type label support for atom/swap

This commit is contained in:
Jacob Gissinger
2024-04-18 14:32:23 -04:00
parent 267e75133a
commit cf6522eebb
2 changed files with 2 additions and 2 deletions

View File

@ -21,7 +21,7 @@ Syntax
.. parsed-literal::
*types* values = two or more atom types
*types* values = two or more atom types (1-Ntypes or type label)
*mu* values = chemical potential of swap types (energy units)
*ke* value = *no* or *yes*
*no* = no conservation of kinetic energy after atom swaps

View File

@ -171,7 +171,7 @@ void FixAtomSwap::options(int narg, char **arg)
while (iarg < narg) {
if (isalpha(arg[iarg][0])) break;
if (nswaptypes >= atom->ntypes) error->all(FLERR, "Illegal fix atom/swap command");
type_list[nswaptypes] = utils::numeric(FLERR, arg[iarg], false, lmp);
type_list[nswaptypes] = utils::expand_type_int(FLERR, arg[iarg], Atom::ATOM, lmp);
nswaptypes++;
iarg++;
}