Ejemplo n.º 1
0
    def test_galilei_transform(self):
        g = GalileiTransform()
        g.galilei_transform()

        np.testing.assert_allclose(np.copy(g.system_CMS_velocity()),
                                   np.zeros((3, )),
                                   atol=1e-15)
Ejemplo n.º 2
0
system.non_bonded_inter[0, 0].dpd.set_params(weight_function=1,
                                             gamma=gamma,
                                             r_cut=r_cut,
                                             trans_weight_function=0,
                                             trans_gamma=0,
                                             trans_r_cut=0)

# Set up the repulsive interaction
system.non_bonded_inter[0, 0].hat.set_params(F_max=F_max, cutoff=r_cut)

# Warm up and equilibration
system.integrator.run(1000000)

# Reset COM movement
g = GalileiTransform()
g.galilei_transform()

# Set up of correlators to obtain stress autocorrelation functions
dso = espressomd.observables.DPDStress()
plain_old_stress = espressomd.observables.StressTensor()

c_dpd = Correlator(obs1=dso,
                   tau_lin=tau_lin,
                   tau_max=tau_max,
                   delta_N=1,
                   corr_operation="componentwise_product",
                   compress1="discard1")
c_old = Correlator(obs1=plain_old_stress,
                   tau_lin=tau_lin,
                   tau_max=tau_max,
                   delta_N=1,