def _check_tor(self, mol1, mol2): tors1 = [mol1.calctor(x[0], x[1], x[2], x[3]) for x in self.cmptors] tors2 = [mol2.calctor(x[0], x[1], x[2], x[3]) for x in self.cmptors] return tordiff.torsdiff(tors1, tors2, self.is_achiral, self.head_tail, self.loopstep) < self.torerror
def _check_tor(self, mol1, mol2): tors1 = [mol1.calctor(x[0], x[1], x[2], x[3]) for x in self.cmptors] tors2 = [mol2.calctor(x[0], x[1], x[2], x[3]) for x in self.cmptors] diff = tordiff.torsdiff(tors1, tors2, self.is_achiral, self.head_tail, self.loopstep) res = diff < self.torerror_radian # if res: # logging.info('LoopClosure._check_tor: tors1: %s' % tors1) # logging.info('LoopClosure._check_tor: tors2: %s' % tors2) # logging.info('LoopClosure._check_tor: diff: %s < %s' % (diff, self.torerror_radian)) return res
def catordiff(mol1, mol2, loop=None): assert isinstance(mol1, molecule.Molecule) assert isinstance(mol2, molecule.Molecule) tors1 = getlooptor(mol1, loop) tors2 = getlooptor(mol2, loop) return tordiff.torsdiff(tors1, tors2, True, 0, 1)