Exemplo n.º 1
0
 def test_multi_structure(self, pt_blank_dir, grompp):
     from paratemp.sim_setup import compile_tprs
     from paratemp.tools import get_temperatures
     dir_topo = pt_blank_dir.joinpath('TOPO')
     dir_topo.mkdir()
     number = 2
     with cd(dir_topo):
         compile_tprs(start_temp=298,  scaling_exponent=0.025,
                      number=number,
                      template='../'+n_template,
                      multi_structure=True,
                      structure='../PT-out',
                      base_name='nvt',
                      grompp_exe=grompp)
     assert dir_topo.exists()
     for i in range(number):
         assert dir_topo.joinpath('nvt{}.tpr'.format(i)).exists()
     assert get_temperatures(
         str(dir_topo.joinpath('temperatures.dat'))).shape == (2,)
Exemplo n.º 2
0
 def test_warns(self, pt_blank_dir, grompp):
     from paratemp.sim_setup import compile_tprs
     from paratemp.tools import get_temperatures
     dir_topo = pt_blank_dir.joinpath('TOPO')
     dir_topo.mkdir()
     number = 2
     with cd(dir_topo):
         with pytest.warns(UserWarning, match=r'Found \d+ structure files'):
             compile_tprs(start_temp=298,
                          scaling_exponent=0.025,
                          number=number,
                          template='../' + n_template,
                          structure='../*.gro',
                          base_name='nvt',
                          grompp_exe=grompp)
     assert dir_topo.exists()
     for i in range(number):
         assert dir_topo.joinpath('nvt{}.tpr'.format(i)).exists()
     assert get_temperatures(str(
         dir_topo.joinpath('temperatures.dat'))).shape == (2, )