# SMILES string convertors

I'm new to SMILES strings, and have noticed that they're not standardised.

Firstly, what is the reason for different structures of SMILES strings to represent the same compound? Why not have a standardised format?

Secondly, are there any tools to convert between different SMILES strings for a given molecule?

SMILES doesn't define a particular order in which the atoms show up in the string. Hence the position in the molecule where software starts printing will determine the string. E.g. for CO2:

• Ketcher prints C(=O)=O (starts with C and considers one of the O's a branch)
• MarvinJS prints O=C=O (starts iteration with O, hence no branching)

Both of these representations are valid, they simply start with different elements. Each tool would recognize SMILES string generated by another tool, so there's no need to convert between strings created by different software.

In order to make different tools generate the same string a so called Canonical SMILES was developed. Not every tool can generate it, but if they do - they'll spit out the same string (in theory).

• Thanks Stanislav, that's really helpful. Useful to understand the different structures, and that Canonical SMILES exists. I'm interested in a converter for a different reason (expanding a machine learning dataset, where it's valid to have more than one SMILES representation for a specific molecule), but I'm guessing as different software recognises strings generated by another tool, there's no demand for such a convertor and one therefore doesn't exist? – GEOGrey Jun 12 '20 at 8:33
• @GEOGrey, yeah, there's no need for such converter. For the dataset you better clean it first before feeding it to the algorithm. So all the SMILES that you get you should convert to the same form (regardless if it's Canonical). If you use some specific library (CDK, OpenEye) they'll probably generate the same SMILES string for the same molecule. – Stanislav Bashkyrtsev Jun 12 '20 at 8:38

Rdkit, which is widely used in cheminformatics, can generate a list of valid smiles strings for a given molecule. That sounds like exactly what you are looking for. More info found here: https://iwatobipen.wordpress.com/2018/11/15/generate-possible-list-of-smlies-with-rdkit-rdkit/