Ejemplo n.º 1
0
 def testProperties(self):
     lj = LennardJones()
     lj.epsilon = 2.0
     lj.sigma = 2.0
     lj.cutoff = 4.0
     lj.shift = 0.0
     # here we test energy computation, as testing property access
     # would always work
     self.assertAlmostEqual(lj.computeEnergy(2.0), 0.0)
     self.assertAlmostEqual(lj.computeEnergy(2.0 * 2.0**(1.0 / 6.0)), -2.0)