Example #1
0
    def setUp(self):
        np.random.seed(0)
        natoms = 31
        self.system = LJCluster(natoms)
        self.pot = self.system.get_potential()

        # get a partially minimized structure
        x0 = self.system.get_random_configuration()
        ret = _quench.lbfgs_py(x0, self.pot, tol=1e-1)
        self.x0 = ret.coords.copy()
        self.E0 = ret.energy

        ret = _quench.lbfgs_py(self.x0, self.pot, tol=1e-7)
        self.x = ret.coords.copy()
        self.E = ret.energy
Example #2
0
    def setUp(self):
        np.random.seed(0)
        natoms = 31
        self.system = LJCluster(natoms)
        self.pot = self.system.get_potential()

        # get a partially minimized structure
        x0 = self.system.get_random_configuration()
        ret = _quench.lbfgs_py(x0, self.pot, tol=1e-1)
        self.x0 = ret.coords.copy()
        self.E0 = ret.energy

        ret = _quench.lbfgs_py(self.x0, self.pot, tol=1e-7)
        self.x = ret.coords.copy()
        self.E = ret.energy
Example #3
0
    def setUp(self):
        np.random.seed(0)
        natoms = 31
        self.system = LJCluster(natoms)
        self.pot = self.system.get_potential()

        # get a partially minimized structure
        self.x0 = _x0.copy()
        self.E0 = -128.289209867

        ret = _quench.lbfgs_py(self.x0, self.pot, tol=1e-7)
        self.x = ret.coords.copy()
        self.E = ret.energy
Example #4
0
 def setUp(self):
     np.random.seed(0)
     natoms = 31
     self.system = LJCluster(natoms)
     self.pot = self.system.get_potential()
     
     # get a partially minimized structure
     self.x0 = _x0.copy()
     self.E0 = -128.289209867
     
     ret = _quench.lbfgs_py(self.x0, self.pot, tol=1e-7)
     self.x = ret.coords.copy()
     self.E = ret.energy
Example #5
0
 def test_lbfgs_py(self):
     res = _quench.lbfgs_py(self.x0, self.pot, tol=1e-7, debug=True)
     self.assertTrue(res.success)
     self.assertAlmostEqual(self.E, res.energy, 4)
     self.check_attributes(res)
Example #6
0
 def test_lbfgs_py(self):
     res = _quench.lbfgs_py(self.x0, self.pot, tol=1e-7, debug=True)
     self.assertTrue(res.success)
     self.assertAlmostEqual(self.E, res.energy, 4)
     self.check_attributes(res)