예제 #1
0
 def testArbitrary(self):
     """Asserts correct output for arbitrary Atom inputs."""
     param = ['N*', '999.9', '-0.0001', '2.0', '-0.52']
     output = molecule.Atom('N*', [999.9, -0.0001, 2.0], -0.52)
     test.assertObjectEqual(self, fileio.GetAtomFromXyzq(param), output)
예제 #2
0
 def testArbitrary(self):
     """Asserts correct Torsion object for arbitrary input parameters."""
     param = ['ANGLE', '62', '64', '67', '51', '10.0', '90.0', '3', '9']
     test.assertObjectEqual(
         self, fileio.GetTorsionFromPrm(param),
         molecule.Torsion(61, 63, 66, 50, 10.0, 90.0, 3, 9))
예제 #3
0
 def testZeroValues(self):
     """Asserts correct output for zero value numeric inputs."""
     param = ['OW', '0.0', '0.0', '0.0', '0.0']
     output = molecule.Atom('OW', [0.0, 0.0, 0.0], 0.0)
     test.assertObjectEqual(self, fileio.GetAtomFromXyzq(param), output)
예제 #4
0
 def testArbitrary(self):
     """Asserts correct Angle object for arbitrary input parameters."""
     param = ['ANGLE', '62', '64', '67', '179.838', '17.76']
     test.assertObjectEqual(self, fileio.GetAngleFromPrm(param),
                            molecule.Angle(61, 63, 66, 179.838, 17.76))
예제 #5
0
 def testSmallestValues(self):
     """Asserts correct Torsion object for smallest allowed values."""
     param = ['TORSION', '1', '2', '3', '4', '0.000001', '-180.0', '1', '1']
     test.assertObjectEqual(
         self, fileio.GetTorsionFromPrm(param),
         molecule.Torsion(0, 1, 2, 3, 0.000001, -180.0, 1, 1))
예제 #6
0
 def testSmallestValues(self):
     """Asserts correct Angle object for smallest allowed values."""
     param = ['ANGLE', '1', '2', '3', '0.000001', '0.000001']
     test.assertObjectEqual(self, fileio.GetAngleFromPrm(param),
                            molecule.Angle(0, 1, 2, 0.000001, 0.000001))
예제 #7
0
 def testArbitrary(self):
     """Asserts correct Bond object for arbitrary input parameters."""
     param = ['BOND', '455', '27', '8.484', '6.63']
     test.assertObjectEqual(self, fileio.GetBondFromPrm(param),
                            molecule.Bond(454, 26, 8.484, 6.63))
예제 #8
0
 def testSmallestValues(self):
     """Asserts correct Bond object for smallest allowed values."""
     param = ['BOND', '1', '2', '0.000001', '0.000001']
     test.assertObjectEqual(self, fileio.GetBondFromPrm(param),
                            molecule.Bond(0, 1, 0.000001, 0.000001))
예제 #9
0
 def testArbitrary(self):
     """Asserts correct Atom object for arbitrary input parameters."""
     param = ['ATOM', '7', 'NA', '1.1', '2.2', '3.3', '4.4', '5.5', '6.6']
     test.assertObjectEqual(
         self, fileio.GetAtomFromPrm(param),
         molecule.Atom('NA', [1.1, 2.2, 3.3], 4.4, 5.5, 6.6))
예제 #10
0
 def testZeroValues(self):
     """Asserts correct Atom object for zero value numeric inputs."""
     param = ['ATOM', '6', 'X', '0.', '0.', '0.', '0.', '0.1', '0.']
     test.assertObjectEqual(self, fileio.GetAtomFromPrm(param),
                            molecule.Atom('X', [0., 0., 0.], 0., 0.1, 0.))