more tweaks to client/server doc pages

This commit is contained in:
Steve Plimpton 2018-09-07 14:00:39 -06:00
parent 25907c856e
commit 0384ef8967
3 changed files with 14 additions and 12 deletions

View File

@ -61,7 +61,7 @@ client or server.
"message"_message.html
"fix client md"_fix_client_md.html = LAMMPS is a client for running MD
"server md"_server_md.html = LAMMPS is a server for computing MD forces
"server mc"_server_mc.html = LAMMPS is a server for computing a Monte Carlo energy
"server mc"_server_mc.html = LAMMPS is a server for computing a Monte Carlo energy :ul
The server doc files give details of the message protocols
for data that is exchanged bewteen the client and server.
@ -119,7 +119,7 @@ For message exchange in {mpi/one} mode:
Launch both codes in a single mpirun command:
mpirun -np 2 lmp_mpi -mpicolor 0 -in in.message.client -log log.client : -np 4 lmp_mpi -mpicolor 1 -in in.message.server -log log.server
mpirun -np 2 lmp_mpi -mpicolor 0 -in in.message.client -log log.client : -np 4 lmp_mpi -mpicolor 1 -in in.message.server -log log.server :pre
The two -np values determine how many procs the client and the server
run on.

View File

@ -63,7 +63,7 @@ See the src/MESSAGE/server_mc.cpp file for details on how LAMMPS uses
these messages. See the examples/COUPLE/lammmps_mc/mc.cpp file for an
example of how an MC driver code can use these messages.
Let NATOMS=1, EINIT=2, DISPLACE=3, ACCEPT=4, RUN=5.
Define NATOMS=1, EINIT=2, DISPLACE=3, ACCEPT=4, RUN=5.
[Client sends one of these kinds of message]:
@ -93,9 +93,9 @@ cs->pack(2,3*natoms,x) # 2nd field = 3N coords of Natoms :pre
cs->send(DISPLACE,1) # msgID = 3 with 1 field
cs->pack_double(1,poteng) # 1st field = new potential energy of system :pre
cs->send(ACCEPT,0) # msgID = 4 with no fields
cs->send(ACCEPT,0) # msgID = 4 with no fields :pre
cs->send(RUN,0) # msgID = 5 with no fields
cs->send(RUN,0) # msgID = 5 with no fields :pre
:line

View File

@ -51,9 +51,9 @@ 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 pressure
values from the server code.
When using the "fix client/md"_fix_client_md.html command, LAMMPS (as
the client code) 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
a conceptual sense. Python-style pseudo code for the library calls to
@ -69,9 +69,11 @@ a quantum code (VASP) can use use these messages.
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,PRESSURE,ERROR}; :pre
Define:
SETUP=1, STEP=2
DIM=1, PERIODICITY=2, ORIGIN=3, BOX=4, NATOMS=5, NTYPES=6, TYPES=7, COORDS=8, UNITS-9, CHARGE=10
FORCES=1, ENERGY=2, PRESSURE=3, ERROR=4 :pre
[Client sends 2 kinds of messages]:
@ -98,7 +100,7 @@ cs->send(STEP,nfields) # msgID with nfields :pre
cs->pack(COORDS,3*natoms,x) # vector of 3N atom coords
cs->pack(ORIGIN,3,origin) # lower-left corner of simulation box
cs->pack(BOX,9,box) # 3 edge vectors of simulation box
cs->pack(BOX,9,box) # 3 edge vectors of simulation box :pre
[Server replies to either kind of message]: