use of org.openscience.cdk.AtomContainer in project cdk by cdk.
the class ChiChainDescriptorTest method testDan80.
@Test
public void testDan80() throws Exception {
IAtomContainer mol = new AtomContainer();
IAtom a1 = mol.getBuilder().newInstance(IAtom.class, "C");
a1.setPoint2d(new Point2d(0.0, 1.5));
mol.addAtom(a1);
IAtom a2 = mol.getBuilder().newInstance(IAtom.class, "C");
a2.setPoint2d(new Point2d(0.0, 0.0));
mol.addAtom(a2);
IAtom a3 = mol.getBuilder().newInstance(IAtom.class, "C");
a3.setPoint2d(new Point2d(-1.4265847744427305, -0.46352549156242084));
mol.addAtom(a3);
IAtom a4 = mol.getBuilder().newInstance(IAtom.class, "C");
a4.setPoint2d(new Point2d(-2.3082626528814396, 0.7500000000000002));
mol.addAtom(a4);
IAtom a5 = mol.getBuilder().newInstance(IAtom.class, "O");
a5.setPoint2d(new Point2d(-1.42658477444273, 1.9635254915624212));
mol.addAtom(a5);
IBond b1 = mol.getBuilder().newInstance(IBond.class, a2, a1, IBond.Order.DOUBLE);
mol.addBond(b1);
IBond b2 = mol.getBuilder().newInstance(IBond.class, a3, a2, IBond.Order.SINGLE);
mol.addBond(b2);
IBond b3 = mol.getBuilder().newInstance(IBond.class, a4, a3, IBond.Order.DOUBLE);
mol.addBond(b3);
IBond b4 = mol.getBuilder().newInstance(IBond.class, a5, a4, IBond.Order.SINGLE);
mol.addBond(b4);
IBond b5 = mol.getBuilder().newInstance(IBond.class, a5, a1, IBond.Order.SINGLE);
mol.addBond(b5);
DoubleArrayResult ret = (DoubleArrayResult) descriptor.calculate(mol).getValue();
Assert.assertEquals(0.0000, ret.get(0), 0.0001);
Assert.assertEquals(0.0000, ret.get(1), 0.0001);
Assert.assertEquals(0.1768, ret.get(2), 0.0001);
Assert.assertEquals(0.0000, ret.get(3), 0.0001);
Assert.assertEquals(0.0000, ret.get(5), 0.0001);
Assert.assertEquals(0.0000, ret.get(6), 0.0001);
Assert.assertEquals(0.04536, ret.get(7), 0.00001);
Assert.assertEquals(0.0000, ret.get(8), 0.0001);
}
use of org.openscience.cdk.AtomContainer in project cdk by cdk.
the class ChiChainDescriptorTest method testDan82.
@Test
public void testDan82() throws Exception {
IAtomContainer mol = new AtomContainer();
IAtom a1 = mol.getBuilder().newInstance(IAtom.class, "C");
a1.setPoint2d(new Point2d(0.0, 1.5));
mol.addAtom(a1);
IAtom a2 = mol.getBuilder().newInstance(IAtom.class, "C");
a2.setPoint2d(new Point2d(0.0, 0.0));
mol.addAtom(a2);
IAtom a3 = mol.getBuilder().newInstance(IAtom.class, "C");
a3.setPoint2d(new Point2d(-1.4265847744427305, -0.46352549156242084));
mol.addAtom(a3);
IAtom a4 = mol.getBuilder().newInstance(IAtom.class, "C");
a4.setPoint2d(new Point2d(-2.3082626528814396, 0.7500000000000002));
mol.addAtom(a4);
IAtom a5 = mol.getBuilder().newInstance(IAtom.class, "O");
a5.setPoint2d(new Point2d(-1.42658477444273, 1.9635254915624212));
mol.addAtom(a5);
IBond b1 = mol.getBuilder().newInstance(IBond.class, a2, a1, IBond.Order.SINGLE);
mol.addBond(b1);
IBond b2 = mol.getBuilder().newInstance(IBond.class, a3, a2, IBond.Order.DOUBLE);
mol.addBond(b2);
IBond b3 = mol.getBuilder().newInstance(IBond.class, a4, a3, IBond.Order.SINGLE);
mol.addBond(b3);
IBond b4 = mol.getBuilder().newInstance(IBond.class, a5, a4, IBond.Order.SINGLE);
mol.addBond(b4);
IBond b5 = mol.getBuilder().newInstance(IBond.class, a5, a1, IBond.Order.SINGLE);
mol.addBond(b5);
DoubleArrayResult ret = (DoubleArrayResult) descriptor.calculate(mol).getValue();
Assert.assertEquals(0.0000, ret.get(0), 0.0001);
Assert.assertEquals(0.0000, ret.get(1), 0.0001);
Assert.assertEquals(0.1768, ret.get(2), 0.0001);
Assert.assertEquals(0.0000, ret.get(3), 0.0001);
Assert.assertEquals(0.0000, ret.get(5), 0.0001);
Assert.assertEquals(0.0000, ret.get(6), 0.0001);
Assert.assertEquals(0.06804, ret.get(7), 0.00001);
Assert.assertEquals(0.0000, ret.get(8), 0.0001);
}
use of org.openscience.cdk.AtomContainer in project cdk by cdk.
the class ChiClusterDescriptorTest method testDan64.
@Test
public void testDan64() throws Exception {
IAtomContainer mol = new AtomContainer();
IAtom a1 = mol.getBuilder().newInstance(IAtom.class, "C");
a1.setPoint2d(new Point2d(0.7500000000000004, 2.799038105676658));
mol.addAtom(a1);
IAtom a2 = mol.getBuilder().newInstance(IAtom.class, "C");
a2.setPoint2d(new Point2d(0.0, 1.5));
mol.addAtom(a2);
IAtom a3 = mol.getBuilder().newInstance(IAtom.class, "C");
a3.setPoint2d(new Point2d(0.0, 0.0));
mol.addAtom(a3);
IAtom a4 = mol.getBuilder().newInstance(IAtom.class, "O");
a4.setPoint2d(new Point2d(-1.2990381056766582, 0.7500000000000001));
mol.addAtom(a4);
IBond b1 = mol.getBuilder().newInstance(IBond.class, a2, a1, IBond.Order.SINGLE);
mol.addBond(b1);
IBond b2 = mol.getBuilder().newInstance(IBond.class, a3, a2, IBond.Order.SINGLE);
mol.addBond(b2);
IBond b3 = mol.getBuilder().newInstance(IBond.class, a4, a3, IBond.Order.SINGLE);
mol.addBond(b3);
IBond b4 = mol.getBuilder().newInstance(IBond.class, a4, a2, IBond.Order.SINGLE);
mol.addBond(b4);
DoubleArrayResult ret = (DoubleArrayResult) descriptor.calculate(mol).getValue();
Assert.assertEquals(0.2887, ret.get(0), 0.0001);
Assert.assertEquals(0.0000, ret.get(1), 0.0001);
Assert.assertEquals(0.0000, ret.get(2), 0.0001);
Assert.assertEquals(0.0000, ret.get(3), 0.0001);
Assert.assertEquals(0.1667, ret.get(4), 0.0001);
Assert.assertEquals(0.0000, ret.get(5), 0.0001);
Assert.assertEquals(0.0000, ret.get(6), 0.0001);
Assert.assertEquals(0.0000, ret.get(7), 0.0001);
}
use of org.openscience.cdk.AtomContainer in project cdk by cdk.
the class ChiPathClusterDescriptorTest method testDan64.
@Test
public void testDan64() throws Exception {
IAtomContainer mol = new AtomContainer();
IAtom a1 = mol.getBuilder().newInstance(IAtom.class, "C");
a1.setPoint2d(new Point2d(0.7500000000000004, 2.799038105676658));
mol.addAtom(a1);
IAtom a2 = mol.getBuilder().newInstance(IAtom.class, "C");
a2.setPoint2d(new Point2d(0.0, 1.5));
mol.addAtom(a2);
IAtom a3 = mol.getBuilder().newInstance(IAtom.class, "C");
a3.setPoint2d(new Point2d(0.0, 0.0));
mol.addAtom(a3);
IAtom a4 = mol.getBuilder().newInstance(IAtom.class, "O");
a4.setPoint2d(new Point2d(-1.2990381056766582, 0.7500000000000001));
mol.addAtom(a4);
IBond b1 = mol.getBuilder().newInstance(IBond.class, a2, a1, IBond.Order.SINGLE);
mol.addBond(b1);
IBond b2 = mol.getBuilder().newInstance(IBond.class, a3, a2, IBond.Order.SINGLE);
mol.addBond(b2);
IBond b3 = mol.getBuilder().newInstance(IBond.class, a4, a3, IBond.Order.SINGLE);
mol.addBond(b3);
IBond b4 = mol.getBuilder().newInstance(IBond.class, a4, a2, IBond.Order.SINGLE);
mol.addBond(b4);
DoubleArrayResult ret = (DoubleArrayResult) descriptor.calculate(mol).getValue();
Assert.assertEquals(0.0000, ret.get(0), 0.0001);
Assert.assertEquals(0.0000, ret.get(1), 0.0001);
Assert.assertEquals(0.0000, ret.get(2), 0.0001);
Assert.assertEquals(0.0000, ret.get(3), 0.0001);
Assert.assertEquals(0.0000, ret.get(4), 0.0001);
Assert.assertEquals(0.0000, ret.get(5), 0.0001);
}
use of org.openscience.cdk.AtomContainer in project cdk by cdk.
the class ChiPathDescriptorTest method testDan82.
@Test
public void testDan82() throws Exception {
IAtomContainer mol = new AtomContainer();
IAtom a1 = mol.getBuilder().newInstance(IAtom.class, "C");
a1.setPoint2d(new Point2d(0.0, 1.5));
mol.addAtom(a1);
IAtom a2 = mol.getBuilder().newInstance(IAtom.class, "C");
a2.setPoint2d(new Point2d(0.0, 0.0));
mol.addAtom(a2);
IAtom a3 = mol.getBuilder().newInstance(IAtom.class, "C");
a3.setPoint2d(new Point2d(-1.4265847744427305, -0.46352549156242084));
mol.addAtom(a3);
IAtom a4 = mol.getBuilder().newInstance(IAtom.class, "C");
a4.setPoint2d(new Point2d(-2.3082626528814396, 0.7500000000000002));
mol.addAtom(a4);
IAtom a5 = mol.getBuilder().newInstance(IAtom.class, "O");
a5.setPoint2d(new Point2d(-1.42658477444273, 1.9635254915624212));
mol.addAtom(a5);
IBond b1 = mol.getBuilder().newInstance(IBond.class, a2, a1, IBond.Order.SINGLE);
mol.addBond(b1);
IBond b2 = mol.getBuilder().newInstance(IBond.class, a3, a2, IBond.Order.DOUBLE);
mol.addBond(b2);
IBond b3 = mol.getBuilder().newInstance(IBond.class, a4, a3, IBond.Order.SINGLE);
mol.addBond(b3);
IBond b4 = mol.getBuilder().newInstance(IBond.class, a5, a4, IBond.Order.SINGLE);
mol.addBond(b4);
IBond b5 = mol.getBuilder().newInstance(IBond.class, a5, a1, IBond.Order.SINGLE);
mol.addBond(b5);
DoubleArrayResult ret = (DoubleArrayResult) descriptor.calculate(mol).getValue();
Assert.assertEquals(3.5355, ret.get(0), 0.0001);
Assert.assertEquals(2.5000, ret.get(1), 0.0001);
Assert.assertEquals(1.7678, ret.get(2), 0.0001);
Assert.assertEquals(1.2500, ret.get(3), 0.0001);
Assert.assertEquals(2.9772, ret.get(8), 0.0001);
Assert.assertEquals(1.7272, ret.get(9), 0.0001);
Assert.assertEquals(1.0089, ret.get(10), 0.0001);
Assert.assertEquals(0.5948, ret.get(11), 0.0001);
}
Aggregations