If I try and match [NH2]c1ncncc1 against the molecule read in from the attached SDF file, I get no hits. But if I convert the file to SMILES and then match it works. Hereis example code:
String filename = "/Users/guhar/src/cdkpcore/ligand3BIY.sdf"; InputStream ins = new FileInputStream(new File(filename)); DefaultChemObjectReader reader = new MDLV2000Reader(ins); ChemFile content; content = (ChemFile) reader.read((ChemObject) new ChemFile()); List<IAtomContainer> cList = ChemFileManipulator.getAllAtomContainers(content); IAtomContainer atomContainer = cList.get(0); CDKHydrogenAdder.getInstance(DefaultChemObjectBuilder.getInstance()).addImplicitHydrogens(atomContainer); AtomContainerManipulator.convertImplicitToExplicitHydrogens(atomContainer);
// SmilesParser sp = new SmilesParser(DefaultChemObjectBuilder.getInstance());
// IAtomContainer atomContainer = sp.parseSmiles("O=P(=O)(OP(=O)(=O)OCC(C)(C)C(O)C(=O)NCCC(=O)NCCSCC(=O)NCCCCC(NC(=O)C)C(=O)N)OCC1C(C(C(O1)n2c3c(nc2)c(ncn3)N)O)OP(=O)(=O)=O");
SMARTSQueryTool sqt = new SMARTSQueryTool("[NH2]c1ncncc1");
boolean status = sqt.matches(atomContainer);
Assert.assertEquals(true, status);
int nmatch = sqt.countMatches(); int nqmatch = sqt.getUniqueMatchingAtoms().size(); Assert.assertEquals(1, nmatch); Assert.assertEquals(1, nqmatch);
Probably an aromaticity problem.
Regards,
John W May
john.wilkinsonmay@gmail.com
On 11 August 2016 at 12:15, Egon Willighagen egonw@users.sf.net wrote:
Related
Bugs:
#1172The problem is resolved in master.
Unfortunately I can't remember nmy sf.net login to go and close the bug.
Can you close it for me?
On Thu, Aug 11, 2016 at 7:15 AM, Egon Willighagen egonw@users.sf.net
wrote:
--
Rajarshi Guha | http://blog.rguha.net
NIH Center for Advancing Translational Science
Related
Bugs:
#1172Rajarshi, can you check if this bug still exists? It probably is fixed...