On Tue, Oct 4, 2011 at 2:07 PM, gilleain torrance
<[email protected]> wrote:
> It seems like the problem is with the SMILESReader. Where your code has :
>
> SMILESReader sr = new SMILESReader(new StringReader(structure));
> MoleculeSet set = (MoleculeSet) sr.read(builder.newMoleculeSet());
> mol = set.getMolecule(0);
>
> you could use instead:
>
> SmilesParser parser = new SmilesParser(builder);

Agreed... if you are not working with File's or InputStream's, just
use the SmilesParser.

> parser.setPreservingAromaticity(true);
> mol = parser.parseSmiles(structure);
> AtomContainerManipulator.percieveAtomTypesAndConfigureAtoms(mol);

Ah, a recent patch (well, about a year ago:
ae21ee2e39c61ae6d1c6aaf7f8919c0fb40170b3) caused atom typing to be not
perceived when aromaticity is not perceived. I puzzled why I was happy
with that change... I'll cook up a patch to ensure that atom types are
again perceived, even when aromaticity is taking literally from the
SMILES string.

> which will preserve the double-bond structure in your smiles.

That is weird, as I think that should be preserved anyway, because the
CDK uses a flag to indicate that a IBond is aromatic, not the actual
bond order...

Egon

-- 
Dr E.L. Willighagen
Postdoctoral Researcher
Institutet för miljömedicin
Karolinska Institutet (http://ki.se/imm)
Homepage: http://egonw.github.com/
LinkedIn: http://se.linkedin.com/in/egonw
Blog: http://chem-bla-ics.blogspot.com/
PubList: http://www.citeulike.org/user/egonw/tag/papers

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
Cdk-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cdk-user

Reply via email to