Enable parallel tests.
[hoomd-blue.git] / test / hoomd_script / test_wall_lj.py
blobbbe65eb216e170581a987b0ac0aeb99bc3ed2322
1 # -*- coding: iso-8859-1 -*-
2 # Maintainer: joaander
4 from hoomd_script import *
5 import unittest
6 import os
8 # tests wall.lj
9 class wall_lj_tests (unittest.TestCase):
10 def setUp(self):
11 print
12 init.create_random(N=100, phi_p=0.05);
14 sorter.set_params(grid=8)
16 # test to see that se can create a wall.lj
17 def test_create(self):
18 wall.lj(r_cut=3.0);
20 # test setting coefficients
21 def test_set_coeff(self):
22 lj_wall = wall.lj(r_cut=3.0);
23 lj_wall.set_coeff('A', epsilon=1.0, sigma=1.0, alpha=1.0)
24 all = group.all();
25 integrate.mode_standard(dt=0.005);
26 integrate.nve(all);
27 run(100);
29 # test coefficient not set checking
30 def test_set_coeff_fail(self):
31 lj_wall = wall.lj(r_cut=3.0);
32 all = group.all();
33 integrate.mode_standard(dt=0.005);
34 integrate.nve(all);
35 self.assertRaises(RuntimeError, run, 100);
37 def tearDown(self):
38 init.reset();
40 if __name__ == '__main__':
41 unittest.main(argv = ['test.py', '-v'])