git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@14455 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -604,7 +604,7 @@ void PairComb3::read_file(char *file)
|
||||
|
||||
FILE *fp;
|
||||
if (comm->me == 0) {
|
||||
fp = fopen(file,"r");
|
||||
fp = force->open_potential(file);
|
||||
if (fp == NULL) {
|
||||
char str[128];
|
||||
sprintf(str,"Cannot open COMB3 potential file %s",file);
|
||||
|
||||
@ -108,7 +108,7 @@ void PairPolymorphic::compute(int eflag, int vflag)
|
||||
int itype,jtype,ktype;
|
||||
int iparam_ii,iparam_jj,iparam_kk,iparam_ij,iparam_ik,iparam_ijk;
|
||||
double xtmp,ytmp,ztmp,delx,dely,delz,evdwl,fpair;
|
||||
double rsq,rsq1,rsq2,r0,r1,r2;
|
||||
double rsq,r0,r1,r2;
|
||||
double delr1[3],delr2[3],fi[3],fj[3],fk[3];
|
||||
double zeta_ij,prefactor,wfac,pfac,gfac,fa,fa_d,bij,bij_d;
|
||||
double costheta;
|
||||
@ -872,7 +872,8 @@ void PairPolymorphic::grab(FILE *fp, int n, double *list)
|
||||
fgets(line,MAXLINE,fp);
|
||||
ptr = strtok(line," \t\n\r\f");
|
||||
list[i++] = atof(ptr);
|
||||
while (ptr = strtok(NULL," \t\n\r\f")) list[i++] = atof(ptr);
|
||||
while ((ptr = strtok(NULL," \t\n\r\f")))
|
||||
list[i++] = atof(ptr);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -16,10 +16,10 @@
|
||||
Based on fix qeq/reax by H. Metin Aktulga
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "math.h"
|
||||
#include "stdio.h"
|
||||
#include "stdlib.h"
|
||||
#include "string.h"
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "fix_qeq.h"
|
||||
#include "atom.h"
|
||||
#include "comm.h"
|
||||
@ -49,7 +49,7 @@ FixQEq::FixQEq(LAMMPS *lmp, int narg, char **arg) :
|
||||
Fix(lmp, narg, arg)
|
||||
{
|
||||
if (narg < 8) error->all(FLERR,"Illegal fix qeq command");
|
||||
|
||||
|
||||
nevery = force->inumeric(FLERR,arg[3]);
|
||||
cutoff = force->numeric(FLERR,arg[4]);
|
||||
tolerance = force->numeric(FLERR,arg[5]);
|
||||
@ -102,7 +102,7 @@ FixQEq::FixQEq(LAMMPS *lmp, int narg, char **arg) :
|
||||
s_hist = t_hist = NULL;
|
||||
grow_arrays(atom->nmax);
|
||||
atom->add_callback(0);
|
||||
|
||||
|
||||
for( int i = 0; i < atom->nmax; i++ )
|
||||
for (int j = 0; j < nprev; ++j )
|
||||
s_hist[i][j] = t_hist[i][j] = atom->q[i];
|
||||
@ -625,7 +625,7 @@ double FixQEq::parallel_dot( double *v1, double *v2, int n)
|
||||
if (atom->mask[i] & groupbit)
|
||||
my_dot += v1[i] * v2[i];
|
||||
}
|
||||
|
||||
|
||||
MPI_Allreduce( &my_dot, &res, 1, MPI_DOUBLE, MPI_SUM, world );
|
||||
|
||||
return res;
|
||||
|
||||
@ -15,10 +15,10 @@
|
||||
Contributing author: Ray Shan (Sandia)
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "math.h"
|
||||
#include "stdio.h"
|
||||
#include "stdlib.h"
|
||||
#include "string.h"
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "fix_qeq_fire.h"
|
||||
#include "atom.h"
|
||||
#include "comm.h"
|
||||
@ -49,8 +49,8 @@ using namespace FixConst;
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
FixQEqFire::FixQEqFire(LAMMPS *lmp, int narg, char **arg) :
|
||||
FixQEq(lmp, narg, arg)
|
||||
FixQEqFire::FixQEqFire(LAMMPS *lmp, int narg, char **arg) :
|
||||
FixQEq(lmp, narg, arg)
|
||||
{
|
||||
qdamp = 0.20;
|
||||
qstep = 0.20;
|
||||
@ -68,7 +68,7 @@ FixQEqFire::FixQEqFire(LAMMPS *lmp, int narg, char **arg) :
|
||||
iarg += 2;
|
||||
} else error->all(FLERR,"Illegal fix qeq/fire command");
|
||||
}
|
||||
|
||||
|
||||
comb = NULL;
|
||||
comb3 = NULL;
|
||||
}
|
||||
@ -89,7 +89,7 @@ void FixQEqFire::init()
|
||||
neighbor->requests[irequest]->half = 1;
|
||||
neighbor->requests[irequest]->full = 0;
|
||||
|
||||
if (tolerance < 1e-4)
|
||||
if (tolerance < 1e-4)
|
||||
if (comm->me == 0)
|
||||
error->warning(FLERR,"Fix qeq/fire tolerance may be too small"
|
||||
" for damped fires");
|
||||
|
||||
@ -65,7 +65,6 @@ void ImproperDistance::compute(int eflag, int vflag)
|
||||
// double ss1,ss2,ss3,r1,r2,r3,c0,c1,c2,s1,s2;
|
||||
// double s12,c,s,domega,a,a11,a22,a33,a12,a13,a23;
|
||||
double domega,a;
|
||||
double sx2,sy2,sz2;
|
||||
|
||||
eimproper = 0.0;
|
||||
if (eflag || vflag) ev_setup(eflag,vflag);
|
||||
|
||||
Reference in New Issue
Block a user