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

This commit is contained in:
sjplimp 2016-07-30 14:47:01 +00:00
parent 4eb6664ba8
commit b5836fa491
3 changed files with 26 additions and 7 deletions

View File

@ -141,6 +141,7 @@ void EwaldDisp::init()
init_coeffs();
init_coeff_sums();
if (function[0]) qsum_qsq();
natoms_original = atom->natoms;
// turn off coulombic if no charge
@ -375,6 +376,7 @@ void EwaldDisp::reallocate()
delete [] kflag;
}
/* ---------------------------------------------------------------------- */
void EwaldDisp::reallocate_atoms()
{
@ -392,6 +394,7 @@ void EwaldDisp::reallocate_atoms()
nevec_max = nevec;
}
/* ---------------------------------------------------------------------- */
void EwaldDisp::allocate_peratom()
{
@ -401,6 +404,7 @@ void EwaldDisp::allocate_peratom()
atom->nmax,EWALD_NFUNCS,"ewald/n:virial_self_peratom");
}
/* ---------------------------------------------------------------------- */
void EwaldDisp::deallocate_peratom() // free memory
{
@ -415,6 +419,7 @@ void EwaldDisp::deallocate_peratom() // free memory
}
}
/* ---------------------------------------------------------------------- */
void EwaldDisp::deallocate() // free memory
{
@ -426,6 +431,7 @@ void EwaldDisp::deallocate() // free memory
delete [] cek_global; cek_global = NULL;
}
/* ---------------------------------------------------------------------- */
void EwaldDisp::coefficients()
{
@ -472,6 +478,8 @@ void EwaldDisp::coefficients()
}
}
/* ---------------------------------------------------------------------- */
void EwaldDisp::init_coeffs()
{
int tmp;
@ -505,6 +513,8 @@ void EwaldDisp::init_coeffs()
}
}
/* ---------------------------------------------------------------------- */
void EwaldDisp::init_coeff_sums()
{
if (sums) return; // calculated only once
@ -547,6 +557,7 @@ void EwaldDisp::init_coeff_sums()
MPI_Allreduce(sum_local, sum, 2*EWALD_MAX_NSUMS, MPI_DOUBLE, MPI_SUM, world);
}
/* ---------------------------------------------------------------------- */
void EwaldDisp::init_self()
{
@ -575,6 +586,7 @@ void EwaldDisp::init_self()
}
}
/* ---------------------------------------------------------------------- */
void EwaldDisp::init_self_peratom()
{
@ -650,7 +662,6 @@ void EwaldDisp::init_self_peratom()
}
}
/* ----------------------------------------------------------------------
compute the EwaldDisp long-range force, energy, virial
------------------------------------------------------------------------- */
@ -680,7 +691,7 @@ void EwaldDisp::compute(int eflag, int vflag)
// update qsum and qsqsum, if atom count has changed and energy needed
if ((eflag_global || eflag_atom) && atom->natoms != natoms_original) {
qsum_qsq();
if (function[0]) qsum_qsq();
natoms_original = atom->natoms;
}
@ -766,6 +777,7 @@ void EwaldDisp::compute_ek()
delete [] z;
}
/* ---------------------------------------------------------------------- */
void EwaldDisp::compute_force()
{
@ -871,6 +883,7 @@ void EwaldDisp::compute_force()
}
}
/* ---------------------------------------------------------------------- */
void EwaldDisp::compute_surface()
{
@ -908,6 +921,7 @@ void EwaldDisp::compute_surface()
}
}
/* ---------------------------------------------------------------------- */
void EwaldDisp::compute_energy()
{
@ -955,6 +969,7 @@ void EwaldDisp::compute_energy()
if (slabflag) compute_slabcorr();
}
/* ---------------------------------------------------------------------- */
void EwaldDisp::compute_energy_peratom()
{
@ -1047,6 +1062,7 @@ void EwaldDisp::compute_energy_peratom()
}
}
/* ---------------------------------------------------------------------- */
#define swap(a, b) { register double t = a; a= b; b = t; }
@ -1111,6 +1127,7 @@ void EwaldDisp::compute_virial()
}
}
/* ---------------------------------------------------------------------- */
void EwaldDisp::compute_virial_dipole()
{
@ -1206,6 +1223,8 @@ void EwaldDisp::compute_virial_dipole()
}
}
/* ---------------------------------------------------------------------- */
void EwaldDisp::compute_virial_peratom()
{
if (!vflag_atom) return;

View File

@ -422,7 +422,7 @@ void PairNb3bHarmonic::setup_params()
n = m;
}
}
// if (n < 0) error->all(FLERR,"Potential file is missing an entry");
if (n < 0) error->all(FLERR,"Potential file is missing an entry");
elem2param[i][j][k] = n;
}

View File

@ -405,10 +405,10 @@ void FixQMMM::exchange_positions()
{
double **x = atom->x;
double *charge = atom->q;
const int * const mask = atom->mask;
const int * const type = atom->type;
const double * const mass = atom->mass;
const tagint * const tag = atom->tag;
int * const mask = atom->mask;
int * const type = atom->type;
double * const mass = atom->mass;
tagint * const tag = atom->tag;
const int nlocal = atom->nlocal;
const int ntypes = atom->ntypes;
const int natoms = (int) atom->natoms;