From bfaa1e9ed0cb94ee89633c178c74b1b09963bd80 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 8 Apr 2022 16:28:57 -0400 Subject: [PATCH] whitespace --- doc/src/mdi.rst | 4 ++-- src/MDI/mdi_engine.cpp | 24 ++++++++++++------------ src/MDI/mdi_engine.h | 4 ++-- src/MDI/mdi_plugin.cpp | 6 +++--- 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/doc/src/mdi.rst b/doc/src/mdi.rst index 93eef50065..95b41a2219 100644 --- a/doc/src/mdi.rst +++ b/doc/src/mdi.rst @@ -51,7 +51,7 @@ code, launched separately from LAMMPS, in which case the mdi plugin command is not used. See the Howto MDI doc page for a discussion of all the different ways -2 or more codes can interact via MDI. +2 or more codes can interact via MDI. The examples/mdi directory has examples which use LAMMPS in 4 different modes: as a driver using an engine as either a stand-alone @@ -241,7 +241,7 @@ commands are supported, as documented above: FORCES"); MDI_Register_callback("@FORCES",">+FORCES"); - MDI_Register_command("@FORCES","<@"); + MDI_Register_command("@FORCES","<@"); MDI_Register_command("@FORCES","add_fix("MDI_ENGINE_INTERNAL all MDI/ENGINE"); - FixMDIEngine *mdi_fix = + FixMDIEngine *mdi_fix = (FixMDIEngine *) modify->get_fix_by_id("MDI_ENGINE_INTERNAL"); mdi_fix->mdi_engine = this; @@ -622,7 +622,7 @@ void MDIEngine::mdi_md() update->whichflag = 1; timer->init_timeout(); - + update->nsteps = 1; update->beginstep = update->firststep = update->ntimestep; update->endstep = update->laststep = update->ntimestep + update->nsteps; @@ -648,9 +648,9 @@ void MDIEngine::mdi_md() update->laststep += 1; update->endstep = update->laststep; output->next = update->ntimestep + 1; - + update->integrate->run(1); - + if (strcmp(mdicmd,"@COORDS") != 0 && strcmp(mdicmd,"@FORCES") != 0 && strcmp(mdicmd,"@ENDSTEP") != 0) break; @@ -690,7 +690,7 @@ void MDIEngine::md() update->whichflag = 1; timer->init_timeout(); - + update->nsteps = nsteps; update->beginstep = update->firststep = update->ntimestep; update->endstep = update->laststep = update->ntimestep + update->nsteps; @@ -735,7 +735,7 @@ void MDIEngine::mdi_optg() // delete the instance before this method returns modify->add_fix("MDI_ENGINE_INTERNAL all MDI/ENGINE"); - FixMDIEngine *mdi_fix = + FixMDIEngine *mdi_fix = (FixMDIEngine *) modify->get_fix_by_id("MDI_ENGINE_INTERNAL"); mdi_fix->mdi_engine = this; @@ -851,11 +851,11 @@ void MDIEngine::optg() void MDIEngine::evaluate() { int flag_create = flag_natoms | flag_types; - int flag_other = flag_cell | flag_cell_displ | flag_charges | + int flag_other = flag_cell | flag_cell_displ | flag_charges | flag_coords | flag_velocities; // create or update system if requested - + if (flag_create) create_system(); else if (flag_other) { if (flag_cell || flag_cell_displ) adjust_box(); @@ -1215,7 +1215,7 @@ void MDIEngine::receive_tolerance() niterate = static_cast (params[2]); max_eval = static_cast (params[3]); - if (etol < 0.0 || ftol < 0.0 || niterate < 0 || max_eval < 0) + if (etol < 0.0 || ftol < 0.0 || niterate < 0 || max_eval < 0) error->all(FLERR,"MDI received invalid toleranace parameters"); } @@ -1378,7 +1378,7 @@ void MDIEngine::send_labels() // use atomID to index into ordered ibuf1 - tagint *tag = atom->tag; + tagint *tag = atom->tag; int *type = atom->type; int nlocal = atom->nlocal; diff --git a/src/MDI/mdi_engine.h b/src/MDI/mdi_engine.h index e2b62b7e86..57a7942722 100644 --- a/src/MDI/mdi_engine.h +++ b/src/MDI/mdi_engine.h @@ -61,7 +61,7 @@ class MDIEngine : protected Pointers { int *sys_types; double *sys_charges,*sys_coords,*sys_velocities; double sys_cell[9],sys_cell_displ[3]; - + int nsteps; // timesteps for MD double etol,ftol; // 4 minimization params for OPTG int niterate,max_eval; @@ -82,7 +82,7 @@ class MDIEngine : protected Pointers { char *id_ke,*id_pe,*id_press; // computes invoked by MDI class Compute *ke,*pe,*press; - class Irregular *irregular; // irregular comm if new COORDS + class Irregular *irregular; // irregular comm if new COORDS // are highly displaced // class methods diff --git a/src/MDI/mdi_plugin.cpp b/src/MDI/mdi_plugin.cpp index 9d2d2b6475..f63a9b5de9 100644 --- a/src/MDI/mdi_plugin.cpp +++ b/src/MDI/mdi_plugin.cpp @@ -73,7 +73,7 @@ MDIPlugin::MDIPlugin(LAMMPS *lmp, int narg, char **arg) : Pointers(lmp) // error checks - if (!mdi_arg || !infile_arg || !lammps_command) + if (!mdi_arg || !infile_arg || !lammps_command) error->all(FLERR,"MDI plugin must specify mdi, infile, command keywords"); // build full plugin_args string for args to plugin library @@ -110,14 +110,14 @@ MDIPlugin::MDIPlugin(LAMMPS *lmp, int narg, char **arg) : Pointers(lmp) with the plugin ---------------------------------------------------------------------- */ -int MDIPlugin::plugin_wrapper(void *pmpicomm, MDI_Comm mdicomm, +int MDIPlugin::plugin_wrapper(void *pmpicomm, MDI_Comm mdicomm, void *vptr) { MPI_Comm mpicomm = *(MPI_Comm *) pmpicomm; MDIPlugin *ptr = (MDIPlugin *) vptr; LAMMPS *lammps = ptr->lmp; char *lammps_command = ptr->lammps_command; - + // set FixMDIAimd mdicomm to driver's mdicomm passed to this callback FixMDIAimd *aimdptr = (FixMDIAimd *) (ptr->fixptr);