use of org.openscience.cdk.smiles.smarts.SMARTSQueryTool in project cdk by cdk.
the class RecursiveTest method testRecursive28_cdkAromaticModel.
@Test
public void testRecursive28_cdkAromaticModel() throws Exception {
SMARTSQueryTool sqt = smarts("[NX3;H2,H1;!$(NC=O)]");
IAtomContainer smi = smiles("Cc1ccc[n+]2c1[nH]cc(c2=O)c1n[nH]nn1");
sqt.setAromaticity(new Aromaticity(ElectronDonation.cdk(), Cycles.cdkAromaticSet()));
AtomContainerManipulator.percieveAtomTypesAndConfigureAtoms(smi);
int[] result = SMARTSSearchTest.match(sqt, smi);
Assert.assertEquals(1, result[0]);
Assert.assertEquals(1, result[1]);
}
use of org.openscience.cdk.smiles.smarts.SMARTSQueryTool in project cdk by cdk.
the class RecursiveTest method testRecursiveSmarts26.
@Test
public void testRecursiveSmarts26() throws Exception {
SMARTSQueryTool sqt = smarts("[NX3;H2,H1;!$(NC=O)]");
IAtomContainer smi = smiles("CCCc1cc(=O)nc([nH]1)S");
int[] result = SMARTSSearchTest.match(sqt, smi);
Assert.assertEquals(0, result[0]);
Assert.assertEquals(0, result[1]);
}
use of org.openscience.cdk.smiles.smarts.SMARTSQueryTool in project cdk by cdk.
the class RecursiveTest method testRecursive29.
@Test
public void testRecursive29() throws Exception {
SMARTSQueryTool sqt = smarts("[NX3;H2,H1;!$(NC=O)]");
IAtomContainer smi = smiles("Cc1cc(=O)c(c[nH]1)C(=O)NC(c1ccc(cc1)O)C(=O)NC1C(=O)N2C1SCC(=C2C(=O)O)CSc1nnnn1C");
int[] result = SMARTSSearchTest.match(sqt, smi);
Assert.assertEquals(0, result[0]);
Assert.assertEquals(0, result[1]);
}
use of org.openscience.cdk.smiles.smarts.SMARTSQueryTool in project cdk by cdk.
the class SMARTSSearchTest method testPropertyR2.
@Test
public void testPropertyR2() throws Exception {
SMARTSQueryTool sqt = smarts("[R2]");
// default for daylight
sqt.useSmallestSetOfSmallestRings();
int[] results = match(sqt, smiles("COc1cc2c(ccnc2cc1)C(O)C4CC(CC3)C(C=C)CN34"));
Assert.assertEquals(6, results[0]);
Assert.assertEquals(6, results[1]);
}
use of org.openscience.cdk.smiles.smarts.SMARTSQueryTool in project cdk by cdk.
the class SMARTSSearchTest method testLogicalOrLowAnd6_cdkAromaticity.
@Test
public void testLogicalOrLowAnd6_cdkAromaticity() throws Exception {
SMARTSQueryTool sqt = smarts("[#7,C;+0,+1]");
IAtomContainer smi = smiles("[Na+].[Na+].[O-]C(=O)c1ccccc1c2c3ccc([O-])cc3oc4cc(=O)ccc24");
sqt.setAromaticity(new Aromaticity(ElectronDonation.cdk(), Cycles.cdkAromaticSet()));
AtomContainerManipulator.percieveAtomTypesAndConfigureAtoms(smi);
int[] results = match(sqt, smi);
Assert.assertEquals(8, results[0]);
}
Aggregations