def testAllElstParams(self):
     params = r_ij, q_i, q_j, epsilon = 1.5, 0.2, -0.4, 2.0
     self.assertAlmostEqual(energy.GetEElstIJ(*params), -8.8550333)
 def testNoCharge2(self):
     params = r_ij, q_i, q_j, epsilon = 1.0, 1.0, 0.0, 1.0
     self.assertAlmostEqual(energy.GetEElstIJ(*params), 0.0)
 def testUnitValues(self):
     params = r_ij, q_i, q_j, epsilon = 1.0, 1.0, 1.0, 1.0
     self.assertAlmostEqual(energy.GetEElstIJ(*params), 332.0637500)
Esempio n. 4
0
 def testAllElstParams(self):
     """Asserts correct value for arbitrary combination of parameters."""
     params = r_ij, q_i, q_j, epsilon = 1.5, 0.2, -0.4, 2.0
     self.assertAlmostEqual(energy.GetEElstIJ(*params), -8.8550333)
Esempio n. 5
0
 def testInfiniteDistance(self):
     """Asserts zero elst energy when separation is infinite."""
     params = r_ij, q_i, q_j, epsilon = float('inf'), 1.0, 1.0, 1.0
     self.assertAlmostEqual(energy.GetEElstIJ(*params), 0.0)
Esempio n. 6
0
 def testLargeDielectric(self):
     """Asserts correct value for non-unit dielectric constant."""
     params = r_ij, q_i, q_j, epsilon = 1.0, 1.0, 1.0, 10.0
     self.assertAlmostEqual(energy.GetEElstIJ(*params), 33.2063750)
Esempio n. 7
0
 def testUnitValues(self):
     """Asserts correct value for unit charges and separation."""
     params = r_ij, q_i, q_j, epsilon = 1.0, 1.0, 1.0, 1.0
     self.assertAlmostEqual(energy.GetEElstIJ(*params), 332.0637500)
Esempio n. 8
0
 def testNoCharge2(self):
     """Asserts no elst energy when second charge is zero."""
     params = r_ij, q_i, q_j, epsilon = 1.0, 1.0, 0.0, 1.0
     self.assertAlmostEqual(energy.GetEElstIJ(*params), 0.0)