def testSmallDistance(self):
     params = r_ij, eps_ij, ro_ij = 1.6, 3.0, 2.0
     self.assertAlmostEqual(energy.GetEVdwIJ(*params), 20.7675621)
 def testNoEpsilon(self):
     params = r_ij, eps_ij, ro_ij = 2.5, 0.0, 2.0
     self.assertAlmostEqual(energy.GetEVdwIJ(*params), 0.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)