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

remove functional tests

bug fix with rbt analysis
parent a005e633
......@@ -235,7 +235,7 @@ class RigidBodyTrajectory(IJob):
# The NetCDF variable that stores the rigid-body fit.
FIT = outputFile.createVariable('fit', numpy.dtype(numpy.float64).char, ('NGROUPS','NFRAMES'))
outputFile.info = self._info
outputFile.info = str(self)
# Loop over the groups.
for comp in range(self.configuration['atom_selection']['selection_length']):
......
from MDANSE import REGISTRY
for v in REGISTRY['job'].itervalues():
for k,v in REGISTRY['job'].items():
# Skip the mcstas test because mcstas executable is not available on all platform
if k=='mvi':
continue
v.build_test("Test_%s.py" % v.type)
#!/usr/bin/python
import unittest
from Tests.UnitTests.UnitTest import UnitTest
from MDANSE import REGISTRY
class TestAC(UnitTest):
def test(self):
parameters = {}
parameters['axis_selection'] = ('Water', ('OW', 'HW'))
parameters['frames'] = (0, 10, 1)
parameters['output_files'] = ('/tmp/output', ['netcdf'])
parameters['per_axis'] = False
parameters['running_mode'] = ('monoprocessor', 1)
parameters['trajectory'] = '../../../Data/Trajectories/MMTK/waterbox_in_periodic_universe.nc'
job = REGISTRY['job']['ac']()
self.assertNotRaises(job.run, parameters, status=False)
def suite():
loader = unittest.TestLoader()
s = unittest.TestSuite()
s.addTest(loader.loadTestsFromTestCase(TestAC))
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 TestAPM(UnitTest):
def test(self):
parameters = {}
parameters['axis'] = ['a', 'b']
parameters['frames'] = (0, 10, 1)
parameters['name'] = 'DMPC'
parameters['output_files'] = ('/tmp/output', ['netcdf'])
parameters['running_mode'] = ('monoprocessor', 1)
parameters['trajectory'] = '../../../Data/Trajectories/MMTK/dmpc_in_periodic_universe.nc'
job = REGISTRY['job']['apm']()
self.assertNotRaises(job.run, parameters, status=False)
def suite():
loader = unittest.TestLoader()
s = unittest.TestSuite()
s.addTest(loader.loadTestsFromTestCase(TestAPM))
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 TestBTT(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']['btt']()
self.assertNotRaises(job.run, parameters, status=False)
def suite():
loader = unittest.TestLoader()
s = unittest.TestSuite()
s.addTest(loader.loadTestsFromTestCase(TestBTT))
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 TestCASTEP(UnitTest):
def test(self):
parameters = {}
parameters['castep_file'] = '../../../Data/Trajectories/CASTEP/PBAnew.md'
parameters['output_file'] = ('/tmp/output', ['netcdf'])
job = REGISTRY['job']['castep']()
self.assertNotRaises(job.run, parameters, status=False)
def suite():
loader = unittest.TestLoader()
s = unittest.TestSuite()
s.addTest(loader.loadTestsFromTestCase(TestCASTEP))
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 TestCCF(UnitTest):
def test(self):
parameters = {}
parameters['atom_selection'] = 'all'
parameters['atom_transmutation'] = None
parameters['frames'] = (0, 10, 1)
parameters['instrument_resolution'] = ('gaussian', {'mu': 0.0, 'sigma': 10.0})
parameters['normalize'] = False
parameters['output_files'] = ('/tmp/output', ['netcdf'])
parameters['q_vectors'] = ('spherical_lattice', {'width': 0.1, 'n_vectors': 50, 'shells': (0.1, 5, 0.1)})
parameters['running_mode'] = ('monoprocessor', 1)
parameters['trajectory'] = '../../../Data/Trajectories/MMTK/waterbox_in_periodic_universe.nc'
parameters['weights'] = 'b_coherent'
job = REGISTRY['job']['ccf']()
self.assertNotRaises(job.run, parameters, status=False)
def suite():
loader = unittest.TestLoader()
s = unittest.TestSuite()
s.addTest(loader.loadTestsFromTestCase(TestCCF))
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 TestCHARMM(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']['charmm']()
self.assertNotRaises(job.run, parameters, status=False)
def suite():
loader = unittest.TestLoader()
s = unittest.TestSuite()
s.addTest(loader.loadTestsFromTestCase(TestCHARMM))
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 TestCN(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['r_values'] = (0, 10, 1)
parameters['running_mode'] = ('monoprocessor', 1)
parameters['trajectory'] = '../../../Data/Trajectories/MMTK/waterbox_in_periodic_universe.nc'
job = REGISTRY['job']['cn']()
self.assertNotRaises(job.run, parameters, status=False)
def suite():
loader = unittest.TestLoader()
s = unittest.TestSuite()
s.addTest(loader.loadTestsFromTestCase(TestCN))
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 TestCOMT(UnitTest):
def test(self):
parameters = {}
parameters['atom_selection'] = 'all'
parameters['frames'] = (0, 1, 1)
parameters['grouping_level'] = 'atom'
parameters['output_files'] = ('/tmp/output', ['netcdf'])
parameters['trajectory'] = '../../../Data/Trajectories/MMTK/waterbox_in_periodic_universe.nc'
job = REGISTRY['job']['comt']()
self.assertNotRaises(job.run, parameters, status=False)
def suite():
loader = unittest.TestLoader()
s = unittest.TestSuite()
s.addTest(loader.loadTestsFromTestCase(TestCOMT))
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 TestCT(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']['ct']()
self.assertNotRaises(job.run, parameters, status=False)
def suite():
loader = unittest.TestLoader()
s = unittest.TestSuite()
s.addTest(loader.loadTestsFromTestCase(TestCT))
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 TestDACF(UnitTest):
def test(self):
parameters = {}
parameters['atom_charges'] = {0: 0.5, 1: 1.2, 2: -0.2}
parameters['atom_selection'] = 'atom_index 0,1,2'
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'
job = REGISTRY['job']['dacf']()
self.assertNotRaises(job.run, parameters, status=False)
def suite():
loader = unittest.TestLoader()
s = unittest.TestSuite()
s.addTest(loader.loadTestsFromTestCase(TestDACF))
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 TestDCSF(UnitTest):
def test(self):
parameters = {}
parameters['atom_selection'] = 'all'
parameters['atom_transmutation'] = None
parameters['frames'] = (0, 10, 1)
parameters['instrument_resolution'] = ('gaussian', {'mu': 0.0, 'sigma': 10.0})
parameters['output_files'] = ('/tmp/output', ['netcdf'])
parameters['q_vectors'] = ('spherical_lattice', {'width': 0.1, 'n_vectors': 50, 'shells': (0.1, 5, 0.1)})
parameters['running_mode'] = ('monoprocessor', 1)
parameters['trajectory'] = '../../../Data/Trajectories/MMTK/waterbox_in_periodic_universe.nc'
parameters['weights'] = 'b_coherent'
job = REGISTRY['job']['dcsf']()
self.assertNotRaises(job.run, parameters, status=False)
def suite():
loader = unittest.TestLoader()
s = unittest.TestSuite()
s.addTest(loader.loadTestsFromTestCase(TestDCSF))
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 TestDEN(UnitTest):
def test(self):
parameters = {}
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'
job = REGISTRY['job']['den']()
self.assertNotRaises(job.run, parameters, status=False)
def suite():
loader = unittest.TestLoader()
s = unittest.TestSuite()
s.addTest(loader.loadTestsFromTestCase(TestDEN))
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 TestDFTB(UnitTest):
def test(self):
parameters = {}
parameters['output_file'] = ('/tmp/output', ['netcdf'])
parameters['trj_file'] = '../../../Data/Trajectories/Forcite/nylon66_rho100_500K_v300K.trj'
parameters['xtd_file'] = '../../../Data/Trajectories/Forcite/nylon66_rho100_500K_v300K.xtd'
job = REGISTRY['job']['dftb']()
self.assertNotRaises(job.run, parameters, status=False)
def suite():
loader = unittest.TestLoader()
s = unittest.TestSuite()
s.addTest(loader.loadTestsFromTestCase(TestDFTB))
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 TestDISCOVER(UnitTest):
def test(self):
parameters = {}
parameters['his_file'] = '../../../Data/Trajectories/Discover/sushi.his'
parameters['output_file'] = ('/tmp/output', ['netcdf'])
parameters['xtd_file'] = '../../../Data/Trajectories/Discover/sushi.xtd'
job = REGISTRY['job']['discover']()
self.assertNotRaises(job.run, parameters, status=False)
def suite():
loader = unittest.TestLoader()
s = unittest.TestSuite()
s.addTest(loader.loadTestsFromTestCase(TestDISCOVER))
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 TestDISF(UnitTest):
def test(self):
parameters = {}
parameters['atom_selection'] = 'all'
parameters['atom_transmutation'] = None
parameters['frames'] = (0, 10, 1)
parameters['grouping_level'] = 'atom'
parameters['instrument_resolution'] = ('gaussian', {'mu': 0.0, 'sigma': 10.0})
parameters['output_files'] = ('/tmp/output', ['netcdf'])
parameters['projection'] = None
parameters['q_vectors'] = ('spherical_lattice', {'width': 0.1, 'n_vectors': 50, 'shells': (0.1, 5, 0.1)})
parameters['running_mode'] = ('monoprocessor', 1)
parameters['trajectory'] = '../../../Data/Trajectories/MMTK/waterbox_in_periodic_universe.nc'
parameters['weights'] = 'b_incoherent2'
job = REGISTRY['job']['disf']()
self.assertNotRaises(job.run, parameters, status=False)
def suite():
loader = unittest.TestLoader()
s = unittest.TestSuite()
s.addTest(loader.loadTestsFromTestCase(TestDISF))
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 TestDL_POLY(UnitTest):
def test(self):
parameters = {}
parameters['atom_aliases'] = {}
parameters['field_file'] = '../../../Data/Trajectories/DL_Poly/FIELD_cumen'
parameters['history_file'] = '../../../Data/Trajectories/DL_Poly/HISTORY_cumen'
parameters['output_file'] = ('/tmp/output', ['netcdf'])
parameters['version'] = '2'
job = REGISTRY['job']['dl_poly']()
self.assertNotRaises(job.run, parameters, status=False)
def suite():
loader = unittest.TestLoader()
s = unittest.TestSuite()
s.addTest(loader.loadTestsFromTestCase(TestDL_POLY))
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 TestDMOL(UnitTest):
def test(self):
parameters = {}
parameters['his_file'] = '../../../Data/Trajectories/Discover/sushi.his'
parameters['output_file'] = ('/tmp/output', ['netcdf'])
parameters['xtd_file'] = '../../../Data/Trajectories/Discover/sushi.xtd'
job = REGISTRY['job']['dmol']()
self.assertNotRaises(job.run, parameters, status=False)
def suite():
loader = unittest.TestLoader()
s = unittest.TestSuite()
s.addTest(loader.loadTestsFromTestCase(TestDMOL))
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 TestDOS(UnitTest):
def test(self):
parameters = {}
parameters['atom_selection'] = 'all'
parameters['atom_transmutation'] = None
parameters['frames'] = (0, 10, 1)
parameters['grouping_level'] = 'atom'
parameters['instrument_resolution'] = ('gaussian', {'mu': 0.0, 'sigma': 10.0})
parameters['interpolation_order'] = 'no interpolation'
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']['dos']()
self.assertNotRaises(job.run, parameters, status=False)
def suite():
loader = unittest.TestLoader()
s = unittest.TestSuite()
s.addTest(loader.loadTestsFromTestCase(TestDOS))
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