Custom Dictionary in Name Import

    It is possible to extend the name to structure conversion by putting structures with their name in a custom dictionary file. Names present in the custom dictionary will be converted to the corresponding structure. The custom dictionary has precedence over the standard Name to Structure conversion.

    The default location for the custom dictionary is a file named custom_names.smi inside the ChemAxon configuration folder.

    The ChemAxon configuration folder is a location on disk where configuration is stored for various ChemAxon products. The location of this folder depends on the operating system used:

    • Windows Vista or above: C:\Users\ USERNAME \chemaxon

    • Windows XP: C:\Documents and Settings\ USERNAME \chemaxon

    • Linux: /home/ USERNAME /.chemaxon

    • OS X: /Users/ USERNAME /.chemaxon

    Format

    For performance reasons, the dictionary has to be in SMILES format. To use a dictionary in another format, it can be converted to SMILES using molconvert or mview (Save As). In the same way, several dictionaries should be merged into a single dictionary file in SMILES format.

    The dictionary file can be represented in 2 different ways. In the most simple and usual one, each line contains a SMILES and a name field, separated by a tab character. Several names can be specified for the same structure on one line, by separating the names with semicolon characters (;).

    For instance:

    C\C=C\CCC(O)=O  gamma-hexenoic acid

    If there are named properties in the file, the NAME field will be used. For instance:

    #SMILESEXACT_MASSNAME
    
    C\C=C\CCC(O)=O114.1424  gamma-hexenoic acid

    You can download this example custom dictionary to test this feature, and to use as a template. Once this dictionary is installed correctly, you need to restart the ChemAxon application you are using (for instance Marvin Sketch, Instant JChem or JChem for Excel). You should now be able to convert the following custom IDs: CXN000001 through CXN000008, and aspirin in four extra languages: 阿司匹林 (Chinese), アスピリン (Japanese), 아스피린 (Korean) and аспири́н (Russian). Note that the foreign names will only work with version 5.12 or later.

    Preventing a name from being converted

    If a name is converted by name to structure but is not desired, it can be blocked using the custom dictionary. This can be useful for instance with names like ATP, which have a chemical meaning (adenosine triphosphate), but also unrelated non-chemical meanings. To block it, use such a line in the custom dictionary:

    [IGNORE]    ATP

    Using a different location for the dictionary

    Path of the custom dictionary file can be changed from API or console by using the dict format option:

    API

    Molecule mol = MolImporter.importMol("CUSTOMNAME", "name:dict=PATH");

    Command line

    molconvert smiles -s CUSTOMNAME -f name:dict=PATH