shake method for two groups of atoms

Thanks Steve,

Yes. The fix spring command can hold two group atoms at a certain distance. However, the distance may exist a large fluctuation near the fixed distance. What I want is that one can fix the distance and obtain the constraint force, f_c, at the fixed position, z, in order to calculate the local diffusion coefficient using the following equation:

D(z) = (K_B* T)^2/ ++<delta_fc(t)*delta_fc(0)> dt.

So, I do not want to the fixed distance with a large fluctuation. Is there other method that can be used to deal with this.

Thanks again.

Thanks Steve,

Yes. The fix spring command can hold two group atoms at a certain distance.
However, the distance may exist a large fluctuation near the fixed distance.
What I want is that one can fix the distance and obtain the constraint
force, f_c, at the fixed position, z, in order to calculate the local
diffusion coefficient using the following equation:

D(z) = (K_B* T)^2/ ++<delta_fc(t)*delta_fc(0)> dt.

So, I do not want to the fixed distance with a large fluctuation. Is there
other method that can be used to deal with this.

the magnitude of the fluctuations is determined by the force
constant of the spring.

i don't see any alternative unless you want to program this yourself.

axel.

I don't think most people do PMF calculations with the 2 bodies
held at a fixed distance, rather by a spring. It can be a stiff
spring if you like. Many people use LAMMPS to do PMF calculations
in that way. There is no fix in LAMMPS to enforce
a long distance contstraint such as you are asking, i.e. one that fixes
a bond that spans the size of the system.

Steve