git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@10025 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -37,6 +37,8 @@ PairHybrid::PairHybrid(LAMMPS *lmp) : Pair(lmp)
|
|||||||
styles = NULL;
|
styles = NULL;
|
||||||
keywords = NULL;
|
keywords = NULL;
|
||||||
multiple = NULL;
|
multiple = NULL;
|
||||||
|
|
||||||
|
outerflag = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
@ -98,7 +100,8 @@ void PairHybrid::compute(int eflag, int vflag)
|
|||||||
else vflag_substyle = vflag;
|
else vflag_substyle = vflag;
|
||||||
|
|
||||||
for (m = 0; m < nstyles; m++) {
|
for (m = 0; m < nstyles; m++) {
|
||||||
styles[m]->compute(eflag,vflag_substyle);
|
if (outerflag) styles[m]->compute(eflag,vflag_substyle);
|
||||||
|
else styles[m]->compute_outer(eflag,vflag_substyle);
|
||||||
|
|
||||||
if (eflag_global) {
|
if (eflag_global) {
|
||||||
eng_vdwl += styles[m]->eng_vdwl;
|
eng_vdwl += styles[m]->eng_vdwl;
|
||||||
@ -146,8 +149,9 @@ void PairHybrid::compute_middle()
|
|||||||
|
|
||||||
void PairHybrid::compute_outer(int eflag, int vflag)
|
void PairHybrid::compute_outer(int eflag, int vflag)
|
||||||
{
|
{
|
||||||
for (int m = 0; m < nstyles; m++)
|
outerflag = 1;
|
||||||
if (styles[m]->respa_enable) styles[m]->compute_outer(eflag,vflag);
|
compute(eflag,vflag);
|
||||||
|
outerflag = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------
|
/* ----------------------------------------------------------------------
|
||||||
|
|||||||
@ -54,6 +54,8 @@ class PairHybrid : public Pair {
|
|||||||
int check_ijtype(int, int, char *);
|
int check_ijtype(int, int, char *);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
int outerflag; // toggle compute() when invoked by outer()
|
||||||
|
|
||||||
int **nmap; // # of sub-styles itype,jtype points to
|
int **nmap; // # of sub-styles itype,jtype points to
|
||||||
int ***map; // list of sub-styles itype,jtype points to
|
int ***map; // list of sub-styles itype,jtype points to
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user