def test(self): from espressomd.electrostatics import P3MGPU es = espressomd.System(box_l=[10.0, 10.0, 10.0]) test_params = {} test_params["prefactor"] = 2 test_params["cao"] = 2 test_params["r_cut"] = 0.9 test_params["accuracy"] = 1e-1 test_params["mesh"] = [10, 10, 10] test_params["epsilon"] = 20.0 test_params["alpha"] = 1.1 test_params["tune"] = False p3m = P3MGPU(**test_params) es.actors.add(p3m) assert_params_match(self, test_params, p3m.get_params())
def test(self): from espressomd.electrostatics import P3MGPU es = espressomd.System(box_l=[10.0, 10.0, 10.0]) es.seed = es.cell_system.get_state()['n_nodes'] * [1234] test_params = {} test_params["prefactor"] = 2 test_params["cao"] = 2 test_params["r_cut"] = 0.9 test_params["accuracy"] = 1e-1 test_params["mesh"] = [10, 10, 10] test_params["epsilon"] = 20.0 test_params["alpha"] = 1.1 test_params["tune"] = False p3m = P3MGPU(**test_params) es.actors.add(p3m) self.assertTrue(params_match(test_params, p3m.get_params()))
max_displacement=0.01) system.integrator.run(n_max_steps) system.integrator.set_vv() print("After: {:.2e}".format(system.analysis.energy()["total"])) # THERMOSTAT if not args.drude: system.thermostat.set_langevin(kT=temperature_com, gamma=gamma_com, seed=42) # ELECTROSTATICS if args.gpup3m: from espressomd.electrostatics import P3MGPU print("\n-->Tune P3M GPU") p3m = P3MGPU(prefactor=coulomb_prefactor, accuracy=1e-3) else: print("\n-->Tune P3M CPU") p3m = P3M(prefactor=coulomb_prefactor, accuracy=1e-3) system.actors.add(p3m) if args.drude: print("-->Adding Drude related bonds") thermalized_dist_bond = ThermalizedBond(temp_com=temperature_com, gamma_com=gamma_com, temp_distance=temperature_drude, gamma_distance=gamma_drude, r_cut=min(lj_sigmas.values()) * 0.5, seed=123)