Enable parallel tests.
[hoomd-blue.git] / test / hoomd_script / test_integrate_nvt.py
blobccd6a21a79207c5eb27f527161170c4573f221d5
1 # -*- coding: iso-8859-1 -*-
2 # Maintainer: joaander
4 from hoomd_script import *
5 import unittest
6 import os
8 # unit tests for integrate.nvt
9 class integrate_nvt_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.nvt(all, T=1.2, tau=0.5);
22 run(100);
24 # tests mtk=False
25 def test(self):
26 all = group.all();
27 integrate.mode_standard(dt=0.005);
28 integrate.nvt(all, T=1.2, tau=0.5,mtk=False);
29 run(100);
31 # test set_params
32 def test_set_params(self):
33 all = group.all();
34 nvt = integrate.nvt(all, T=1.2, tau=0.5);
35 nvt.set_params(T=1.3);
36 nvt.set_params(tau=0.6);
38 # test w/ empty group
39 def test_empty(self):
40 empty = group.cuboid(name="empty", xmin=-100, xmax=-100, ymin=-100, ymax=-100, zmin=-100, zmax=-100)
41 mode = integrate.mode_standard(dt=0.005);
42 nvt = integrate.nvt(group=empty, T=1.0, tau=0.5)
43 run(1);
45 def tearDown(self):
46 init.reset();
48 if __name__ == '__main__':
49 unittest.main(argv = ['test.py', '-v'])