Skip to content

Commit

Permalink
new bug unit tests and bug references
Browse files Browse the repository at this point in the history
Change-Id: I5d4c3aa30f766187ebb1e688135ac3ce092247f1
Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>
  • Loading branch information
danielszisz authored and egonw committed Jul 29, 2012
1 parent 373d6ec commit 069f06b
Showing 1 changed file with 29 additions and 0 deletions.
Expand Up @@ -278,6 +278,10 @@ public void testGetNextUnplacedHeavyAtomWithAliphaticPlacedNeighbour_IAtomContai
Assert.assertNull(nextSuchUnPlacedHeavyAtom);
}


/**
* @cdk.bug #3224093
*/
@Test
public void testGetAngleValue_String_String_String() throws Exception {
SmilesParser parser = new SmilesParser(DefaultChemObjectBuilder.getInstance());
Expand All @@ -299,6 +303,9 @@ public void testGetAngleValue_String_String_String() throws Exception {

}

/**
* @cdk.bug #3524092
*/
@Test
public void testGetBondLengthValue_String_String() throws Exception {
SmilesParser parser = new SmilesParser(DefaultChemObjectBuilder.getInstance());
Expand All @@ -322,6 +329,28 @@ public void testGetBondLengthValue_String_String() throws Exception {
Assert.assertEquals(1.508, bondlength, 0.001);
}

/**
* @cdk.bug #3523247
*/
@Test
public void testGetBondLengthValue_bug_CNBond() throws Exception {
SmilesParser parser = new SmilesParser(DefaultChemObjectBuilder.getInstance());
String smiles = "CCCN";
IAtomContainer molecule = parser.parseSmiles(smiles);
Assert.assertNotNull(molecule);
ForceFieldConfigurator ffc= new ForceFieldConfigurator();
ffc.setForceFieldConfigurator("mmff94");
AtomPlacer3D atomPlacer3d= new AtomPlacer3D();
atomPlacer3d.initilize(ffc.getParameterSet());
ffc.assignAtomTyps(molecule);

String id1 = molecule.getAtom(2).getAtomTypeName();
String id2 = molecule.getAtom(3).getAtomTypeName();
double bondlength = atomPlacer3d.getBondLengthValue(id1, id2);
Assert.assertEquals(1.482, bondlength, 0.001);

}

@Test
public void testMarkPlaced_IAtomContainer() {
AtomPlacer3D atmplacer = new AtomPlacer3D();
Expand Down

0 comments on commit 069f06b

Please sign in to comment.