converting in mol with the right bond topology

User 779e37e0e6

10-11-2011 18:47:50

Hi all,


 


I have been workin with ChemAxon for a while. I just noticed something really bad while checking some of my results. I noticed that the bond topology (second last column from the left in the bond list) is not  translated the right way when I convert a smiles into a mol file. For example, If I convert a smiles string of the molecule 2,3-oxolane diol(right molecule in the attached file) in mol, the bond topology of every single is translated to 0 (meaning either ring or chain). Even the bonds that are forming the oxolane ring (the value should be 2).The same for the bonds in a chain (value should be 1).


One consequence is that when doing substructure search, glycerol (left molecule in the attached file), which is acyclic, is returned as a substructure of "2,3-oxolane diol". When I manually edited the mol file for glycerol, I specified all the bond types and topology (but I did not want to include the explicit hydrogen).The substructure search tool checks those bond parameters to compare the two molecules.Thus, in theory, the bond joining 2 atoms in a ring (of a molecule 1) is not matched to a similar bond joining the same two atoms in a chain (in the other molecule 2)


However, since the topology of the bonds  in the mol file generated automatically by molconvert is 0 (either ring or chain). My question is, is there an option that allows me to convert a smiles string into a .mol file but in a way that it respect the bond topology (not the stereochemistry)? I need the tool to automatically generate those for query molecules before doing some further processing.


 


I understand that in general, this should not be a default, but if there is an option, that would be helpful.


I really urgently need your help and would be glad hearing from you soon.


Regards,


Y. D.

ChemAxon 990acf0dec

18-11-2011 17:06:14

Hi Yan,


First of all, sorry for the late reply. I moved your question to the appropriate forum (Structure representation); you will get an answer here soon.


Best regards,


Akos

ChemAxon d26931946c

21-11-2011 12:29:00

Hi Yan,


 


We treat bond topology as a query property. There is no option for calculate and store it in molconvert.


However this piece of code calculates and stores the information in the bonds, and the resulting mol file has the correct bond topology information.


public static void main(String[] arg) throws IOException, Exception {
    MolImporter mi = new MolImporter(arg[0]);
    MolExporter me = new MolExporter(new FileOutputStream(arg[0]+".mol"), "mol");
    Molecule mol;
    while ((mol = mi.read()) != null) {
        TopologyAnalyserPlugin tap = new TopologyAnalyserPlugin();
        tap.setMolecule(mol);
        for (int i = 0; i < mol.getBondCount(); i++) {
        mol.getBond(i).setFlags(
        tap.isRingBond(i) ? MolBond.TOPOLOGY_RING
                    : MolBond.TOPOLOGY_CHAIN,
                MolBond.TOPOLOGY_MASK);
        }
        me.write(mol);
    }
    me.close();
    }

If this solution is not good for you we will consider to introduce a new option to Mol format export.


Best regards,


Peter

ChemAxon 25dcd765a3

21-11-2011 15:38:51

Hi,


We definitely want to import Glycerol (left) as a substructure of 2,3-oxolane diol (right).


In the SMILES/SMARTS string OCC(O)CO, according to the SMILES definition these atoms can be either in ring or chain as well. So we don't want to make any restriction about the chain/ring topology. I think that would generate problem as it would be impossible to find rings defined by a part of the ring atoms. For example SMILES/SMARTS "C" would not match cyclohexane ring.


To define that these atoms are in ring/chain one can use the 'R' or 'r' atomic primitives in SMARTS format.


All the best


Andras

User 779e37e0e6

22-02-2012 17:49:17

Hi everybody,


Thanks for your support.


To Andras: " So we don't want to make any restriction about the chain/ring topology. I think that would generate problem as it would be impossible to find rings defined by a part of the ring atoms"


>> This is right. However, depending on the application one wants to perform, it would be useful to have an option to conserve the bond topology when converting from smiles to mol file. It helps for example in the classification of molecules. I would like to avoid using SMARTS here, for computation time purposes. On a long run, it would be easier to convert substructures in mol and just do a simple substructure search with only mol files.


 


To Peter: "If this solution is not good for you we will consider to introduce a new option to Mol format export." 


>> That would be awesome. Please let us know if it is done.


Regards,


 


Yannick


 

ChemAxon d26931946c

27-02-2012 09:47:51

Dear Yannick,


 


Why SMARTS causes computation time problems for you? 


 


We decided not to implement this export option, because converting files should not add a query property to the molecules.


 


Best regards,


Peter