def testProperties(self):
     sc=SoftCosine()
     sc.A=2.0
     sc.cutoff=1.1
     sc.shift=0.0
     # here we test energy computation, as testing property access
     # would always work
     self.assertAlmostEqual(sc.computeEnergy(0.0), 4.0)
     self.assertAlmostEqual(sc.computeEnergy(1.1), 0.0)
     self.assertAlmostEqual(sc.computeEnergy(2.5), 0.0)
Example #2
0
 def testProperties(self):
     sc=SoftCosine()
     sc.A=2.0
     sc.cutoff=1.1
     sc.shift=0.0
     # here we test energy computation, as testing property access
     # would always work
     self.assertAlmostEqual(sc.computeEnergy(0.0), 4.0)
     self.assertAlmostEqual(sc.computeEnergy(1.1), 0.0)
     self.assertAlmostEqual(sc.computeEnergy(2.5), 0.0)
 def testEnergy(self):
     sc=SoftCosine(A=2.0)
     self.assertAlmostEqual(sc.computeEnergy(0.0), 4.0)
Example #4
0
 def testEnergy(self):
     sc=SoftCosine(A=2.0)
     self.assertAlmostEqual(sc.computeEnergy(0.0), 4.0)