Test_sd.py 942 Bytes
Newer Older
1
2
#!/usr/bin/python

3
import unittest
4
from Tests.UnitTests.UnitTest import UnitTest
5
6
from MDANSE import REGISTRY

7
class TestSD(UnitTest):
8

9
10
11
    def test(self):
        parameters = {}
        parameters['frames'] = (0, 10, 1)
12
        parameters['output_files'] = ('/tmp/output', ['netcdf'])
13
        parameters['reference_basis'] = ('C284H438N84O79S7', ('O', 'C_beta', 'C_delta'))
14
15
16
17
        parameters['running_mode'] = ('monoprocessor', 1)
        parameters['spatial_resolution'] = 0.1
        parameters['target_molecule'] = 'atom_index 151'
        parameters['trajectory'] = '../../../Data/Trajectories/MMTK/protein_in_periodic_universe.nc'
18
19
        job = REGISTRY['job']['sd']()
        self.assertNotRaises(job.run, parameters, status=False)
20

21
22
23
24
25
def suite():
    loader = unittest.TestLoader()
    s = unittest.TestSuite()
    s.addTest(loader.loadTestsFromTestCase(TestSD))
    return s
26

27
28
if __name__ == '__main__':
    unittest.main(verbosity=2)