units and doc changes
This commit is contained in:
@ -44,10 +44,11 @@ running {ab initio} MD with quantum forces.
|
||||
|
||||
The group associated with this fix is ignored.
|
||||
|
||||
The protocol for message format and content that LAMMPS exchanges with
|
||||
the server code is defined on the "server md"_server_md.html doc page.
|
||||
The protocol and "units"_units.html for message format and content
|
||||
that LAMMPS exchanges with the server code is defined on the "server
|
||||
md"_server_md.html doc page.
|
||||
|
||||
Note that when using LAMMPS in this mode, your LAMMPS input script
|
||||
Note that when using LAMMPS as an MD client, your LAMMPS input script
|
||||
should not normally contain force field commands, like a
|
||||
"pair_style"_doc/pair_style.html, "bond_style"_doc/bond_style.html, or
|
||||
"kspace_style"_kspace_style.html commmand. However it is possible for
|
||||
|
||||
@ -37,6 +37,7 @@ signals when it is done sending messages to LAMMPS, at which point the
|
||||
loop will exit, and the remainder of the LAMMPS script will be
|
||||
processed.
|
||||
|
||||
The "server"_server.html doc page gives other options for using LAMMPS
|
||||
See an example of how this command is used in
|
||||
examples/COUPLE/lammps_mc/in.server.
|
||||
|
||||
|
||||
@ -37,7 +37,8 @@ signals when it is done sending messages to LAMMPS, at which point the
|
||||
loop will exit, and the remainder of the LAMMPS script will be
|
||||
processed.
|
||||
|
||||
See an example of how this command is used in
|
||||
The "server"_server.html doc page gives other options for using LAMMPS
|
||||
in server mode. See an example of how this command is used in
|
||||
examples/message/in.message.server.
|
||||
|
||||
:line
|
||||
@ -45,13 +46,13 @@ examples/message/in.message.server.
|
||||
When using this command, LAMMPS (as the server code) receives the
|
||||
current coordinates of all particles from the client code each
|
||||
timestep, computes their interaction, and returns the energy, forces,
|
||||
and virial for the interacting particles to the client code, so it can
|
||||
complete the timestep. This command could also be used with a client
|
||||
code that performs energy minimization, using the server to compute
|
||||
forces and energy each iteration of its minimizer.
|
||||
and pressure for the interacting particles to the client code, so it
|
||||
can complete the timestep. This command could also be used with a
|
||||
client code that performs energy minimization, using the server to
|
||||
compute forces and energy each iteration of its minimizer.
|
||||
|
||||
When using the "fix client/md" command, LAMMPS (as the client code)
|
||||
does the timestepping and receives needed energy, forces, and virial
|
||||
does the timestepping and receives needed energy, forces, and pressure
|
||||
values from the server code.
|
||||
|
||||
The format and content of the exchanged messages are explained here in
|
||||
@ -70,7 +71,7 @@ The following pseudo-code uses these values, defined as enums.
|
||||
|
||||
enum{SETUP=1,STEP};
|
||||
enum{DIM=1,PERIODICITY,ORIGIN,BOX,NATOMS,NTYPES,TYPES,COORDS,UNITS,CHARGE};
|
||||
enum{FORCES=1,ENERGY,VIRIAL,ERROR}; :pre
|
||||
enum{FORCES=1,ENERGY,PRESSURE,ERROR}; :pre
|
||||
|
||||
[Client sends 2 kinds of messages]:
|
||||
|
||||
@ -101,11 +102,35 @@ cs->pack(BOX,9,box) # 3 edge vectors of simulation box
|
||||
|
||||
[Server replies to either kind of message]:
|
||||
|
||||
# required fields: FORCES, ENERGY, PRESSURE
|
||||
# optional fields: ERROR :pre
|
||||
|
||||
cs->send(msgID,nfields) # msgID with nfields
|
||||
cs->pack(FORCES,3*Natoms,f) # vector of 3N forces on atoms
|
||||
cs->pack(ENERGY,1,poteng) # total potential energy of system
|
||||
cs->pack(VIRIAL,6,virial) # global virial tensor (6-vector)
|
||||
cs->pack(ERROR,6,virial) # server had an error (e.g. DFT non-convergence) :pre
|
||||
cs->pack(PRESSURE,6,press) # global pressure tensor (6-vector)
|
||||
cs->pack_int(ERROR,flag) # server had an error (e.g. DFT non-convergence) :pre
|
||||
|
||||
:line
|
||||
|
||||
The units for various quantities that are sent and received iva
|
||||
messages are defined for atomic-scale simulations in the table below.
|
||||
The client and server codes (including LAMMPS) can use internal units
|
||||
different than these (e.g. "real units"_units.html in LAMMPS), so long
|
||||
as they convert to these units for meesaging.
|
||||
|
||||
COORDS, ORIGIN, BOX = Angstroms
|
||||
CHARGE = multiple of electron charge (1.0 is a proton)
|
||||
ENERGY = eV
|
||||
FORCES = eV/Angstrom
|
||||
PRESSURE = bars :ul
|
||||
|
||||
Note that these are "metal units"_units.html in LAMMPS.
|
||||
|
||||
If you wish to run LAMMPS in another its non-atomic units, e.g. "lj
|
||||
units"_units.html, then the client and server should exchange a UNITS
|
||||
message as indicated above, and both the client and server should
|
||||
agree on the units for the data they exchange.
|
||||
|
||||
:line
|
||||
|
||||
|
||||
Reference in New Issue
Block a user