OECreateCanSmiString¶

void OECreateCanSmiString(std::string &str, const OEMolBase &mol)


Creates a canonical SMILES string representing a given molecule, but without isotopic labeling or stereochemistry. This function is just a special case of the OECreateSmiString function, called with the flavor OESMILESFlag.DEFAULT.

Note

This function produces what Daylight Chemical Information Systems term a unique SMILES.

Note that the canonical SMILES generated by this function remains dependent on the state of the molecule, especially its aromaticity state (see examples in Aromaticity Models in OEChem TK section). Thus, to generate a canonical smiles suitable for purposes such as a database key, the user must assure that the state of the molecule has been standardized. In particular, aromaticity should be perceived according to the preferred model.

In contrast, the high-level output function OEWriteMolecule, when writing the canonical SMILES format (OEFormat.CAN) does invoke OEFindRingAtomsAndBonds and OEAssignAromaticFlags.