Search in sources :

Example 1 with JPlogPDescriptor

use of org.openscience.cdk.qsar.descriptors.molecular.JPlogPDescriptor in project cdk by cdk.

the class AtomTyperTests method testCarbonylConjugated.

@Test
public void testCarbonylConjugated() throws CDKException {
    JPlogPDescriptor desc = new JPlogPDescriptor();
    IAtomContainer molecule = parseSmiles("c1nnccc1");
    IAtom atom = molecule.getAtom(0);
    assertFalse(desc.jplogp.carbonylConjugated(atom));
    molecule = parseSmiles("C=C=C");
    atom = molecule.getAtom(0);
    assertFalse(desc.jplogp.carbonylConjugated(atom));
    molecule = parseSmiles("CC(=O)C");
    atom = molecule.getAtom(0);
    assertTrue(desc.jplogp.carbonylConjugated(atom));
}
Also used : IAtomContainer(org.openscience.cdk.interfaces.IAtomContainer) JPlogPDescriptor(org.openscience.cdk.qsar.descriptors.molecular.JPlogPDescriptor) IAtom(org.openscience.cdk.interfaces.IAtom) Test(org.junit.Test)

Example 2 with JPlogPDescriptor

use of org.openscience.cdk.qsar.descriptors.molecular.JPlogPDescriptor in project cdk by cdk.

the class AtomTyperTests method testGetOxygenSpecial.

@Test
public void testGetOxygenSpecial() throws CDKException {
    JPlogPDescriptor desc = new JPlogPDescriptor();
    IAtomContainer molecule = parseSmiles("ON");
    IAtom atom = molecule.getAtom(0);
    // DD = 01
    assertEquals(1, desc.jplogp.getOxygenSpecial(atom));
    molecule = parseSmiles("OS");
    atom = molecule.getAtom(0);
    // DD = 02
    assertEquals(2, desc.jplogp.getOxygenSpecial(atom));
    molecule = parseSmiles("OC");
    atom = molecule.getAtom(0);
    // DD = 03
    assertEquals(3, desc.jplogp.getOxygenSpecial(atom));
    molecule = parseSmiles("o1cccc1");
    atom = molecule.getAtom(0);
    // DD = 08
    assertEquals(8, desc.jplogp.getOxygenSpecial(atom));
    molecule = parseSmiles("O=N");
    atom = molecule.getAtom(0);
    // DD = 04
    assertEquals(4, desc.jplogp.getOxygenSpecial(atom));
    molecule = parseSmiles("O=S");
    atom = molecule.getAtom(0);
    // DD = 05
    assertEquals(5, desc.jplogp.getOxygenSpecial(atom));
    molecule = parseSmiles("O=CO");
    atom = molecule.getAtom(0);
    // DD = 06
    assertEquals(6, desc.jplogp.getOxygenSpecial(atom));
    molecule = parseSmiles("O=CN");
    atom = molecule.getAtom(0);
    // DD = 09
    assertEquals(9, desc.jplogp.getOxygenSpecial(atom));
    molecule = parseSmiles("O=CS");
    atom = molecule.getAtom(0);
    // DD = 10
    assertEquals(10, desc.jplogp.getOxygenSpecial(atom));
    molecule = parseSmiles("O=CC");
    atom = molecule.getAtom(0);
    // DD = 07
    assertEquals(7, desc.jplogp.getOxygenSpecial(atom));
}
Also used : IAtomContainer(org.openscience.cdk.interfaces.IAtomContainer) JPlogPDescriptor(org.openscience.cdk.qsar.descriptors.molecular.JPlogPDescriptor) IAtom(org.openscience.cdk.interfaces.IAtom) Test(org.junit.Test)

Example 3 with JPlogPDescriptor

use of org.openscience.cdk.qsar.descriptors.molecular.JPlogPDescriptor in project cdk by cdk.

the class AtomTyperTests method testGetCarbonSpecial.

@Test
public void testGetCarbonSpecial() throws CDKException {
    JPlogPDescriptor desc = new JPlogPDescriptor();
    IAtomContainer molecule = parseSmiles("CC");
    IAtom atom = molecule.getAtom(0);
    // DD = 02
    assertEquals(2, desc.jplogp.getCarbonSpecial(atom));
    molecule = parseSmiles("CO");
    atom = molecule.getAtom(0);
    // DD = 03
    assertEquals(3, desc.jplogp.getCarbonSpecial(atom));
    molecule = parseSmiles("c1ncccc1");
    atom = molecule.getAtom(0);
    // DD = 11
    assertEquals(11, desc.jplogp.getCarbonSpecial(atom));
    molecule = parseSmiles("c1(O)ccccc1");
    atom = molecule.getAtom(0);
    // DD = 05
    assertEquals(5, desc.jplogp.getCarbonSpecial(atom));
    molecule = parseSmiles("c1(O)ncccc1");
    atom = molecule.getAtom(0);
    // DD = 13
    assertEquals(13, desc.jplogp.getCarbonSpecial(atom));
    molecule = parseSmiles("c1ccccc1");
    atom = molecule.getAtom(0);
    // DD = 04
    assertEquals(4, desc.jplogp.getCarbonSpecial(atom));
    molecule = parseSmiles("C=O");
    atom = molecule.getAtom(0);
    // DD = 07
    assertEquals(7, desc.jplogp.getCarbonSpecial(atom));
    molecule = parseSmiles("C(=C)O");
    atom = molecule.getAtom(0);
    // DD = 08
    assertEquals(8, desc.jplogp.getCarbonSpecial(atom));
    molecule = parseSmiles("C(=O)O");
    atom = molecule.getAtom(0);
    // DD = 14
    assertEquals(14, desc.jplogp.getCarbonSpecial(atom));
    molecule = parseSmiles("C=C");
    atom = molecule.getAtom(0);
    // DD = 06
    assertEquals(6, desc.jplogp.getCarbonSpecial(atom));
    molecule = parseSmiles("C#N");
    atom = molecule.getAtom(0);
    // DD = 12
    assertEquals(12, desc.jplogp.getCarbonSpecial(atom));
    molecule = parseSmiles("C(O)#C");
    atom = molecule.getAtom(0);
    // DD = 10
    assertEquals(10, desc.jplogp.getCarbonSpecial(atom));
    molecule = parseSmiles("C(O)#N");
    atom = molecule.getAtom(0);
    // DD = 15
    assertEquals(15, desc.jplogp.getCarbonSpecial(atom));
    molecule = parseSmiles("C#C");
    atom = molecule.getAtom(0);
    // DD = 09
    assertEquals(9, desc.jplogp.getCarbonSpecial(atom));
}
Also used : IAtomContainer(org.openscience.cdk.interfaces.IAtomContainer) JPlogPDescriptor(org.openscience.cdk.qsar.descriptors.molecular.JPlogPDescriptor) IAtom(org.openscience.cdk.interfaces.IAtom) Test(org.junit.Test)

Example 4 with JPlogPDescriptor

use of org.openscience.cdk.qsar.descriptors.molecular.JPlogPDescriptor in project cdk by cdk.

the class AtomTyperTests method testGetDefaultSpecial.

@Test
public void testGetDefaultSpecial() throws CDKException {
    JPlogPDescriptor desc = new JPlogPDescriptor();
    IAtomContainer molecule = parseSmiles("P(=O)(O)(O)C");
    IAtom atom = molecule.getAtom(0);
    // DD = 03
    assertEquals(3, desc.jplogp.getDefaultSpecial(atom));
    molecule = parseSmiles("o1cccc1");
    atom = molecule.getAtom(0);
    // DD = 10
    assertEquals(10, desc.jplogp.getDefaultSpecial(atom));
}
Also used : IAtomContainer(org.openscience.cdk.interfaces.IAtomContainer) JPlogPDescriptor(org.openscience.cdk.qsar.descriptors.molecular.JPlogPDescriptor) IAtom(org.openscience.cdk.interfaces.IAtom) Test(org.junit.Test)

Example 5 with JPlogPDescriptor

use of org.openscience.cdk.qsar.descriptors.molecular.JPlogPDescriptor in project cdk by cdk.

the class AtomTyperTests method testDefaultSpecial.

@Test
public void testDefaultSpecial() throws CDKException {
    IAtomContainer molecule = parseSmiles("P(=O)(O)(O)O");
    JPlogPDescriptor desc = new JPlogPDescriptor();
    Map<Integer, Integer> holo = desc.jplogp.getMappedHologram(molecule);
    assertEquals(1, holo.get(115404).intValue());
}
Also used : IAtomContainer(org.openscience.cdk.interfaces.IAtomContainer) JPlogPDescriptor(org.openscience.cdk.qsar.descriptors.molecular.JPlogPDescriptor) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)24 JPlogPDescriptor (org.openscience.cdk.qsar.descriptors.molecular.JPlogPDescriptor)24 IAtomContainer (org.openscience.cdk.interfaces.IAtomContainer)21 IAtom (org.openscience.cdk.interfaces.IAtom)16 SmilesParser (org.openscience.cdk.smiles.SmilesParser)6 DescriptorValue (org.openscience.cdk.qsar.DescriptorValue)5 DoubleResult (org.openscience.cdk.qsar.result.DoubleResult)5 Atom (org.openscience.cdk.Atom)2 DescriptorSpecification (org.openscience.cdk.qsar.DescriptorSpecification)1