Skip to content

Commit

Permalink
Auxiliary test.
Browse files Browse the repository at this point in the history
  • Loading branch information
johnmay committed Nov 28, 2016
1 parent a878ad5 commit 3691b26
Showing 1 changed file with 19 additions and 0 deletions.
Expand Up @@ -313,4 +313,23 @@ public void testGetIsotopes_IMolecularFormula_Charged() {
Assert.assertNotEquals(ip1.getIsotope(0).getMass(), ip2.getIsotope(0).getMass());
}

@Test
public void testGetIsotopes_IMolecularFormula_deprotonate() {
IsotopePatternGenerator isogen = new IsotopePatternGenerator(.1);

IMolecularFormula mf1 = MolecularFormulaManipulator.getMolecularFormula("C6H12O6", builder);
MolecularFormulaManipulator.adjustProtonation(mf1, -1);
IsotopePattern ip1 = isogen.getIsotopes(mf1);
Assert.assertEquals(1, ip1.getNumberOfIsotopes());

isogen = new IsotopePatternGenerator(.1);
IMolecularFormula mf2 = MolecularFormulaManipulator.getMolecularFormula("C6H11O6", builder);
IsotopePattern ip2 = isogen.getIsotopes(mf2);
Assert.assertEquals(1, ip2.getNumberOfIsotopes());

Assert.assertEquals(ip1.getIsotope(0).getMass(), ip2.getIsotope(0).getMass(), 0.001);
}



}

0 comments on commit 3691b26

Please sign in to comment.