# Measuring specific forces during Brownian dynamics simulation

Meant to CC the mail list on this …

I was thinking more of using fix langevin during the simulation and just doing some accounting to get the drag force. Since f_drag = -(gamma)*v, I essentially want to find the gamma used in fix langevin and use it to compute a per-atom vector variable in LAMMPS is that is the equivalent of the drag force.

The documentation lists f_drag = -(mass/damp)*v, but reading fix_langevin.cpp I see a conversion factor used frequently, ‘ftm2v’. I can’t seem to find what its value is, and I’m wondering if it’s absolutely necessary to compute the equivalent force used by fix langevin. Or is this as simple as computing (mass/damp) and teating it as the effective drag constant gamma?

I find some of the unit conversion discussion in the documentation fairly confusing, and interpreting the damp variable relative to the classical definition of gamma=6pietar, eta the viscosity, is not clear to me. If you wish to capture an accurate viscous force for the system, is ‘damp’ contingent on the definition gamma=6pietar?

You essentially determine damp by setting gamma=(mass/damp) and converting from physical to LJ units?

Sorry if this seems like a lot of questions. Trying to gain a well-rounded understanding of what LAMMPS is doing. I’m an applied mathematician, not a physicist, so please excuse some lack of physical intuition.

Best,
Brian

I was thinking more of using fix langevin during the simulation and just doing some accounting to get the drag force. Since f_drag = -(gamma)*v, I essentially want to find the gamma used in fix langevin and use it to compute a per-atom vector variable in LAMMPS is that is the equivalent of the drag force.

The documentation lists f_drag = -(mass/damp)*v, but reading fix_langevin.cpp I see a conversion factor used frequently, ‘ftm2v’. I can’t seem to find what its value is, and I’m wondering if it’s absolutely necessary to compute the equivalent force used by fix langevin. Or is this as simple as computing (mass/damp) and teating it as the effective drag constant gamma?

yes, this factor is required as otherwise you don’t correctly account for the units your properties have.
please also note, that it is not possible to exactly recover that force from the velocity, since LAMMPS uses velocity verlet time integration and the langevin fix (and its forces) are applied in the “middle” of the timestep. while output options typically are run at the end of the timestep (i.e. after the second half-velocity update).

the value of ftm2v depends on the choice of units and is set in the Update::set_units() function.

I find some of the unit conversion discussion in the documentation fairly confusing, and interpreting the damp variable relative to the classical definition of gamma=6pietar, eta the viscosity, is not clear to me. If you wish to capture an accurate viscous force for the system, is ‘damp’ contingent on the definition gamma=6pietar?

You essentially determine damp by setting gamma=(mass/damp) and converting from physical to LJ units?

there are no unit conversions with LJ units. the whole point of LJ (or reduced units) is that you don’t need them.

Sorry if this seems like a lot of questions. Trying to gain a well-rounded understanding of what LAMMPS is doing. I’m an applied mathematician, not a physicist, so please excuse some lack of physical intuition.

the flow of control in LAMMPS during time stepping is outlined in the “Developer Guide” PDF file linked from the LAMMPS homepage.

axel.