I have a question about how to change the weight function in DPD in LAMMPS. My problem has a little difference with the conventional “LAMMPS” code. My question is actually about the weight function exponent in dissipative forces. This value in original code is equal 2.0 but I want to put this equals 0.5.

Now my question is that whether to achieve this goal the change of source file “pair-dpd.cpp”- as mentioned below- is sufficient or other actions should be taken?

I have a question about how to change the weight function in DPD in LAMMPS.
My problem has a little difference with the conventional “LAMMPS” code. My
question is actually about the weight function exponent in dissipative
forces. This value in original code is equal 2.0 but I want to put this

no, it is not:

wd = 1.0 - r/cut[itype][jtype];

is a linear decay.

equals 0.5.

Now my question is that whether to achieve this goal the change of source
file “pair-dpd.cpp”- as mentioned below- is sufficient or other actions
should be taken?

for starters, your change will make the calculation *much* slower due
to useless calls to pow(), which is the by far most time consuming
function in the C math library.

second, the way to proceed would be to set up several test inputs,
compute their results by hand from the proper formula and compare to
what your modified LAMMPS computes.

what if somebody here says "yes, it looks correct to me", but it wasn't??