How can I convert a list of CAS IDs to structures (SMILES)? I have been trying Chemspider API, PubChem and the chemical identifier Resolver but there are still some IDs I can't find the structure. One example is 166177-30-6.
-
1$\begingroup$ I've been consistently successful with CAS' at chem.nlm.nih.gov/chemidplus $\endgroup$– mykhalCommented Jun 8, 2020 at 13:49
-
$\begingroup$ 166177-30-6 resist to chem.nlm.nih.gov/chemidplus for example :) $\endgroup$– BNDCommented Jun 8, 2020 at 20:37
-
1$\begingroup$ PubChem has been a great resource for looking up structure (and other) information by CAS Registry Number. My search for 138683-67-7 yields a result: pubchem.ncbi.nlm.nih.gov/compound/2947 You can also search PubChem programmatically in python, for example, with just a few lines of code to retrieve the data from a list. $\endgroup$– BalooRMCommented Jun 8, 2020 at 23:09
-
$\begingroup$ Yeah, PubChem seems to the most extensive. chem.nlm.nih.gov/chemidplus may also be relying on PubChem in the background. However, 166177-30-6 is not on PubChem. $\endgroup$– BNDCommented Jun 9, 2020 at 6:32
-
$\begingroup$ I did a Google search of 166177-30-6 and found a single hit from a German specialty synthesis company. It is possible that this CAS RN is a custom medicinal chemistry intermediate. This could explain why it does not appear in PubChem and other resources. Other than going straight to CAS, options may be limited. A full-text patent search is a possibility. At least the CAS RN provides a distinct search term. $\endgroup$– BalooRMCommented Jun 9, 2020 at 15:23
1 Answer
First you should check if the CAS registry number is numerically plausible. ACS outlines this by
The CAS Registry Number may be written in a general form as:
$N_i....N_4N_3 - N_2N_1 - R $
in which $R$ represents the check digit and $N$ represents a fundamental sequential number. The check digit is derived from the following formula
$$\frac{iN_i + \ldots + 4N_4 + 3N_3 + 2N_2 + 1N_1}{10} = Q + \frac{R}{10}$$
in which $Q$ represents an integer which is discarded.
This check can be automated. Richard L. Apodaca for instance wrote a portable Ruby script:
module CAS
def validate cas_number
return false unless cas_number && cas_number.match(/[0-9]{2,7}-[0-9]{2}-[0-9]/)
check_digit = cas_number[-1,1].to_i
sum = 0
cas_number.reverse.scan(/[0-9]/).each_with_index do |digit, i|
sum = sum + digit.to_i * i
end
check_digit == sum.remainder(10)
end
end
include CAS
while true do
print "CAS Number: "
cas_number = gets.strip
break if cas_number.empty?
puts CAS.validate(cas_number) ? "valid" : "invalid"
end
Then a query in a database is reasonable, though eventually only CAS is the authoritative body to assign (and withdraw) this book keeping identifier (which, contrasting to e.g. a SMILES string, doesn't retain chemical information). Chemical abstracts (as printed resource), or SciFinder Scholar (as an electronic interface to the records) were/are subscription based. This key number still might be not assigned, or one which no longer is actively used (at least by CAS). See for instance the entry about titania, or the polymorphs of rutile and anatase on CAS' common chemistry which all share the Hill formula $\ce{TiO2}$. In case your compound is commercialized, applications like openenventory can resolve a CAS number into a chemical name and structure.