Permalink
Browse files

Formatting.

  • Loading branch information...
fweik committed Oct 3, 2018
1 parent 5215157 commit 7c99454bd0f5943bf3ee20c9d2bc44650092f34f
@@ -256,7 +256,7 @@ static void recalc_maximal_cutoff_nonbonded() {
#endif
#ifdef WCA
max_cut_current = std::max(max_cut_current, data->WCA_cut);
max_cut_current = std::max(max_cut_current, data->WCA_cut);
#endif
#ifdef DPD
@@ -50,8 +50,7 @@ inline double wca_pair_energy(const Particle *p1, const Particle *p2,
if (dist < ia_params->WCA_cut) {
auto const frac2 = Utils::sqr(ia_params->WCA_sig / dist);
auto const frac6 = frac2 * frac2 * frac2;
return 4.0 * ia_params->WCA_eps *
(Utils::sqr(frac6) - frac6 + .25);
return 4.0 * ia_params->WCA_eps * (Utils::sqr(frac6) - frac6 + .25);
}
return 0.0;
}
@@ -112,13 +112,13 @@ def test_lj_generic(self):
def test_wca(self):
wca_eps = 2.12
wca_sig = 1.37
wca_cutoff = wca_sig * 2.**(1./6.)
wca_cutoff = wca_sig * 2.**(1. / 6.)
wca_shift = -((wca_sig / wca_cutoff)**12 - (
wca_sig / wca_cutoff)**6)
self.system.non_bonded_inter[0,0].wca.set_params(epsilon=wca_eps,
sigma=wca_sig)
self.system.non_bonded_inter[0, 0].wca.set_params(epsilon=wca_eps,
sigma=wca_sig)
for i in range(231):
self.system.part[1].pos = self.system.part[1].pos + self.step
@@ -144,7 +144,7 @@ def test_wca(self):
self.assertItemsFractionAlmostEqual(f1_sim, f1_ref)
self.system.non_bonded_inter[0, 0].wca.set_params(
epsilon=0.,sigma=1.)
epsilon=0., sigma=1.)
# Test Generic Lennard-Jones Softcore Potential
@ut.skipIf(not espressomd.has_features("LJGEN_SOFTCORE"),

0 comments on commit 7c99454

Please sign in to comment.