def test_K(self): """ Test the creation of a temperature quantity with units of K. """ q = quantity.Temperature(1.0, "K") self.assertAlmostEqual(q.value, 1.0, 6) self.assertAlmostEqual(q.value_si, 1.0, delta=1e-6) self.assertEqual(q.units, "K")
def test_degR(self): """ Test the creation of a temperature quantity with units of degrees R. """ q = quantity.Temperature(1.0, "degR") self.assertAlmostEqual(q.value, 1.0, 6) self.assertAlmostEqual(q.value_si, 5.0 / 9.0, delta=1e-6) self.assertEqual(q.units, "degR")
def __init__(self, shapeIndex=None, epsilon=None, sigma=None, dipoleMoment=None, polarizability=None, rotrelaxcollnum=None, comment=''): self.shapeIndex = shapeIndex try: self.epsilon = Energy(epsilon) except quantity.QuantityError: self.epsilon = quantity.Temperature(epsilon) self.epsilon.value_si *= constants.R self.epsilon.units = 'kJ/mol' self.sigma = Length(sigma) self.dipoleMoment = DipoleMoment(dipoleMoment) self.polarizability = Volume(polarizability) self.rotrelaxcollnum = rotrelaxcollnum self.comment = comment
def Tlist(self, value): self._Tlist = quantity.Temperature(value)
def Tmax(self, value): self._Tmax = quantity.Temperature(value)
def Tmin(self, value): self._Tmin = quantity.Temperature(value)
def test_degR(self): """ Test the creation of a temperature quantity with units of degrees R. """ with self.assertRaises(NotImplementedError): q = quantity.Temperature(1.0, "degR")