示例#1
0
 def setUp(self):
     natoms = 50
     rcut = 1.6
     ntypeA = int(natoms * 0.8)
     self.x0 = _x0.copy()
     boxl = 7.
     boxvec = np.array([boxl] * 3)
     self.pot = BLJCut(natoms, ntypeA, rcut=rcut, boxvec=boxvec)
     self.pot_fortran = LJpshift(natoms, ntypeA, boxl=boxl, rcut=rcut)
     self.e0 = 6971.685336750815
示例#2
0
    def setUp(self):
        natoms = 50
        rcut = 1.6
        ntypeA = int(natoms * 0.8)
        self.x0 = _x0.copy()
        self.pot = BLJCut(natoms, ntypeA, rcut=rcut)

        self.e0 = 1412.0144910476681

        self.pot_fortran = LJpshift(natoms, ntypeA, rcut=rcut)
示例#3
0
 def setUp(self):
     natoms = 50
     rcut = 1.6
     ntypeA = int(natoms * 0.8)
     self.x0 = _x0.copy()
     boxl = 7.
     boxvec = np.array([boxl]*3)
     self.pot = BLJCut(natoms, ntypeA, rcut=rcut, boxvec=boxvec)
     self.pot_fortran = LJpshift(natoms, ntypeA, boxl=boxl, rcut=rcut)
     self.e0 = 6971.685336750815
示例#4
0
    def setUp(self):
        natoms = 50
        rcut = 1.6
        ntypeA = int(natoms * 0.8)
        self.x0 = _x0.copy()
        self.pot = BLJCut(natoms, ntypeA, rcut=rcut)

        self.e0 = 1412.0144910476681
        
        self.pot_fortran = LJpshift(natoms, ntypeA, rcut=rcut)
示例#5
0
class TestBLJ_CPP_Bulk(_base_test._TestConfiguration):
    def setUp(self):
        natoms = 50
        rcut = 1.6
        ntypeA = int(natoms * 0.8)
        self.x0 = _x0.copy()
        boxl = 7.
        boxvec = np.array([boxl]*3)
        self.pot = BLJCut(natoms, ntypeA, rcut=rcut, boxvec=boxvec)
        self.pot_fortran = LJpshift(natoms, ntypeA, boxl=boxl, rcut=rcut)
        self.e0 = 6971.685336750815
    
    def test_against_fortran(self):
        efort = self.pot_fortran.getEnergy(self.x0)
        self.assertAlmostEqual(self.e0, efort)
示例#6
0
class TestBLJ_CPP_simple(_base_test._TestConfiguration):
    def setUp(self):
        natoms = 50
        rcut = 1.6
        ntypeA = int(natoms * 0.8)
        self.x0 = _x0.copy()
        self.pot = BLJCut(natoms, ntypeA, rcut=rcut)

        self.e0 = 1412.0144910476681
        
        self.pot_fortran = LJpshift(natoms, ntypeA, rcut=rcut)
    
    def test_against_fortran(self):
        efort = self.pot_fortran.getEnergy(self.x0)
        self.assertAlmostEqual(self.e0, efort)
示例#7
0
class TestBLJ_CPP_Bulk(_base_test._TestConfiguration):
    def setUp(self):
        natoms = 50
        rcut = 1.6
        ntypeA = int(natoms * 0.8)
        self.x0 = _x0.copy()
        boxl = 7.
        boxvec = np.array([boxl] * 3)
        self.pot = BLJCut(natoms, ntypeA, rcut=rcut, boxvec=boxvec)
        self.pot_fortran = LJpshift(natoms, ntypeA, boxl=boxl, rcut=rcut)
        self.e0 = 6971.685336750815

    def test_against_fortran(self):
        efort = self.pot_fortran.getEnergy(self.x0)
        self.assertAlmostEqual(self.e0, efort)
示例#8
0
class TestBLJ_CPP_simple(_base_test._TestConfiguration):
    def setUp(self):
        natoms = 50
        rcut = 1.6
        ntypeA = int(natoms * 0.8)
        self.x0 = _x0.copy()
        self.pot = BLJCut(natoms, ntypeA, rcut=rcut)

        self.e0 = 1412.0144910476681

        self.pot_fortran = LJpshift(natoms, ntypeA, rcut=rcut)

    def test_against_fortran(self):
        efort = self.pot_fortran.getEnergy(self.x0)
        self.assertAlmostEqual(self.e0, efort)