Merge pull request #3218 from lammps/mdi-new-functions

MDI new functions
This commit is contained in:
Axel Kohlmeyer
2022-04-14 20:48:51 -04:00
committed by GitHub
9 changed files with 49 additions and 50 deletions

View File

@ -23,7 +23,7 @@ fix 1 all nve
# NPT
#fix 1 all npt temp 1.0 1.0 0.1 iso 1.0 1.0 1.0
fix 2 all mdi/aimd plugin
fix 2 all mdi/aimd
fix_modify 2 energy yes virial yes
thermo_style custom step temp pe etotal press vol

View File

@ -286,18 +286,15 @@ while iarg < narg:
if not mdiarg: error()
mdi.MDI_Init(mdiarg)
# LAMMPS engine is a stand-alone code
# world = MPI communicator for just this driver
# invoke perform_tasks() directly
if not plugin:
mdi.MDI_Init(mdiarg)
world = mdi.MDI_MPI_get_world_comm()
# connect to engine
mdicomm = mdi.MDI_Accept_Communicator()
perform_tasks(world,mdicomm,None)
# LAMMPS engine is a plugin library
@ -305,7 +302,6 @@ if not plugin:
# MDI will call back to perform_tasks()
if plugin:
mdi.MDI_Init(mdiarg)
world = MPI.COMM_WORLD
plugin_args += " -mdi \"-role ENGINE -name lammps -method LINK\""
mdi.MDI_Launch_plugin(plugin,plugin_args,world,perform_tasks,None)