1 # -*- coding: iso-8859-1 -*-
4 from hoomd_script
import *
8 # unit tests for integrate.nve_rigid
9 class integrate_nvt_rigid_tests (unittest
.TestCase
):
12 sysdef
= init
.create_random(N
=100, phi_p
=0.05);
13 for p
in sysdef
.particles
:
16 sysdef
.sysdef
.getRigidData().initializeData()
17 force
.constant(fx
=0.1, fy
=0.1, fz
=0.1)
19 # tests basic creation of the integrater
22 integrate
.mode_standard(dt
=0.005);
23 integrate
.nvt_rigid(all
, T
=1.2, tau
=0.5);
27 def test_set_params(self
):
29 nvt
= integrate
.nvt_rigid(all
, T
=1.2, tau
=0.5);
30 nvt
.set_params(T
=1.3);
35 # unit tests for integrate.nve_rigid w/o rigid bodies
36 class integrate_nvt_rigid_nobody_tests (unittest
.TestCase
):
39 sysdef
= init
.create_random(N
=100, phi_p
=0.05);
40 force
.constant(fx
=0.1, fy
=0.1, fz
=0.1)
44 empty
= group
.cuboid(name
="empty", xmin
=-100, xmax
=-100, ymin
=-100, ymax
=-100, zmin
=-100, zmax
=-100)
45 mode
= integrate
.mode_standard(dt
=0.005);
46 nve
= integrate
.nvt_rigid(group
=empty
, T
=1.2, tau
=0.5)
52 if __name__
== '__main__':
53 unittest
.main(argv
= ['test.py', '-v'])