git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@5105 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -289,38 +289,6 @@ void PairSoft::read_restart_settings(FILE *fp)
|
|||||||
MPI_Bcast(&mix_flag,1,MPI_INT,0,world);
|
MPI_Bcast(&mix_flag,1,MPI_INT,0,world);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------
|
|
||||||
check if name is recognized, return integer index for that name
|
|
||||||
if name not recognized, return -1
|
|
||||||
if type pair setting, return -2 if no type pairs are set
|
|
||||||
------------------------------------------------------------------------- */
|
|
||||||
|
|
||||||
int PairSoft::pre_adapt(char *name, int ilo, int ihi, int jlo, int jhi)
|
|
||||||
{
|
|
||||||
int count = 0;
|
|
||||||
for (int i = ilo; i <= ihi; i++)
|
|
||||||
for (int j = MAX(jlo,i); j <= jhi; j++)
|
|
||||||
count++;
|
|
||||||
if (count == 0) return -2;
|
|
||||||
|
|
||||||
if (strcmp(name,"a") == 0) return 0;
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------
|
|
||||||
adapt parameter indexed by which
|
|
||||||
change all pair variables affected by the reset parameter
|
|
||||||
if type pair setting, set I-J and J-I coeffs
|
|
||||||
------------------------------------------------------------------------- */
|
|
||||||
|
|
||||||
void PairSoft::adapt(int which, int ilo, int ihi, int jlo, int jhi,
|
|
||||||
double value)
|
|
||||||
{
|
|
||||||
for (int i = ilo; i <= ihi; i++)
|
|
||||||
for (int j = MAX(jlo,i); j <= jhi; j++)
|
|
||||||
prefactor[i][j] = prefactor[j][i] = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
double PairSoft::single(int i, int j, int itype, int jtype, double rsq,
|
double PairSoft::single(int i, int j, int itype, int jtype, double rsq,
|
||||||
@ -337,3 +305,12 @@ double PairSoft::single(int i, int j, int itype, int jtype, double rsq,
|
|||||||
philj = prefactor[itype][jtype] * (1.0+cos(arg));
|
philj = prefactor[itype][jtype] * (1.0+cos(arg));
|
||||||
return factor_lj*philj;
|
return factor_lj*philj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
void *PairSoft::extract(char *str, int &dim)
|
||||||
|
{
|
||||||
|
dim = 2;
|
||||||
|
if (strcmp(str,"a") == 0) return (void *) prefactor;
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|||||||
@ -38,9 +38,8 @@ class PairSoft : public Pair {
|
|||||||
void read_restart(FILE *);
|
void read_restart(FILE *);
|
||||||
void write_restart_settings(FILE *);
|
void write_restart_settings(FILE *);
|
||||||
void read_restart_settings(FILE *);
|
void read_restart_settings(FILE *);
|
||||||
int pre_adapt(char *, int, int, int, int);
|
|
||||||
void adapt(int, int, int, int, int, double);
|
|
||||||
double single(int, int, int, int, double, double, double, double &);
|
double single(int, int, int, int, double, double, double, double &);
|
||||||
|
void *extract(char *, int &);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
double PI;
|
double PI;
|
||||||
|
|||||||
@ -466,11 +466,12 @@ void Respa::run(int n)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------
|
/* ----------------------------------------------------------------------
|
||||||
delete fix at end of run, so its atom arrays won't persist
|
delete rRESPA fix at end of run, so its atom arrays won't persist
|
||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
void Respa::cleanup()
|
void Respa::cleanup()
|
||||||
{
|
{
|
||||||
|
modify->post_run();
|
||||||
modify->delete_fix("RESPA");
|
modify->delete_fix("RESPA");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -286,6 +286,13 @@ void Verlet::run(int n)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
void Verlet::cleanup()
|
||||||
|
{
|
||||||
|
modify->post_run();
|
||||||
|
}
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------
|
/* ----------------------------------------------------------------------
|
||||||
clear force on own & ghost atoms
|
clear force on own & ghost atoms
|
||||||
setup and clear other arrays as needed
|
setup and clear other arrays as needed
|
||||||
|
|||||||
@ -32,6 +32,7 @@ class Verlet : public Integrate {
|
|||||||
void setup();
|
void setup();
|
||||||
void setup_minimal(int);
|
void setup_minimal(int);
|
||||||
void run(int);
|
void run(int);
|
||||||
|
void cleanup();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int triclinic; // 0 if domain is orthog, 1 if triclinic
|
int triclinic; // 0 if domain is orthog, 1 if triclinic
|
||||||
|
|||||||
Reference in New Issue
Block a user