CAS Registry Number
representation.scientific.cas_numberChemical Abstracts Service registry number. Unique numeric identifier for chemical substances. Format: 2-7 digits, hyphen, 2 digits, hyphen, 1 check digit. The check digit is the weighted sum of all preceding digits mod 10, where the rightmost digit before the check has weight 1, next has weight 2, etc.
Worked samples
DuckDB 1.5.5 · finetype 0.6.64
| Value | As VARCHAR | check_digit | part1 | part2 |
|---|---|---|---|---|
| 7732-18-5 | 7732-18-5 | 5 | 7732 | 18 |
| 64-17-5 | 64-17-5 | 5 | 64 | 17 |
| 50-78-2 | 50-78-2 | 2 | 50 | 78 |
| 7647-14-5 | 7647-14-5 | 5 | 7647 | 14 |
| 67-56-1 | 67-56-1 | 1 | 67 | 56 |
| 71-43-2 | 71-43-2 | 2 | 71 | 43 |
Shape
^\d{2,7}-\d{2}-\d$| Value | Length | Shape |
|---|---|---|
| 7732-18-5 | 9 | matches |
| 64-17-5 | 7 | matches |
| 50-78-2 | 7 | matches |
| 7647-14-5 | 9 | matches |
| 67-56-1 | 7 | matches |
| 71-43-2 | 7 | matches |
| 7732-18- | 8 | rejected: one character short |
Told apart
1 of the 6 other scientific types accept every one of these samples on shape alone.
- SMILES Notationmatches them by pattern
Background
Origin
CAS Registry Numbers are assigned by the Chemical Abstracts Service (CAS) in the US.[1] The CAS Chemical Registry System became operational in 1965.[1] CAS says its Registry Numbers have set the standard for identifying chemical substances since 1965.[2]
CAS describes a CAS Registry Number as a unique and unambiguous identifier for a specific substance.[2] A CAS Registry Number can contain up to 10 digits, divided by hyphens into three parts.[2] The first part of a CAS Registry Number has 2 to 7 digits, the second part has 2 digits, and the final part is a single check digit.[3] The CAS check digit is found by multiplying the other digits, from right to left, by 1, 2, 3 and so on, adding the products and taking the sum modulo 10.[1] For water, 7732-18-5, the weighted sum is 105, and 105 mod 10 gives the check digit 5.[1] The three-part format gives CAS a maximum capacity of 1,000,000,000 unique numbers.[1]
A CAS Registry Number has no inherent meaning and is assigned in sequential, increasing order.[1] A CAS Registry Number carries no chemical or structural meaning in itself.[4] The University of Texas at Austin's chemistry guide notes that the shorter the first segment, the older the registration.[4]
Use
CAS says governmental agencies rely on CAS Registry Numbers for substance identification in regulatory applications.[2] Almost all molecule databases allow searching by CAS Registry Number.[1] A column of CAS numbers is worth treating as a join key, since matching on chemical names across sources is far less dependable. (Meridian's view)
The US EPA warns that when its TSCA Inventory CSV is opened in Excel, CAS Registry Numbers in the CASRN column may be changed to dates.[5] The US EPA advises importing the TSCA Inventory CSV through Excel's Data tab and its From Text/CSV option to prevent that conversion.[5] The EPA's TSCA Inventory carries a second field, casregno, holding the CAS Registry Number without dashes.[5] Keep CAS numbers as text from the moment you read them, and if a file has already been through a spreadsheet, look for values that have turned into dates before trusting the column. (Meridian's view) Validate each value with the check digit as well as the pattern, since a well-shaped number with a typo will still look right. (Meridian's view) A check digit that passes shows the number is well formed, not that it names the substance you expect, so confirm important identifiers against a lookup. (Meridian's view)
Where you'll meet it
The US EPA's downloadable TSCA Inventory identifies its non-confidential chemical substance listings by CAS Registry Number and CA Index Name.[5] CAS Common Chemistry, an open community resource for accessing chemical information, covers nearly 500,000 chemical substances.[6]
Sources
- [1]CAS Registry Number - Wikipediasecondary source
- [2]CAS REGISTRY | CASorganisation
- [3]Check Digit Verification of CAS Registry Numbers | CASdocumentation
- [4]Chemical Info Sources - Chemistry - LibGuides at University of Texas at Austinsecondary source
- [5]How to Access the TSCA Inventory | US EPAdataset
- [6]CAS Common Chemistryorganisation
Detection notes
New in taxonomy expansion. CAS numbers are the global standard for chemical substance identification. Over 200 million substances registered. Check digit algorithm: number all digits right-to-left (excluding check), multiply each by its position, sum, mod 10. Water=7732-18-5, Ethanol=64-17-5.
Use it
$ finetype infer -i "7732-18-5" --mode column
→ representation.scientific.cas_number
SELECT ft_infer('7732-18-5');
-- → 'representation.scientific.cas_number'CAST({col} AS VARCHAR)Schema
https://meridian.online/schemas/representation.scientific.cas_number · Frictionless type string
finetype taxonomy representation.scientific.cas_number -o json-schema