diff --git a/planckton/tests/test_hydrogen_removal.py b/planckton/tests/test_hydrogen_removal.py index aa7e678..f9865f0 100644 --- a/planckton/tests/test_hydrogen_removal.py +++ b/planckton/tests/test_hydrogen_removal.py @@ -34,11 +34,11 @@ def test_hydrogen_removal_and_sim(): system = packer.pack() my_sim = Simulation( system, - kT=3.0, + kT=[3.0], + tau=[1.0], + n_steps=[1e3], gsd_write=1e2, log_write=1e2, - e_factor=0.5, - n_steps=3e3, mode="cpu", shrink_steps=1e3, ) diff --git a/planckton/tests/test_mixture.py b/planckton/tests/test_mixture.py index 102676c..2612c26 100644 --- a/planckton/tests/test_mixture.py +++ b/planckton/tests/test_mixture.py @@ -21,11 +21,11 @@ def test_mixture(): system = packer.pack() my_sim = Simulation( system, - kT=3.0, + kT=[3.0], + tau=[1.0], + n_steps=[1e3], gsd_write=1e2, log_write=1e2, - e_factor=0.5, - n_steps=3e3, mode="cpu", shrink_steps=1e3, ) diff --git a/planckton/tests/test_sim.py b/planckton/tests/test_sim.py index d2bce42..a32bac9 100644 --- a/planckton/tests/test_sim.py +++ b/planckton/tests/test_sim.py @@ -16,11 +16,11 @@ def test_simple_sim(self, compound_name): system = packer.pack() my_sim = Simulation( system, - kT=3.0, + kT=[3.0], + tau=[1.0], + n_steps=[1e3], gsd_write=1e2, log_write=1e2, - e_factor=1, - n_steps=3e3, mode="cpu", shrink_steps=1e3, target_length=packer.L, @@ -38,11 +38,11 @@ def test_smiles_gaff(self): system = packer.pack() my_sim = Simulation( system, - kT=3.0, + kT=[3.0], + tau=[1.0], + n_steps=[1e3], gsd_write=1e2, log_write=1e2, - e_factor=1, - n_steps=3e3, mode="cpu", shrink_steps=1e3, target_length=packer.L, @@ -60,11 +60,11 @@ def test_gaff_noH(self): system = packer.pack() my_sim = Simulation( system, - kT=3.0, + kT=[3.0], + tau=[1.0], + n_steps=[1e3], gsd_write=1e2, log_write=1e2, - e_factor=1, - n_steps=3e3, mode="cpu", shrink_steps=1e3, target_length=packer.L, @@ -101,13 +101,50 @@ def test_nlist(self): system = packer.pack() my_sim = Simulation( system, - kT=3.0, + kT=[3.0], + tau=[1.0], + n_steps=[1e3], gsd_write=1e2, log_write=1e2, - e_factor=1, - n_steps=3e3, mode="cpu", shrink_steps=1e3, target_length=packer.L, nlist="tree", ) + + def test_temps_ramp(self): + p3ht = Compound("c1cscc1CCCCCC") + packer = Pack( + p3ht, + ff=FORCEFIELD["gaff"], + n_compounds=2, + density=0.01 * u.g / u.cm ** 3, + ) + system = packer.pack() + my_sim = Simulation( + system, + kT=[3.0, 4.0], + tau=[1.0, 1.0], + n_steps=[1e3, 1e3], + shrink_steps=1e3, + target_length=packer.L, + mode="cpu", + ) + + def test_bad_temps_raises(self): + p3ht = Compound("c1cscc1CCCCCC") + packer = Pack( + p3ht, + ff=FORCEFIELD["gaff"], + n_compounds=2, + density=0.01 * u.g / u.cm ** 3, + ) + system = packer.pack() + with pytest.raises(AssertionError): + my_sim = Simulation( + system, + kT=[3.0, 4.0], + tau=[1.0], + n_steps=[1e3], + mode="cpu", + )