OECreateIUPACName

std::string OECreateIUPACName(const OEChem::OEMolBase &mol,
                              const unsigned char *style=OENamStyleOpenEye)

This function attempts to generate a ‘reasonable’ IUPAC name for the given molecule, mol, and return the result in a string. These ‘reasonable’ names attempts to be one of the recommended IUPAC names for a compound, however occasionally this function may fall back to using IUPAC ‘systematic’ naming for parts of a molecule. Any parts of a molecule that cannot be named result in the substring BLAH appearing in the returned string.

The optional style argument can be used to control and customize the style of the names generated by this function. The nine currently predefined name styles are

After the name has been generated it may be translated into one of several languages, for example using the OEToGerman or OEToJapanese functions, then optionally capitalized using OECapitalizeName, and finally converted into a final character encoding, for example using OEToUTF8 or OEToHTML.