Fix potential problem in Messenger related to MPI window
[hoomd-blue.git] / test / hoomd_script / test_external_periodic.py
blob73c4daaa0be6fa7f0b255a62317fa91fedf4295a
1 # -*- coding: iso-8859-1 -*-
2 # Maintainer: joaander
4 from hoomd_script import *
5 import unittest
6 import os
8 # tests force.constant
9 class external_periodic_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 an external.periodic
17 def test_create(self):
18 periodic = external.periodic();
19 periodic.force_coeff.set('A',A=1.0, i=3, w=0.02, p=3);
20 all = group.all();
21 integrate.mode_standard(dt=0.001);
22 integrate.nve(all);
23 run(100);
25 ## test enable/disable
26 def test_enable_disable(self):
27 all = group.all()
28 periodic = external.periodic();
29 periodic.force_coeff.set('A',A=1.0, i=3, w=0.02, p=3);
31 periodic.disable();
32 periodic.enable();
34 def tearDown(self):
35 init.reset();
38 if __name__ == '__main__':
39 unittest.main(argv = ['test.py', '-v'])