1 # -*- coding: iso-8859-1 -*-
4 from hoomd_script
import *
9 class pair_dpd_tests (unittest
.TestCase
):
12 init
.create_random(N
=100, phi_p
=0.05);
14 sorter
.set_params(grid
=8)
16 # basic test of creation
18 dpd
= pair
.dpd(r_cut
=3.0, T
=1.0);
19 dpd
.pair_coeff
.set('A', 'A', A
=1.0, gamma
= 4.5, r_cut
=2.5);
22 # test missing coefficients
23 def test_set_missing_gamma(self
):
24 dpd
= pair
.dpd(r_cut
=3.0, T
=1.0);
25 dpd
.pair_coeff
.set('A', 'A', A
=40);
26 self
.assertRaises(RuntimeError, dpd
.update_coeffs
);
28 # test missing coefficients
29 def test_missing_AA(self
):
30 dpd
= pair
.dpd(r_cut
=3.0, T
=1.0);
31 self
.assertRaises(RuntimeError, dpd
.update_coeffs
);
37 if __name__
== '__main__':
38 unittest
.main(argv
= ['test.py', '-v'])