Commit 7dc9a136 authored by eric pellegrini's avatar eric pellegrini
Browse files

remove functional tests

bug fix with rbt analysis
parent a005e633
#!/usr/bin/python
import unittest
from Tests.UnitTests.UnitTest import UnitTest
from MDANSE import REGISTRY
class TestRMT(UnitTest):
def test(self):
parameters = {}
parameters['axis'] = 'c'
parameters['frames'] = (0, 10, 1)
parameters['lower_leaflet'] = 'DMPC'
parameters['output_files'] = ('/tmp/output', ['netcdf'])
parameters['trajectory'] = '../../../Data/Trajectories/MMTK/dmpc_in_periodic_universe.nc'
parameters['upper_leaflet'] = 'DMPC'
job = REGISTRY['job']['rmt']()
self.assertNotRaises(job.run, parameters, status=False)
def suite():
loader = unittest.TestLoader()
s = unittest.TestSuite()
s.addTest(loader.loadTestsFromTestCase(TestRMT))
return s
if __name__ == '__main__':
unittest.main(verbosity=2)
#!/usr/bin/python
import unittest
from Tests.UnitTests.UnitTest import UnitTest
from MDANSE import REGISTRY
class TestROG(UnitTest):
def test(self):
parameters = {}
parameters['atom_selection'] = 'all'
parameters['frames'] = (0, 10, 1)
parameters['output_files'] = ('/tmp/output', ['netcdf'])
parameters['running_mode'] = ('monoprocessor', 1)
parameters['trajectory'] = '../../../Data/Trajectories/MMTK/waterbox_in_periodic_universe.nc'
parameters['weights'] = 'equal'
job = REGISTRY['job']['rog']()
self.assertNotRaises(job.run, parameters, status=False)
def suite():
loader = unittest.TestLoader()
s = unittest.TestSuite()
s.addTest(loader.loadTestsFromTestCase(TestROG))
return s
if __name__ == '__main__':
unittest.main(verbosity=2)
#!/usr/bin/python
import unittest
from Tests.UnitTests.UnitTest import UnitTest
from MDANSE import REGISTRY
class TestSAS(UnitTest):
def test(self):
parameters = {}
parameters['atom_selection'] = 'all'
parameters['frames'] = (0, 2, 1)
parameters['n_sphere_points'] = 1000
parameters['output_files'] = ('/tmp/output', ['netcdf'])
parameters['probe_radius'] = 0.14
parameters['running_mode'] = ('monoprocessor', 1)
parameters['trajectory'] = '../../../Data/Trajectories/MMTK/waterbox_in_periodic_universe.nc'
job = REGISTRY['job']['sas']()
self.assertNotRaises(job.run, parameters, status=False)
def suite():
loader = unittest.TestLoader()
s = unittest.TestSuite()
s.addTest(loader.loadTestsFromTestCase(TestSAS))
return s
if __name__ == '__main__':
unittest.main(verbosity=2)
#!/usr/bin/python
import unittest
from Tests.UnitTests.UnitTest import UnitTest
from MDANSE import REGISTRY
class TestSD(UnitTest):
def test(self):
parameters = {}
parameters['frames'] = (0, 10, 1)
parameters['output_files'] = ('/tmp/output', ['netcdf'])
parameters['reference_basis'] = ('C284H438N84O79S7', ('O', 'C_beta', 'C_delta'))
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'
job = REGISTRY['job']['sd']()
self.assertNotRaises(job.run, parameters, status=False)
def suite():
loader = unittest.TestLoader()
s = unittest.TestSuite()
s.addTest(loader.loadTestsFromTestCase(TestSD))
return s
if __name__ == '__main__':
unittest.main(verbosity=2)
#!/usr/bin/python
import unittest
from Tests.UnitTests.UnitTest import UnitTest
from MDANSE import REGISTRY
class TestSFFSF(UnitTest):
def test(self):
parameters = {}
parameters['instrument_resolution'] = ('gaussian', {'mu': 0.0, 'sigma': 10.0})
parameters['netcdf_input_file'] = '../../../Data/NetCDF/disf_prot.nc'
parameters['output_files'] = ('/tmp/output', ['netcdf'])
job = REGISTRY['job']['sffsf']()
self.assertNotRaises(job.run, parameters, status=False)
def suite():
loader = unittest.TestLoader()
s = unittest.TestSuite()
s.addTest(loader.loadTestsFromTestCase(TestSFFSF))
return s
if __name__ == '__main__':
unittest.main(verbosity=2)
#!/usr/bin/python
import unittest
from Tests.UnitTests.UnitTest import UnitTest
from MDANSE import REGISTRY
class TestSSF(UnitTest):
def test(self):
parameters = {}
parameters['atom_selection'] = 'all'
parameters['atom_transmutation'] = None
parameters['frames'] = (0, 10, 1)
parameters['output_files'] = ('/tmp/output', ['netcdf'])
parameters['q_values'] = (0, 10, 1)
parameters['r_values'] = (0, 10, 1)
parameters['running_mode'] = ('monoprocessor', 1)
parameters['trajectory'] = '../../../Data/Trajectories/MMTK/waterbox_in_periodic_universe.nc'
parameters['weights'] = 'b_coherent'
job = REGISTRY['job']['ssf']()
self.assertNotRaises(job.run, parameters, status=False)
def suite():
loader = unittest.TestLoader()
s = unittest.TestSuite()
s.addTest(loader.loadTestsFromTestCase(TestSSF))
return s
if __name__ == '__main__':
unittest.main(verbosity=2)
#!/usr/bin/python
import unittest
from Tests.UnitTests.UnitTest import UnitTest
from MDANSE import REGISTRY
class TestTEMP(UnitTest):
def test(self):
parameters = {}
parameters['frames'] = (0, 10, 1)
parameters['interpolation_order'] = 'no interpolation'
parameters['output_files'] = ('/tmp/output', ['netcdf'])
parameters['trajectory'] = '../../../Data/Trajectories/MMTK/waterbox_in_periodic_universe.nc'
job = REGISTRY['job']['temp']()
self.assertNotRaises(job.run, parameters, status=False)
def suite():
loader = unittest.TestLoader()
s = unittest.TestSuite()
s.addTest(loader.loadTestsFromTestCase(TestTEMP))
return s
if __name__ == '__main__':
unittest.main(verbosity=2)
#!/usr/bin/python
import unittest
from Tests.UnitTests.UnitTest import UnitTest
from MDANSE import REGISTRY
class TestUT(UnitTest):
def test(self):
parameters = {}
parameters['atom_selection'] = 'all'
parameters['frames'] = (0, 10, 1)
parameters['output_files'] = ('/tmp/output', ['netcdf'])
parameters['trajectory'] = '../../../Data/Trajectories/MMTK/waterbox_in_periodic_universe.nc'
job = REGISTRY['job']['ut']()
self.assertNotRaises(job.run, parameters, status=False)
def suite():
loader = unittest.TestLoader()
s = unittest.TestSuite()
s.addTest(loader.loadTestsFromTestCase(TestUT))
return s
if __name__ == '__main__':
unittest.main(verbosity=2)
#!/usr/bin/python
import unittest
from Tests.UnitTests.UnitTest import UnitTest
from MDANSE import REGISTRY
class TestVACF(UnitTest):
def test(self):
parameters = {}
parameters['atom_selection'] = 'all'
parameters['atom_transmutation'] = None
parameters['frames'] = (0, 10, 1)
parameters['grouping_level'] = 'atom'
parameters['interpolation_order'] = 'no interpolation'
parameters['normalize'] = False
parameters['output_files'] = ('/tmp/output', ['netcdf'])
parameters['projection'] = None
parameters['running_mode'] = ('monoprocessor', 1)
parameters['trajectory'] = '../../../Data/Trajectories/MMTK/waterbox_in_periodic_universe.nc'
parameters['weights'] = 'equal'
job = REGISTRY['job']['vacf']()
self.assertNotRaises(job.run, parameters, status=False)
def suite():
loader = unittest.TestLoader()
s = unittest.TestSuite()
s.addTest(loader.loadTestsFromTestCase(TestVACF))
return s
if __name__ == '__main__':
unittest.main(verbosity=2)
#!/usr/bin/python
import unittest
from Tests.UnitTests.UnitTest import UnitTest
from MDANSE import REGISTRY
class TestVASP(UnitTest):
def test(self):
parameters = {}
parameters['output_file'] = ('/tmp/output', ['netcdf'])
parameters['time_step'] = 1.0
parameters['xdatcar_file'] = '../../../Data/Trajectories/VASP/XDATCAR_version5'
job = REGISTRY['job']['vasp']()
self.assertNotRaises(job.run, parameters, status=False)
def suite():
loader = unittest.TestLoader()
s = unittest.TestSuite()
s.addTest(loader.loadTestsFromTestCase(TestVASP))
return s
if __name__ == '__main__':
unittest.main(verbosity=2)
#!/usr/bin/python
import unittest
from Tests.UnitTests.UnitTest import UnitTest
from MDANSE import REGISTRY
class TestVO(UnitTest):
def test(self):
parameters = {}
parameters['frames'] = (0, 5, 1)
parameters['output_files'] = ('/tmp/output', ['netcdf'])
parameters['pbc'] = True
parameters['pbc_border_size'] = 0.0
parameters['trajectory'] = '../../../Data/Trajectories/MMTK/waterbox_in_periodic_universe.nc'
job = REGISTRY['job']['vo']()
self.assertNotRaises(job.run, parameters, status=False)
def suite():
loader = unittest.TestLoader()
s = unittest.TestSuite()
s.addTest(loader.loadTestsFromTestCase(TestVO))
return s
if __name__ == '__main__':
unittest.main(verbosity=2)
#!/usr/bin/python
import unittest
from Tests.UnitTests.UnitTest import UnitTest
from MDANSE import REGISTRY
class TestXPLOR(UnitTest):
def test(self):
parameters = {}
parameters['dcd_file'] = '../../../Data/Trajectories/CHARMM/2vb1.dcd'
parameters['fold'] = False
parameters['output_file'] = ('/tmp/output', ['netcdf'])
parameters['pdb_file'] = '../../../Data/Trajectories/CHARMM/2vb1.pdb'
job = REGISTRY['job']['xplor']()
self.assertNotRaises(job.run, parameters, status=False)
def suite():
loader = unittest.TestLoader()
s = unittest.TestSuite()
s.addTest(loader.loadTestsFromTestCase(TestXPLOR))
return s
if __name__ == '__main__':
unittest.main(verbosity=2)
#!/usr/bin/python
import unittest
from Tests.UnitTests.UnitTest import UnitTest
from MDANSE import REGISTRY
class TestXSSF(UnitTest):
def test(self):
parameters = {}
parameters['atom_selection'] = 'all'
parameters['atom_transmutation'] = None
parameters['frames'] = (0, 10, 1)
parameters['output_files'] = ('/tmp/output', ['netcdf'])
parameters['q_values'] = (0, 10, 1)
parameters['r_values'] = (0, 10, 1)
parameters['running_mode'] = ('monoprocessor', 1)
parameters['trajectory'] = '../../../Data/Trajectories/MMTK/waterbox_in_periodic_universe.nc'
job = REGISTRY['job']['xssf']()
self.assertNotRaises(job.run, parameters, status=False)
def suite():
loader = unittest.TestLoader()
s = unittest.TestSuite()
s.addTest(loader.loadTestsFromTestCase(TestXSSF))
return s
if __name__ == '__main__':
unittest.main(verbosity=2)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment