def test_BondElementBondSelector_select_all_bnds(self): """ test BondElement select: all bonds """ bndSel = BondElementBondSelector('C') ats = self.mol.allAtoms bnds = ats.bonds[0] resultBnds = bndSel.select(bnds) #print 'all_bnds:len(resultBnds)=', len(resultBnds) self.assertEqual(len(resultBnds) , 334)
def test_BondElementBondSelector_select_all_bnds(self): """ test BondElement select: all bonds """ bndSel = BondElementBondSelector('C') ats = self.mol.allAtoms bnds = ats.bonds[0] resultBnds = bndSel.select(bnds) #print 'all_bnds:len(resultBnds)=', len(resultBnds) self.assertEqual(len(resultBnds), 334)
def test_BondElementBondSelector_select_no_bnds(self): """ test BondElement select: no bonds """ bndSel = BondElementBondSelector("P") ats = self.mol.allAtoms bnds = ats.bonds[0] resultBnds = bndSel.select(bnds) # print 'no_bnds:len(resultBnds)=', len(resultBnds) self.assertEqual(len(resultBnds), 0)
def test_BondElementBondSelector_select_some_bnds(self): """ test BondElement select: some bonds """ bndSel = BondElementBondSelector('C') ats = self.mol.allAtoms[:10] bnds = ats.bonds[0] resultBnds = bndSel.select(bnds) #print 'some_bnds:len(resultBnds)=', len(resultBnds) #self.assertEqual(len(resultBnds) , 9) self.assertEqual(len(resultBnds) , 6)
def test_BondElementBondSelector_select_some_bnds(self): """ test BondElement select: some bonds """ bndSel = BondElementBondSelector('C') ats = self.mol.allAtoms[:10] bnds = ats.bonds[0] resultBnds = bndSel.select(bnds) #print 'some_bnds:len(resultBnds)=', len(resultBnds) #self.assertEqual(len(resultBnds) , 9) self.assertEqual(len(resultBnds), 6)
def test_BondElementBondSelector_constructor(self): """ test BondElement constructor """ bndLenSel = BondElementBondSelector('C') self.assertEqual(bndLenSel.__class__, BondElementBondSelector)