def _minimizemol(self, newmol): if self.check_energy_before_minimization: ene = tinker.analyze(newmol, self.forcefield) if ene >= self.minimal_invalid_energy_before_minimization: return None, None logging.debug("call tinker.newton_mol") logging.debug(" self.forcefield=%s" % self.forcefield) logging.debug(" self.minconverge=%s" % self.minconverge) logging.debug(" prefix=%s" % threading.currentThread().getName()) res = self.min_func(newmol, self.forcefield, self.minconverge, prefix=threading.currentThread().getName()) logging.debug("return from tinker.newton_mol") return res
def test(self): mol = read.readxyz(StringIO(test_in)) self.assertAlmostEqual(tinker.analyze(mol, "mm2"), 0.7996)