Page tree
Skip to end of metadata
Go to start of metadata

SMILES/SMARTS with additional information

Information stored after the SMILES string separated by space or tab character are treated as molecule field. (According to the SMILES definition they can be ignored or used as comment.) More molecule fields can be stored after the first one but they should be separated by tab character (to allow space in the data field). The newline and tab characters are escaped during export. By default the first additional information is the molecule name. However, the molecule name is never considered as a field, it is a special property of the molecule. After that more informations can be stored as fields in field_1, field_2, etc. The default behavior can be overridden by import option f, eg: import option "fid,flogP" imports the first field as "id" and the next one as "pKa".

Example

Smiles file containing the following line (note the separator characters are tabs):

CC ethane   1   1.35

By default imported as a methane molecule with molecule name: ethane, with data field_1: 1 and data field_2: 1.35.
With import option "fname,fid,flogP" it is imported as a methane molecule with molecule name: ethane, with id: 1 and logP: 1.35.

SMILES/SMARTS files with header

As SMILES format does not support to save additional information stored in the molecule, Chemaxon adds a header line to the smiles file, if the export of these additional information is requested by T option.
The header files starts with the '#' character followed by the file format string "SMILES" or "SMARTS" and the field names separated by tab characters. The lines followed by the header contains the smiles/smarts string and the field data separated by tab characters.

Examples

Smiles file (1.smi) containing the following line (note the separator characters are tabs):

CC ethane   1   1.35
  • Exported to smiles format (molconvert smiles 1.smi):

    CC
  • Exported to smiles format with export option T* (molconvert smiles:T\* 1.smi) results in:
    #SMILES name    field_1 field_2
    CC      ethane  1       1.35
  • With import option "fname,fid,flogP" and export option T* (molconvert smiles:T\* "1.smi{fname,fid,flogP}") results in:
    #SMILES name    id      logP
    CC      ethane  1       1.35
 
  • No labels