Enable parallel tests.
[hoomd-blue.git] / test / hoomd_script / test_integrate_nve.py
blobabcbc8640aadbdce99939cb5379837c71ad243bd
1 # -*- coding: iso-8859-1 -*-
2 # Maintainer: joaander
4 from hoomd_script import *
5 import unittest
6 import os
8 # unit tests for integrate.nve
9 class integrate_nve_tests (unittest.TestCase):
10 def setUp(self):
11 print
12 init.create_random(N=100, phi_p=0.05);
13 force.constant(fx=0.1, fy=0.1, fz=0.1)
15 sorter.set_params(grid=8)
17 # tests basic creation of the dump
18 def test(self):
19 all = group.all();
20 integrate.mode_standard(dt=0.005);
21 integrate.nve(all);
22 run(100);
24 # tests creation of the method with options
25 def test(self):
26 all = group.all();
27 integrate.mode_standard(dt=0.005);
28 integrate.nve(all, limit=0.01, zero_force=True);
29 run(100);
31 # test set_params
32 def test_set_params(self):
33 all = group.all();
34 mode = integrate.mode_standard(dt=0.005);
35 mode.set_params(dt=0.001);
36 nve = integrate.nve(all);
37 nve.set_params(limit=False);
38 nve.set_params(limit=0.1);
39 nve.set_params(zero_force=False);
41 # test w/ empty group
42 def test_empty(self):
43 empty = group.cuboid(name="empty", xmin=-100, xmax=-100, ymin=-100, ymax=-100, zmin=-100, zmax=-100)
44 mode = integrate.mode_standard(dt=0.005);
45 nve = integrate.nve(group=empty)
46 run(1);
48 def tearDown(self):
49 init.reset();
52 if __name__ == '__main__':
53 unittest.main(argv = ['test.py', '-v'])