You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A different RNG salt has to be used for translation and rotation.
Test fragment
def test_correlations(self):
"""Checks that velocity components are uncorrelated"""
system=self.system
system.time_step=0.01
system.cell_system.skin=0.1
system.part.add(id=(1,2),pos=np.zeros((2,3)))
vel_obs = ParticleVelocities(ids=system.part[:].id)
vel_series = TimeSeries(obs=vel_obs)
system.auto_update_accumulators.add(vel_series)
if espressomd.has_features("ROTATION"):
system.part[:].rotation=(1,1,1)
omega_obs = ParticleBodyAngularVelocities(ids=system.part[:].id)
omega_series=TimeSeries(obs=omega_obs)
system.auto_update_accumulators.add(omega_series)
kT=3.2
system.thermostat.set_langevin(kT=kT,gamma=2.1,seed=17)
steps=int(1E5)
system.integrator.run(steps)
vel = np.array(vel_series.time_series())
for i in range(6):
for j in range(i+1,6):
print(i,j,np.sum(vel[:,i]*vel[:,j]/steps))
#self.assertAlmostEqual(np.sum(vel[:,i]*vel[:,j]),0)
if espressomd.has_features("ROTATION"):
omega = np.array(omega_series.time_series())
for i in range(6):
for j in range(i+1,6):
#self.assertClose(np.dot(omega[:,i],omega[:,j]),0)
print(i,j,np.sum(omega[:,i]*omega[:,j]))
for i in range(6):
for j in range(6):
#self.assertAlmostEqual(np.dot(vel[:,i],omega[:,j]),0)
print(i,j,np.sum(vel[:,i]*omega[:,j])/steps/kT)
The langevin thermostat uses maximally correlated noise for the translation and rotation thermalization.
The text was updated successfully, but these errors were encountered: