removed redundant region check, made com/overdamped "yes" or "no" instead of 0/1

This commit is contained in:
Tom Swinburne
2020-05-01 14:36:06 +02:00
parent bad3becac3
commit 7c620f7514
4 changed files with 7 additions and 21 deletions

View File

@ -7177,9 +7177,6 @@ keyword to allow for additional bonds to be formed
*Region ID for fix heat does not exist*
Self-explanatory.
*Region ID for fix pafi does not exist*
Self-explanatory.
*Region ID for fix setforce does not exist*
Self-explanatory.

View File

@ -26,7 +26,7 @@ compute pa all property/atom d_nx d_ny d_nz d_dnx d_dny d_dnz d_ddnx d_ddny d_dd
run 0
## fix name group-id pafi compute-id temperature tdamp seed overdamped 0/1 com 0/1
fix hp all pafi pa 500.0 0.01 434 overdamped 0 com 1
fix hp all pafi pa 500.0 0.01 434 overdamped no com yes
run 0
minimize 0 0 1000 1000 # best if using NEB path

View File

@ -66,7 +66,7 @@ FixPAFI::FixPAFI(LAMMPS *lmp, int narg, char **arg) :
{
if (lmp->citeme) lmp->citeme->add(cite_fix_pafi_package);
if (narg < 7) error->all(FLERR,"Illegal fix pafi command");
if (narg < 11) error->all(FLERR,"Illegal fix pafi command");
dynamic_group_allow = 0;
vector_flag = 1;
@ -114,20 +114,13 @@ FixPAFI::FixPAFI(LAMMPS *lmp, int narg, char **arg) :
idregion = NULL; // not used
int iarg = 7;
while (iarg < narg) {
if (strcmp(arg[iarg],"region") == 0) {
if (iarg+2 > narg) error->all(FLERR,"Illegal fix pafi command");
iregion = domain->find_region(arg[iarg+1]);
if (iregion == -1)
error->all(FLERR,"Region ID for fix pafi does not exist");
int n = strlen(arg[iarg+1]) + 1;
idregion = new char[n];
strcpy(idregion,arg[iarg+1]);
iarg += 2;
} else if (strcmp(arg[iarg],"overdamped") == 0) {
od_flag = force->inumeric(FLERR,arg[iarg+1]);
if (strcmp(arg[iarg],"overdamped") == 0) {
if (strcmp(arg[iarg+1],"no") == 0) od_flag = 0;
else if (strcmp(arg[iarg+1],"yes") == 0) od_flag = 1;
iarg += 2;
} else if (strcmp(arg[iarg],"com") == 0) {
com_flag = force->inumeric(FLERR,arg[iarg+1]);
if (strcmp(arg[iarg+1],"no") == 0) com_flag = 0;
else if (strcmp(arg[iarg+1],"yes") == 0) com_flag = 1;
iarg += 2;
} else error->all(FLERR,"Illegal fix pafi command");
}

View File

@ -80,10 +80,6 @@ Self-explanatory. Check the input script syntax and compare to the
documentation for the command. You can use -echo screen as a
command-line option when running LAMMPS to see the offending line.
E: Region ID for fix pafi does not exist
Self-explanatory.
E: Compute ID for fix pafi does not exist
Self-explanatory.