コード例 #1
0
ファイル: SaturationCheckerTest.java プロジェクト: jonalv/cdk
 @Test
 public void testCalculateMissingHydrogens_Aromatic() throws Exception {
   IAtomContainer pyrrole = MoleculeFactory.makePyrrole();
   IAtom n = pyrrole.getAtom(1);
   IRingSet rs = (new SSSRFinder(pyrrole)).findSSSR();
   IRing ring = (IRing) rs.getAtomContainer(0);
   for (int j = 0; j < ring.getBondCount(); j++) {
     ring.getBond(j).setFlag(CDKConstants.ISAROMATIC, true);
   }
   Assert.assertEquals(5, ring.getBondCount());
   Assert.assertEquals(1, satcheck.calculateNumberOfImplicitHydrogens(n, pyrrole));
 }