Commit 7c4a0d67 authored by cmaffeo2's avatar cmaffeo2
Browse files

Eliminated numpy log(0) error message when writing bond potentials, which is...

Eliminated numpy log(0) error message when writing bond potentials, which is caught anyway by .isnan
parent 06d30673
......@@ -153,6 +153,7 @@ class HarmonicBond(HarmonicPotential):
def potential(self,dr):
u = HarmonicPotential.potential(self,dr)
if self.correct_geometry:
with np.errstate(divide='ignore',invalid='ignore'):
du = 2*0.58622592*np.log(dr+self.r0) * self.temperature/295
du[np.logical_not(np.isfinite(du))] = 0
u = u-du
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment