git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@15291 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp 2016-07-12 22:59:27 +00:00
parent 6ec2346ca0
commit eec4d961c0
4 changed files with 5 additions and 11 deletions

View File

@ -141,12 +141,6 @@ void Compute::modify_params(int narg, char **arg)
else if (strcmp(arg[iarg+1],"yes") == 0) dynamic_user = 1;
else error->all(FLERR,"Illegal compute_modify command");
iarg += 2;
} else if (strcmp(arg[iarg],"thermo") == 0) {
if (iarg+2 > narg) error->all(FLERR,"Illegal compute_modify command");
if (strcmp(arg[iarg+1],"no") == 0) thermoflag = 0;
else if (strcmp(arg[iarg+1],"yes") == 0) thermoflag = 1;
else error->all(FLERR,"Illegal compute_modify command");
iarg += 2;
} else error->all(FLERR,"Illegal compute_modify command");
}
}

View File

@ -151,7 +151,6 @@ class Compute : protected Pointers {
int fix_dof; // DOF due to fixes
int dynamic; // recount atoms for temperature computes
int dynamic_user; // user request for temp compute to be dynamic
int thermoflag; // 1 if include fix PE for PE computes
double vbias[3]; // stored velocity bias for one atom
double **vbiasall; // stored velocity bias for all atoms

View File

@ -46,12 +46,12 @@ ComputePE::ComputePE(LAMMPS *lmp, int narg, char **arg) :
pairflag = 1;
bondflag = angleflag = dihedralflag = improperflag = 1;
kspaceflag = 1;
thermoflag = 1;
fixflag = 1;
} else {
pairflag = 0;
bondflag = angleflag = dihedralflag = improperflag = 0;
kspaceflag = 0;
thermoflag = 0;
fixflag = 0;
int iarg = 3;
while (iarg < narg) {
if (strcmp(arg[iarg],"pair") == 0) pairflag = 1;
@ -60,6 +60,7 @@ ComputePE::ComputePE(LAMMPS *lmp, int narg, char **arg) :
else if (strcmp(arg[iarg],"dihedral") == 0) dihedralflag = 1;
else if (strcmp(arg[iarg],"improper") == 0) improperflag = 1;
else if (strcmp(arg[iarg],"kspace") == 0) kspaceflag = 1;
else if (strcmp(arg[iarg],"fix") == 0) fixflag = 1;
else error->all(FLERR,"Illegal compute pe command");
iarg++;
}
@ -94,7 +95,7 @@ double ComputePE::compute_scalar()
scalar += force->pair->etail / volume;
}
if (thermoflag && modify->n_thermo_energy) scalar += modify->thermo_energy();
if (fixflag && modify->n_thermo_energy) scalar += modify->thermo_energy();
return scalar;
}

View File

@ -32,7 +32,7 @@ class ComputePE : public Compute {
double compute_scalar();
private:
int pairflag,bondflag,angleflag,dihedralflag,improperflag,kspaceflag;
int pairflag,bondflag,angleflag,dihedralflag,improperflag,kspaceflag,fixflag;
};
}