Exemplo n.º 1
0
 def setUp(self):
     current_dir = os.path.dirname(__file__)
     xyz, hs_radii, rattlers = read_xyzdr(current_dir +
                                          "/_hswca20_min2.xyzdr")
     sca = 0.205071132088
     boxv = [6.26533756282, 6.26533756282, 6.26533756282]
     self.pot = _hs_wca_cpp.HS_WCA(eps=1,
                                   sca=sca,
                                   radii=hs_radii,
                                   boxvec=boxv,
                                   distance_method=Distance.PERIODIC)
     self.natoms = 20
     result = minimize(xyz, self.pot)
     self.xmin = result[0]  # xyz
     self.Emin = result[1]  # self.pot.getEnergy(self.xmin)
     self.xrandom = np.random.uniform(-1, 1, len(xyz)) * 1e-2
Exemplo n.º 2
0
 def setUp(self):
     current_dir = os.path.dirname(__file__)
     xyz, hs_radii, rattlers = read_xyzdr(current_dir +
                                          "/_hswca20_shear_min.xyzdr")
     sca = 0.1186889420813968
     boxv = [5.5295418812871766, 5.5295418812871766, 5.5295418812871766]
     shear = 0.1
     self.pot = _hs_wca_cpp.HS_WCA(eps=1,
                                   sca=sca,
                                   radii=hs_radii,
                                   boxvec=boxv,
                                   distance_method=Distance.LEES_EDWARDS,
                                   pot_kwargs={'shear': 0.0})
     self.natoms = 20
     result = minimize(xyz, self.pot)
     self.xmin = result[0]  # xyz
     self.Emin = result[1]  # self.pot.getEnergy(self.xmin)
     self.xrandom = np.random.uniform(-1, 1, len(xyz)) * 1e-2