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

This commit is contained in:
sjplimp
2015-02-13 22:15:04 +00:00
parent 0b86f84588
commit 9312336d24
4 changed files with 24 additions and 1 deletions

View File

@ -287,6 +287,17 @@ void PPPMDisp::init()
error->warning(FLERR, str);
}
// show error message if pppm/disp is not used correctly
if (function[1] || function[2] || function[3]) {
if (!gridflag_6 && !gewaldflag_6 && accuracy_real_6 < 0
&& accuracy_kspace_6 < 0 && !auto_disp_flag) {
error->all(FLERR, "PPPMDisp used but no parameters set, "
"for further information please see the pppm/disp "
"documentation");
}
}
// compute qsum & qsqsum, if function[0] is set, warn if not charge-neutral
scale = 1.0;

View File

@ -493,6 +493,10 @@ E: Epsilon or sigma reference not set by pair style in PPPMDisp
Self-explanatory.
E: PPPMDisp used but no parameters set, for further information please see the pppm/disp documentation
An efficient and accurate usage of the pppm/disp requires settings via the kspace_modify command. Please see the pppm/disp documentation for further instructions.
E: KSpace accuracy too large to estimate G vector
Reduce the accuracy request or specify gwald explicitly

View File

@ -61,6 +61,7 @@ KSpace::KSpace(LAMMPS *lmp, int narg, char **arg) : Pointers(lmp)
order_6 = 5;
gridflag_6 = 0;
gewaldflag_6 = 0;
auto_disp_flag = 0;
slabflag = 0;
differentiation_flag = 0;
@ -556,6 +557,12 @@ void KSpace::modify_params(int narg, char **arg)
else if (strcmp(arg[iarg+1],"no") == 0) scalar_pressure_flag = 0;
else error->all(FLERR,"Illegal kspace_modify command");
iarg += 2;
} else if (strcmp(arg[iarg],"disp/auto") == 0) {
if (iarg+2 > narg) error->all(FLERR,"Illegal kspace_modify command");
if (strcmp(arg[iarg+1],"yes") == 0) auto_disp_flag = 1;
else if (strcmp(arg[iarg+1],"no") == 0) auto_disp_flag = 0;
else error->all(FLERR,"Illegal kspace_modify command");
iarg += 2;
} else error->all(FLERR,"Illegal kspace_modify command");
}
}

View File

@ -66,6 +66,7 @@ class KSpace : protected Pointers {
// dispersion solver (force units)
double accuracy_kspace_6; // reciprocal space accuracy for
// dispersion solver (force units)
int auto_disp_flag; // use automatic paramter generation for pppm/disp
double two_charge_force; // force in user units of two point
// charges separated by 1 Angstrom