Commit edd3fb71 authored by Jacob Gissinger's avatar Jacob Gissinger
Browse files

reset_mol_ids: documented verbose option

parent fe6efe88
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ Syntax
       *compress* value = *yes* or *no*
       *offset* value = *Noffset* >= -1
       *single* value = *yes* or *no* to treat single atoms (no bonds) as molecules
       *verbose* value = *yes* or *no*

Examples
""""""""
@@ -95,6 +96,10 @@ is not *all* there may be collisions with the molecule IDs of other atoms.
   does not perform a full update of the bond topology data structures
   within LAMMPS.

The *verbose* keyword determines if this command outputs run-time
information to the screen and log file, including the number of new
molecule IDs and CPU time used by the command.

Restrictions
""""""""""""
none
@@ -112,5 +117,5 @@ Related commands
Default
"""""""

The default keyword settings are compress = yes, single = no, and
offset = -1.
The default keyword settings are compress = yes, single = no,
verbose = yes, and offset = -1.
+1 −1
Original line number Diff line number Diff line
@@ -2518,7 +2518,7 @@ update molecule IDs, charges, types, special lists and all topology
void FixBondReact::update_everything()
{
  if (reset_mol_ids_flag)
    input->one("reset_mol_ids " + std::string(group->names[igroup]) + " verbose 0");
    input->one("reset_mol_ids " + std::string(group->names[igroup]) + " verbose no");

  int *type = atom->type;

+5 −3
Original line number Diff line number Diff line
@@ -79,12 +79,14 @@ void ResetMolIDs::command(int narg, char **arg)
      iarg += 2;
    } else if (strcmp(arg[iarg],"verbose") == 0) {
      if (iarg+2 > narg) error->all(FLERR,"Illegal reset_mol_ids command");
      verbose = utils::inumeric(FLERR,arg[iarg+1],1,lmp);
      if (strcmp(arg[iarg+1],"yes") == 0) verbose = 1;
      else if (strcmp(arg[iarg+1],"no") == 0) verbose = 0;
      else error->all(FLERR,"Illegal reset_mol_ids command");
      iarg += 2;
    } else error->all(FLERR,"Illegal reset_mol_ids command");
  }

  if (verbose == 1 && comm->me == 0) utils::logmesg(lmp,"Resetting molecule IDs ...\n");
  if (verbose && (comm->me == 0)) utils::logmesg(lmp,"Resetting molecule IDs ...\n");

  // record wall time for resetting molecule IDs

@@ -208,7 +210,7 @@ void ResetMolIDs::command(int narg, char **arg)

  MPI_Barrier(world);

  if (verbose == 1 && comm->me == 0) {
  if (verbose && (comm->me == 0)) {
    if (nchunk < 0)
      utils::logmesg(lmp,fmt::format("  number of new molecule IDs = unknown\n"));
    else