Skip to content
This repository has been archived by the owner on Jan 29, 2024. It is now read-only.

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jennyfothergill committed Sep 21, 2021
1 parent 6a46aae commit 150cc84
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 18 deletions.
6 changes: 3 additions & 3 deletions planckton/tests/test_hydrogen_removal.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
Expand Down
6 changes: 3 additions & 3 deletions planckton/tests/test_mixture.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
Expand Down
61 changes: 49 additions & 12 deletions planckton/tests/test_sim.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand Down Expand Up @@ -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",
)

0 comments on commit 150cc84

Please sign in to comment.