anticipate patches from upstream to 12 Aug 2013 version
This commit is contained in:
@ -22,7 +22,7 @@
|
||||
|
||||
<CENTER><H3>LAMMPS-ICMS Documentation
|
||||
</H3></CENTER>
|
||||
<CENTER><H4>9 Aug 2013 version
|
||||
<CENTER><H4>12 Aug 2013 version
|
||||
</H4></CENTER>
|
||||
<H4>Version info:
|
||||
</H4>
|
||||
|
||||
@ -18,7 +18,7 @@
|
||||
<H1></H1>
|
||||
|
||||
LAMMPS-ICMS Documentation :c,h3
|
||||
9 Aug 2013 version :c,h4
|
||||
12 Aug 2013 version :c,h4
|
||||
|
||||
Version info: :h4
|
||||
|
||||
|
||||
@ -51,10 +51,10 @@ packages, more details are provided.
|
||||
<TR ALIGN="center"><TD >FLD</TD><TD > Fast Lubrication Dynamics</TD><TD > Kumar & Bybee & Higdon (1)</TD><TD > <A HREF = "pair_lubricateU.html">pair_style lubricateU</A></TD><TD > -</TD><TD > -</TD></TR>
|
||||
<TR ALIGN="center"><TD >GPU</TD><TD > GPU-enabled potentials</TD><TD > Mike Brown (ORNL)</TD><TD > <A HREF = "Section_accelerate.html#acc_6">Section accelerate</A></TD><TD > gpu</TD><TD > lib/gpu</TD></TR>
|
||||
<TR ALIGN="center"><TD >GRANULAR</TD><TD > granular systems</TD><TD > -</TD><TD > <A HREF = "Section_howto.html#howto_6">Section_howto</A></TD><TD > pour</TD><TD > -</TD></TR>
|
||||
<TR ALIGN="center"><TD >KIM</TD><TD > openKIM potentials</TD><TD > Smirichinski & Elliot & Tadmor (3)</TD><TD > <A HREF = "pair_kim.html">pair_style kim</A></TD><TD > kim</TD><TD > lib/kim</TD></TR>
|
||||
<TR ALIGN="center"><TD >KIM</TD><TD > openKIM potentials</TD><TD > Smirichinski & Elliot & Tadmor (3)</TD><TD > <A HREF = "pair_kim.html">pair_style kim</A></TD><TD > kim</TD><TD > KIM</TD></TR>
|
||||
<TR ALIGN="center"><TD >KSPACE</TD><TD > long-range Coulombic solvers</TD><TD > -</TD><TD > <A HREF = "kspace_style.html">kspace_style</A></TD><TD > peptide</TD><TD > -</TD></TR>
|
||||
<TR ALIGN="center"><TD >MANYBODY</TD><TD > many-body potentials</TD><TD > -</TD><TD > <A HREF = "pair_tersoff.html">pair_style tersoff</A></TD><TD > shear</TD><TD > -</TD></TR>
|
||||
<TR ALIGN="center"><TD >MEAM</TD><TD > modified EAM potential</TD><TD > Greg Wagner (Sandia)</TD><TD > <A HREF = "pair_meam.html">pair_style meam</A></TD><TD > meam</TD><TD > KIM</TD></TR>
|
||||
<TR ALIGN="center"><TD >MEAM</TD><TD > modified EAM potential</TD><TD > Greg Wagner (Sandia)</TD><TD > <A HREF = "pair_meam.html">pair_style meam</A></TD><TD > meam</TD><TD > lib/meam</TD></TR>
|
||||
<TR ALIGN="center"><TD >MC</TD><TD > Monte Carlo options</TD><TD > -</TD><TD > <A HREF = "fix_gcmc.html">fix gcmc</A></TD><TD > -</TD><TD > -</TD></TR>
|
||||
<TR ALIGN="center"><TD >MOLECULE</TD><TD > molecular system force fields</TD><TD > -</TD><TD > <A HREF = "Section_howto.html#howto_3">Section_howto</A></TD><TD > peptide</TD><TD > -</TD></TR>
|
||||
<TR ALIGN="center"><TD >OPT</TD><TD > optimized pair potentials</TD><TD > Fischer & Richie & Natoli (2)</TD><TD > <A HREF = "Section_accelerate.html#acc_4">Section accelerate</A></TD><TD > -</TD><TD > -</TD></TR>
|
||||
@ -97,10 +97,10 @@ lib/package, then the code for the library is under the lib directory
|
||||
of the LAMMPS distribution. See the lib/package/README file for info
|
||||
on how to build the library. If it is not listed as lib/package, then
|
||||
it is a third-party library not included in the LAMMPS distribution.
|
||||
See the src/package/Makefile.lammps file for info on where to download
|
||||
the library. <A HREF = "Section_start.html#start_3_3">Section start</A> of the
|
||||
manual also gives details on how to build LAMMPS with both kinds of
|
||||
auxiliary libraries.
|
||||
See the src/package/README or src/package/Makefile.lammps file for
|
||||
info on where to download the library. <A HREF = "Section_start.html#start_3_3">Section
|
||||
start</A> of the manual also gives details
|
||||
on how to build LAMMPS with both kinds of auxiliary libraries.
|
||||
</P>
|
||||
<HR>
|
||||
|
||||
|
||||
@ -46,10 +46,10 @@ DIPOLE, point dipole particles, -, "pair_style dipole/cut"_pair_dipole.html, dip
|
||||
FLD, Fast Lubrication Dynamics, Kumar & Bybee & Higdon (1), "pair_style lubricateU"_pair_lubricateU.html, -, -
|
||||
GPU, GPU-enabled potentials, Mike Brown (ORNL), "Section accelerate"_Section_accelerate.html#acc_6, gpu, lib/gpu
|
||||
GRANULAR, granular systems, -, "Section_howto"_Section_howto.html#howto_6, pour, -
|
||||
KIM, openKIM potentials, Smirichinski & Elliot & Tadmor (3), "pair_style kim"_pair_kim.html, kim, lib/kim
|
||||
KIM, openKIM potentials, Smirichinski & Elliot & Tadmor (3), "pair_style kim"_pair_kim.html, kim, KIM
|
||||
KSPACE, long-range Coulombic solvers, -, "kspace_style"_kspace_style.html, peptide, -
|
||||
MANYBODY, many-body potentials, -, "pair_style tersoff"_pair_tersoff.html, shear, -
|
||||
MEAM, modified EAM potential, Greg Wagner (Sandia), "pair_style meam"_pair_meam.html, meam, KIM
|
||||
MEAM, modified EAM potential, Greg Wagner (Sandia), "pair_style meam"_pair_meam.html, meam, lib/meam
|
||||
MC, Monte Carlo options, -, "fix gcmc"_fix_gcmc.html, -, -
|
||||
MOLECULE, molecular system force fields, -, "Section_howto"_Section_howto.html#howto_3, peptide, -
|
||||
OPT, optimized pair potentials, Fischer & Richie & Natoli (2), "Section accelerate"_Section_accelerate.html#acc_4, -, -
|
||||
@ -91,10 +91,10 @@ lib/package, then the code for the library is under the lib directory
|
||||
of the LAMMPS distribution. See the lib/package/README file for info
|
||||
on how to build the library. If it is not listed as lib/package, then
|
||||
it is a third-party library not included in the LAMMPS distribution.
|
||||
See the src/package/Makefile.lammps file for info on where to download
|
||||
the library. "Section start"_Section_start.html#start_3_3 of the
|
||||
manual also gives details on how to build LAMMPS with both kinds of
|
||||
auxiliary libraries.
|
||||
See the src/package/README or src/package/Makefile.lammps file for
|
||||
info on where to download the library. "Section
|
||||
start"_Section_start.html#start_3_3 of the manual also gives details
|
||||
on how to build LAMMPS with both kinds of auxiliary libraries.
|
||||
|
||||
:line
|
||||
:line
|
||||
|
||||
@ -47,7 +47,7 @@ script</A>.
|
||||
<HR>
|
||||
|
||||
<P>If mode is <I>pf/callback</I> then the fix will make a callback every
|
||||
<I>Ncall</I> timesteps or minimization iteration to the external program.
|
||||
<I>Ncall</I> timesteps or minimization iterations to the external program.
|
||||
The external program computes forces on atoms by setting values in an
|
||||
array owned by the fix. The fix then adds these forces to each atom
|
||||
in the group, once every <I>Napply</I> steps, similar to the way the <A HREF = "fix_addforce.html">fix
|
||||
@ -89,29 +89,70 @@ array. The fix adds these forces to each atom in the group, once
|
||||
every <I>Napply</I> steps, similar to the way the <A HREF = "fix_addforce.html">fix
|
||||
addforce</A> command works.
|
||||
</P>
|
||||
<P>The name of the public force array provided by the FixExternal
|
||||
class is
|
||||
</P>
|
||||
<PRE>double **fexternal;
|
||||
</PRE>
|
||||
<P>It is allocated by the FixExternal class as an (N,3) array where N is
|
||||
the number of atoms owned by a processor. The 3 corresponds to the
|
||||
fx, fy, fz components of force.
|
||||
</P>
|
||||
<P>It is up to the external program to set the values in this array to
|
||||
the desired quantities, as often as desired. For example, the driver
|
||||
program might perform an MD run in stages of 1000 timesteps each. In
|
||||
between calls to the LAMMPS <A HREF = "run.html">run</A> command, it could retrieve
|
||||
atom coordinates from LAMMPS, compute forces, set values in the fix
|
||||
external array, etc.
|
||||
atom coordinates from LAMMPS, compute forces, set values in fexternal,
|
||||
etc.
|
||||
</P>
|
||||
<HR>
|
||||
|
||||
<P>To use this fix during energy minimization, the energy corresponding
|
||||
to the added forces must also be set so as to be consistent with the
|
||||
added forces. Otherwise the minimization will not converge correctly.
|
||||
</P>
|
||||
<P>This can be done from the external driver by calling this public
|
||||
method of the FixExternal class:
|
||||
</P>
|
||||
<PRE>void set_energy(double eng);
|
||||
</PRE>
|
||||
<P>where eng is the potential energy. Eng is an extensive quantity,
|
||||
meaning it should be the sum over per-atom energies of all affected
|
||||
atoms. It should also be provided in <A HREF = "units.html">energy units</A>
|
||||
consistent with the simulation. See the details below for how to
|
||||
insure this energy setting is used appropriately in a minimization.
|
||||
</P>
|
||||
<HR>
|
||||
|
||||
<P><B>Restart, fix_modify, output, run start/stop, minimize info:</B>
|
||||
</P>
|
||||
<P>No information about this fix is written to <A HREF = "restart.html">binary restart
|
||||
files</A>. None of the <A HREF = "fix_modify.html">fix_modify</A> options
|
||||
are relevant to this fix. No global or per-atom quantities are stored
|
||||
by this fix for access by various <A HREF = "Section_howto.html#howto_15">output
|
||||
commands</A>. No parameter of this fix can
|
||||
be used with the <I>start/stop</I> keywords of the <A HREF = "run.html">run</A> command.
|
||||
files</A>.
|
||||
</P>
|
||||
<P>The <A HREF = "fix_modify.html">fix_modify</A> <I>energy</I> option is supported by this
|
||||
fix to add the potential "energy" set by the external driver to the
|
||||
system's potential energy as part of <A HREF = "thermo_style.html">thermodynamic
|
||||
output</A>. This is a fictitious quantity but is
|
||||
needed so that the <A HREF = "minimize.html">minimize</A> command can include the
|
||||
forces added by this fix in a consistent manner. I.e. there is a
|
||||
decrease in potential energy when atoms move in the direction of the
|
||||
added force.
|
||||
</P>
|
||||
<P>This fix computes a global scalar which can be accessed by various
|
||||
<A HREF = "Section_howto.html#howto_15">output commands</A>. The scalar is the
|
||||
potential energy discussed above. The scalar stored by this fix
|
||||
is "extensive".
|
||||
</P>
|
||||
<P>No parameter of this fix can be used with the <I>start/stop</I> keywords of
|
||||
the <A HREF = "run.html">run</A> command.
|
||||
</P>
|
||||
<P>The forces due to this fix are imposed during an energy minimization,
|
||||
invoked by the <A HREF = "minimize.html">minimize</A> command. However, LAMMPS
|
||||
knows nothing about the energy associated with these forces. So you
|
||||
should perform the minimization based on a force tolerance, not an
|
||||
energy tolerance.
|
||||
invoked by the <A HREF = "minimize.html">minimize</A> command.
|
||||
</P>
|
||||
<P>IMPORTANT NOTE: If you want the fictitious potential energy associated
|
||||
with the added forces to be included in the total potential energy of
|
||||
the system (the quantity being minimized), you MUST enable the
|
||||
<A HREF = "fix_modify.html">fix_modify</A> <I>energy</I> option for this fix.
|
||||
</P>
|
||||
<P><B>Restrictions:</B> none
|
||||
</P>
|
||||
|
||||
@ -40,7 +40,7 @@ script"_Section_python.html.
|
||||
:line
|
||||
|
||||
If mode is {pf/callback} then the fix will make a callback every
|
||||
{Ncall} timesteps or minimization iteration to the external program.
|
||||
{Ncall} timesteps or minimization iterations to the external program.
|
||||
The external program computes forces on atoms by setting values in an
|
||||
array owned by the fix. The fix then adds these forces to each atom
|
||||
in the group, once every {Napply} steps, similar to the way the "fix
|
||||
@ -82,29 +82,70 @@ array. The fix adds these forces to each atom in the group, once
|
||||
every {Napply} steps, similar to the way the "fix
|
||||
addforce"_fix_addforce.html command works.
|
||||
|
||||
The name of the public force array provided by the FixExternal
|
||||
class is
|
||||
|
||||
double **fexternal; :pre
|
||||
|
||||
It is allocated by the FixExternal class as an (N,3) array where N is
|
||||
the number of atoms owned by a processor. The 3 corresponds to the
|
||||
fx, fy, fz components of force.
|
||||
|
||||
It is up to the external program to set the values in this array to
|
||||
the desired quantities, as often as desired. For example, the driver
|
||||
program might perform an MD run in stages of 1000 timesteps each. In
|
||||
between calls to the LAMMPS "run"_run.html command, it could retrieve
|
||||
atom coordinates from LAMMPS, compute forces, set values in the fix
|
||||
external array, etc.
|
||||
atom coordinates from LAMMPS, compute forces, set values in fexternal,
|
||||
etc.
|
||||
|
||||
:line
|
||||
|
||||
To use this fix during energy minimization, the energy corresponding
|
||||
to the added forces must also be set so as to be consistent with the
|
||||
added forces. Otherwise the minimization will not converge correctly.
|
||||
|
||||
This can be done from the external driver by calling this public
|
||||
method of the FixExternal class:
|
||||
|
||||
void set_energy(double eng); :pre
|
||||
|
||||
where eng is the potential energy. Eng is an extensive quantity,
|
||||
meaning it should be the sum over per-atom energies of all affected
|
||||
atoms. It should also be provided in "energy units"_units.html
|
||||
consistent with the simulation. See the details below for how to
|
||||
insure this energy setting is used appropriately in a minimization.
|
||||
|
||||
:line
|
||||
|
||||
[Restart, fix_modify, output, run start/stop, minimize info:]
|
||||
|
||||
No information about this fix is written to "binary restart
|
||||
files"_restart.html. None of the "fix_modify"_fix_modify.html options
|
||||
are relevant to this fix. No global or per-atom quantities are stored
|
||||
by this fix for access by various "output
|
||||
commands"_Section_howto.html#howto_15. No parameter of this fix can
|
||||
be used with the {start/stop} keywords of the "run"_run.html command.
|
||||
files"_restart.html.
|
||||
|
||||
The "fix_modify"_fix_modify.html {energy} option is supported by this
|
||||
fix to add the potential "energy" set by the external driver to the
|
||||
system's potential energy as part of "thermodynamic
|
||||
output"_thermo_style.html. This is a fictitious quantity but is
|
||||
needed so that the "minimize"_minimize.html command can include the
|
||||
forces added by this fix in a consistent manner. I.e. there is a
|
||||
decrease in potential energy when atoms move in the direction of the
|
||||
added force.
|
||||
|
||||
This fix computes a global scalar which can be accessed by various
|
||||
"output commands"_Section_howto.html#howto_15. The scalar is the
|
||||
potential energy discussed above. The scalar stored by this fix
|
||||
is "extensive".
|
||||
|
||||
No parameter of this fix can be used with the {start/stop} keywords of
|
||||
the "run"_run.html command.
|
||||
|
||||
The forces due to this fix are imposed during an energy minimization,
|
||||
invoked by the "minimize"_minimize.html command. However, LAMMPS
|
||||
knows nothing about the energy associated with these forces. So you
|
||||
should perform the minimization based on a force tolerance, not an
|
||||
energy tolerance.
|
||||
invoked by the "minimize"_minimize.html command.
|
||||
|
||||
IMPORTANT NOTE: If you want the fictitious potential energy associated
|
||||
with the added forces to be included in the total potential energy of
|
||||
the system (the quantity being minimized), you MUST enable the
|
||||
"fix_modify"_fix_modify.html {energy} option for this fix.
|
||||
|
||||
[Restrictions:] none
|
||||
|
||||
|
||||
@ -100,7 +100,7 @@ be used for periodic cell dimensions less than 10 angstroms.
|
||||
</P>
|
||||
<A NAME = "Aktulga"></A>
|
||||
|
||||
<P><B>(Aktulga)</B> Aktulga, Fogarty, Pandit, Grama, Parallel Computing, to
|
||||
appear (2011).
|
||||
<P>(Aktulga) Aktulga, Fogarty, Pandit, Grama, Parallel Computing, 38,
|
||||
245-259 (2012).
|
||||
</P>
|
||||
</HTML>
|
||||
|
||||
@ -94,5 +94,5 @@ be used for periodic cell dimensions less than 10 angstroms.
|
||||
[(Nakano)] Nakano, Computer Physics Communications, 104, 59-69 (1997).
|
||||
|
||||
:link(Aktulga)
|
||||
[(Aktulga)] Aktulga, Fogarty, Pandit, Grama, Parallel Computing, to
|
||||
appear (2011).
|
||||
(Aktulga) Aktulga, Fogarty, Pandit, Grama, Parallel Computing, 38,
|
||||
245-259 (2012).
|
||||
|
||||
@ -316,8 +316,8 @@ Journal of Physical Chemistry A, 112, 1040-1053 (2008).
|
||||
</P>
|
||||
<A NAME = "Aktulga"></A>
|
||||
|
||||
<P><B>(Aktulga)</B> Aktulga, Fogarty, Pandit, Grama, Parallel Computing, to
|
||||
appear (2011).
|
||||
<P>(Aktulga) Aktulga, Fogarty, Pandit, Grama, Parallel Computing, 38,
|
||||
245-259 (2012).
|
||||
</P>
|
||||
<A NAME = "Liu_2011"></A>
|
||||
|
||||
|
||||
@ -308,8 +308,8 @@ mincap = 50.
|
||||
Journal of Physical Chemistry A, 112, 1040-1053 (2008).
|
||||
|
||||
:link(Aktulga)
|
||||
[(Aktulga)] Aktulga, Fogarty, Pandit, Grama, Parallel Computing, to
|
||||
appear (2011).
|
||||
(Aktulga) Aktulga, Fogarty, Pandit, Grama, Parallel Computing, 38,
|
||||
245-259 (2012).
|
||||
|
||||
:link(Liu_2011)
|
||||
[(Liu)] L. Liu, Y. Liu, S. V. Zybin, H. Sun and W. A. Goddard, Journal
|
||||
|
||||
@ -92,7 +92,7 @@ undump d1
|
||||
#
|
||||
# TEST 4: Edge histogram tests
|
||||
#
|
||||
compute v1 type2 voronoi/atom edge_histo 6
|
||||
compute v1 type2 voronoi/atom edge_histo 8
|
||||
thermo_style custom c_v1[1] c_v1[2] c_v1[3] c_v1[4] c_v1[5] c_v1[6] c_v1[7]
|
||||
run 1
|
||||
variable t4a equal (abs(c_v1[4]-12000)+c_v1[1]+c_v1[2]+c_v1[3]+c_v1[5]+c_v1[6]+c_v1[7])/120
|
||||
@ -150,6 +150,5 @@ uncompute v1
|
||||
uncompute r0
|
||||
undump d1
|
||||
|
||||
|
||||
# All tests done
|
||||
print TEST_DONE
|
||||
|
||||
@ -47,11 +47,12 @@ DumpImage::DumpImage(LAMMPS *lmp, int narg, char **arg) :
|
||||
{
|
||||
if (binary || multiproc) error->all(FLERR,"Invalid dump image filename");
|
||||
|
||||
// set filetype based on filename suffix
|
||||
// _and_ turn on the binary flag so we don't get corrupted
|
||||
// output on windows.
|
||||
// force binary flag on to avoid corrupted output on Windows
|
||||
|
||||
binary = 1;
|
||||
|
||||
// set filetype based on filename suffix
|
||||
|
||||
int n = strlen(filename);
|
||||
if (strlen(filename) > 4 && strcmp(&filename[n-4],".jpg") == 0)
|
||||
filetype = JPG;
|
||||
|
||||
@ -33,6 +33,10 @@ FixExternal::FixExternal(LAMMPS *lmp, int narg, char **arg) :
|
||||
{
|
||||
if (narg < 4) error->all(FLERR,"Illegal fix external command");
|
||||
|
||||
scalar_flag = 1;
|
||||
global_freq = 1;
|
||||
extscalar = 1;
|
||||
|
||||
if (strcmp(arg[3],"pf/callback") == 0) {
|
||||
if (narg != 6) error->all(FLERR,"Illegal fix external command");
|
||||
mode = PF_CALLBACK;
|
||||
@ -55,6 +59,8 @@ FixExternal::FixExternal(LAMMPS *lmp, int narg, char **arg) :
|
||||
fexternal = NULL;
|
||||
grow_arrays(atom->nmax);
|
||||
atom->add_callback(0);
|
||||
|
||||
user_energy = 0.0;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
@ -75,6 +81,7 @@ int FixExternal::setmask()
|
||||
int mask = 0;
|
||||
if (mode == PF_CALLBACK || mode == PF_ARRAY) {
|
||||
mask |= POST_FORCE;
|
||||
mask |= THERMO_ENERGY;
|
||||
mask |= MIN_POST_FORCE;
|
||||
}
|
||||
return mask;
|
||||
@ -138,6 +145,23 @@ void FixExternal::min_post_force(int vflag)
|
||||
post_force(vflag);
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void FixExternal::set_energy(double eng)
|
||||
{
|
||||
user_energy = eng;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
potential energy of added force
|
||||
up to user to set it via set_energy()
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
double FixExternal::compute_scalar()
|
||||
{
|
||||
return user_energy;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
memory usage of local atom-based array
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
@ -26,6 +26,8 @@ namespace LAMMPS_NS {
|
||||
|
||||
class FixExternal : public Fix {
|
||||
public:
|
||||
double **fexternal;
|
||||
|
||||
FixExternal(class LAMMPS *, int, char **);
|
||||
~FixExternal();
|
||||
int setmask();
|
||||
@ -34,6 +36,9 @@ class FixExternal : public Fix {
|
||||
void min_setup(int);
|
||||
void post_force(int);
|
||||
void min_post_force(int);
|
||||
double compute_scalar();
|
||||
|
||||
void set_energy(double eng);
|
||||
|
||||
double memory_usage();
|
||||
void grow_arrays(int);
|
||||
@ -48,7 +53,7 @@ class FixExternal : public Fix {
|
||||
int mode,ncall,napply;
|
||||
FnPtr callback;
|
||||
void *ptr_caller;
|
||||
double **fexternal;
|
||||
double user_energy;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@ -534,15 +534,12 @@ void FixLangevin::post_force_untemplated
|
||||
|
||||
if (Tp_BIAS) {
|
||||
temperature->remove_bias(i,v[i]);
|
||||
fdrag[0] = gamma1*v[i][0];
|
||||
fdrag[1] = gamma1*v[i][1];
|
||||
fdrag[2] = gamma1*v[i][2];
|
||||
fdrag[0] = gamma1*v[i][0];
|
||||
if (v[i][0] != 0.0) f[i][0] += fdrag[0] + fran[0];
|
||||
else fran[0] = 0.0;
|
||||
if (v[i][1] != 0.0) f[i][1] += fdrag[1] + fran[1];
|
||||
else fran[1] = 0.0;
|
||||
if (v[i][2] != 0.0) f[i][2] += fdrag[2] + fran[2];
|
||||
else fran[2] = 0.0;
|
||||
if (v[i][0] == 0.0) fran[0] = 0.0;
|
||||
if (v[i][1] == 0.0) fran[1] = 0.0;
|
||||
if (v[i][2] == 0.0) fran[2] = 0.0;
|
||||
temperature->restore_bias(i,v[i]);
|
||||
} else {
|
||||
fdrag[0] = gamma1*v[i][0];
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
@ -1 +1 @@
|
||||
#define LAMMPS_VERSION "9 Aug 2013"
|
||||
#define LAMMPS_VERSION "12 Aug 2013"
|
||||
|
||||
Reference in New Issue
Block a user