mirror of https://github.com/lammps/lammps.git
git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@10466 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
parent
33b91864aa
commit
a2367f3cba
|
@ -35,6 +35,16 @@
|
|||
|
||||
#include "colvarproxy_lammps.h"
|
||||
|
||||
static const char colvars_pub[] =
|
||||
"@Article{fiorin13,\n"
|
||||
" author = {G.~Fiorin and M.{\\,}L.~Klein and J.~H{\\'e}nin},\n"
|
||||
" title = {Using collective variables to drive molecular"
|
||||
" dynamics simulations},\n"
|
||||
" journal = {Mol.~Phys.},\n"
|
||||
" year = 2013,\n"
|
||||
" note = {doi: 10.1080/00268976.2013.813594}\n"
|
||||
"}\n\n";
|
||||
|
||||
/* re-usable integer hash table code with static linkage. */
|
||||
|
||||
/** hash table top level data structure */
|
||||
|
@ -360,7 +370,7 @@ FixColvars::FixColvars(LAMMPS *lmp, int narg, char **arg) :
|
|||
/* storage required to communicate a single coordinate or force. */
|
||||
size_one = sizeof(struct commdata);
|
||||
|
||||
citeme->add(CiteMe::FIORIN_2013);
|
||||
citeme->add(colvars_pub);
|
||||
}
|
||||
|
||||
/*********************************
|
||||
|
|
|
@ -47,6 +47,10 @@ DumpImage::DumpImage(LAMMPS *lmp, int narg, char **arg) :
|
|||
{
|
||||
if (binary || multiproc) error->all(FLERR,"Invalid dump image filename");
|
||||
|
||||
// force binary flag on to avoid corrupted output on Windows
|
||||
|
||||
binary = 1;
|
||||
|
||||
// set filetype based on filename suffix
|
||||
|
||||
int n = strlen(filename);
|
||||
|
|
|
@ -413,9 +413,15 @@ void FixShake::setup(int vflag)
|
|||
dtv = step_respa[0];
|
||||
dtf_innerhalf = 0.5 * step_respa[0] * force->ftm2v;
|
||||
dtf_inner = dtf_innerhalf;
|
||||
((Respa *) update->integrate)->copy_flevel_f(nlevels_respa-1);
|
||||
post_force_respa(vflag,nlevels_respa-1,0);
|
||||
((Respa *) update->integrate)->copy_f_flevel(nlevels_respa-1);
|
||||
|
||||
// apply correction to all rRESPA levels
|
||||
|
||||
for (int ilevel = 0; ilevel < nlevels_respa; ilevel++) {
|
||||
((Respa *) update->integrate)->copy_flevel_f(ilevel);
|
||||
post_force_respa(vflag,ilevel,loop_respa[ilevel]-1);
|
||||
((Respa *) update->integrate)->copy_f_flevel(ilevel);
|
||||
}
|
||||
|
||||
dtf_inner = step_respa[0] * force->ftm2v;
|
||||
}
|
||||
}
|
||||
|
@ -543,10 +549,12 @@ void FixShake::post_force_respa(int vflag, int ilevel, int iloop)
|
|||
|
||||
if (ilevel == nlevels_respa-1 && update->ntimestep == next_output) stats();
|
||||
|
||||
// enforce SHAKE constraints on every loop iteration of every rRESPA level
|
||||
// except last loop iteration of inner levels
|
||||
// might be OK to skip enforcing SHAKE constraings
|
||||
// on last iteration of inner levels if pressure not requested
|
||||
// however, leads to slightly different trajectories
|
||||
|
||||
if (ilevel < nlevels_respa-1 && iloop == loop_respa[ilevel]-1) return;
|
||||
//if (ilevel < nlevels_respa-1 && iloop == loop_respa[ilevel]-1 && !vflag)
|
||||
// return;
|
||||
|
||||
// xshake = unconstrained move with current v,f as function of level
|
||||
// communicate results if necessary
|
||||
|
@ -554,9 +562,12 @@ void FixShake::post_force_respa(int vflag, int ilevel, int iloop)
|
|||
unconstrained_update_respa(ilevel);
|
||||
if (nprocs > 1) comm->forward_comm_fix(this);
|
||||
|
||||
// virial setup, only need to compute on outermost level
|
||||
// virial setup only needed on last iteration of innermost level
|
||||
// and if pressure is requested
|
||||
// virial accumulation happens at outermost level
|
||||
|
||||
if (ilevel == nlevels_respa-1 && vflag) v_setup(vflag);
|
||||
if (ilevel == 0 && iloop == loop_respa[ilevel] - 1 && vflag) v_setup(vflag);
|
||||
if (iloop == loop_respa[ilevel]-1) evflag = 1;
|
||||
else evflag = 0;
|
||||
|
||||
// loop over clusters to add constraint forces
|
||||
|
|
|
@ -439,9 +439,13 @@ void Neighbor::skip_from_respa(NeighList *list)
|
|||
if (ipage_middle->status())
|
||||
error->one(FLERR,"Neighbor list overflow, boost neigh_modify one");
|
||||
}
|
||||
|
||||
inum++;
|
||||
}
|
||||
|
||||
list->inum = inum;
|
||||
listinner->inum = inum;
|
||||
if (respamiddle) listmiddle->inum = inum;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
|
|
|
@ -286,7 +286,8 @@ void Respa::init()
|
|||
|
||||
ev_setup();
|
||||
|
||||
// detect if fix omp is present and will clear force arrays for us
|
||||
// detect if fix omp is present and will clear force arrays
|
||||
|
||||
int ifix = modify->find_fix("package_omp");
|
||||
if (ifix >= 0) external_force_clear = 1;
|
||||
|
||||
|
|
Loading…
Reference in New Issue