bond/break: direct type label support

This commit is contained in:
Jacob Gissinger
2024-05-11 16:40:40 -04:00
parent 8fc1a8ec7f
commit c5c7e6fb74
2 changed files with 5 additions and 5 deletions

View File

@ -13,7 +13,7 @@ Syntax
* ID, group-ID are documented in :doc:`fix <fix>` command * ID, group-ID are documented in :doc:`fix <fix>` command
* bond/break = style name of this fix command * bond/break = style name of this fix command
* Nevery = attempt bond breaking every this many steps * Nevery = attempt bond breaking every this many steps
* bondtype = type of bonds to break * bondtype = type of bonds to break (integer or type label)
* Rmax = bond longer than Rmax can break (distance units) * Rmax = bond longer than Rmax can break (distance units)
* zero or more keyword/value pairs may be appended * zero or more keyword/value pairs may be appended
* keyword = *prob* * keyword = *prob*

View File

@ -46,8 +46,8 @@ FixBondBreak::FixBondBreak(LAMMPS *lmp, int narg, char **arg) :
MPI_Comm_rank(world,&me); MPI_Comm_rank(world,&me);
MPI_Comm_size(world,&nprocs); MPI_Comm_size(world,&nprocs);
nevery = utils::inumeric(FLERR,arg[3],false,lmp); nevery = utils::inumeric(FLERR, arg[3], false, lmp);
if (nevery <= 0) error->all(FLERR,"Illegal fix bond/break command"); if (nevery <= 0) error->all(FLERR, "Illegal fix bond/break command");
force_reneighbor = 1; force_reneighbor = 1;
next_reneighbor = -1; next_reneighbor = -1;
@ -56,8 +56,8 @@ FixBondBreak::FixBondBreak(LAMMPS *lmp, int narg, char **arg) :
global_freq = 1; global_freq = 1;
extvector = 0; extvector = 0;
btype = utils::inumeric(FLERR,arg[4],false,lmp); btype = utils::expand_type_int(FLERR, arg[4], Atom::BOND, lmp);
cutoff = utils::numeric(FLERR,arg[5],false,lmp); cutoff = utils::numeric(FLERR, arg[5], false, lmp);
if (btype < 1 || btype > atom->nbondtypes) if (btype < 1 || btype > atom->nbondtypes)
error->all(FLERR,"Invalid bond type in fix bond/break command"); error->all(FLERR,"Invalid bond type in fix bond/break command");