@Test public void testDoubleValue() { DoubleResult result = new DoubleResult(5); Assert.assertEquals(5.0, result.doubleValue(), 0.000001); }
@Test public void testLength() { DoubleResult result = new DoubleResult(5); Assert.assertEquals(1, result.length()); } }
@Test public void testToString() { DoubleResult result = new DoubleResult(5.0); Assert.assertEquals("5.0", result.toString()); }
@Test public void testno1000() throws ClassNotFoundException, CDKException, java.lang.Exception { Object[] params = {new Boolean(true), new Boolean(false)}; descriptor.setParameters(params); SmilesParser sp = new SmilesParser(DefaultChemObjectBuilder.getInstance()); IAtomContainer mol = sp.parseSmiles("Clc1cccc(c1)/C=C/[N+](=O)[O-]"); // xlogp training set molecule no1000 assertAtomTypesPerceived(mol); addExplicitHydrogens(mol); //logger.debug("no10000:"+((DoubleResult)descriptor.calculate(mol).getValue()).doubleValue()+"\n"); Assert.assertEquals(2.809, ((DoubleResult) descriptor.calculate(mol).getValue()).doubleValue(), 1.0); //at: 16 }
@Override public IDescriptorResult getDescriptorResultType() { return new DoubleResult(0.0); }
@Test public void testApirinBug1296383() throws ClassNotFoundException, CDKException, java.lang.Exception { Object[] params = {new Boolean(true), new Boolean(false)}; descriptor.setParameters(params); SmilesParser sp = new SmilesParser(DefaultChemObjectBuilder.getInstance()); IAtomContainer mol = sp.parseSmiles("CC(=O)OC1=CC=CC=C1C(=O)O"); // aspirin assertAtomTypesPerceived(mol); addExplicitHydrogens(mol); //logger.debug("Aspirin:"+((DoubleResult)descriptor.calculate(mol).getValue()).doubleValue()+"\n"); Assert.assertEquals(1.422, ((DoubleResult) descriptor.calculate(mol).getValue()).doubleValue(), 0.1); //at: 16 }
/** * Returns the specific type of the DescriptorResult object. * * The return value from this method really indicates what type of result will * be obtained from the {@link org.openscience.cdk.qsar.DescriptorValue} object. Note that the same result * can be achieved by interrogating the {@link org.openscience.cdk.qsar.DescriptorValue} object; this method * allows you to do the same thing, without actually calculating the descriptor. * * @return an object that implements the {@link org.openscience.cdk.qsar.result.IDescriptorResult} interface indicating * the actual type of values returned by the descriptor in the {@link org.openscience.cdk.qsar.DescriptorValue} object */ @Override public IDescriptorResult getDescriptorResultType() { return new DoubleResult(0.0); }
@Test public void testno1782() throws ClassNotFoundException, CDKException, java.lang.Exception { Object[] params = {new Boolean(true), new Boolean(false)}; descriptor.setParameters(params); SmilesParser sp = new SmilesParser(DefaultChemObjectBuilder.getInstance()); IAtomContainer mol = sp.parseSmiles("S1C2N(C(=O)C2NC(=O)C(c2ccccc2)C(=O)O)C(C(=O)O)C1(C)C"); // xlogp training set molecule no30 assertAtomTypesPerceived(mol); addExplicitHydrogens(mol); //logger.debug("no1782:"+((DoubleResult)descriptor.calculate(mol).getValue()).doubleValue()+"\n"); Assert.assertEquals(1.84, ((DoubleResult) descriptor.calculate(mol).getValue()).doubleValue(), 0.1); //at: 16 }
/** * Returns the specific type of the DescriptorResult object. * * The return value from this method really indicates what type of result will * be obtained from the {@link org.openscience.cdk.qsar.DescriptorValue} object. Note that the same result * can be achieved by interrogating the {@link org.openscience.cdk.qsar.DescriptorValue} object; this method * allows you to do the same thing, without actually calculating the descriptor. * * @return an object that implements the {@link org.openscience.cdk.qsar.result.IDescriptorResult} interface indicating * the actual type of values returned by the descriptor in the {@link org.openscience.cdk.qsar.DescriptorValue} object */ @Override public IDescriptorResult getDescriptorResultType() { return new DoubleResult(0.0); }
@Test public void testno1596() throws ClassNotFoundException, CDKException, java.lang.Exception { // the xlogp program value is 0.44 because of paralleled donor pair correction factor Object[] params = {new Boolean(true), new Boolean(false)}; descriptor.setParameters(params); SmilesParser sp = new SmilesParser(DefaultChemObjectBuilder.getInstance()); IAtomContainer mol = sp.parseSmiles("Nc2ccc(S(=O)(=O)c1ccc(N)cc1)cc2"); // xlogp training set molecule no1596 assertAtomTypesPerceived(mol); addExplicitHydrogens(mol); //logger.debug("no1596:"+((DoubleResult)descriptor.calculate(mol).getValue()).doubleValue()+"\n"); Assert.assertEquals(0.86, ((DoubleResult) descriptor.calculate(mol).getValue()).doubleValue(), 1.0); //at: 16 }
/** * Returns the specific type of the DescriptorResult object. * * The return value from this method really indicates what type of result will * be obtained from the {@link org.openscience.cdk.qsar.DescriptorValue} object. Note that the same result * can be achieved by interrogating the {@link org.openscience.cdk.qsar.DescriptorValue} object; this method * allows you to do the same thing, without actually calculating the descriptor. * * @return an object that implements the {@link org.openscience.cdk.qsar.result.IDescriptorResult} interface indicating * the actual type of values returned by the descriptor in the {@link org.openscience.cdk.qsar.DescriptorValue} object */ @Override public IDescriptorResult getDescriptorResultType() { return new DoubleResult(0.0); }
@Test public void testno1429() throws ClassNotFoundException, CDKException, java.lang.Exception { Object[] params = {new Boolean(true), new Boolean(false)}; descriptor.setParameters(params); SmilesParser sp = new SmilesParser(DefaultChemObjectBuilder.getInstance()); IAtomContainer mol = sp.parseSmiles("O=C(OC)CNC(=O)c1ccc(N)cc1"); // xlogp training set molecule no1429 assertAtomTypesPerceived(mol); addExplicitHydrogens(mol); //logger.debug("no1429:"+((DoubleResult)descriptor.calculate(mol).getValue()).doubleValue()+"\n"); Assert.assertEquals(0.31, ((DoubleResult) descriptor.calculate(mol).getValue()).doubleValue(), 1.0); //at: 16 }
/** * Returns the specific type of the DescriptorResult object. * * The return value from this method really indicates what type of result will * be obtained from the {@link org.openscience.cdk.qsar.DescriptorValue} object. Note that the same result * can be achieved by interrogating the {@link org.openscience.cdk.qsar.DescriptorValue} object; this method * allows you to do the same thing, without actually calculating the descriptor. * * @return an object that implements the {@link org.openscience.cdk.qsar.result.IDescriptorResult} interface indicating * the actual type of values returned by the descriptor in the {@link org.openscience.cdk.qsar.DescriptorValue} object */ @Override public IDescriptorResult getDescriptorResultType() { return new DoubleResult(0.0); }
@Test public void testAprindine() throws ClassNotFoundException, CDKException, java.lang.Exception { //even here the amid assignment is very strange Object[] params = {new Boolean(true), new Boolean(false)}; descriptor.setParameters(params); SmilesParser sp = new SmilesParser(DefaultChemObjectBuilder.getInstance()); IAtomContainer mol = sp.parseSmiles("CCN(CC)CCCN(C2Cc1ccccc1C2)c3ccccc3"); // xlogp training set molecule Aprindine assertAtomTypesPerceived(mol); addExplicitHydrogens(mol); //logger.debug("Aprindine:"+((DoubleResult)descriptor.calculate(mol).getValue()).doubleValue()+"\n"); Assert.assertEquals(5.03, ((DoubleResult) descriptor.calculate(mol).getValue()).doubleValue(), 1.0); //at: 16 }
/** * Returns the specific type of the DescriptorResult object. * * The return value from this method really indicates what type of result will * be obtained from the {@link org.openscience.cdk.qsar.DescriptorValue} object. Note that the same result * can be achieved by interrogating the {@link org.openscience.cdk.qsar.DescriptorValue} object; this method * allows you to do the same thing, without actually calculating the descriptor. * * @return an object that implements the {@link org.openscience.cdk.qsar.result.IDescriptorResult} interface indicating * the actual type of values returned by the descriptor in the {@link org.openscience.cdk.qsar.DescriptorValue} object */ @Override public IDescriptorResult getDescriptorResultType() { return new DoubleResult(0.0); }
@Test public void testno1837() throws ClassNotFoundException, CDKException, java.lang.Exception { Object[] params = {new Boolean(true), new Boolean(false)}; descriptor.setParameters(params); SmilesParser sp = new SmilesParser(DefaultChemObjectBuilder.getInstance()); IAtomContainer mol = sp.parseSmiles("O=P(N1CC1)(N2CC2)N3CC3"); // xlogp training set molecule no1837 assertAtomTypesPerceived(mol); addExplicitHydrogens(mol); //logger.debug("no1837:"+((DoubleResult)descriptor.calculate(mol).getValue()).doubleValue()+"\n"); Assert.assertEquals(-1.19, ((DoubleResult) descriptor.calculate(mol).getValue()).doubleValue(), 0.1); //at: 16 }
/** * Returns the specific type of the DescriptorResult object. * * The return value from this method really indicates what type of result will * be obtained from the {@link org.openscience.cdk.qsar.DescriptorValue} object. Note that the same result * can be achieved by interrogating the {@link org.openscience.cdk.qsar.DescriptorValue} object; this method * allows you to do the same thing, without actually calculating the descriptor. * * @return an object that implements the {@link org.openscience.cdk.qsar.result.IDescriptorResult} interface indicating * the actual type of values returned by the descriptor in the {@link org.openscience.cdk.qsar.DescriptorValue} object */ @Override public IDescriptorResult getDescriptorResultType() { return new DoubleResult(0.0); }
@Test public void test1844() throws ClassNotFoundException, CDKException, java.lang.Exception { Object[] params = {new Boolean(true), new Boolean(false)}; descriptor.setParameters(params); SmilesParser sp = new SmilesParser(DefaultChemObjectBuilder.getInstance()); // SMILES is in octet-rule version, PubChem has normalized one IAtomContainer mol = sp.parseSmiles("Brc1cc(Cl)c(O[P+]([S-])(OC)OC)cc1Cl"); // xlogp training set molecule 1844 assertAtomTypesPerceived(mol); addExplicitHydrogens(mol); //logger.debug("no1844:"+((DoubleResult)descriptor.calculate(mol).getValue()).doubleValue()+"\n"); Assert.assertEquals(5.22, ((DoubleResult) descriptor.calculate(mol).getValue()).doubleValue(), 1.0); //at: 16 }
/** * Returns the specific type of the DescriptorResult object. * * The return value from this method really indicates what type of result will * be obtained from the {@link org.openscience.cdk.qsar.DescriptorValue} object. Note that the same result * can be achieved by interrogating the {@link org.openscience.cdk.qsar.DescriptorValue} object; this method * allows you to do the same thing, without actually calculating the descriptor. * * @return an object that implements the {@link org.openscience.cdk.qsar.result.IDescriptorResult} interface indicating * the actual type of values returned by the descriptor in the {@link org.openscience.cdk.qsar.DescriptorValue} object */ @Override public IDescriptorResult getDescriptorResultType() { return new DoubleResult(0.0); }
@Test public void test1810() throws ClassNotFoundException, CDKException, java.lang.Exception { Object[] params = {new Boolean(true), new Boolean(false)}; descriptor.setParameters(params); SmilesParser sp = new SmilesParser(DefaultChemObjectBuilder.getInstance()); IAtomContainer mol = sp.parseSmiles("Clc1ccc2Sc3ccccc3N(CCCN3CCN(C)CC3)c2c1"); // xlogp training set molecule 1810 assertAtomTypesPerceived(mol); addExplicitHydrogens(mol); //logger.debug("no1810:"+((DoubleResult)descriptor.calculate(mol).getValue()).doubleValue()+"\n"); Assert.assertEquals(4.56, ((DoubleResult) descriptor.calculate(mol).getValue()).doubleValue(), 1.0); //at: 16 }