コード例 #1
0
 def testSmallDistance(self):
     params = r_ij, eps_ij, ro_ij = 1.6, 3.0, 2.0
     self.assertAlmostEqual(energy.GetEVdwIJ(*params), 20.7675621)
コード例 #2
0
 def testNoEpsilon(self):
     params = r_ij, eps_ij, ro_ij = 2.5, 0.0, 2.0
     self.assertAlmostEqual(energy.GetEVdwIJ(*params), 0.0)
コード例 #3
0
 def testLargeDistance(self):
     params = r_ij, eps_ij, ro_ij = 4.0, 3.0, 2.0
     self.assertAlmostEqual(energy.GetEVdwIJ(*params), -0.0930176)
コード例 #4
0
 def testInfiniteDistance(self):
     """Asserts zero energy for infinite separation."""
     params = r_ij, eps_ij, ro_ij = float('inf'), 1.0, 1.0
     self.assertAlmostEqual(energy.GetEVdwIJ(*params), 0.0)
コード例 #5
0
 def testSmallDistance(self):
     """Asserts correct value for smaller than equilibrium separation."""
     params = r_ij, eps_ij, ro_ij = 1.6, 3.0, 2.0
     self.assertAlmostEqual(energy.GetEVdwIJ(*params), 20.7675621)
コード例 #6
0
 def testLargeDistance(self):
     """Asserts correct value for greater than equilibrium separation."""
     params = r_ij, eps_ij, ro_ij = 4.0, 3.0, 2.0
     self.assertAlmostEqual(energy.GetEVdwIJ(*params), -0.0930176)
コード例 #7
0
 def testEquilibriumDistance(self):
     """Asserts negative epsilon energy for equilibrium separation."""
     params = r_ij, eps_ij, ro_ij = 2.5, 2.0, 2.5
     self.assertAlmostEqual(energy.GetEVdwIJ(*params), -2.0)
コード例 #8
0
 def testNoEpsilon(self):
     """Asserts no vdw energy for zero epsilon."""
     params = r_ij, eps_ij, ro_ij = 2.5, 0.0, 2.0
     self.assertAlmostEqual(energy.GetEVdwIJ(*params), 0.0)