torchcell.datamodels.identity.compound_identity_key
- compound_identity_key(compound: Compound) str[source]
The join key for a compound, as
"<field>:<value>".Precedence:
inchikey, elsechebi_id, elsepubchem_cid, else the normalized lowercasename(normalize_compound_name, the same folding the environment collision check uses, so ‘NaCl’ and ‘sodium chloride’ agree even with no identifier on either side). The field name is part of the key, so a name that happens to be spelled like an InChIKey cannot collide with a real one.