1 # -*- coding: iso-8859-1 -*-
4 from hoomd_script
import *
8 # unit tests for integrate.nve
9 class integrate_nve_tests (unittest
.TestCase
):
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
20 integrate
.mode_standard(dt
=0.005);
24 # tests creation of the method with options
27 integrate
.mode_standard(dt
=0.005);
28 integrate
.nve(all
, limit
=0.01, zero_force
=True);
32 def test_set_params(self
):
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);
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
)
52 if __name__
== '__main__':
53 unittest
.main(argv
= ['test.py', '-v'])