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
Currently, DPD is encoded as a Potential that must be used in conjunction with VerletNVE. This can be confusing to the user and its awkward to explain. For instance, if you need DPD you need to include "VerletNVE.cuh":
#include<uammd.cuh>
#include<Integrator/VerletNVE.cuh>
#include<Interactor/PairForces.cuh>
#include<Interactor/Potential/DPD.cuh>usingnamespaceuammd;//A function that creates and returns a DPD integratorautocreateIntegratorDPD(UAMMD sim){
Potential::DPD::Parameters par;
par.temperature = sim.par.temperature;
//The cut off for the weight function
par.cutOff = sim.par.cutOff;
//The friction coefficient
par.gamma = sim.par.friction;
//The strength of the weight function
par.A = sim.par.strength;
par.dt = sim.par.dt;
auto dpd = make_shared<Potential::DPD>(dpd);
//From the example in PairForcesauto interactor = createPairForcesWithPotential(sim, dpd);
//From the example in the MD section// particle velocities should not be initialized// by VerletNVE (initVelocities=false)using NVE = VerletNVE;
NVE::Parameters params;
params.dt = par.dt;
params.initVelocities=false;
verlet = make_shared<NVE>(pd, params);
verlet->addInteractor(interactor);
return verlet;
}
It would be great if instead one could
#include<uammd.cuh>
#include<Integrator/DPD.cuh>usingnamespaceuammd;//A function that creates and returns a DPD integratorautocreateIntegratorDPD(UAMMD sim){
DPDIntegrator::Parameters par;
par.temperature = sim.par.temperature;
//The cut off for the weight function
par.cutOff = sim.par.cutOff;
//The friction coefficient
par.gamma = sim.par.friction;
//The strength of the weight function
par.A = sim.par.strength;
par.dt = sim.par.dt;
par.initVelocities=false;
dpd = make_shared<DPDIntegrator>(pd, params);
return dpd;
}
This would also make it easier to improve/change the algorithm specifically for DPD should the need arise.
The text was updated successfully, but these errors were encountered:
Currently, DPD is encoded as a Potential that must be used in conjunction with VerletNVE. This can be confusing to the user and its awkward to explain. For instance, if you need DPD you need to include "VerletNVE.cuh":
It would be great if instead one could
This would also make it easier to improve/change the algorithm specifically for DPD should the need arise.
The text was updated successfully, but these errors were encountered: