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

This commit is contained in:
sjplimp 2010-10-22 21:27:16 +00:00
parent 85f070b25b
commit 6ec332feea
5 changed files with 20 additions and 35 deletions

View File

@ -289,38 +289,6 @@ void PairSoft::read_restart_settings(FILE *fp)
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,
@ -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));
return factor_lj*philj;
}
/* ---------------------------------------------------------------------- */
void *PairSoft::extract(char *str, int &dim)
{
dim = 2;
if (strcmp(str,"a") == 0) return (void *) prefactor;
return NULL;
}

View File

@ -38,9 +38,8 @@ class PairSoft : public Pair {
void read_restart(FILE *);
void write_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 &);
void *extract(char *, int &);
private:
double PI;

View File

@ -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()
{
modify->post_run();
modify->delete_fix("RESPA");
}

View File

@ -286,6 +286,13 @@ void Verlet::run(int n)
}
}
/* ---------------------------------------------------------------------- */
void Verlet::cleanup()
{
modify->post_run();
}
/* ----------------------------------------------------------------------
clear force on own & ghost atoms
setup and clear other arrays as needed

View File

@ -32,6 +32,7 @@ class Verlet : public Integrate {
void setup();
void setup_minimal(int);
void run(int);
void cleanup();
private:
int triclinic; // 0 if domain is orthog, 1 if triclinic