forked from lijiext/lammps
git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@5100 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
parent
8372b98a29
commit
b7c21ad2ec
|
@ -379,13 +379,14 @@ void DihedralCharmm::init_style()
|
|||
if (weight[i] > 0.0) weightflag = 1;
|
||||
|
||||
if (weightflag) {
|
||||
int itmp;
|
||||
if (force->pair == NULL)
|
||||
error->all("Dihedral charmm is incompatible with Pair style");
|
||||
lj14_1 = (double **) force->pair->extract("lj14_1");
|
||||
lj14_2 = (double **) force->pair->extract("lj14_2");
|
||||
lj14_3 = (double **) force->pair->extract("lj14_3");
|
||||
lj14_4 = (double **) force->pair->extract("lj14_4");
|
||||
int *ptr = (int *) force->pair->extract("implicit");
|
||||
lj14_1 = (double **) force->pair->extract("lj14_1",itmp);
|
||||
lj14_2 = (double **) force->pair->extract("lj14_2",itmp);
|
||||
lj14_3 = (double **) force->pair->extract("lj14_3",itmp);
|
||||
lj14_4 = (double **) force->pair->extract("lj14_4",itmp);
|
||||
int *ptr = (int *) force->pair->extract("implicit",itmp);
|
||||
if (!lj14_1 || !lj14_2 || !lj14_3 || !lj14_4 || !ptr)
|
||||
error->all("Dihedral charmm is incompatible with Pair style");
|
||||
implicit = *ptr;
|
||||
|
|
|
@ -497,12 +497,16 @@ double PairLJCharmmCoulCharmm::single(int i, int j, int itype, int jtype,
|
|||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void *PairLJCharmmCoulCharmm::extract(char *str)
|
||||
void *PairLJCharmmCoulCharmm::extract(char *str, int &dim)
|
||||
{
|
||||
dim = 2;
|
||||
if (strcmp(str,"lj14_1") == 0) return (void *) lj14_1;
|
||||
else if (strcmp(str,"lj14_2") == 0) return (void *) lj14_2;
|
||||
else if (strcmp(str,"lj14_3") == 0) return (void *) lj14_3;
|
||||
else if (strcmp(str,"lj14_4") == 0) return (void *) lj14_4;
|
||||
else if (strcmp(str,"implicit") == 0) return (void *) &implicit;
|
||||
if (strcmp(str,"lj14_2") == 0) return (void *) lj14_2;
|
||||
if (strcmp(str,"lj14_3") == 0) return (void *) lj14_3;
|
||||
if (strcmp(str,"lj14_4") == 0) return (void *) lj14_4;
|
||||
|
||||
dim = 0;
|
||||
if (strcmp(str,"implicit") == 0) return (void *) &implicit;
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@ class PairLJCharmmCoulCharmm : public Pair {
|
|||
void write_restart_settings(FILE *);
|
||||
void read_restart_settings(FILE *);
|
||||
virtual double single(int, int, int, int, double, double, double, double &);
|
||||
virtual void *extract(char *);
|
||||
virtual void *extract(char *, int &);
|
||||
|
||||
protected:
|
||||
int implicit;
|
||||
|
|
|
@ -214,15 +214,3 @@ double PairLJCharmmCoulCharmmImplicit::single(int i, int j,
|
|||
|
||||
return eng;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void *PairLJCharmmCoulCharmmImplicit::extract(char *str)
|
||||
{
|
||||
if (strcmp(str,"lj14_1") == 0) return (void *) lj14_1;
|
||||
else if (strcmp(str,"lj14_2") == 0) return (void *) lj14_2;
|
||||
else if (strcmp(str,"lj14_3") == 0) return (void *) lj14_3;
|
||||
else if (strcmp(str,"lj14_4") == 0) return (void *) lj14_4;
|
||||
else if (strcmp(str,"implicit") == 0) return (void *) &implicit;
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
@ -29,7 +29,6 @@ class PairLJCharmmCoulCharmmImplicit : public PairLJCharmmCoulCharmm {
|
|||
PairLJCharmmCoulCharmmImplicit(class LAMMPS *);
|
||||
void compute(int, int);
|
||||
double single(int, int, int, int, double, double, double, double &);
|
||||
void *extract(char *);
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue