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

@ -56,7 +56,7 @@ 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)