What is the subroutine for SHAKE or RATTLE? Thanks.

Hi, everyone.

It is my first use of LAMMPS and I am looking for a numerical scheme for one specific constrained SDE, the constrain

is a macroscopic one, i.e., overdamped Langevin(Brownian dynamics) equations with an equality constraint which is
expressed in form of expectation(or moment of n-th order). This is unlike the common ‘micro’ constraint(simply
function in terms of variable in SDE) . I can not find such a subrountine for solving constrained SDE in
MD codes in LAMMPS. I see there is an algorithm called “SHAKE” or "RATTLE "which and it seems they could
implement Langevin(or Brownian) dynamics with constraints. If convenient, could anyone help to point out which subroutine
is specific for implementing SHAKE/RATTLE? Thanks in advance.

It’s called “shake,” and it’s a “fix,” so look at fix_shake.* for the code. . . .


It's called "shake," and it's a "fix," so look at fix_shake.* for the code.

...and before that, you should have a look at:


to understand the flow of control. LAMMPS is
a bit different from other MD codes in how things
are organized and play together.