Enable parallel tests.
[hoomd-blue.git] / test / hoomd_script / test_pair_dpd.py
blob38d40cf32590597ffbbf1670e12d763f36608c1d
1 # -*- coding: iso-8859-1 -*-
2 # Maintainer: joaander
4 from hoomd_script import *
5 import unittest
6 import os
8 # pair.dpd
9 class pair_dpd_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 # basic test of creation
17 def test(self):
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);
20 dpd.update_coeffs();
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);
33 def tearDown(self):
34 init.reset();
37 if __name__ == '__main__':
38 unittest.main(argv = ['test.py', '-v'])