Measuring specific forces during Brownian dynamics simulation


I’m running Brownian dynamics style simulation of crosslinked polymer chains applying displacements via fix move to specific atoms at the boundaries. I’m trying to compute the work through the network using simple outputs of forces/atom and displacement/atom in my dump files. However, during a sanity check, when applying no displacement and holding the boundary particles in place, I noticed that this work rose more or less linearly throughout the simulation even though no external displacement was imposed.

I’m using fix nve/limit and fix langevin to simulate Brownian dynamics, and I suspect that the thermal force term used by fix langevin is being included in the forces/atom in the dump file resulting in the monotonic increase in work over a passive simulation. Is there any way to exclude this and collect only the forces from the Langevin damping, the pairwise potentials, the bond potentials, and angular potentials I’ve implemented?



There is a fix store/force command which will store the forces from the pair (plus bond, angle, etc)
before any constraints are applied. You can thus access those forces from
that fix when and write them to a dump file.

In this context, fix langevin is a constraint force, that is added to the force afterwards.
However, there is no logic in the fix langevin source file to separate its 2 components
and allow you to access just one of the 2 terms for the analysis you describe.

It would be possible to add that logic so that fix langevin produced “output” (which
could again be accessed when performing a dump, similar to fix store/force),
and have that “output” be one of the 2 Langevin force terms. So if you’re
willing to modify the fix langevin source code you could do it.