forked from lijiext/lammps
git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@14831 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
parent
f50b03fcab
commit
eb8fdc4ab6
|
@ -63,6 +63,7 @@ FixTuneKspace::FixTuneKspace(LAMMPS *lmp, int narg, char **arg) :
|
|||
// parse arguments
|
||||
|
||||
nevery = force->inumeric(FLERR,arg[3]);
|
||||
if (nevery <= 0) error->all(FLERR,"Illegal fix tune/kspace command");
|
||||
|
||||
// set up reneighboring
|
||||
|
||||
|
|
|
@ -79,6 +79,7 @@ FixAtomSwap::FixAtomSwap(LAMMPS *lmp, int narg, char **arg) :
|
|||
double temperature = force->numeric(FLERR,arg[6]);
|
||||
beta = 1.0/(force->boltz*temperature);
|
||||
|
||||
if (nevery <= 0) error->all(FLERR,"Illegal fix atom/swap command");
|
||||
if (ncycles < 0) error->all(FLERR,"Illegal fix atom/swap command");
|
||||
if (seed <= 0) error->all(FLERR,"Illegal fix atom/swap command");
|
||||
|
||||
|
|
|
@ -85,6 +85,7 @@ FixGCMC::FixGCMC(LAMMPS *lmp, int narg, char **arg) :
|
|||
chemical_potential = force->numeric(FLERR,arg[9]);
|
||||
displace = force->numeric(FLERR,arg[10]);
|
||||
|
||||
if (nevery <= 0) error->all(FLERR,"Illegal fix gcmc command");
|
||||
if (nexchanges < 0) error->all(FLERR,"Illegal fix gcmc command");
|
||||
if (nmcmoves < 0) error->all(FLERR,"Illegal fix gcmc command");
|
||||
if (seed <= 0) error->all(FLERR,"Illegal fix gcmc command");
|
||||
|
|
|
@ -55,6 +55,10 @@ FixQEq::FixQEq(LAMMPS *lmp, int narg, char **arg) :
|
|||
tolerance = force->numeric(FLERR,arg[5]);
|
||||
maxiter = force->inumeric(FLERR,arg[6]);
|
||||
|
||||
// check for sane arguments
|
||||
if ((nevery <= 0) || (cutoff <= 0.0) || (tolerance <= 0.0) || (maxiter <= 0))
|
||||
error->all(FLERR,"Illegal fix qeq command");
|
||||
|
||||
alpha = 0.20;
|
||||
swa = 0.0;
|
||||
swb = cutoff;
|
||||
|
|
|
@ -122,7 +122,7 @@ void NEB::command(int narg, char **arg)
|
|||
|
||||
if (etol < 0.0) error->all(FLERR,"Illegal NEB command");
|
||||
if (ftol < 0.0) error->all(FLERR,"Illegal NEB command");
|
||||
if (nevery == 0) error->universe_all(FLERR,"Illegal NEB command");
|
||||
if (nevery <= 0) error->universe_all(FLERR,"Illegal NEB command");
|
||||
if (n1steps % nevery || n2steps % nevery)
|
||||
error->universe_all(FLERR,"Illegal NEB command");
|
||||
|
||||
|
|
|
@ -87,7 +87,7 @@ void Temper::command(int narg, char **arg)
|
|||
|
||||
// swap frequency must evenly divide total # of timesteps
|
||||
|
||||
if (nevery == 0)
|
||||
if (nevery <= 0)
|
||||
error->universe_all(FLERR,"Invalid frequency in temper command");
|
||||
nswaps = nsteps/nevery;
|
||||
if (nswaps*nevery != nsteps)
|
||||
|
|
|
@ -71,6 +71,8 @@ FixQEqReax::FixQEqReax(LAMMPS *lmp, int narg, char **arg) :
|
|||
if (narg != 8) error->all(FLERR,"Illegal fix qeq/reax command");
|
||||
|
||||
nevery = force->inumeric(FLERR,arg[3]);
|
||||
if (nevery <= 0) error->all(FLERR,"Illegal fix qeq/reax command");
|
||||
|
||||
swa = force->numeric(FLERR,arg[4]);
|
||||
swb = force->numeric(FLERR,arg[5]);
|
||||
tolerance = force->numeric(FLERR,arg[6]);
|
||||
|
|
|
@ -60,6 +60,7 @@ DumpCustom::DumpCustom(LAMMPS *lmp, int narg, char **arg) :
|
|||
clearstep = 1;
|
||||
|
||||
nevery = force->inumeric(FLERR,arg[3]);
|
||||
if (nevery <= 0) error->all(FLERR,"Illegal dump custom command");
|
||||
|
||||
// size_one may be shrunk below if additional optional args exist
|
||||
|
||||
|
|
|
@ -43,6 +43,8 @@ DumpLocal::DumpLocal(LAMMPS *lmp, int narg, char **arg) :
|
|||
clearstep = 1;
|
||||
|
||||
nevery = force->inumeric(FLERR,arg[3]);
|
||||
if (nevery <= 0) error->all(FLERR,"Illegal dump local command");
|
||||
|
||||
|
||||
size_one = nfield = narg-5;
|
||||
pack_choice = new FnPtrPack[nfield];
|
||||
|
|
Loading…
Reference in New Issue