whitespace fixes
This commit is contained in:
@ -3,7 +3,7 @@ Using LAMMPS with the MDI library for code coupling
|
||||
|
||||
..note::
|
||||
|
||||
This Howto doc page will eventually replace the
|
||||
This Howto doc page will eventually replace the
|
||||
:doc:`Howto client/server <Howto_client_server>` doc page.
|
||||
|
||||
Client/server coupling of two codes is where one code is the "client"
|
||||
|
||||
@ -1801,7 +1801,7 @@ USER-MDI package
|
||||
|
||||
A LAMMPS command and fix to allow client-server coupling of LAMMPS to
|
||||
other atomic or molecular simulation codes via the `MolSSI Driver Interface
|
||||
(MDI) library <https://molssi-mdi.github.io/MDI_Library/html/index.html>`_.
|
||||
(MDI) library <https://molssi-mdi.github.io/MDI_Library/html/index.html>`_.
|
||||
|
||||
**Author:** Taylor Barnes - MolSSI, taylor.a.barnes at gmail.com
|
||||
|
||||
|
||||
@ -263,7 +263,7 @@ int FixMDIEngine::execute_command(const char *command, MDI_Comm mdicomm)
|
||||
if (ierr != 0)
|
||||
error->all(FLERR,"MDI: Unable to send number of atom types to driver");
|
||||
}
|
||||
|
||||
|
||||
} else if (strcmp(command,"<TYPES") == 0 ) {
|
||||
send_types(error);
|
||||
|
||||
@ -359,7 +359,7 @@ int FixMDIEngine::execute_command(const char *command, MDI_Comm mdicomm)
|
||||
// set the maximum number of force evaluations to 0
|
||||
update->max_eval = 0;
|
||||
}
|
||||
|
||||
|
||||
} else if (strcmp(command,"@COORDS") == 0 ) {
|
||||
strncpy(target_node, "@COORDS", MDI_COMMAND_LENGTH);
|
||||
local_exit_flag = true;
|
||||
@ -484,7 +484,7 @@ void FixMDIEngine::receive_coordinates(Error* error)
|
||||
}
|
||||
|
||||
// ensure atoms are in current box & update box via shrink-wrap
|
||||
// has to be be done before invoking Irregular::migrate_atoms()
|
||||
// has to be be done before invoking Irregular::migrate_atoms()
|
||||
// since it requires atoms be inside simulation box
|
||||
|
||||
if (domain->triclinic) domain->x2lamda(atom->nlocal);
|
||||
@ -577,7 +577,7 @@ void FixMDIEngine::send_charges(Error* error)
|
||||
|
||||
MPI_Reduce(charges, charges_reduced, atom->natoms, MPI_DOUBLE, MPI_SUM, 0, world);
|
||||
|
||||
if (master) {
|
||||
if (master) {
|
||||
ierr = MDI_Send((char*) charges_reduced, atom->natoms, MDI_DOUBLE, driver_socket);
|
||||
if (ierr != 0)
|
||||
error->all(FLERR,"MDI: Unable to send charges to driver");
|
||||
@ -689,7 +689,7 @@ void FixMDIEngine::send_types(Error* error)
|
||||
{
|
||||
int * const type = atom->type;
|
||||
|
||||
if (master) {
|
||||
if (master) {
|
||||
ierr = MDI_Send((char*) type, atom->natoms, MDI_INT, driver_socket);
|
||||
if (ierr != 0)
|
||||
error->all(FLERR,"MDI: Unable to send atom types to driver");
|
||||
@ -709,7 +709,7 @@ void FixMDIEngine::send_labels(Error* error)
|
||||
strncpy(&labels[iatom * MDI_LABEL_LENGTH], label.c_str(), label_len);
|
||||
}
|
||||
|
||||
if (master) {
|
||||
if (master) {
|
||||
ierr = MDI_Send( labels, atom->natoms * MDI_LABEL_LENGTH, MDI_CHAR, driver_socket);
|
||||
if (ierr != 0)
|
||||
error->all(FLERR,"MDI: Unable to send atom types to driver");
|
||||
@ -935,7 +935,7 @@ void FixMDIEngine::send_cell(Error* error)
|
||||
celldata[icell] *= unit_conv;
|
||||
}
|
||||
|
||||
if (master) {
|
||||
if (master) {
|
||||
ierr = MDI_Send((char*) celldata, 9, MDI_DOUBLE, driver_socket);
|
||||
if (ierr != 0)
|
||||
error->all(FLERR,"MDI: Unable to send cell dimensions to driver");
|
||||
@ -949,7 +949,7 @@ void FixMDIEngine::receive_cell(Error* error)
|
||||
double celldata[9];
|
||||
|
||||
// receive the new cell vector from the driver
|
||||
if (master) {
|
||||
if (master) {
|
||||
ierr = MDI_Recv((char*) celldata, 9, MDI_DOUBLE, driver_socket);
|
||||
if (ierr != 0)
|
||||
error->all(FLERR,"MDI: Unable to send cell dimensions to driver");
|
||||
@ -1007,7 +1007,7 @@ void FixMDIEngine::send_celldispl(Error* error)
|
||||
celldata[icell] *= unit_conv;
|
||||
}
|
||||
|
||||
if (master) {
|
||||
if (master) {
|
||||
ierr = MDI_Send((char*) celldata, 3, MDI_DOUBLE, driver_socket);
|
||||
if (ierr != 0)
|
||||
error->all(FLERR,"MDI: Unable to send cell displacement to driver");
|
||||
@ -1020,7 +1020,7 @@ void FixMDIEngine::receive_celldispl(Error* error)
|
||||
{
|
||||
// receive the cell displacement from the driver
|
||||
double celldata[3];
|
||||
if (master) {
|
||||
if (master) {
|
||||
ierr = MDI_Recv((char*) celldata, 3, MDI_DOUBLE, driver_socket);
|
||||
if (ierr != 0)
|
||||
error->all(FLERR,"MDI: Unable to receive cell displacement from driver");
|
||||
|
||||
@ -136,9 +136,9 @@ Self-explanatory.
|
||||
|
||||
E: Unknown command from driver
|
||||
|
||||
The driver sent a command that is not supported by the LAMMPS
|
||||
interface. In some cases this might be because a nonsensical
|
||||
command was sent (i.e. "SCF"). In other cases, the LAMMPS
|
||||
The driver sent a command that is not supported by the LAMMPS
|
||||
interface. In some cases this might be because a nonsensical
|
||||
command was sent (i.e. "SCF"). In other cases, the LAMMPS
|
||||
interface might benefit from being expanded.
|
||||
|
||||
*/
|
||||
|
||||
@ -210,20 +210,20 @@ void MDIEngine::command(int narg, char **arg)
|
||||
// DEFAULT, INIT_MD, INIT_OPTG
|
||||
|
||||
command = mdi_fix->engine_mode("@DEFAULT");
|
||||
|
||||
|
||||
// MDI commands for dynamics or minimization
|
||||
|
||||
if (strcmp(command,"@INIT_MD") == 0 ) {
|
||||
command = mdi_md();
|
||||
if (strcmp(command,"EXIT")) break;
|
||||
|
||||
|
||||
} else if (strcmp(command,"@INIT_OPTG") == 0 ) {
|
||||
command = mdi_optg();
|
||||
if (strcmp(command,"EXIT")) break;
|
||||
|
||||
} else if (strcmp(command,"EXIT") == 0) {
|
||||
break;
|
||||
|
||||
|
||||
} else
|
||||
error->all(FLERR,
|
||||
fmt::format("MDI node exited with "
|
||||
@ -306,7 +306,7 @@ char *MDIEngine::mdi_optg()
|
||||
|
||||
Minimize *minimizer = new Minimize(lmp);
|
||||
|
||||
// setup the minimizer in a way that ensures optimization
|
||||
// setup the minimizer in a way that ensures optimization
|
||||
// will continue until MDI driver exits
|
||||
|
||||
update->etol = std::numeric_limits<double>::min();
|
||||
|
||||
Reference in New Issue
Block a user