Question about SMARTS of OMe superatom

User f05f6b8c05

02-02-2012 14:10:42

Hi,


If I draw OMe superatom in MarvinSketch 5.4.1.1 (run on XP, served from Solaris) and save as a SMARTS, I get:


[#6]O


Is that correct?  Doesn't #6 mean that the carbon can be aromatic?  I would expect a SMARTS of just CO.


Am I mistaken?


Thanks for any guidance.


Andrew

ChemAxon 25dcd765a3

06-02-2012 14:16:02

Hi,


During export we ungroup these sgroups (as SMILES/SMARTS formats not able to handle sgroups) and so we are not able to differentiate this structure (OMe) from O-C query structure where the carbon can be part of an aromatic ring. Such a way we generate [#6]O, where O with a single bond surely cannot be aromatic, but the Carbon atom can be a member of an aromatic ring.


I hope this helps


Andras

User f05f6b8c05

07-02-2012 12:33:09

Thank you for your reply.  Our goal is that if we find a superatom called "OMe" in a compound,  then we want to be sure it is connected with exact methyl ether structure and not some other structure.  How would you suggest that we do this with the API?


We find superatoms in structures using below API code.


Thanks.


 


Given Molecule mol ...


 


Sgroup[] sgs = mol.getSgroupArray();


for (int i=0; i<sgs.length; ++i) {


if (sgs.getType()==Sgroup.ST_SUPERATOM) {


   SuperatomSgroup sasg = (SuperatomSgroup)sgs;


   String name = sasg.getSuperAtom().getSymbol();


   Molecule csg_mol = new Molecule();


   Sgroup csg = sgs.createMolecule(csg_mol);


   csg_mol.expandSgroups();


    // if I know name is "OMe", what is best way to confirm expanded Sgroup is truly -O-CH3?


   String smiless = csg_mol.toFormat("smiles");


   String smartss = csg_mol.toFormat("smarts");


}


}


 

ChemAxon 25dcd765a3

09-02-2012 15:31:46

You can convert the implicit Hydrogen atoms to explicit ones which as far as I see solves this problem.


for (int i = 0; i < sgs.length; ++i) {
        if (sgs.getType() == Sgroup.ST_SUPERATOM) {
        SuperatomSgroup sasg = (SuperatomSgroup) sgs;
        String name = sasg.getSuperAtom().getSymbol();
        Molecule csg_mol = new Molecule();
        Sgroup csg = sgs.createMolecule(csg_mol);
        csg_mol.expandSgroups();

        csg_mol.addExplicitHydrogens(0);

        // if I know name is "OMe", what is best way to confirm expanded
        // Sgroup is truly -O-CH3?
        String smiless = csg_mol.toFormat("smiles");
        String smartss = csg_mol.toFormat("smarts");
        System.out.println(smiless+" "+smartss);
        }
    }

the smiles and smarts strings will be the same:


[H]C([H])([H])O     (smiles)


[H]C([H])([H])O     (smarts)


 


I hope this helps


 


PS: If you use the latest Marvin addExplicitHydrogens is deprecated, please use chemaxon.calculations.hydrogenize.Hydrogenize#addHAtoms(csg_mol, null, 0)


Andras

User f05f6b8c05

10-02-2012 11:15:22

Thanks!