fix client/md command
fix ID group-ID client/md
ID, group-ID are documented in fix command
client/md = style name of this fix command
fix 1 all client/md
This fix style enables LAMMPS to run as a “client” code and communicate each timestep with a separate “server” code to perform an MD simulation together.
The Howto client/server doc page gives an overview of client/server coupling of LAMMPS with another code where one code is the “client” and sends request messages to a “server” code. The server responds to each request with a reply message. This enables the two codes to work in tandem to perform a simulation.
When using this fix, LAMMPS (as the client code) passes the current coordinates of all particles to the server code each timestep, which computes their interaction, and returns the energy, forces, and virial for the interacting particles to LAMMPS, so it can complete the timestep.
Note that the server code can be a quantum code, or another classical MD code which encodes a force field (pair_style in LAMMPS lingo) which LAMMPS does not have. In the quantum case, this fix is a mechanism for running ab initio MD with quantum forces.
The group associated with this fix is ignored.
Note that when using LAMMPS as an MD client, your LAMMPS input script should not normally contain force field commands, like a pair_style, bond_style, or kspace_style command. However it is possible for a server code to only compute a portion of the full force-field, while LAMMPS computes the remaining part. Your LAMMPS script can also specify boundary conditions or force constraints in the usual way, which will be added to the per-atom forces returned by the server code.
See the examples/message directory for example scripts where LAMMPS is both the “client” and/or “server” code for this kind of client/server MD simulation. The examples/message/README file explains how to launch LAMMPS and another code in tandem to perform a coupled simulation.
Restart, fix_modify, output, run start/stop, minimize info:
No information about this fix is written to binary restart files.
This fix computes a global scalar which can be accessed by various output commands. The scalar is the potential energy discussed above. The scalar value calculated by this fix is “extensive”.