Skip to content
Permalink
Browse files

Fix regressions

  • Loading branch information...
jngrad committed Jun 7, 2019
1 parent 4198151 commit fc23107b8846273ef1a509d03093ab31ea2ad394
@@ -21,10 +21,12 @@
import tests_common
import espressomd

if espressomd.has_features("ELECTROSTATICS", "PARTIAL_PERIODIC"):
from espressomd.electrostatics import MMM1D


@utx.skipIfMissingFeatures(["ELECTROSTATICS", "PARTIAL_PERIODIC"])
class ElectrostaticInteractionsTests(ut.TestCase):
from espressomd.electrostatics import MMM1D
# Handle to espresso system
system = espressomd.System(box_l=[1.0, 1.0, 1.0])

@@ -38,11 +40,12 @@ def setUp(self):
self.system.part[0].q = 1
self.system.part[1].q = -1

test_mmm1d = tests_common.generate_test_for_class(
system, MMM1D, dict(prefactor=2.0,
maxPWerror=0.001,
far_switch_radius=3,
tune=False))
if espressomd.has_features("ELECTROSTATICS", "PARTIAL_PERIODIC"):
test_mmm1d = tests_common.generate_test_for_class(
system, MMM1D, dict(prefactor=2.0,
maxPWerror=0.001,
far_switch_radius=3,
tune=False))


if __name__ == "__main__":
@@ -70,8 +70,10 @@ class ReactionEnsembleTest(ut.TestCase):
system.part[0].add_bond((h, 1))
WLRE = reaction_ensemble.WangLandauReactionEnsemble(
temperature=temperature, exclusion_radius=0, seed=69)
WLRE.add_reaction(gamma=K_diss, reactant_types=[0], reactant_coefficients=[
1], product_types=[1, 2], product_coefficients=[1, 1], default_charges={0: 0, 1: -1, 2: +1})
WLRE.add_reaction(
gamma=K_diss, reactant_types=[0], reactant_coefficients=[1],
product_types=[1, 2], product_coefficients=[1, 1],
default_charges={0: 0, 1: -1, 2: +1})
system.setup_type_map([0, 1, 2, 3])
# initialize wang_landau
# generate preliminary_energy_run_results here, this should be done in a
@@ -78,7 +78,7 @@ class WidomInsertionTest(ut.TestCase):
def setUp(self):
self.system.part.add(id=0, pos=0.5 * self.system.box_l,
type=self.TYPE_HA)

self.system.non_bonded_inter[self.TYPE_HA, self.TYPE_HA].lennard_jones.set_params(
epsilon=self.LJ_EPS, sigma=self.LJ_SIG, cutoff=self.LJ_CUT,
shift="auto")

0 comments on commit fc23107

Please sign in to comment.
You can’t perform that action at this time.