Merge remote branch 'lammps-ro/master' into lammps-icms
Resolved Conflicts: doc/Manual.txt doc/fix_tune_kspace.txt doc/group2ndx.txt src/DIPOLE/atom_vec_dipole.cpp src/DIPOLE/pair_lj_long_dipole_long.cpp src/MOLECULE/atom_vec_angle.cpp src/MOLECULE/atom_vec_bond.cpp src/MOLECULE/atom_vec_full.cpp src/MOLECULE/atom_vec_molecular.cpp src/PERI/atom_vec_peri.cpp src/USER-AWPMD/atom_vec_wavepacket.cpp src/USER-COLVARS/README src/USER-EFF/atom_vec_electron.cpp src/USER-SPH/atom_vec_meso.cpp src/atom.h src/atom_vec_atomic.cpp src/atom_vec_body.cpp src/atom_vec_charge.cpp src/atom_vec_ellipsoid.cpp src/atom_vec_line.cpp src/atom_vec_sphere.cpp src/atom_vec_tri.cpp src/fix_restrain.cpp src/force.cpp tools/restart2data.cpp
This commit is contained in:
19
src/pair.cpp
19
src/pair.cpp
@ -71,6 +71,7 @@ Pair::Pair(LAMMPS *lmp) : Pointers(lmp)
|
||||
// pair_modify settings
|
||||
|
||||
compute_flag = 1;
|
||||
manybody_flag = 0;
|
||||
offset_flag = 0;
|
||||
mix_flag = GEOMETRIC;
|
||||
tail_flag = 0;
|
||||
@ -172,11 +173,27 @@ void Pair::init()
|
||||
if (tail_flag && domain->nonperiodic && comm->me == 0)
|
||||
error->warning(FLERR,"Using pair tail corrections with nonperiodic system");
|
||||
|
||||
if (!allocated) error->all(FLERR,"All pair coeffs are not set");
|
||||
// for manybody potentials
|
||||
// check if bonded exclusions could invalidate the neighbor list
|
||||
|
||||
if (manybody_flag && atom->molecular) {
|
||||
int flag = 0;
|
||||
if (atom->nbonds > 0 && force->special_lj[1] == 0.0 &&
|
||||
force->special_coul[1] == 0.0) flag = 1;
|
||||
if (atom->nangles > 0 && force->special_lj[2] == 0.0 &&
|
||||
force->special_coul[2] == 0.0) flag = 1;
|
||||
if (atom->ndihedrals > 0 && force->special_lj[3] == 0.0 &&
|
||||
force->special_coul[3] == 0.0) flag = 1;
|
||||
if (flag && comm->me == 0)
|
||||
error->warning(FLERR,"Using a manybody potential with "
|
||||
"bonds/angles/dihedrals and special_bond exclusions");
|
||||
}
|
||||
|
||||
// I,I coeffs must be set
|
||||
// init_one() will check if I,J is set explicitly or inferred by mixing
|
||||
|
||||
if (!allocated) error->all(FLERR,"All pair coeffs are not set");
|
||||
|
||||
for (i = 1; i <= atom->ntypes; i++)
|
||||
if (setflag[i][i] == 0) error->all(FLERR,"All pair coeffs are not set");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user