update MDI LAMMPS-on-LAMMPS examples
This commit is contained in:
@ -3,7 +3,7 @@ MolSSI MDI library for coupling codes together and communicating
|
||||
between them with MDI messages.
|
||||
|
||||
There are more examples of using LAMMPS with quantum codes via MDI in
|
||||
the examples/QM directory.
|
||||
the examples/QUANTUM directory.
|
||||
|
||||
Within the MDI context, one code is the driver and another code is the
|
||||
engine. The 2 codes can be written in any language; C++ (LAMMPS) and
|
||||
@ -27,8 +27,8 @@ Examples for all these use cases, using LAMMPS as a driver and as an
|
||||
engine are in this directory. The Run.sh file shows how run in all
|
||||
the modes. Type "sh Run.sh" to try them all out.
|
||||
|
||||
Examples for using LAMMPS as a driver with the tight-binding code
|
||||
LATTE are in the examples/QM/LATTE sub-directory. See its README file
|
||||
Examples for using LAMMPS as a driver with the tight-binding code LATTE
|
||||
are in the examples/QUANTUM/LATTE sub-directory. See its README file
|
||||
for more info.
|
||||
|
||||
-------------------------------------------------
|
||||
|
||||
@ -1,5 +1,10 @@
|
||||
# Run all the examples
|
||||
|
||||
LAMMPS=lmp_mpi
|
||||
#LAMMPS=${HOME}/compile/lammps/build-test/lmp
|
||||
BINPATH=${HOME}/compile/lammps/git/src
|
||||
#BINPATH=${HOME}/compile/lammps/build-test
|
||||
|
||||
# -------------------------------------------------
|
||||
# -------------------------------------------------
|
||||
|
||||
@ -9,48 +14,48 @@
|
||||
|
||||
# Run without MDI
|
||||
|
||||
lmp_mpi -log log.aimd.alone.1 < in.aimd.alone
|
||||
${LAMMPS} -log log.aimd.alone.1 -in in.aimd.alone
|
||||
|
||||
# ---
|
||||
|
||||
# Run with TCP: 1 proc each
|
||||
|
||||
lmp_mpi -mdi "-name LMP1 -role DRIVER -method TCP -port 8021" -log log.aimd.driver.tcp.1 -in in.aimd.driver &
|
||||
${LAMMPS} -mdi "-name LMP1 -role DRIVER -method TCP -port 8021" -log log.aimd.driver.tcp.1 -in in.aimd.driver &
|
||||
|
||||
lmp_mpi -mdi "-name LMP2 -role ENGINE -method TCP -port 8021 -hostname localhost" -log log.aimd.engine.tcp.1 -in in.aimd.engine
|
||||
${LAMMPS} -mdi "-name LMP2 -role ENGINE -method TCP -port 8021 -hostname localhost" -log log.aimd.engine.tcp.1 -in in.aimd.engine
|
||||
|
||||
# ---
|
||||
|
||||
# Run with TCP: 3 procs + 4 procs
|
||||
|
||||
mpirun -np 3 lmp_mpi -mdi "-name LMP1 -role DRIVER -method TCP -port 8021" -log log.aimd.driver.tcp.3 -in in.aimd.driver &
|
||||
mpirun -np 3 ${LAMMPS} -mdi "-name LMP1 -role DRIVER -method TCP -port 8021" -log log.aimd.driver.tcp.3 -in in.aimd.driver &
|
||||
|
||||
mpirun -np 4 lmp_mpi -mdi "-name LMP2 -role ENGINE -method TCP -port 8021 -hostname localhost" -log log.aimd.engine.tcp.4 -in in.aimd.engine
|
||||
mpirun -np 4 ${LAMMPS} -mdi "-name LMP2 -role ENGINE -method TCP -port 8021 -hostname localhost" -log log.aimd.engine.tcp.4 -in in.aimd.engine
|
||||
|
||||
# ---
|
||||
|
||||
# Run with MPI: 1 proc each
|
||||
|
||||
mpirun -np 1 lmp_mpi -mdi "-name LMP1 -role DRIVER -method MPI" -log log.aimd.driver.mpi.1 -in in.aimd.driver : -np 1 lmp_mpi -mdi "-name LMP2 -role ENGINE -method MPI" -log log.aimd.engine.mpi.1 -in in.aimd.engine
|
||||
mpirun -np 1 ${LAMMPS} -mdi "-name LMP1 -role DRIVER -method MPI" -log log.aimd.driver.mpi.1 -in in.aimd.driver : -np 1 ${LAMMPS} -mdi "-name LMP2 -role ENGINE -method MPI" -log log.aimd.engine.mpi.1 -in in.aimd.engine
|
||||
|
||||
# ---
|
||||
|
||||
# Run with MPI: 3 procs + 4 procs
|
||||
|
||||
mpirun -np 3 lmp_mpi -mdi "-name LMP1 -role DRIVER -method MPI" -log log.aimd.driver.mpi.3 -in in.aimd.driver : -np 4 lmp_mpi -mdi "-name LMP2 -role ENGINE -method MPI" -log log.aimd.engine.mpi.4 -in in.aimd.engine
|
||||
mpirun -np 3 ${LAMMPS} -mdi "-name LMP1 -role DRIVER -method MPI" -log log.aimd.driver.mpi.3 -in in.aimd.driver : -np 4 ${LAMMPS} -mdi "-name LMP2 -role ENGINE -method MPI" -log log.aimd.engine.mpi.4 -in in.aimd.engine
|
||||
|
||||
# ---
|
||||
|
||||
# Run in plugin mode: 1 proc
|
||||
|
||||
lmp_mpi -mdi "-name LMP1 -role DRIVER -method LINK -plugin_path /home/sjplimp/lammps/git/src" -log log.aimd.driver.plugin.1 -in in.aimd.driver.plugin
|
||||
${LAMMPS} -mdi "-name LMP1 -role DRIVER -method LINK -plugin_path ${BINPATH}" -log log.aimd.driver.plugin.1 -in in.aimd.driver.plugin
|
||||
mv log.aimd.engine.plugin log.aimd.engine.plugin.1
|
||||
|
||||
# ---
|
||||
|
||||
# Run in plugin mode: 3 procs
|
||||
|
||||
mpirun -np 3 lmp_mpi -mdi "-name LMP1 -role DRIVER -method LINK -plugin_path /home/sjplimp/lammps/git/src" -log log.aimd.driver.plugin.3 -in in.aimd.driver.plugin
|
||||
mpirun -np 3 ${LAMMPS} -mdi "-name LMP1 -role DRIVER -method LINK -plugin_path ${BINPATH}" -log log.aimd.driver.plugin.3 -in in.aimd.driver.plugin
|
||||
mv log.aimd.engine.plugin log.aimd.engine.plugin.3
|
||||
|
||||
# -------------------------------------------------
|
||||
@ -62,46 +67,46 @@ mv log.aimd.engine.plugin log.aimd.engine.plugin.3
|
||||
|
||||
# Run without MDI
|
||||
|
||||
lmp_mpi -log log.snapshot.alone.1 < in.snapshot.alone
|
||||
${LAMMPS} -log log.snapshot.alone.1 -in in.snapshot.alone
|
||||
mv dump.snapshot.alone dump.snapshot.alone.1
|
||||
|
||||
# ---
|
||||
|
||||
# Run with TCP: 1 proc each
|
||||
|
||||
lmp_mpi -mdi "-name LMP1 -role DRIVER -method TCP -port 8021" -log log.snapshot.driver.tcp.1 -in in.snapshot.driver &
|
||||
${LAMMPS} -mdi "-name LMP1 -role DRIVER -method TCP -port 8021" -log log.snapshot.driver.tcp.1 -in in.snapshot.driver &
|
||||
|
||||
lmp_mpi -mdi "-name LMP2 -role ENGINE -method TCP -port 8021 -hostname localhost" -log log.snapshot.engine.tcp.1 -in in.snapshot.engine
|
||||
${LAMMPS} -mdi "-name LMP2 -role ENGINE -method TCP -port 8021 -hostname localhost" -log log.snapshot.engine.tcp.1 -in in.snapshot.engine
|
||||
mv dump.snapshot.driver dump.snapshot.driver.tcp.1
|
||||
|
||||
# ---
|
||||
|
||||
# Run with TCP: 3 procs + 4 procs
|
||||
|
||||
mpirun -np 3 lmp_mpi -mdi "-name LMP1 -role DRIVER -method TCP -port 8021" -log log.snapshot.driver.tcp.3 -in in.snapshot.driver &
|
||||
mpirun -np 3 ${LAMMPS} -mdi "-name LMP1 -role DRIVER -method TCP -port 8021" -log log.snapshot.driver.tcp.3 -in in.snapshot.driver &
|
||||
|
||||
mpirun -np 4 lmp_mpi -mdi "-name LMP2 -role ENGINE -method TCP -port 8021 -hostname localhost" -log log.snapshot.engine.tcp.4 -in in.snapshot.engine
|
||||
mpirun -np 4 ${LAMMPS} -mdi "-name LMP2 -role ENGINE -method TCP -port 8021 -hostname localhost" -log log.snapshot.engine.tcp.4 -in in.snapshot.engine
|
||||
mv dump.snapshot.driver dump.snapshot.driver.tcp.4
|
||||
|
||||
# ---
|
||||
|
||||
# Run with MPI: 1 proc each
|
||||
|
||||
mpirun -np 1 lmp_mpi -mdi "-name LMP1 -role DRIVER -method MPI" -log log.snapshot.driver.mpi.1 -in in.snapshot.driver : -np 1 lmp_mpi -mdi "-name LMP2 -role ENGINE -method MPI" -log log.snapshot.engine.mpi.1 -in in.snapshot.engine
|
||||
mpirun -np 1 ${LAMMPS} -mdi "-name LMP1 -role DRIVER -method MPI" -log log.snapshot.driver.mpi.1 -in in.snapshot.driver : -np 1 ${LAMMPS} -mdi "-name LMP2 -role ENGINE -method MPI" -log log.snapshot.engine.mpi.1 -in in.snapshot.engine
|
||||
mv dump.snapshot.driver dump.snapshot.driver.mpi.1
|
||||
|
||||
# ---
|
||||
|
||||
# Run with MPI: 3 procs + 4 procs
|
||||
|
||||
mpirun -np 3 lmp_mpi -mdi "-name LMP1 -role DRIVER -method MPI" -log log.snapshot.driver.mpi.3 -in in.snapshot.driver : -np 4 lmp_mpi -mdi "-name LMP2 -role ENGINE -method MPI" -log log.snapshot.engine.mpi.3 -in in.snapshot.engine
|
||||
mpirun -np 3 ${LAMMPS} -mdi "-name LMP1 -role DRIVER -method MPI" -log log.snapshot.driver.mpi.3 -in in.snapshot.driver : -np 4 ${LAMMPS} -mdi "-name LMP2 -role ENGINE -method MPI" -log log.snapshot.engine.mpi.3 -in in.snapshot.engine
|
||||
mv dump.snapshot.driver dump.snapshot.driver.mpi.4
|
||||
|
||||
# ---
|
||||
|
||||
# Run in plugin mode: 1 proc
|
||||
|
||||
lmp_mpi -mdi "-name LMP1 -role DRIVER -method LINK -plugin_path /home/sjplimp/lammps/git/src" -log log.snapshot.driver.plugin.1 -in in.snapshot.driver.plugin
|
||||
${LAMMPS} -mdi "-name LMP1 -role DRIVER -method LINK -plugin_path ${BINPATH}" -log log.snapshot.driver.plugin.1 -in in.snapshot.driver.plugin
|
||||
mv log.snapshot.engine.plugin log.snapshot.engine.plugin.1
|
||||
mv dump.snapshot.driver.plugin dump.snapshot.driver.plugin.1
|
||||
|
||||
@ -109,7 +114,7 @@ mv dump.snapshot.driver.plugin dump.snapshot.driver.plugin.1
|
||||
|
||||
# Run in plugin mode: 3 procs
|
||||
|
||||
mpirun -np 3 lmp_mpi -mdi "-name LMP1 -role DRIVER -method LINK -plugin_path /home/sjplimp/lammps/git/src" -log log.snapshot.driver.plugin.3 -in in.snapshot.driver.plugin
|
||||
mpirun -np 3 ${LAMMPS} -mdi "-name LMP1 -role DRIVER -method LINK -plugin_path ${BINPATH}" -log log.snapshot.driver.plugin.3 -in in.snapshot.driver.plugin
|
||||
mv log.snapshot.engine.plugin log.snapshot.engine.plugin.3
|
||||
mv dump.snapshot.driver.plugin dump.snapshot.driver.plugin.3
|
||||
|
||||
@ -122,46 +127,46 @@ mv dump.snapshot.driver.plugin dump.snapshot.driver.plugin.3
|
||||
|
||||
# Run without MDI
|
||||
|
||||
lmp_mpi -log log.series.alone.1 < in.series.alone
|
||||
${LAMMPS} -log log.series.alone.1 -in in.series.alone
|
||||
mv dump.series.alone dump.series.alone.1
|
||||
|
||||
# ---
|
||||
|
||||
# Run with TCP: 1 proc each
|
||||
|
||||
lmp_mpi -mdi "-name LMP1 -role DRIVER -method TCP -port 8021" -log log.series.driver.tcp.1 -in in.series.driver &
|
||||
${LAMMPS} -mdi "-name LMP1 -role DRIVER -method TCP -port 8021" -log log.series.driver.tcp.1 -in in.series.driver &
|
||||
|
||||
lmp_mpi -mdi "-name LMP2 -role ENGINE -method TCP -port 8021 -hostname localhost" -log log.series.engine.tcp.1 -in in.series.engine
|
||||
${LAMMPS} -mdi "-name LMP2 -role ENGINE -method TCP -port 8021 -hostname localhost" -log log.series.engine.tcp.1 -in in.series.engine
|
||||
mv dump.series.driver dump.series.driver.tcp.1
|
||||
|
||||
# ---
|
||||
|
||||
# Run with TCP: 3 procs + 4 procs
|
||||
|
||||
mpirun -np 3 lmp_mpi -mdi "-name LMP1 -role DRIVER -method TCP -port 8021" -log log.series.driver.tcp.3 -in in.series.driver &
|
||||
mpirun -np 3 ${LAMMPS} -mdi "-name LMP1 -role DRIVER -method TCP -port 8021" -log log.series.driver.tcp.3 -in in.series.driver &
|
||||
|
||||
mpirun -np 4 lmp_mpi -mdi "-name LMP2 -role ENGINE -method TCP -port 8021 -hostname localhost" -log log.series.engine.tcp.4 -in in.series.engine
|
||||
mpirun -np 4 ${LAMMPS} -mdi "-name LMP2 -role ENGINE -method TCP -port 8021 -hostname localhost" -log log.series.engine.tcp.4 -in in.series.engine
|
||||
mv dump.series.driver dump.series.driver.tcp.4
|
||||
|
||||
# ---
|
||||
|
||||
# Run with MPI: 1 proc each
|
||||
|
||||
mpirun -np 1 lmp_mpi -mdi "-name LMP1 -role DRIVER -method MPI" -log log.series.driver.mpi.1 -in in.series.driver : -np 1 lmp_mpi -mdi "-name LMP2 -role ENGINE -method MPI" -log log.series.engine.mpi.1 -in in.series.engine
|
||||
mpirun -np 1 ${LAMMPS} -mdi "-name LMP1 -role DRIVER -method MPI" -log log.series.driver.mpi.1 -in in.series.driver : -np 1 ${LAMMPS} -mdi "-name LMP2 -role ENGINE -method MPI" -log log.series.engine.mpi.1 -in in.series.engine
|
||||
mv dump.series.driver dump.series.driver.mpi.1
|
||||
|
||||
# ---
|
||||
|
||||
# Run with MPI: 3 procs + 4 procs
|
||||
|
||||
mpirun -np 3 lmp_mpi -mdi "-name LMP1 -role DRIVER -method MPI" -log log.series.driver.mpi.3 -in in.series.driver : -np 4 lmp_mpi -mdi "-name LMP2 -role ENGINE -method MPI" -log log.series.engine.mpi.4 -in in.series.engine
|
||||
mpirun -np 3 ${LAMMPS} -mdi "-name LMP1 -role DRIVER -method MPI" -log log.series.driver.mpi.3 -in in.series.driver : -np 4 ${LAMMPS} -mdi "-name LMP2 -role ENGINE -method MPI" -log log.series.engine.mpi.4 -in in.series.engine
|
||||
mv dump.series.driver dump.series.driver.mpi.4
|
||||
|
||||
# ---
|
||||
|
||||
# Run in plugin mode: 1 proc
|
||||
|
||||
lmp_mpi -mdi "-name LMP1 -role DRIVER -method LINK -plugin_path /home/sjplimp/lammps/git/src" -log log.series.driver.plugin.1 -in in.series.driver.plugin
|
||||
${LAMMPS} -mdi "-name LMP1 -role DRIVER -method LINK -plugin_path ${BINPATH}" -log log.series.driver.plugin.1 -in in.series.driver.plugin
|
||||
mv log.series.engine.plugin log.series.engine.plugin.1
|
||||
mv dump.series.driver.plugin dump.series.driver.plugin.1
|
||||
|
||||
@ -169,7 +174,7 @@ mv dump.series.driver.plugin dump.series.driver.plugin.1
|
||||
|
||||
# Run in plugin mode: 3 procs
|
||||
|
||||
mpirun -np 3 lmp_mpi -mdi "-name LMP1 -role DRIVER -method LINK -plugin_path /home/sjplimp/lammps/git/src" -log log.series.driver.plugin.3 -in in.series.driver.plugin
|
||||
mpirun -np 3 ${LAMMPS} -mdi "-name LMP1 -role DRIVER -method LINK -plugin_path ${BINPATH}" -log log.series.driver.plugin.3 -in in.series.driver.plugin
|
||||
mv log.series.engine.plugin log.series.engine.plugin.3
|
||||
mv dump.series.driver.plugin dump.series.driver.plugin.3
|
||||
|
||||
@ -184,7 +189,7 @@ mv dump.series.driver.plugin dump.series.driver.plugin.3
|
||||
|
||||
python3 sequence_driver.py -mdi "-role DRIVER -name sequence -method TCP -port 8021" &
|
||||
|
||||
lmp_mpi -mdi "-role ENGINE -name LMP -method TCP -port 8021 -hostname localhost" -log log.sequence.engine.tcp.1 -in in.sequence.python
|
||||
${LAMMPS} -mdi "-role ENGINE -name LMP -method TCP -port 8021 -hostname localhost" -log log.sequence.engine.tcp.1 -in in.sequence.python
|
||||
|
||||
# ---
|
||||
|
||||
@ -192,31 +197,31 @@ lmp_mpi -mdi "-role ENGINE -name LMP -method TCP -port 8021 -hostname localhost"
|
||||
|
||||
mpirun -np 2 python3 sequence_driver.py -mdi "-role DRIVER -name sequence -method TCP -port 8021" &
|
||||
|
||||
mpirun -np 4 lmp_mpi -mdi "-role ENGINE -name LMP -method TCP -port 8021 -hostname localhost" -log log.sequence.engine.tcp.4 -in in.sequence.python
|
||||
mpirun -np 4 ${LAMMPS} -mdi "-role ENGINE -name LMP -method TCP -port 8021 -hostname localhost" -log log.sequence.engine.tcp.4 -in in.sequence.python
|
||||
|
||||
# ---
|
||||
|
||||
# Run with MPI: 1 proc each
|
||||
|
||||
mpirun -np 1 python3 sequence_driver.py -mdi "-role DRIVER -name sequence -method MPI" : -np 1 lmp_mpi -mdi "-role ENGINE -name LAMMPS -method MPI" -log log.sequence.engine.mpi.1 -in in.sequence.python
|
||||
mpirun -np 1 python3 sequence_driver.py -mdi "-role DRIVER -name sequence -method MPI" : -np 1 ${LAMMPS} -mdi "-role ENGINE -name LAMMPS -method MPI" -log log.sequence.engine.mpi.1 -in in.sequence.python
|
||||
|
||||
# ---
|
||||
|
||||
# Run with MPI: 2 procs + 4 procs
|
||||
|
||||
mpirun -np 2 python3 sequence_driver.py -mdi "-role DRIVER -name sequence -method MPI" : -np 4 lmp_mpi -mdi "-role ENGINE -name LMP -method MPI" -log log.sequence.engine.mpi.4 -in in.sequence.python
|
||||
mpirun -np 2 python3 sequence_driver.py -mdi "-role DRIVER -name sequence -method MPI" : -np 4 ${LAMMPS} -mdi "-role ENGINE -name LMP -method MPI" -log log.sequence.engine.mpi.4 -in in.sequence.python
|
||||
|
||||
# ---
|
||||
|
||||
# Run in plugin mode: 1 proc
|
||||
|
||||
python3 sequence_driver.py -plugin lammps -mdi "-role DRIVER -name sequence -method LINK -plugin_path /home/sjplimp/lammps/git/src" -plugin_args "-log log.sequence.engine.plugin.1 -in in.sequence".python
|
||||
python3 sequence_driver.py -plugin lammps -mdi "-role DRIVER -name sequence -method LINK -plugin_path ${BINPATH}" -plugin_args "-log log.sequence.engine.plugin.1 -in in.sequence".python
|
||||
|
||||
# ---
|
||||
|
||||
# Run in plugin mode: 3 procs
|
||||
|
||||
mpirun -np 3 python3 sequence_driver.py -plugin lammps -mdi "-role DRIVER -name sequence -method LINK -plugin_path /home/sjplimp/lammps/git/src" -plugin_args "-log log.sequence.engine.plugin.3 -in in.sequence".python
|
||||
mpirun -np 3 python3 sequence_driver.py -plugin lammps -mdi "-role DRIVER -name sequence -method LINK -plugin_path ${BINPATH}" -plugin_args "-log log.sequence.engine.plugin.3 -in in.sequence".python
|
||||
|
||||
# -------------------------------------------------
|
||||
# -------------------------------------------------
|
||||
@ -229,9 +234,9 @@ mpirun -np 3 python3 sequence_driver.py -plugin lammps -mdi "-role DRIVER -name
|
||||
|
||||
python3 aimd_driver.py -mdi "-role DRIVER -name aimdpy -method TCP -port 8021" > log.aimdpy.driver.tcp.1 &
|
||||
|
||||
lmp_mpi -mdi "-role ENGINE -name MM -method TCP -port 8021 -hostname localhost" -log log.aimdpy.mm.tcp.1 -in in.aimdpy.mm &
|
||||
${LAMMPS} -mdi "-role ENGINE -name MM -method TCP -port 8021 -hostname localhost" -log log.aimdpy.mm.tcp.1 -in in.aimdpy.mm &
|
||||
|
||||
lmp_mpi -mdi "-role ENGINE -name QM -method TCP -port 8021 -hostname localhost" -log log.aimdpy.qm.tcp.1 -in in.aimdpy.qm
|
||||
${LAMMPS} -mdi "-role ENGINE -name QM -method TCP -port 8021 -hostname localhost" -log log.aimdpy.qm.tcp.1 -in in.aimdpy.qm
|
||||
|
||||
# ---
|
||||
|
||||
@ -239,18 +244,18 @@ lmp_mpi -mdi "-role ENGINE -name QM -method TCP -port 8021 -hostname localhost"
|
||||
|
||||
mpirun -np 2 python3 aimd_driver.py -mdi "-role DRIVER -name aimdpy -method TCP -port 8021" > log.aimdpy.driver.tcp.2 &
|
||||
|
||||
mpirun -np 2 lmp_mpi -mdi "-role ENGINE -name MM -method TCP -port 8021 -hostname localhost" -log log.aimdpy.mm.tcp.2 -in in.aimdpy.mm &
|
||||
mpirun -np 2 ${LAMMPS} -mdi "-role ENGINE -name MM -method TCP -port 8021 -hostname localhost" -log log.aimdpy.mm.tcp.2 -in in.aimdpy.mm &
|
||||
|
||||
mpirun -np 3 lmp_mpi -mdi "-role ENGINE -name QM -method TCP -port 8021 -hostname localhost" -log log.aimdpy.qm.tcp.3 -in in.aimdpy.qm
|
||||
mpirun -np 3 ${LAMMPS} -mdi "-role ENGINE -name QM -method TCP -port 8021 -hostname localhost" -log log.aimdpy.qm.tcp.3 -in in.aimdpy.qm
|
||||
|
||||
# ---
|
||||
|
||||
# Run with MPI: 1 proc each
|
||||
|
||||
mpirun -np 1 python3 aimd_driver.py -mdi "-role DRIVER -name aimdpy -method MPI" : -np 1 lmp_mpi -mdi "-role ENGINE -name MM -method MPI" -log log.aimdpy.mm.mpi.1 -in in.aimdpy.mm : -np 1 lmp_mpi -mdi "-role ENGINE -name QM -method MPI" -log log.aimdpy.qm.mpi.1 -in in.aimdpy.qm > log.aimdpy.driver.mpi.1
|
||||
mpirun -np 1 python3 aimd_driver.py -mdi "-role DRIVER -name aimdpy -method MPI" : -np 1 ${LAMMPS} -mdi "-role ENGINE -name MM -method MPI" -log log.aimdpy.mm.mpi.1 -in in.aimdpy.mm : -np 1 ${LAMMPS} -mdi "-role ENGINE -name QM -method MPI" -log log.aimdpy.qm.mpi.1 -in in.aimdpy.qm > log.aimdpy.driver.mpi.1
|
||||
|
||||
# ---
|
||||
|
||||
# Run with MPI: 2 procs + 2 procs + 3 procs
|
||||
|
||||
mpirun -np 2 python3 aimd_driver.py -mdi "-role DRIVER -name aimdpy -method MPI" : -np 2 lmp_mpi -mdi "-role ENGINE -name MM -method MPI" -log log.aimdpy.mm.mpi.2 -in in.aimdpy.mm : -np 3 lmp_mpi -mdi "-role ENGINE -name QM -method MPI" -log log.aimdpy.qm.mpi.3 -in in.aimdpy.qm > log.aimdpy.driver.mpi.2
|
||||
mpirun -np 2 python3 aimd_driver.py -mdi "-role DRIVER -name aimdpy -method MPI" : -np 2 ${LAMMPS} -mdi "-role ENGINE -name MM -method MPI" -log log.aimdpy.mm.mpi.2 -in in.aimdpy.mm : -np 3 ${LAMMPS} -mdi "-role ENGINE -name QM -method MPI" -log log.aimdpy.qm.mpi.3 -in in.aimdpy.qm > log.aimdpy.driver.mpi.2
|
||||
|
||||
@ -1,28 +1,28 @@
|
||||
# 3d Lennard-Jones melt - MDI driver script
|
||||
|
||||
variable x index 5
|
||||
variable y index 5
|
||||
variable z index 5
|
||||
variable x index 5
|
||||
variable y index 5
|
||||
variable z index 5
|
||||
|
||||
units lj
|
||||
atom_style atomic
|
||||
units lj
|
||||
atom_style atomic
|
||||
|
||||
lattice fcc 0.8442
|
||||
region box block 0 $x 0 $y 0 $z
|
||||
create_box 1 box
|
||||
create_atoms 1 box
|
||||
mass 1 1.0
|
||||
lattice fcc 0.8442
|
||||
region box block 0 $x 0 $y 0 $z
|
||||
create_box 1 box
|
||||
create_atoms 1 box
|
||||
mass 1 1.0
|
||||
|
||||
velocity all create 1.44 87287 loop geom
|
||||
velocity all create 1.44 87287 loop geom
|
||||
|
||||
pair_style lj/cut 2.5
|
||||
pair_coeff 1 1 1.0 1.0 2.5
|
||||
pair_style lj/cut 2.5
|
||||
pair_coeff 1 1 1.0 1.0 2.5
|
||||
|
||||
neighbor 0.3 bin
|
||||
neigh_modify delay 0 every 1 check yes
|
||||
neighbor 0.3 bin
|
||||
neigh_modify delay 0 every 1 check yes
|
||||
|
||||
# NVE
|
||||
fix 1 all nve
|
||||
fix 1 all nve
|
||||
# NPT
|
||||
#fix 1 all npt temp 1.0 1.0 0.1 iso 1.0 1.0 1.0
|
||||
|
||||
|
||||
@ -1,25 +1,26 @@
|
||||
# 3d Lennard-Jones melt - MDI driver script
|
||||
|
||||
variable x index 5
|
||||
variable y index 5
|
||||
variable z index 5
|
||||
variable x index 5
|
||||
variable y index 5
|
||||
variable z index 5
|
||||
|
||||
units lj
|
||||
atom_style atomic
|
||||
units lj
|
||||
atom_style atomic
|
||||
atom_modify map array
|
||||
|
||||
lattice fcc 0.8442
|
||||
region box block 0 $x 0 $y 0 $z
|
||||
create_box 1 box
|
||||
create_atoms 1 box
|
||||
mass 1 1.0
|
||||
lattice fcc 0.8442
|
||||
region box block 0 $x 0 $y 0 $z
|
||||
create_box 1 box
|
||||
create_atoms 1 box
|
||||
mass 1 1.0
|
||||
|
||||
velocity all create 1.44 87287 loop geom
|
||||
velocity all create 1.44 87287 loop geom
|
||||
|
||||
neighbor 0.3 bin
|
||||
neigh_modify delay 0 every 1 check yes
|
||||
neighbor 0.3 bin
|
||||
neigh_modify delay 0 every 1 check yes
|
||||
|
||||
# NVE
|
||||
fix 1 all nve
|
||||
fix 1 all nve
|
||||
# NPT
|
||||
#fix 1 all npt temp 1.0 1.0 0.1 iso 1.0 1.0 1.0
|
||||
|
||||
|
||||
@ -1,25 +1,26 @@
|
||||
# 3d Lennard-Jones melt - MDI driver script
|
||||
|
||||
variable x index 5
|
||||
variable y index 5
|
||||
variable z index 5
|
||||
variable x index 5
|
||||
variable y index 5
|
||||
variable z index 5
|
||||
|
||||
units lj
|
||||
atom_style atomic
|
||||
units lj
|
||||
atom_style atomic
|
||||
atom_modify map array
|
||||
|
||||
lattice fcc 0.8442
|
||||
region box block 0 $x 0 $y 0 $z
|
||||
create_box 1 box
|
||||
create_atoms 1 box
|
||||
mass 1 1.0
|
||||
lattice fcc 0.8442
|
||||
region box block 0 $x 0 $y 0 $z
|
||||
create_box 1 box
|
||||
create_atoms 1 box
|
||||
mass 1 1.0
|
||||
|
||||
velocity all create 1.44 87287 loop geom
|
||||
velocity all create 1.44 87287 loop geom
|
||||
|
||||
neighbor 0.3 bin
|
||||
neigh_modify delay 0 every 1 check yes
|
||||
neighbor 0.3 bin
|
||||
neigh_modify delay 0 every 1 check yes
|
||||
|
||||
# NVE
|
||||
fix 1 all nve
|
||||
fix 1 all nve
|
||||
# NPT
|
||||
#fix 1 all npt temp 1.0 1.0 0.1 iso 1.0 1.0 1.0
|
||||
|
||||
|
||||
@ -1,18 +1,18 @@
|
||||
# 3d Lennard-Jones melt - MDI engine script
|
||||
|
||||
units lj
|
||||
atom_style atomic
|
||||
units lj
|
||||
atom_style atomic
|
||||
|
||||
lattice fcc 1.0
|
||||
region box block 0 1 0 1 0 1
|
||||
create_box 1 box
|
||||
mass 1 1.0
|
||||
lattice fcc 1.0
|
||||
region box block 0 1 0 1 0 1
|
||||
create_box 1 box
|
||||
mass 1 1.0
|
||||
|
||||
pair_style lj/cut 2.5
|
||||
pair_coeff 1 1 1.0 1.0 2.5
|
||||
pair_style lj/cut 2.5
|
||||
pair_coeff 1 1 1.0 1.0 2.5
|
||||
|
||||
neighbor 0.3 bin
|
||||
neigh_modify delay 0 every 1 check yes
|
||||
neighbor 0.3 bin
|
||||
neigh_modify delay 0 every 1 check yes
|
||||
|
||||
thermo_style custom step temp pe etotal press vol
|
||||
thermo 1
|
||||
|
||||
@ -1,23 +1,23 @@
|
||||
# 3d Lennard-Jones melt - LAMMPS as MM engine for aimd_driver.py
|
||||
|
||||
variable x index 5
|
||||
variable y index 5
|
||||
variable z index 5
|
||||
variable x index 5
|
||||
variable y index 5
|
||||
variable z index 5
|
||||
|
||||
units lj
|
||||
atom_style atomic
|
||||
units lj
|
||||
atom_style atomic
|
||||
|
||||
lattice fcc 0.8442
|
||||
region box block 0 $x 0 $y 0 $z
|
||||
create_box 1 box
|
||||
create_atoms 1 box
|
||||
mass 1 1.0
|
||||
lattice fcc 0.8442
|
||||
region box block 0 $x 0 $y 0 $z
|
||||
create_box 1 box
|
||||
create_atoms 1 box
|
||||
mass 1 1.0
|
||||
|
||||
velocity all create 1.44 87287 loop geom
|
||||
velocity all create 1.44 87287 loop geom
|
||||
|
||||
neighbor 0.3 bin
|
||||
neigh_modify delay 0 every 1 check yes
|
||||
neighbor 0.3 bin
|
||||
neigh_modify delay 0 every 1 check yes
|
||||
|
||||
fix 1 all nve
|
||||
fix 1 all nve
|
||||
|
||||
mdi engine
|
||||
|
||||
@ -1,22 +1,22 @@
|
||||
# 3d Lennard-Jones melt - LAMMPS as surrogate QM engine for aimd_driver.py
|
||||
|
||||
variable x index 5
|
||||
variable y index 5
|
||||
variable z index 5
|
||||
variable x index 5
|
||||
variable y index 5
|
||||
variable z index 5
|
||||
|
||||
units lj
|
||||
atom_style atomic
|
||||
units lj
|
||||
atom_style atomic
|
||||
|
||||
lattice fcc 0.8442
|
||||
region box block 0 $x 0 $y 0 $z
|
||||
create_box 1 box
|
||||
create_atoms 1 box
|
||||
mass 1 1.0
|
||||
lattice fcc 0.8442
|
||||
region box block 0 $x 0 $y 0 $z
|
||||
create_box 1 box
|
||||
create_atoms 1 box
|
||||
mass 1 1.0
|
||||
|
||||
pair_style lj/cut 2.5
|
||||
pair_coeff 1 1 1.0 1.0 2.5
|
||||
pair_style lj/cut 2.5
|
||||
pair_coeff 1 1 1.0 1.0 2.5
|
||||
|
||||
neighbor 0.3 bin
|
||||
neigh_modify delay 0 every 1 check yes
|
||||
neighbor 0.3 bin
|
||||
neigh_modify delay 0 every 1 check yes
|
||||
|
||||
mdi engine
|
||||
|
||||
@ -1,18 +1,18 @@
|
||||
# MDI engine script to process a series of evaulate, run, minimize commands
|
||||
|
||||
units lj
|
||||
atom_style atomic
|
||||
units lj
|
||||
atom_style atomic
|
||||
|
||||
lattice fcc 0.8442
|
||||
region box block 0 1 0 1 0 1
|
||||
create_box 1 box
|
||||
mass 1 1.0
|
||||
lattice fcc 0.8442
|
||||
region box block 0 1 0 1 0 1
|
||||
create_box 1 box
|
||||
mass 1 1.0
|
||||
|
||||
pair_style lj/cut 2.5
|
||||
pair_coeff 1 1 1.0 1.0 2.5
|
||||
pair_style lj/cut 2.5
|
||||
pair_coeff 1 1 1.0 1.0 2.5
|
||||
|
||||
neighbor 0.3 bin
|
||||
neigh_modify delay 0 every 1 check yes
|
||||
neighbor 0.3 bin
|
||||
neigh_modify delay 0 every 1 check yes
|
||||
|
||||
fix 1 all nve
|
||||
|
||||
|
||||
@ -1,25 +1,25 @@
|
||||
# 3d Lennard-Jones melt - MDI driver script
|
||||
|
||||
variable x index 5
|
||||
variable y index 5
|
||||
variable z index 5
|
||||
variable x index 5
|
||||
variable y index 5
|
||||
variable z index 5
|
||||
|
||||
variable rho index 0.7 0.8 0.9
|
||||
|
||||
label LOOP
|
||||
|
||||
units lj
|
||||
atom_style atomic
|
||||
units lj
|
||||
atom_style atomic
|
||||
|
||||
read_data data.series.${rho}
|
||||
|
||||
displace_atoms all random 0.1 0.1 0.1 48294
|
||||
|
||||
pair_style lj/cut 2.5
|
||||
pair_coeff 1 1 1.0 1.0 2.5
|
||||
pair_style lj/cut 2.5
|
||||
pair_coeff 1 1 1.0 1.0 2.5
|
||||
|
||||
neighbor 0.3 bin
|
||||
neigh_modify delay 0 every 1 check yes
|
||||
neighbor 0.3 bin
|
||||
neigh_modify delay 0 every 1 check yes
|
||||
|
||||
compute 1 all pressure NULL virial
|
||||
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
# 3d Lennard-Jones melt - MDI driver script
|
||||
|
||||
variable x index 5
|
||||
variable y index 5
|
||||
variable z index 5
|
||||
variable x index 5
|
||||
variable y index 5
|
||||
variable z index 5
|
||||
|
||||
variable rho index 0.7 0.8 0.9
|
||||
|
||||
@ -10,15 +10,16 @@ mdi connect
|
||||
|
||||
label LOOP
|
||||
|
||||
units lj
|
||||
atom_style atomic
|
||||
units lj
|
||||
atom_style atomic
|
||||
atom_modify map array
|
||||
|
||||
read_data data.series.${rho}
|
||||
|
||||
displace_atoms all random 0.1 0.1 0.1 48294
|
||||
|
||||
neighbor 0.3 bin
|
||||
neigh_modify delay 0 every 1 check yes
|
||||
neighbor 0.3 bin
|
||||
neigh_modify delay 0 every 1 check yes
|
||||
|
||||
fix 1 all mdi/qm add no virial yes connect no
|
||||
variable evirial equal (f_1[1]+f_1[2]+f_1[3])/3
|
||||
|
||||
@ -1,22 +1,23 @@
|
||||
# 3d Lennard-Jones melt - MDI driver script
|
||||
|
||||
variable x index 5
|
||||
variable y index 5
|
||||
variable z index 5
|
||||
variable x index 5
|
||||
variable y index 5
|
||||
variable z index 5
|
||||
|
||||
variable rho index 0.7 0.8 0.9
|
||||
|
||||
label LOOP
|
||||
|
||||
units lj
|
||||
atom_style atomic
|
||||
units lj
|
||||
atom_style atomic
|
||||
atom_modify map array
|
||||
|
||||
read_data data.series.${rho}
|
||||
|
||||
displace_atoms all random 0.1 0.1 0.1 48294
|
||||
|
||||
neighbor 0.3 bin
|
||||
neigh_modify delay 0 every 1 check yes
|
||||
neighbor 0.3 bin
|
||||
neigh_modify delay 0 every 1 check yes
|
||||
|
||||
fix 1 all mdi/qm add no virial yes
|
||||
variable evirial equal (f_1[1]+f_1[2]+f_1[3])/3
|
||||
|
||||
@ -1,17 +1,17 @@
|
||||
# 3d Lennard-Jones melt - MDI engine script
|
||||
|
||||
units lj
|
||||
atom_style atomic
|
||||
units lj
|
||||
atom_style atomic
|
||||
|
||||
lattice fcc 1.0
|
||||
region box block 0 1 0 1 0 1
|
||||
create_box 1 box
|
||||
mass 1 1.0
|
||||
lattice fcc 1.0
|
||||
region box block 0 1 0 1 0 1
|
||||
create_box 1 box
|
||||
mass 1 1.0
|
||||
|
||||
pair_style lj/cut 2.5
|
||||
pair_coeff 1 1 1.0 1.0 2.5
|
||||
pair_style lj/cut 2.5
|
||||
pair_coeff 1 1 1.0 1.0 2.5
|
||||
|
||||
neighbor 0.3 bin
|
||||
neigh_modify delay 0 every 1 check yes
|
||||
neighbor 0.3 bin
|
||||
neigh_modify delay 0 every 1 check yes
|
||||
|
||||
mdi engine
|
||||
|
||||
@ -1,19 +1,19 @@
|
||||
# 3d Lennard-Jones melt - MDI driver script
|
||||
|
||||
units lj
|
||||
atom_style atomic
|
||||
units lj
|
||||
atom_style atomic
|
||||
|
||||
read_data data.snapshot
|
||||
|
||||
velocity all create 1.44 87287 loop geom
|
||||
velocity all create 1.44 87287 loop geom
|
||||
|
||||
pair_style lj/cut 2.5
|
||||
pair_coeff 1 1 1.0 1.0 2.5
|
||||
pair_style lj/cut 2.5
|
||||
pair_coeff 1 1 1.0 1.0 2.5
|
||||
|
||||
neighbor 0.3 bin
|
||||
neigh_modify delay 0 every 1 check yes
|
||||
neighbor 0.3 bin
|
||||
neigh_modify delay 0 every 1 check yes
|
||||
|
||||
fix 1 all nve
|
||||
fix 1 all nve
|
||||
|
||||
compute 1 all pressure NULL virial
|
||||
|
||||
|
||||
@ -1,19 +1,20 @@
|
||||
# 3d Lennard-Jones melt - MDI driver script
|
||||
|
||||
units lj
|
||||
atom_style atomic
|
||||
units lj
|
||||
atom_style atomic
|
||||
atom_modify map array
|
||||
|
||||
read_data data.snapshot
|
||||
|
||||
velocity all create 1.44 87287 loop geom
|
||||
velocity all create 1.44 87287 loop geom
|
||||
|
||||
pair_style lj/cut 2.5
|
||||
pair_coeff 1 1 1.0 1.0 2.5
|
||||
pair_style lj/cut 2.5
|
||||
pair_coeff 1 1 1.0 1.0 2.5
|
||||
|
||||
neighbor 0.3 bin
|
||||
neigh_modify delay 0 every 1 check yes
|
||||
neighbor 0.3 bin
|
||||
neigh_modify delay 0 every 1 check yes
|
||||
|
||||
fix 1 all nve
|
||||
fix 1 all nve
|
||||
|
||||
fix 2 all mdi/qm add no every 100 virial yes
|
||||
|
||||
|
||||
@ -1,23 +1,24 @@
|
||||
# 3d Lennard-Jones melt - MDI driver script
|
||||
|
||||
variable x index 5
|
||||
variable y index 5
|
||||
variable z index 5
|
||||
variable x index 5
|
||||
variable y index 5
|
||||
variable z index 5
|
||||
|
||||
units lj
|
||||
atom_style atomic
|
||||
units lj
|
||||
atom_style atomic
|
||||
atom_modify map array
|
||||
|
||||
read_data data.snapshot
|
||||
|
||||
velocity all create 1.44 87287 loop geom
|
||||
velocity all create 1.44 87287 loop geom
|
||||
|
||||
pair_style lj/cut 2.5
|
||||
pair_coeff 1 1 1.0 1.0 2.5
|
||||
pair_style lj/cut 2.5
|
||||
pair_coeff 1 1 1.0 1.0 2.5
|
||||
|
||||
neighbor 0.3 bin
|
||||
neigh_modify delay 0 every 1 check yes
|
||||
neighbor 0.3 bin
|
||||
neigh_modify delay 0 every 1 check yes
|
||||
|
||||
fix 1 all nve
|
||||
fix 1 all nve
|
||||
|
||||
fix 2 all mdi/qm add no every 100 virial yes
|
||||
|
||||
|
||||
@ -1,17 +1,17 @@
|
||||
# 3d Lennard-Jones melt - MDI engine script
|
||||
|
||||
units lj
|
||||
atom_style atomic
|
||||
units lj
|
||||
atom_style atomic
|
||||
|
||||
lattice fcc 1.0
|
||||
region box block 0 1 0 1 0 1
|
||||
create_box 1 box
|
||||
mass 1 1.0
|
||||
lattice fcc 1.0
|
||||
region box block 0 1 0 1 0 1
|
||||
create_box 1 box
|
||||
mass 1 1.0
|
||||
|
||||
pair_style lj/cut 2.5
|
||||
pair_coeff 1 1 1.0 1.0 2.5
|
||||
pair_style lj/cut 2.5
|
||||
pair_coeff 1 1 1.0 1.0 2.5
|
||||
|
||||
neighbor 0.3 bin
|
||||
neigh_modify delay 0 every 1 check yes
|
||||
neighbor 0.3 bin
|
||||
neigh_modify delay 0 every 1 check yes
|
||||
|
||||
mdi engine
|
||||
|
||||
Reference in New Issue
Block a user