whitespace, pointer initializer, and permission fixes
This commit is contained in:
@ -40,7 +40,7 @@ using namespace FixConst;
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
FixMolSwap::FixMolSwap(LAMMPS *lmp, int narg, char **arg) :
|
||||
Fix(lmp, narg, arg)
|
||||
Fix(lmp, narg, arg), random(nullptr), c_pe(nullptr)
|
||||
{
|
||||
if (narg < 9) error->all(FLERR,"Illegal fix mol/swap command");
|
||||
|
||||
@ -83,7 +83,7 @@ FixMolSwap::FixMolSwap(LAMMPS *lmp, int narg, char **arg) :
|
||||
error->all(FLERR,"Fix mol/swap atom types are invalid");
|
||||
if (seed <= 0) error->all(FLERR,"Illegal fix mol/swap command");
|
||||
if (temperature <= 0.0) error->all(FLERR,"Illegal fix mol/swap command");
|
||||
if (ke_flag && atom->rmass)
|
||||
if (ke_flag && atom->rmass)
|
||||
error->all(FLERR,"Cannot conserve kinetic energy with fix mol/swap "
|
||||
"unless per-type masses");
|
||||
|
||||
@ -211,7 +211,7 @@ void FixMolSwap::init()
|
||||
MPI_Allreduce(&flag,&flagall,1,MPI_INT,MPI_MAX,world);
|
||||
if (flagall) qflag = 0;
|
||||
|
||||
if (!qflag && comm->me == 0)
|
||||
if (!qflag && comm->me == 0)
|
||||
error->warning(FLERR,"Cannot swap charges in fix mol/swap");
|
||||
}
|
||||
|
||||
@ -277,7 +277,7 @@ int FixMolSwap::attempt_swap()
|
||||
// pick a random molecule
|
||||
// swap properties of all its eligible itype & jtype atoms
|
||||
|
||||
tagint molID =
|
||||
tagint molID =
|
||||
minmol + static_cast<tagint> (random->uniform() * (maxmol-minmol+1));
|
||||
if (molID > maxmol) molID = maxmol;
|
||||
|
||||
|
||||
@ -44,7 +44,7 @@ class FixMolSwap : public Fix {
|
||||
|
||||
int ke_flag; // 1 if kinetic energy is also swapped
|
||||
double i2j_vscale; // scale factors for velocity to keep KE constant
|
||||
double j2i_vscale;
|
||||
double j2i_vscale;
|
||||
|
||||
int qflag; // 1 if charge is also swapped
|
||||
double iq,jq; // charge values for all itype,jtype atoms
|
||||
|
||||
Reference in New Issue
Block a user