compute pressure in dpd pair_style

Hello LAMMPS folks, I have a question about some internal settings of LAMMPS: in did pair_style does LAMMPS includes the dissipative force and random force to compute the virial term?
I got this question because I am working to get the stress correlation function of a DPD fluid, but the curve I got using the "compute pressure" command and the "fix ave/correlate” command is too steep at 0 time. I suspect that it may be because LAMMPS includes all the forces(conservative force, dissipative force and random force) to calculate the virial term. While I have read on some papers saying that the random force does not contribute to the calculation of instantaneous transport coefficients. I am writing my own DPD program to see what would happen if I exclude the random force in the viral term.

Hello LAMMPS folks, I have a question about some internal settings of LAMMPS: in did pair_style does LAMMPS includes the dissipative force and random force to compute the virial term?

yes, the entire force is considered. you can see it here:
http://git.lammps.org/git/?p=lammps-ro.git;a=blob;f=src/pair_dpd.cpp;hb=HEAD#l115

I got this question because I am working to get the stress correlation function of a DPD fluid, but the curve I got using the "compute pressure" command and the "fix ave/correlate” command is too steep at 0 time. I suspect that it may be because LAMMPS includes all the forces(conservative force, dissipative force and random force) to calculate the virial term. While I have read on some papers saying that the

are you sure that you use compute pressure correctly?

random force does not contribute to the calculation of instantaneous transport coefficients. I am writing my own DPD program to see what would happen if I exclude the random force in the viral term.

why not just modify LAMMPS? you'd save yourself a *lot* of effort.

Thanks for your advices, Axel.

After some test, I am sure now that it is the random force that causes the large steepness of the stress autocorrelation function at 0 time.
My own DPD program gave the same outcome as that of LAMMPS when including the random force, and when random force is excluded the curve would be much smoothed. But this is a specific area problem, not a LAMMPS issue anymore.

I did try to read the LAMMPS source code before I wrote my own DPD program, but I failed to understand its structure and the large amount of codes scares me. I may try again later.

Thanks for your advices, Axel.

After some test, I am sure now that it is the random force that causes the large steepness of the stress autocorrelation function at 0 time.
My own DPD program gave the same outcome as that of LAMMPS when including the random force, and when random force is excluded the curve would be much smoothed. But this is a specific area problem, not a LAMMPS issue anymore.

I did try to read the LAMMPS source code before I wrote my own DPD program, but I failed to understand its structure and the large amount of codes scares me. I may try again later.

LAMMPS is very modular, so most of the code you can ignore. to create
a custom DPD (pair) style you effectively only need to look at a few
files.

axel.

I added a note to the DPD doc page to indicate that all the force components
are included in the virial/pressure calculation.

Steve