コード例 #1
0
ファイル: test_blj_cpp.py プロジェクト: yangxi1209/pele
 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
ファイル: test_blj_cpp.py プロジェクト: yangxi1209/pele
    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
ファイル: test_blj_cpp.py プロジェクト: Mahdisadjadi/pele
 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
ファイル: test_blj_cpp.py プロジェクト: Mahdisadjadi/pele
    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
ファイル: test_blj_cpp.py プロジェクト: Mahdisadjadi/pele
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
ファイル: test_blj_cpp.py プロジェクト: Mahdisadjadi/pele
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
ファイル: test_blj_cpp.py プロジェクト: yangxi1209/pele
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
ファイル: test_blj_cpp.py プロジェクト: yangxi1209/pele
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)