# Force constant for Umbrella sampling and WHAM analysis

Dear Lammps users,

I have performed umbrella sampling in lammps using the following command:

fix kpmf wpmf spring tether 0.5 NULL NULL \$d 0.0

Looking at the manual K has the form of: K(R-R0)Mi/M

Now I am trying to combine all the windows that I created with Lammps, using UI(umbrella integration) or WHAM analysis. Their biasing potential has the form of V= K/2 (R-R0)^2

I have two questions:

First should I multiply my force value by two for analyzing with WHAM/UI?

Second the format of these two equations are different specifically the power of 2 for biasing potential. What would you suggest to do with that respect?

I appreciate your time and help

Yasaman

I think Paul may have used WHAM before with LAMMPS.

Steve

You should be able to use the data from LAMMPS’s fix spring directly in your WHAM analysis. The functional forms are identical. Looks like you’ve misread the fix spring documentation (which could probably be clearer). From the docs (http://lammps.sandia.gov/doc/fix_spring.html ):

“A restoring force of magnitude K (R - R0) Mi / M is applied to each atom in the group where K is the spring constant, Mi is the mass of the atom, and M is the total mass of all atoms in the group. Note that K thus represents the total force on the group of atoms, not a per-atom force.”

“The scalar is the spring energy = 0.5 * K * r^2.”

Paul

Thank you for pointing that out. Now in terms of K values the K I am using in fix spring is total K or half K?

Thank you

Yasaman

The energy that fix spring imposes is:

V = 0.5 * K * (R-R0)^2

Which is the same as the WHAM formula.

The value you set for K is K, not half K. That factor of 0.5 comes in only when you compute the energy that the spring imposes. LAMMPS does that for you when it computes the spring energy, as in this line:

espring = 0.5k_spring * drdr;

Please carefully review the documentation, and (if necessary) the source code.

Paul