Skip to content

Commit

Permalink
Fix RuleOfFiveDescriptor always pass molecular weight test
Browse files Browse the repository at this point in the history
  • Loading branch information
k-ujihara committed Nov 18, 2018
1 parent 5950ab8 commit e7317dc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ public DescriptorValue calculate(IAtomContainer mol) {
int donors = ((IntegerResult) don.calculate(mol).getValue()).intValue();

IMolecularDescriptor mw = new WeightDescriptor();
Object[] mwparams = {""};
Object[] mwparams = {"*"};
mw.setParameters(mwparams);
double mwvalue = ((DoubleResult) mw.calculate(mol).getValue()).doubleValue();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public void testRuleOfFiveDescriptor() throws ClassNotFoundException, CDKExcepti
SmilesParser sp = new SmilesParser(DefaultChemObjectBuilder.getInstance());
IAtomContainer mol = sp.parseSmiles("CCCC(OCC)OCC(c1cccc2ccccc12)C4CCC(CCCO)C(CC3CNCNC3)C4"); //
addExplicitHydrogens(mol);
Assert.assertEquals(2, ((IntegerResult) descriptor.calculate(mol).getValue()).intValue());
Assert.assertEquals(3, ((IntegerResult) descriptor.calculate(mol).getValue()).intValue());
}

@Test
Expand Down

0 comments on commit e7317dc

Please sign in to comment.