Merge branch 'integration' into fix-flow-gauss
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
# Makefile for LAMMPS documentation
|
||||
SHA1 = $(shell echo $USER-$PWD | sha1sum | cut -f1 -d" ")
|
||||
SHA1 = $(shell echo $USER-$PWD | python utils/sha1sum.py)
|
||||
BUILDDIR = /tmp/lammps-docs-$(SHA1)
|
||||
RSTDIR = $(BUILDDIR)/rst
|
||||
VENV = $(BUILDDIR)/docenv
|
||||
|
||||
@ -15,18 +15,28 @@ make clean-all # remove entire build folder and any cached data
|
||||
## Installing prerequisites
|
||||
|
||||
To run the documention build toolchain Python 3 and virtualenv have to be
|
||||
installed. The following are instructions for common Linux distributions:
|
||||
installed. Here are instructions for common setups:
|
||||
|
||||
### virtualenv
|
||||
|
||||
#### Ubuntu
|
||||
### Ubuntu
|
||||
|
||||
```bash
|
||||
sudo apt-get install python-virtualenv
|
||||
```
|
||||
|
||||
#### Fedora
|
||||
### Fedora
|
||||
|
||||
```
|
||||
sudo yum install python-virtualenv
|
||||
```
|
||||
|
||||
### MacOS X
|
||||
|
||||
## Python 3
|
||||
|
||||
Download the latest Python 3 MacOS X package from https://www.python.org and install it.
|
||||
This will install both Python 3 and pip3.
|
||||
|
||||
## virtualenv
|
||||
|
||||
Once Python 3 is installed, open a Terminal and type `pip3 install virtualenv`. This will
|
||||
install virtualenv from the Python Package Index.
|
||||
|
||||
@ -135,7 +135,7 @@
|
||||
<H1></H1><div class="section" id="lammps-documentation">
|
||||
<h1>LAMMPS Documentation</h1>
|
||||
<div class="section" id="aug-2016-version">
|
||||
<h2>23 Aug 2016 version</h2>
|
||||
<h2>27 Aug 2016 version</h2>
|
||||
</div>
|
||||
<div class="section" id="version-info">
|
||||
<h2>Version info:</h2>
|
||||
|
||||
@ -159,64 +159,65 @@
|
||||
</div>
|
||||
<div class="section" id="description">
|
||||
<h2>Description</h2>
|
||||
<p>This fix implements the Gaussian dynamics (GD) method to simulate a system at
|
||||
constant mass flux <a class="reference internal" href="#strong"><span class="std std-ref">(Strong)</span></a>. GD is a nonequilibrium molecular
|
||||
dynamics simulation method that can be used to study fluid flows through
|
||||
pores, pipes, and channels. In its original implementation GD was used to
|
||||
compute the pressure required to achieve a fixed mass flux through an opening.
|
||||
The flux can be conserved in any combination of the directions, x, y, or z,
|
||||
using xflag,yflag,zflag. This fix does not initialize a net flux through
|
||||
a system, it only conserves the center-of-mass momentum that is present
|
||||
when the fix is declared in the input script. Use the <a class="reference internal" href="velocity.html"><span class="doc">velocity</span></a>
|
||||
command to generate an initial center-of-mass momentum.</p>
|
||||
<p>GD applies an external fluctuating gravitational field that acts as a driving
|
||||
force to keep the system away from equilibrium. To maintain steady state, a
|
||||
profile-unbiased thermostat must be implemented to dissipate the heat that is
|
||||
added by the driving force. <a class="reference internal" href="compute_temp_profile.html"><span class="doc">Compute temp/profile</span></a>
|
||||
can be used to implement a profile-unbiased thermostat.</p>
|
||||
<p>A common use of this fix is to compute a pressure drop across a pipe, pore, or
|
||||
membrane. The pressure profile can be computed in LAMMPS with <a class="reference internal" href="compute_stress_atom.html"><span class="doc">compute stress/atom</span></a> and <a class="reference internal" href="fix_ave_chunk.html"><span class="doc">fix ave/chunk</span></a>,
|
||||
or with the hardy method in <a class="reference internal" href="fix_atc.html"><span class="doc">fix atc</span></a>. Note that the simple
|
||||
<a class="reference internal" href="compute_stress_atom.html"><span class="doc">compute stress/atom</span></a> method is only accurate away
|
||||
from inhomogeneities in the fluid, such as fixed wall atoms. Further, the
|
||||
computed pressure profile must be corrected for the acceleration applied by
|
||||
GD before computing a pressure drop or comparing it to other methods, such as
|
||||
the pump method <a class="reference internal" href="#zhu"><span class="std std-ref">(Zhu)</span></a>. The pressure correction is discussed and
|
||||
described in <a class="reference internal" href="#strong"><span class="std std-ref">(Strong)</span></a>.</p>
|
||||
<p>This fix implements the Gaussian dynamics (GD) method to simulate a
|
||||
system at constant mass flux <a class="reference internal" href="#strong"><span class="std std-ref">(Strong)</span></a>. GD is a
|
||||
nonequilibrium molecular dynamics simulation method that can be used
|
||||
to study fluid flows through pores, pipes, and channels. In its
|
||||
original implementation GD was used to compute the pressure required
|
||||
to achieve a fixed mass flux through an opening. The flux can be
|
||||
conserved in any combination of the directions, x, y, or z, using
|
||||
xflag,yflag,zflag. This fix does not initialize a net flux through a
|
||||
system, it only conserves the center-of-mass momentum that is present
|
||||
when the fix is declared in the input script. Use the
|
||||
<a class="reference internal" href="velocity.html"><span class="doc">velocity</span></a> command to generate an initial center-of-mass
|
||||
momentum.</p>
|
||||
<p>GD applies an external fluctuating gravitational field that acts as a
|
||||
driving force to keep the system away from equilibrium. To maintain
|
||||
steady state, a profile-unbiased thermostat must be implemented to
|
||||
dissipate the heat that is added by the driving force. <a class="reference internal" href="compute_temp_profile.html"><span class="doc">Compute temp/profile</span></a> can be used to implement a
|
||||
profile-unbiased thermostat.</p>
|
||||
<p>A common use of this fix is to compute a pressure drop across a pipe,
|
||||
pore, or membrane. The pressure profile can be computed in LAMMPS with
|
||||
<a class="reference internal" href="compute_stress_atom.html"><span class="doc">compute stress/atom</span></a> and <a class="reference internal" href="fix_ave_chunk.html"><span class="doc">fix ave/chunk</span></a>, or with the hardy method in <a class="reference internal" href="fix_atc.html"><span class="doc">fix atc</span></a>. Note that the simple <a class="reference internal" href="compute_stress_atom.html"><span class="doc">compute stress/atom</span></a> method is only accurate away
|
||||
from inhomogeneities in the fluid, such as fixed wall atoms. Further,
|
||||
the computed pressure profile must be corrected for the acceleration
|
||||
applied by GD before computing a pressure drop or comparing it to
|
||||
other methods, such as the pump method <a class="reference internal" href="#zhu"><span class="std std-ref">(Zhu)</span></a>. The pressure
|
||||
correction is discussed and described in <a class="reference internal" href="#strong"><span class="std std-ref">(Strong)</span></a>.</p>
|
||||
<div class="admonition note">
|
||||
<p class="first admonition-title">Note</p>
|
||||
<p class="last">For a complete example including the considerations discussed above, see
|
||||
the examples/USER/flow_gauss directory.</p>
|
||||
<p class="last">For a complete example including the considerations discussed
|
||||
above, see the examples/USER/flow_gauss directory.</p>
|
||||
</div>
|
||||
<div class="admonition note">
|
||||
<p class="first admonition-title">Note</p>
|
||||
<p class="last">Only the flux of the atoms in group-ID will be conserved. If the
|
||||
velocities of the group-ID atoms are coupled to the velocities of other atoms
|
||||
in the simulation, the flux will not be conserved. For example, in a
|
||||
simulation with fluid atoms and harmonically constrained wall atoms, if a
|
||||
single thermostat is applied to group <em>all</em>, the fluid atom velocities will be
|
||||
coupled to the wall atom velocities, and the flux will not be conserved. This
|
||||
issue can be avoided by thermostatting the fluid and wall groups separately.</p>
|
||||
velocities of the group-ID atoms are coupled to the velocities of
|
||||
other atoms in the simulation, the flux will not be conserved. For
|
||||
example, in a simulation with fluid atoms and harmonically constrained
|
||||
wall atoms, if a single thermostat is applied to group <em>all</em>, the
|
||||
fluid atom velocities will be coupled to the wall atom velocities, and
|
||||
the flux will not be conserved. This issue can be avoided by
|
||||
thermostatting the fluid and wall groups separately.</p>
|
||||
</div>
|
||||
<dl class="docutils">
|
||||
<dt>Adding an acceleration to atoms does work on the system. This added energy</dt>
|
||||
<dd>can be optionally subtracted from the potential energy for the thermodynamic</dd>
|
||||
</dl>
|
||||
<p>output (see below) to check that the timestep is small enough to conserve
|
||||
energy. Since the applied acceleration is fluctuating in time, the work cannot
|
||||
be computed from a potential. As a result, computing the work is slightly more
|
||||
computationally expensive than usual, so it is not performed by default. To
|
||||
invoke the work calculation, use the <em>energy</em> keyword. The
|
||||
<p>Adding an acceleration to atoms does work on the system. This added
|
||||
energy can be optionally subtracted from the potential energy for the
|
||||
thermodynamic output (see below) to check that the timestep is small
|
||||
enough to conserve energy. Since the applied acceleration is
|
||||
fluctuating in time, the work cannot be computed from a potential. As
|
||||
a result, computing the work is slightly more computationally
|
||||
expensive than usual, so it is not performed by default. To invoke the
|
||||
work calculation, use the <em>energy</em> keyword. The
|
||||
<a class="reference internal" href="fix_modify.html"><span class="doc">fix_modify</span></a> <em>energy</em> option also invokes the work
|
||||
calculation, and overrides an <em>energy no</em> setting here. If neither <em>energy yes</em>
|
||||
or <em>fix_modify energy yes</em> are set, the global scalar computed by the fix
|
||||
will return zero.</p>
|
||||
calculation, and overrides an <em>energy no</em> setting here. If neither
|
||||
<em>energy yes</em> or <em>fix_modify energy yes</em> are set, the global scalar
|
||||
computed by the fix will return zero.</p>
|
||||
<div class="admonition note">
|
||||
<p class="first admonition-title">Note</p>
|
||||
<p class="last">In order to check energy conservation, any other fixes that do work on
|
||||
the system must have <em>fix_modify energy yes</em> set as well. This includes
|
||||
thermostat fixes and any constraints that hold the positions of wall atoms
|
||||
fixed, such as <a class="reference internal" href="fix_spring_self.html"><span class="doc">fix spring/self</span></a>.</p>
|
||||
<p class="last">In order to check energy conservation, any other fixes that do
|
||||
work on the system must have <em>fix_modify energy yes</em> set as well. This
|
||||
includes thermostat fixes and any constraints that hold the positions
|
||||
of wall atoms fixed, such as <a class="reference internal" href="fix_spring_self.html"><span class="doc">fix spring/self</span></a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
<hr class="docutils" />
|
||||
@ -252,7 +253,6 @@ the <a class="reference internal" href="run.html"><span class="doc">run</span></
|
||||
<p id="strong"><strong>(Strong)</strong> Strong and Eaves, J. Phys. Chem. Lett. 7, 1907 (2016).</p>
|
||||
<p id="evans"><strong>(Evans)</strong> Evans and Morriss, Phys. Rev. Lett. 56, 2172 (1986).</p>
|
||||
<p id="zhu"><strong>(Zhu)</strong> Zhu, Tajkhorshid, and Schulten, Biophys. J. 83, 154 (2002).</p>
|
||||
<hr class="docutils" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@ -1094,6 +1094,10 @@
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="fix_flow_gauss.html#index-0">fix flow/gauss</a>
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="fix_freeze.html#index-0">fix freeze</a>
|
||||
</dt>
|
||||
|
||||
@ -1241,12 +1245,12 @@
|
||||
<dt><a href="fix_nve_eff.html#index-0">fix nve/eff</a>
|
||||
</dt>
|
||||
|
||||
</dl></td>
|
||||
<td style="width: 33%" valign="top"><dl>
|
||||
|
||||
<dt><a href="fix_nve_limit.html#index-0">fix nve/limit</a>
|
||||
</dt>
|
||||
|
||||
</dl></td>
|
||||
<td style="width: 33%" valign="top"><dl>
|
||||
|
||||
<dt><a href="fix_nve_line.html#index-0">fix nve/line</a>
|
||||
</dt>
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -1,7 +1,7 @@
|
||||
<!-- HTML_ONLY -->
|
||||
<HEAD>
|
||||
<TITLE>LAMMPS Users Manual</TITLE>
|
||||
<META NAME="docnumber" CONTENT="23 Aug 2016 version">
|
||||
<META NAME="docnumber" CONTENT="27 Aug 2016 version">
|
||||
<META NAME="author" CONTENT="http://lammps.sandia.gov - Sandia National Laboratories">
|
||||
<META NAME="copyright" CONTENT="Copyright (2003) Sandia Corporation. This software and manual is distributed under the GNU General Public License.">
|
||||
</HEAD>
|
||||
@ -21,7 +21,7 @@
|
||||
<H1></H1>
|
||||
|
||||
LAMMPS Documentation :c,h3
|
||||
23 Aug 2016 version :c,h4
|
||||
27 Aug 2016 version :c,h4
|
||||
|
||||
Version info: :h4
|
||||
|
||||
|
||||
@ -31,61 +31,67 @@ fix GD fluid flow/gauss 1 1 1 energy yes :pre
|
||||
|
||||
[Description:]
|
||||
|
||||
This fix implements the Gaussian dynamics (GD) method to simulate a system at
|
||||
constant mass flux "(Strong)"_#Strong. GD is a nonequilibrium molecular
|
||||
dynamics simulation method that can be used to study fluid flows through
|
||||
pores, pipes, and channels. In its original implementation GD was used to
|
||||
compute the pressure required to achieve a fixed mass flux through an opening.
|
||||
The flux can be conserved in any combination of the directions, x, y, or z,
|
||||
using xflag,yflag,zflag. This fix does not initialize a net flux through
|
||||
a system, it only conserves the center-of-mass momentum that is present
|
||||
when the fix is declared in the input script. Use the "velocity"_velocity.html
|
||||
command to generate an initial center-of-mass momentum.
|
||||
This fix implements the Gaussian dynamics (GD) method to simulate a
|
||||
system at constant mass flux "(Strong)"_#Strong. GD is a
|
||||
nonequilibrium molecular dynamics simulation method that can be used
|
||||
to study fluid flows through pores, pipes, and channels. In its
|
||||
original implementation GD was used to compute the pressure required
|
||||
to achieve a fixed mass flux through an opening. The flux can be
|
||||
conserved in any combination of the directions, x, y, or z, using
|
||||
xflag,yflag,zflag. This fix does not initialize a net flux through a
|
||||
system, it only conserves the center-of-mass momentum that is present
|
||||
when the fix is declared in the input script. Use the
|
||||
"velocity"_velocity.html command to generate an initial center-of-mass
|
||||
momentum.
|
||||
|
||||
GD applies an external fluctuating gravitational field that acts as a driving
|
||||
force to keep the system away from equilibrium. To maintain steady state, a
|
||||
profile-unbiased thermostat must be implemented to dissipate the heat that is
|
||||
added by the driving force. "Compute temp/profile"_compute_temp_profile.html
|
||||
can be used to implement a profile-unbiased thermostat.
|
||||
GD applies an external fluctuating gravitational field that acts as a
|
||||
driving force to keep the system away from equilibrium. To maintain
|
||||
steady state, a profile-unbiased thermostat must be implemented to
|
||||
dissipate the heat that is added by the driving force. "Compute
|
||||
temp/profile"_compute_temp_profile.html can be used to implement a
|
||||
profile-unbiased thermostat.
|
||||
|
||||
A common use of this fix is to compute a pressure drop across a pipe, pore, or
|
||||
membrane. The pressure profile can be computed in LAMMPS with "compute
|
||||
stress/atom"_compute_stress_atom.html and "fix ave/chunk"_fix_ave_chunk.html,
|
||||
or with the hardy method in "fix atc"_fix_atc.html. Note that the simple
|
||||
"compute stress/atom"_compute_stress_atom.html method is only accurate away
|
||||
from inhomogeneities in the fluid, such as fixed wall atoms. Further, the
|
||||
computed pressure profile must be corrected for the acceleration applied by
|
||||
GD before computing a pressure drop or comparing it to other methods, such as
|
||||
the pump method "(Zhu)"_#Zhu. The pressure correction is discussed and
|
||||
described in "(Strong)"_#Strong.
|
||||
A common use of this fix is to compute a pressure drop across a pipe,
|
||||
pore, or membrane. The pressure profile can be computed in LAMMPS with
|
||||
"compute stress/atom"_compute_stress_atom.html and "fix
|
||||
ave/chunk"_fix_ave_chunk.html, or with the hardy method in "fix
|
||||
atc"_fix_atc.html. Note that the simple "compute
|
||||
stress/atom"_compute_stress_atom.html method is only accurate away
|
||||
from inhomogeneities in the fluid, such as fixed wall atoms. Further,
|
||||
the computed pressure profile must be corrected for the acceleration
|
||||
applied by GD before computing a pressure drop or comparing it to
|
||||
other methods, such as the pump method "(Zhu)"_#Zhu. The pressure
|
||||
correction is discussed and described in "(Strong)"_#Strong.
|
||||
|
||||
NOTE: For a complete example including the considerations discussed above, see
|
||||
the examples/USER/flow_gauss directory.
|
||||
NOTE: For a complete example including the considerations discussed
|
||||
above, see the examples/USER/flow_gauss directory.
|
||||
|
||||
NOTE: Only the flux of the atoms in group-ID will be conserved. If the
|
||||
velocities of the group-ID atoms are coupled to the velocities of other atoms
|
||||
in the simulation, the flux will not be conserved. For example, in a
|
||||
simulation with fluid atoms and harmonically constrained wall atoms, if a
|
||||
single thermostat is applied to group {all}, the fluid atom velocities will be
|
||||
coupled to the wall atom velocities, and the flux will not be conserved. This
|
||||
issue can be avoided by thermostatting the fluid and wall groups separately.
|
||||
NOTE: Only the flux of the atoms in group-ID will be conserved. If the
|
||||
velocities of the group-ID atoms are coupled to the velocities of
|
||||
other atoms in the simulation, the flux will not be conserved. For
|
||||
example, in a simulation with fluid atoms and harmonically constrained
|
||||
wall atoms, if a single thermostat is applied to group {all}, the
|
||||
fluid atom velocities will be coupled to the wall atom velocities, and
|
||||
the flux will not be conserved. This issue can be avoided by
|
||||
thermostatting the fluid and wall groups separately.
|
||||
|
||||
Adding an acceleration to atoms does work on the system. This added energy
|
||||
can be optionally subtracted from the potential energy for the thermodynamic
|
||||
output (see below) to check that the timestep is small enough to conserve
|
||||
energy. Since the applied acceleration is fluctuating in time, the work cannot
|
||||
be computed from a potential. As a result, computing the work is slightly more
|
||||
computationally expensive than usual, so it is not performed by default. To
|
||||
invoke the work calculation, use the {energy} keyword. The
|
||||
"fix_modify"_fix_modify.html {energy} option also invokes the work
|
||||
calculation, and overrides an {energy no} setting here. If neither {energy yes}
|
||||
or {fix_modify energy yes} are set, the global scalar computed by the fix
|
||||
will return zero.
|
||||
Adding an acceleration to atoms does work on the system. This added
|
||||
energy can be optionally subtracted from the potential energy for the
|
||||
thermodynamic output (see below) to check that the timestep is small
|
||||
enough to conserve energy. Since the applied acceleration is
|
||||
fluctuating in time, the work cannot be computed from a potential. As
|
||||
a result, computing the work is slightly more computationally
|
||||
expensive than usual, so it is not performed by default. To invoke the
|
||||
work calculation, use the {energy} keyword. The
|
||||
"fix_modify"_fix_modify.html {energy} option also invokes the work
|
||||
calculation, and overrides an {energy no} setting here. If neither
|
||||
{energy yes} or {fix_modify energy yes} are set, the global scalar
|
||||
computed by the fix will return zero.
|
||||
|
||||
NOTE: In order to check energy conservation, any other fixes that do work on
|
||||
the system must have {fix_modify energy yes} set as well. This includes
|
||||
thermostat fixes and any constraints that hold the positions of wall atoms
|
||||
fixed, such as "fix spring/self"_fix_spring_self.html.
|
||||
NOTE: In order to check energy conservation, any other fixes that do
|
||||
work on the system must have {fix_modify energy yes} set as well. This
|
||||
includes thermostat fixes and any constraints that hold the positions
|
||||
of wall atoms fixed, such as "fix spring/self"_fix_spring_self.html.
|
||||
|
||||
:line
|
||||
|
||||
@ -117,7 +123,8 @@ the "run"_run.html command.
|
||||
|
||||
[Related commands:]
|
||||
|
||||
"fix addforce"_fix_addforce.html, "compute temp/profile"_compute_temp_profile.html, "velocity"_velocity.html
|
||||
"fix addforce"_fix_addforce.html, "compute
|
||||
temp/profile"_compute_temp_profile.html, "velocity"_velocity.html
|
||||
|
||||
[Default:]
|
||||
|
||||
@ -133,5 +140,3 @@ The option default for the {energy} keyword is energy = no.
|
||||
|
||||
:link(Zhu)
|
||||
[(Zhu)] Zhu, Tajkhorshid, and Schulten, Biophys. J. 83, 154 (2002).
|
||||
|
||||
:line
|
||||
|
||||
7
doc/utils/sha1sum.py
Executable file
7
doc/utils/sha1sum.py
Executable file
@ -0,0 +1,7 @@
|
||||
#!/bin/env python
|
||||
# simple utility which reimplements sha1sum using Python
|
||||
import hashlib
|
||||
import sys
|
||||
s = hashlib.sha1()
|
||||
s.update(sys.stdin.read().encode())
|
||||
print(s.hexdigest())
|
||||
@ -37,7 +37,7 @@ dihedral_style spherical, Andrew Jewett, jewett.aij@gmail.com, 15 Jul 16
|
||||
dihedral_style table, Andrew Jewett, jewett.aij@gmail.com, 10 Jan 12
|
||||
fix addtorque, Laurent Joly (U Lyon), ljoly.ulyon at gmail.com, 8 Aug 11
|
||||
fix ave/correlate/long, Jorge Ramirez (UPM Madrid), jorge.ramirez at upm.es, 21 Oct 2015
|
||||
fix flow/gauss, Joel D. Eaves (CU Boulder), Joel.Eaves@Colorado.edu, 23 Aug 2016
|
||||
fix flow/gauss, Joel Eaves (CU Boulder), Joel.Eaves@Colorado.edu, 23 Aug 2016
|
||||
fix gle, Michele Ceriotti (EPFL Lausanne), michele.ceriotti at gmail.com, 24 Nov 2014
|
||||
fix imd, Axel Kohlmeyer, akohlmey at gmail.com, 9 Nov 2009
|
||||
fix ipi, Michele Ceriotti (EPFL Lausanne), michele.ceriotti at gmail.com, 24 Nov 2014
|
||||
|
||||
@ -86,7 +86,8 @@ FixFlowGauss::FixFlowGauss(LAMMPS *lmp, int narg, char **arg) :
|
||||
if ( strcmp(arg[iarg],"energy") == 0 ) {
|
||||
if ( iarg+2 > narg ) error->all(FLERR,"Illegal energy keyword");
|
||||
if ( strcmp(arg[iarg+1],"yes") == 0 ) workflag = 1;
|
||||
else if ( strcmp(arg[iarg+1],"no") != 0 ) error->all(FLERR,"Illegal energy keyword");
|
||||
else if ( strcmp(arg[iarg+1],"no") != 0 )
|
||||
error->all(FLERR,"Illegal energy keyword");
|
||||
iarg += 2;
|
||||
} else error->all(FLERR,"Illegal fix flow/gauss command");
|
||||
}
|
||||
|
||||
@ -38,10 +38,13 @@ int Compute::instance_total = 0;
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
Compute::Compute(LAMMPS *lmp, int narg, char **arg) : Pointers(lmp)
|
||||
Compute::Compute(LAMMPS *lmp, int narg, char **arg) : Pointers(lmp),
|
||||
id(NULL), style(NULL),
|
||||
vector(NULL), array(NULL), vector_atom(NULL), array_atom(NULL), vector_local(NULL), array_local(NULL),
|
||||
tlist(NULL), vbiasall(NULL)
|
||||
{
|
||||
instance_me = instance_total++;
|
||||
|
||||
|
||||
if (narg < 3) error->all(FLERR,"Illegal compute command");
|
||||
|
||||
// compute ID, group, and style
|
||||
@ -93,8 +96,7 @@ Compute::Compute(LAMMPS *lmp, int narg, char **arg) : Pointers(lmp)
|
||||
// setup list of timesteps
|
||||
|
||||
ntime = maxtime = 0;
|
||||
tlist = NULL;
|
||||
|
||||
|
||||
// data masks
|
||||
|
||||
datamask = ALL_MASK;
|
||||
@ -105,11 +107,6 @@ Compute::Compute(LAMMPS *lmp, int narg, char **arg) : Pointers(lmp)
|
||||
datamask_modify = ALL_MASK;
|
||||
|
||||
copymode = 0;
|
||||
|
||||
// force init to zero in case these are used as logicals
|
||||
|
||||
vector = vector_atom = vector_local = NULL;
|
||||
array = array_atom = array_local = NULL;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
@ -24,7 +24,8 @@ using namespace LAMMPS_NS;
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
ComputeAngle::ComputeAngle(LAMMPS *lmp, int narg, char **arg) :
|
||||
Compute(lmp, narg, arg)
|
||||
Compute(lmp, narg, arg),
|
||||
emine(NULL)
|
||||
{
|
||||
if (narg != 3) error->all(FLERR,"Illegal compute angle command");
|
||||
|
||||
|
||||
@ -33,7 +33,8 @@ using namespace MathConst;
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
ComputeAngleLocal::ComputeAngleLocal(LAMMPS *lmp, int narg, char **arg) :
|
||||
Compute(lmp, narg, arg)
|
||||
Compute(lmp, narg, arg),
|
||||
vector(NULL), array(NULL)
|
||||
{
|
||||
if (narg < 4) error->all(FLERR,"Illegal compute angle/local command");
|
||||
|
||||
@ -55,8 +56,6 @@ ComputeAngleLocal::ComputeAngleLocal(LAMMPS *lmp, int narg, char **arg) :
|
||||
}
|
||||
|
||||
nmax = 0;
|
||||
vector = NULL;
|
||||
array = NULL;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
@ -26,7 +26,8 @@ using namespace LAMMPS_NS;
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
ComputeAngmomChunk::ComputeAngmomChunk(LAMMPS *lmp, int narg, char **arg) :
|
||||
Compute(lmp, narg, arg)
|
||||
Compute(lmp, narg, arg),
|
||||
idchunk(NULL), massproc(NULL), masstotal(NULL), com(NULL), comall(NULL), angmom(NULL), angmomall(NULL)
|
||||
{
|
||||
if (narg != 4) error->all(FLERR,"Illegal compute angmom/chunk command");
|
||||
|
||||
@ -48,9 +49,6 @@ ComputeAngmomChunk::ComputeAngmomChunk(LAMMPS *lmp, int narg, char **arg) :
|
||||
|
||||
nchunk = 1;
|
||||
maxchunk = 0;
|
||||
massproc = masstotal = NULL;
|
||||
com = comall = NULL;
|
||||
angmom = angmomall = NULL;
|
||||
allocate();
|
||||
}
|
||||
|
||||
|
||||
@ -24,7 +24,8 @@ using namespace LAMMPS_NS;
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
ComputeBond::ComputeBond(LAMMPS *lmp, int narg, char **arg) :
|
||||
Compute(lmp, narg, arg)
|
||||
Compute(lmp, narg, arg),
|
||||
emine(NULL)
|
||||
{
|
||||
if (narg != 3) error->all(FLERR,"Illegal compute bond command");
|
||||
|
||||
|
||||
@ -33,7 +33,8 @@ enum{DIST,ENG,FORCE};
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
ComputeBondLocal::ComputeBondLocal(LAMMPS *lmp, int narg, char **arg) :
|
||||
Compute(lmp, narg, arg)
|
||||
Compute(lmp, narg, arg),
|
||||
bstyle(NULL), vector(NULL), array(NULL)
|
||||
{
|
||||
if (narg < 4) error->all(FLERR,"Illegal compute bond/local command");
|
||||
|
||||
@ -62,8 +63,6 @@ ComputeBondLocal::ComputeBondLocal(LAMMPS *lmp, int narg, char **arg) :
|
||||
if (bstyle[i] != DIST) singleflag = 1;
|
||||
|
||||
nmax = 0;
|
||||
vector = NULL;
|
||||
array = NULL;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
@ -36,7 +36,8 @@ using namespace LAMMPS_NS;
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
ComputeCentroAtom::ComputeCentroAtom(LAMMPS *lmp, int narg, char **arg) :
|
||||
Compute(lmp, narg, arg)
|
||||
Compute(lmp, narg, arg),
|
||||
distsq(NULL), nearest(NULL), centro(NULL)
|
||||
{
|
||||
if (narg < 4 || narg > 6) error->all(FLERR,"Illegal compute centro/atom command");
|
||||
|
||||
@ -69,11 +70,7 @@ ComputeCentroAtom::ComputeCentroAtom(LAMMPS *lmp, int narg, char **arg) :
|
||||
else size_peratom_cols = 10;
|
||||
|
||||
nmax = 0;
|
||||
centro = NULL;
|
||||
maxneigh = 0;
|
||||
distsq = NULL;
|
||||
nearest = NULL;
|
||||
array_atom = NULL;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
@ -56,7 +56,10 @@ ComputeChunkAtom *ComputeChunkAtom::cptr;
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
ComputeChunkAtom::ComputeChunkAtom(LAMMPS *lmp, int narg, char **arg) :
|
||||
Compute(lmp, narg, arg)
|
||||
Compute(lmp, narg, arg),
|
||||
id_fix(NULL), chunk(NULL), ichunk(NULL), exclude(NULL),
|
||||
chunk_volume_vec(NULL), coord(NULL), chunkID(NULL), idregion(NULL), cfvid(NULL),
|
||||
hash(NULL), varatom(NULL)
|
||||
{
|
||||
if (narg < 4) error->all(FLERR,"Illegal compute chunk/atom command");
|
||||
|
||||
|
||||
@ -34,7 +34,8 @@ using namespace LAMMPS_NS;
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
ComputeClusterAtom::ComputeClusterAtom(LAMMPS *lmp, int narg, char **arg) :
|
||||
Compute(lmp, narg, arg)
|
||||
Compute(lmp, narg, arg),
|
||||
clusterID(NULL)
|
||||
{
|
||||
if (narg != 4) error->all(FLERR,"Illegal compute cluster/atom command");
|
||||
|
||||
@ -46,7 +47,6 @@ ComputeClusterAtom::ComputeClusterAtom(LAMMPS *lmp, int narg, char **arg) :
|
||||
comm_forward = 1;
|
||||
|
||||
nmax = 0;
|
||||
clusterID = NULL;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
@ -42,7 +42,8 @@ enum{NCOMMON,NBOND,MAXBOND,MINBOND};
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
ComputeCNAAtom::ComputeCNAAtom(LAMMPS *lmp, int narg, char **arg) :
|
||||
Compute(lmp, narg, arg)
|
||||
Compute(lmp, narg, arg),
|
||||
nearest(NULL), nnearest(NULL), pattern(NULL)
|
||||
{
|
||||
if (narg != 4) error->all(FLERR,"Illegal compute cna/atom command");
|
||||
|
||||
@ -54,9 +55,6 @@ ComputeCNAAtom::ComputeCNAAtom(LAMMPS *lmp, int narg, char **arg) :
|
||||
cutsq = cutoff*cutoff;
|
||||
|
||||
nmax = 0;
|
||||
nearest = NULL;
|
||||
nnearest = NULL;
|
||||
pattern = NULL;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
@ -28,7 +28,8 @@ enum{ONCE,NFREQ,EVERY};
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
ComputeCOMChunk::ComputeCOMChunk(LAMMPS *lmp, int narg, char **arg) :
|
||||
Compute(lmp, narg, arg)
|
||||
Compute(lmp, narg, arg),
|
||||
idchunk(NULL), masstotal(NULL), massproc(NULL), com(NULL), comall(NULL)
|
||||
{
|
||||
if (narg != 4) error->all(FLERR,"Illegal compute com/chunk command");
|
||||
|
||||
@ -50,8 +51,6 @@ ComputeCOMChunk::ComputeCOMChunk(LAMMPS *lmp, int narg, char **arg) :
|
||||
|
||||
nchunk = 1;
|
||||
maxchunk = 0;
|
||||
massproc = masstotal = NULL;
|
||||
com = comall = NULL;
|
||||
allocate();
|
||||
|
||||
firstflag = massneed = 1;
|
||||
|
||||
@ -32,7 +32,8 @@ using namespace LAMMPS_NS;
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
ComputeContactAtom::ComputeContactAtom(LAMMPS *lmp, int narg, char **arg) :
|
||||
Compute(lmp, narg, arg)
|
||||
Compute(lmp, narg, arg),
|
||||
contact(NULL)
|
||||
{
|
||||
if (narg != 3) error->all(FLERR,"Illegal compute contact/atom command");
|
||||
|
||||
@ -41,7 +42,6 @@ ComputeContactAtom::ComputeContactAtom(LAMMPS *lmp, int narg, char **arg) :
|
||||
comm_reverse = 1;
|
||||
|
||||
nmax = 0;
|
||||
contact = NULL;
|
||||
|
||||
// error checks
|
||||
|
||||
|
||||
@ -32,7 +32,8 @@ using namespace LAMMPS_NS;
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
ComputeCoordAtom::ComputeCoordAtom(LAMMPS *lmp, int narg, char **arg) :
|
||||
Compute(lmp, narg, arg)
|
||||
Compute(lmp, narg, arg),
|
||||
typelo(NULL), typehi(NULL), cvec(NULL), carray(NULL)
|
||||
{
|
||||
if (narg < 4) error->all(FLERR,"Illegal compute coord/atom command");
|
||||
|
||||
@ -65,8 +66,6 @@ ComputeCoordAtom::ComputeCoordAtom(LAMMPS *lmp, int narg, char **arg) :
|
||||
else size_peratom_cols = ncol;
|
||||
|
||||
nmax = 0;
|
||||
cvec = NULL;
|
||||
carray = NULL;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
@ -24,7 +24,8 @@ using namespace LAMMPS_NS;
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
ComputeDihedral::ComputeDihedral(LAMMPS *lmp, int narg, char **arg) :
|
||||
Compute(lmp, narg, arg)
|
||||
Compute(lmp, narg, arg),
|
||||
emine(NULL)
|
||||
{
|
||||
if (narg != 3) error->all(FLERR,"Illegal compute dihedral command");
|
||||
|
||||
|
||||
@ -34,7 +34,8 @@ using namespace MathConst;
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
ComputeDihedralLocal::ComputeDihedralLocal(LAMMPS *lmp, int narg, char **arg) :
|
||||
Compute(lmp, narg, arg)
|
||||
Compute(lmp, narg, arg),
|
||||
vector(NULL), array(NULL)
|
||||
{
|
||||
if (narg < 4) error->all(FLERR,"Illegal compute dihedral/local command");
|
||||
|
||||
@ -56,8 +57,6 @@ ComputeDihedralLocal::ComputeDihedralLocal(LAMMPS *lmp, int narg, char **arg) :
|
||||
}
|
||||
|
||||
nmax = 0;
|
||||
vector = NULL;
|
||||
array = NULL;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
@ -30,7 +30,9 @@ enum { MASSCENTER, GEOMCENTER };
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
ComputeDipoleChunk::ComputeDipoleChunk(LAMMPS *lmp, int narg, char **arg) :
|
||||
Compute(lmp, narg, arg)
|
||||
Compute(lmp, narg, arg),
|
||||
idchunk(NULL), massproc(NULL), masstotal(NULL), chrgproc(NULL), chrgtotal(NULL), com(NULL),
|
||||
comall(NULL), dipole(NULL), dipoleall(NULL)
|
||||
{
|
||||
if ((narg != 4) && (narg != 5)) error->all(FLERR,"Illegal compute dipole/chunk command");
|
||||
|
||||
@ -60,10 +62,6 @@ ComputeDipoleChunk::ComputeDipoleChunk(LAMMPS *lmp, int narg, char **arg) :
|
||||
|
||||
nchunk = 1;
|
||||
maxchunk = 0;
|
||||
massproc = masstotal = NULL;
|
||||
chrgproc = chrgtotal = NULL;
|
||||
com = comall = NULL;
|
||||
dipole = dipoleall = NULL;
|
||||
allocate();
|
||||
}
|
||||
|
||||
|
||||
@ -29,7 +29,8 @@ using namespace LAMMPS_NS;
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
ComputeDisplaceAtom::ComputeDisplaceAtom(LAMMPS *lmp, int narg, char **arg) :
|
||||
Compute(lmp, narg, arg)
|
||||
Compute(lmp, narg, arg),
|
||||
id_fix(NULL), displace(NULL)
|
||||
{
|
||||
if (narg != 3) error->all(FLERR,"Illegal compute displace/atom command");
|
||||
|
||||
@ -76,7 +77,6 @@ ComputeDisplaceAtom::ComputeDisplaceAtom(LAMMPS *lmp, int narg, char **arg) :
|
||||
// per-atom displacement array
|
||||
|
||||
nmax = 0;
|
||||
displace = NULL;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
@ -29,7 +29,8 @@ using namespace LAMMPS_NS;
|
||||
|
||||
ComputeErotateSphereAtom::
|
||||
ComputeErotateSphereAtom(LAMMPS *lmp, int narg, char **arg) :
|
||||
Compute(lmp, narg, arg)
|
||||
Compute(lmp, narg, arg),
|
||||
erot(NULL)
|
||||
{
|
||||
if (narg != 3)
|
||||
error->all(FLERR,"Illegal compute erotate/sphere//atom command");
|
||||
@ -43,7 +44,6 @@ ComputeErotateSphereAtom(LAMMPS *lmp, int narg, char **arg) :
|
||||
error->all(FLERR,"Compute erotate/sphere/atom requires atom style sphere");
|
||||
|
||||
nmax = 0;
|
||||
erot = NULL;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
@ -42,7 +42,8 @@ using namespace MathConst;
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
ComputeGroupGroup::ComputeGroupGroup(LAMMPS *lmp, int narg, char **arg) :
|
||||
Compute(lmp, narg, arg)
|
||||
Compute(lmp, narg, arg),
|
||||
group2(NULL)
|
||||
{
|
||||
if (narg < 4) error->all(FLERR,"Illegal compute group/group command");
|
||||
|
||||
|
||||
@ -27,7 +27,9 @@ using namespace LAMMPS_NS;
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
ComputeGyrationChunk::ComputeGyrationChunk(LAMMPS *lmp, int narg, char **arg) :
|
||||
Compute(lmp, narg, arg)
|
||||
Compute(lmp, narg, arg),
|
||||
idchunk(NULL), massproc(NULL), masstotal(NULL), com(NULL), comall(NULL), rg(NULL),
|
||||
rgall(NULL), rgt(NULL), rgtall(NULL)
|
||||
{
|
||||
if (narg < 4) error->all(FLERR,"Illegal compute gyration/chunk command");
|
||||
|
||||
@ -67,10 +69,6 @@ ComputeGyrationChunk::ComputeGyrationChunk(LAMMPS *lmp, int narg, char **arg) :
|
||||
|
||||
nchunk = 1;
|
||||
maxchunk = 0;
|
||||
massproc = masstotal = NULL;
|
||||
com = comall = NULL;
|
||||
rg = rgall = NULL;
|
||||
rgt = rgtall = NULL;
|
||||
allocate();
|
||||
}
|
||||
|
||||
|
||||
@ -33,7 +33,8 @@ using namespace LAMMPS_NS;
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
ComputeHeatFlux::ComputeHeatFlux(LAMMPS *lmp, int narg, char **arg) :
|
||||
Compute(lmp, narg, arg)
|
||||
Compute(lmp, narg, arg),
|
||||
id_ke(NULL), id_pe(NULL), id_stress(NULL)
|
||||
{
|
||||
if (narg != 6) error->all(FLERR,"Illegal compute heat/flux command");
|
||||
|
||||
|
||||
@ -44,7 +44,8 @@ using namespace MathConst;
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
ComputeHexOrderAtom::ComputeHexOrderAtom(LAMMPS *lmp, int narg, char **arg) :
|
||||
Compute(lmp, narg, arg)
|
||||
Compute(lmp, narg, arg),
|
||||
distsq(NULL), nearest(NULL), qnarray(NULL)
|
||||
{
|
||||
if (narg < 3 ) error->all(FLERR,"Illegal compute hexorder/atom command");
|
||||
|
||||
@ -87,10 +88,7 @@ ComputeHexOrderAtom::ComputeHexOrderAtom(LAMMPS *lmp, int narg, char **arg) :
|
||||
size_peratom_cols = ncol;
|
||||
|
||||
nmax = 0;
|
||||
qnarray = NULL;
|
||||
maxneigh = 0;
|
||||
distsq = NULL;
|
||||
nearest = NULL;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
@ -24,7 +24,8 @@ using namespace LAMMPS_NS;
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
ComputeImproper::ComputeImproper(LAMMPS *lmp, int narg, char **arg) :
|
||||
Compute(lmp, narg, arg)
|
||||
Compute(lmp, narg, arg),
|
||||
emine(NULL)
|
||||
{
|
||||
if (narg != 3) error->all(FLERR,"Illegal compute improper command");
|
||||
|
||||
|
||||
@ -35,7 +35,8 @@ using namespace MathConst;
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
ComputeImproperLocal::ComputeImproperLocal(LAMMPS *lmp, int narg, char **arg) :
|
||||
Compute(lmp, narg, arg)
|
||||
Compute(lmp, narg, arg),
|
||||
vector(NULL), array(NULL)
|
||||
{
|
||||
if (narg < 4) error->all(FLERR,"Illegal compute improper/local command");
|
||||
|
||||
@ -57,8 +58,6 @@ ComputeImproperLocal::ComputeImproperLocal(LAMMPS *lmp, int narg, char **arg) :
|
||||
}
|
||||
|
||||
nmax = 0;
|
||||
vector = NULL;
|
||||
array = NULL;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
@ -26,7 +26,9 @@ using namespace LAMMPS_NS;
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
ComputeInertiaChunk::ComputeInertiaChunk(LAMMPS *lmp, int narg, char **arg) :
|
||||
Compute(lmp, narg, arg)
|
||||
Compute(lmp, narg, arg),
|
||||
idchunk(NULL), massproc(NULL), masstotal(NULL), com(NULL), comall(NULL),
|
||||
inertia(NULL), inertiaall(NULL)
|
||||
{
|
||||
if (narg != 4) error->all(FLERR,"Illegal compute inertia/chunk command");
|
||||
|
||||
@ -48,9 +50,6 @@ ComputeInertiaChunk::ComputeInertiaChunk(LAMMPS *lmp, int narg, char **arg) :
|
||||
|
||||
nchunk = 1;
|
||||
maxchunk = 0;
|
||||
massproc = masstotal = NULL;
|
||||
com = comall = NULL;
|
||||
inertia = inertiaall = NULL;
|
||||
allocate();
|
||||
}
|
||||
|
||||
|
||||
@ -26,7 +26,8 @@ using namespace LAMMPS_NS;
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
ComputeKEAtom::ComputeKEAtom(LAMMPS *lmp, int narg, char **arg) :
|
||||
Compute(lmp, narg, arg)
|
||||
Compute(lmp, narg, arg),
|
||||
ke(NULL)
|
||||
{
|
||||
if (narg != 3) error->all(FLERR,"Illegal compute ke/atom command");
|
||||
|
||||
@ -34,7 +35,6 @@ ComputeKEAtom::ComputeKEAtom(LAMMPS *lmp, int narg, char **arg) :
|
||||
size_peratom_cols = 0;
|
||||
|
||||
nmax = 0;
|
||||
ke = NULL;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
@ -26,7 +26,8 @@ using namespace LAMMPS_NS;
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
ComputeMSD::ComputeMSD(LAMMPS *lmp, int narg, char **arg) :
|
||||
Compute(lmp, narg, arg)
|
||||
Compute(lmp, narg, arg),
|
||||
id_fix(NULL)
|
||||
{
|
||||
if (narg < 3) error->all(FLERR,"Illegal compute msd command");
|
||||
|
||||
|
||||
@ -28,7 +28,8 @@ using namespace LAMMPS_NS;
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
ComputeMSDChunk::ComputeMSDChunk(LAMMPS *lmp, int narg, char **arg) :
|
||||
Compute(lmp, narg, arg)
|
||||
Compute(lmp, narg, arg),
|
||||
idchunk(NULL), id_fix(NULL), massproc(NULL), masstotal(NULL), com(NULL), comall(NULL), msd(NULL)
|
||||
{
|
||||
if (narg != 4) error->all(FLERR,"Illegal compute msd/chunk command");
|
||||
|
||||
@ -47,10 +48,6 @@ ComputeMSDChunk::ComputeMSDChunk(LAMMPS *lmp, int narg, char **arg) :
|
||||
firstflag = 1;
|
||||
init();
|
||||
|
||||
massproc = masstotal = NULL;
|
||||
com = comall = NULL;
|
||||
msd = NULL;
|
||||
|
||||
// create a new fix STORE style for reference positions
|
||||
// id = compute-ID + COMPUTE_STORE, fix group = compute group
|
||||
// do not know size of array at this point, just allocate 1x3 array
|
||||
|
||||
@ -26,7 +26,8 @@ using namespace LAMMPS_NS;
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
ComputeOmegaChunk::ComputeOmegaChunk(LAMMPS *lmp, int narg, char **arg) :
|
||||
Compute(lmp, narg, arg)
|
||||
Compute(lmp, narg, arg),
|
||||
idchunk(NULL), massproc(NULL), masstotal(NULL), com(NULL), comall(NULL), angmom(NULL), angmomall(NULL)
|
||||
{
|
||||
if (narg != 4) error->all(FLERR,"Illegal compute omega/chunk command");
|
||||
|
||||
@ -48,9 +49,6 @@ ComputeOmegaChunk::ComputeOmegaChunk(LAMMPS *lmp, int narg, char **arg) :
|
||||
|
||||
nchunk = 1;
|
||||
maxchunk = 0;
|
||||
massproc = masstotal = NULL;
|
||||
com = comall = NULL;
|
||||
angmom = angmomall = NULL;
|
||||
allocate();
|
||||
}
|
||||
|
||||
|
||||
@ -45,7 +45,8 @@ using namespace std;
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
ComputeOrientOrderAtom::ComputeOrientOrderAtom(LAMMPS *lmp, int narg, char **arg) :
|
||||
Compute(lmp, narg, arg)
|
||||
Compute(lmp, narg, arg),
|
||||
distsq(NULL), nearest(NULL), rlist(NULL), qlist(NULL), qnarray(NULL), qnm_r(NULL), qnm_i(NULL)
|
||||
{
|
||||
if (narg < 3 ) error->all(FLERR,"Illegal compute orientorder/atom command");
|
||||
|
||||
@ -109,13 +110,7 @@ ComputeOrientOrderAtom::ComputeOrientOrderAtom(LAMMPS *lmp, int narg, char **arg
|
||||
size_peratom_cols = ncol;
|
||||
|
||||
nmax = 0;
|
||||
qnarray = NULL;
|
||||
maxneigh = 0;
|
||||
distsq = NULL;
|
||||
nearest = NULL;
|
||||
rlist = NULL;
|
||||
qnm_r = NULL;
|
||||
qnm_i = NULL;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
@ -26,7 +26,8 @@ enum{EPAIR,EVDWL,ECOUL};
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
ComputePair::ComputePair(LAMMPS *lmp, int narg, char **arg) :
|
||||
Compute(lmp, narg, arg)
|
||||
Compute(lmp, narg, arg),
|
||||
pstyle(NULL), pair(NULL), one(NULL)
|
||||
{
|
||||
if (narg < 4 || narg > 5) error->all(FLERR,"Illegal compute pair command");
|
||||
|
||||
|
||||
@ -36,7 +36,8 @@ enum{TYPE,RADIUS};
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
ComputePairLocal::ComputePairLocal(LAMMPS *lmp, int narg, char **arg) :
|
||||
Compute(lmp, narg, arg)
|
||||
Compute(lmp, narg, arg),
|
||||
pstyle(NULL), pindex(NULL), vector(NULL), array(NULL)
|
||||
{
|
||||
if (narg < 4) error->all(FLERR,"Illegal compute pair/local command");
|
||||
|
||||
@ -96,8 +97,6 @@ ComputePairLocal::ComputePairLocal(LAMMPS *lmp, int narg, char **arg) :
|
||||
if (pstyle[i] != DIST) singleflag = 1;
|
||||
|
||||
nmax = 0;
|
||||
vector = NULL;
|
||||
array = NULL;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
@ -33,7 +33,8 @@ using namespace LAMMPS_NS;
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
ComputePEAtom::ComputePEAtom(LAMMPS *lmp, int narg, char **arg) :
|
||||
Compute(lmp, narg, arg)
|
||||
Compute(lmp, narg, arg),
|
||||
energy(NULL)
|
||||
{
|
||||
if (narg < 3) error->all(FLERR,"Illegal compute pe/atom command");
|
||||
|
||||
@ -68,7 +69,6 @@ ComputePEAtom::ComputePEAtom(LAMMPS *lmp, int narg, char **arg) :
|
||||
}
|
||||
|
||||
nmax = 0;
|
||||
energy = NULL;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
@ -34,7 +34,8 @@ using namespace LAMMPS_NS;
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
ComputePressure::ComputePressure(LAMMPS *lmp, int narg, char **arg) :
|
||||
Compute(lmp, narg, arg)
|
||||
Compute(lmp, narg, arg),
|
||||
vptr(NULL), id_temp(NULL)
|
||||
{
|
||||
if (narg < 4) error->all(FLERR,"Illegal compute pressure command");
|
||||
if (igroup) error->all(FLERR,"Compute pressure must use group all");
|
||||
|
||||
@ -32,7 +32,8 @@ using namespace LAMMPS_NS;
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
ComputePropertyAtom::ComputePropertyAtom(LAMMPS *lmp, int narg, char **arg) :
|
||||
Compute(lmp, narg, arg)
|
||||
Compute(lmp, narg, arg),
|
||||
index(NULL), vector(NULL), array(NULL), pack_choice(NULL)
|
||||
{
|
||||
if (narg < 4) error->all(FLERR,"Illegal compute property/atom command");
|
||||
|
||||
@ -352,8 +353,6 @@ ComputePropertyAtom::ComputePropertyAtom(LAMMPS *lmp, int narg, char **arg) :
|
||||
}
|
||||
|
||||
nmax = 0;
|
||||
vector = NULL;
|
||||
array = NULL;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
@ -25,7 +25,8 @@ using namespace LAMMPS_NS;
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
ComputePropertyChunk::ComputePropertyChunk(LAMMPS *lmp, int narg, char **arg) :
|
||||
Compute(lmp, narg, arg)
|
||||
Compute(lmp, narg, arg),
|
||||
idchunk(NULL), count_one(NULL), count_all(NULL)
|
||||
{
|
||||
if (narg < 5) error->all(FLERR,"Illegal compute property/chunk command");
|
||||
|
||||
@ -78,9 +79,6 @@ ComputePropertyChunk::ComputePropertyChunk(LAMMPS *lmp, int narg, char **arg) :
|
||||
|
||||
nchunk = 1;
|
||||
maxchunk = 0;
|
||||
vector = NULL;
|
||||
array = NULL;
|
||||
count_one = count_all = NULL;
|
||||
allocate();
|
||||
|
||||
if (nvalues == 1) {
|
||||
|
||||
@ -34,7 +34,8 @@ enum{TYPE,RADIUS};
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
ComputePropertyLocal::ComputePropertyLocal(LAMMPS *lmp, int narg, char **arg) :
|
||||
Compute(lmp, narg, arg)
|
||||
Compute(lmp, narg, arg),
|
||||
vector(NULL), array(NULL), indices(NULL), pack_choice(NULL)
|
||||
{
|
||||
if (narg < 4) error->all(FLERR,"Illegal compute property/local command");
|
||||
|
||||
@ -253,9 +254,6 @@ ComputePropertyLocal::ComputePropertyLocal(LAMMPS *lmp, int narg, char **arg) :
|
||||
error->all(FLERR,"Compute property/local requires atom attribute radius");
|
||||
|
||||
nmax = 0;
|
||||
vector = NULL;
|
||||
array = NULL;
|
||||
indices = NULL;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
@ -38,7 +38,9 @@ using namespace MathConst;
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
ComputeRDF::ComputeRDF(LAMMPS *lmp, int narg, char **arg) :
|
||||
Compute(lmp, narg, arg)
|
||||
Compute(lmp, narg, arg),
|
||||
rdfpair(NULL), nrdfpair(NULL), ilo(NULL), ihi(NULL), jlo(NULL), jhi(NULL),
|
||||
hist(NULL), histall(NULL), typecount(NULL), icount(NULL), jcount(NULL), duplicates(NULL)
|
||||
{
|
||||
if (narg < 4 || (narg-4) % 2) error->all(FLERR,"Illegal compute rdf command");
|
||||
|
||||
|
||||
@ -43,7 +43,9 @@ enum{PERATOM,LOCAL};
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
ComputeReduce::ComputeReduce(LAMMPS *lmp, int narg, char **arg) :
|
||||
Compute(lmp, narg, arg)
|
||||
Compute(lmp, narg, arg),
|
||||
nvalues(0), which(NULL), argindex(NULL), flavor(NULL), value2index(NULL), ids(NULL),
|
||||
onevec(NULL), replace(NULL), indices(NULL), owner(NULL), idregion(NULL), varatom(NULL)
|
||||
{
|
||||
int iarg = 0;
|
||||
if (strcmp(style,"reduce") == 0) {
|
||||
|
||||
@ -34,7 +34,8 @@ enum{COMPUTE,FIX,VARIABLE};
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
ComputeSlice::ComputeSlice(LAMMPS *lmp, int narg, char **arg) :
|
||||
Compute(lmp, narg, arg)
|
||||
Compute(lmp, narg, arg),
|
||||
nvalues(0), which(NULL), argindex(NULL), value2index(NULL), ids(NULL)
|
||||
{
|
||||
if (narg < 7) error->all(FLERR,"Illegal compute slice command");
|
||||
|
||||
|
||||
@ -36,7 +36,8 @@ enum{NOBIAS,BIAS};
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
ComputeStressAtom::ComputeStressAtom(LAMMPS *lmp, int narg, char **arg) :
|
||||
Compute(lmp, narg, arg)
|
||||
Compute(lmp, narg, arg),
|
||||
id_temp(NULL), stress(NULL)
|
||||
{
|
||||
if (narg < 4) error->all(FLERR,"Illegal compute stress/atom command");
|
||||
|
||||
@ -98,7 +99,6 @@ ComputeStressAtom::ComputeStressAtom(LAMMPS *lmp, int narg, char **arg) :
|
||||
}
|
||||
|
||||
nmax = 0;
|
||||
stress = NULL;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
@ -29,7 +29,9 @@ enum{TEMP,KECOM,INTERNAL};
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
ComputeTempChunk::ComputeTempChunk(LAMMPS *lmp, int narg, char **arg) :
|
||||
Compute(lmp, narg, arg)
|
||||
Compute(lmp, narg, arg),
|
||||
which(NULL), idchunk(NULL), id_bias(NULL), sum(NULL), sumall(NULL), count(NULL),
|
||||
countall(NULL), massproc(NULL), masstotal(NULL), vcm(NULL), vcmall(NULL)
|
||||
{
|
||||
if (narg < 4) error->all(FLERR,"Illegal compute temp/chunk command");
|
||||
|
||||
@ -129,12 +131,7 @@ ComputeTempChunk::ComputeTempChunk(LAMMPS *lmp, int narg, char **arg) :
|
||||
|
||||
nchunk = 1;
|
||||
maxchunk = 0;
|
||||
sum = sumall = NULL;
|
||||
count = countall = NULL;
|
||||
massproc = masstotal = NULL;
|
||||
vcm = vcmall = NULL;
|
||||
array = NULL;
|
||||
|
||||
|
||||
if (nvalues) {
|
||||
array_flag = 1;
|
||||
size_array_cols = nvalues;
|
||||
|
||||
@ -31,7 +31,8 @@ enum{TENSOR,BIN};
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
ComputeTempProfile::ComputeTempProfile(LAMMPS *lmp, int narg, char **arg) :
|
||||
Compute(lmp, narg, arg)
|
||||
Compute(lmp, narg, arg),
|
||||
bin(NULL), vbin(NULL), binave(NULL), tbin(NULL), tbinall(NULL)
|
||||
{
|
||||
if (narg < 7) error->all(FLERR,"Illegal compute temp/profile command");
|
||||
|
||||
@ -138,7 +139,6 @@ ComputeTempProfile::ComputeTempProfile(LAMMPS *lmp, int narg, char **arg) :
|
||||
}
|
||||
|
||||
maxatom = 0;
|
||||
bin = NULL;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
@ -28,7 +28,8 @@ using namespace LAMMPS_NS;
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
ComputeTempRegion::ComputeTempRegion(LAMMPS *lmp, int narg, char **arg) :
|
||||
Compute(lmp, narg, arg)
|
||||
Compute(lmp, narg, arg),
|
||||
idregion(NULL)
|
||||
{
|
||||
if (narg != 4) error->all(FLERR,"Illegal compute temp/region command");
|
||||
|
||||
|
||||
@ -33,7 +33,8 @@ enum{ROTATE,ALL};
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
ComputeTempSphere::ComputeTempSphere(LAMMPS *lmp, int narg, char **arg) :
|
||||
Compute(lmp, narg, arg)
|
||||
Compute(lmp, narg, arg),
|
||||
id_bias(NULL)
|
||||
{
|
||||
if (narg < 3) error->all(FLERR,"Illegal compute temp/sphere command");
|
||||
|
||||
@ -44,7 +45,6 @@ ComputeTempSphere::ComputeTempSphere(LAMMPS *lmp, int narg, char **arg) :
|
||||
tempflag = 1;
|
||||
|
||||
tempbias = 0;
|
||||
id_bias = NULL;
|
||||
mode = ALL;
|
||||
|
||||
int iarg = 3;
|
||||
|
||||
@ -26,7 +26,8 @@ using namespace LAMMPS_NS;
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
ComputeTorqueChunk::ComputeTorqueChunk(LAMMPS *lmp, int narg, char **arg) :
|
||||
Compute(lmp, narg, arg)
|
||||
Compute(lmp, narg, arg),
|
||||
idchunk(NULL), massproc(NULL), masstotal(NULL), com(NULL), comall(NULL), torque(NULL), torqueall(NULL)
|
||||
{
|
||||
if (narg != 4) error->all(FLERR,"Illegal compute torque/chunk command");
|
||||
|
||||
@ -48,9 +49,6 @@ ComputeTorqueChunk::ComputeTorqueChunk(LAMMPS *lmp, int narg, char **arg) :
|
||||
|
||||
nchunk = 1;
|
||||
maxchunk = 0;
|
||||
massproc = masstotal = NULL;
|
||||
com = comall = NULL;
|
||||
torque = torqueall = NULL;
|
||||
allocate();
|
||||
}
|
||||
|
||||
|
||||
@ -25,7 +25,8 @@ using namespace LAMMPS_NS;
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
ComputeVACF::ComputeVACF(LAMMPS *lmp, int narg, char **arg) :
|
||||
Compute(lmp, narg, arg)
|
||||
Compute(lmp, narg, arg),
|
||||
id_fix(NULL)
|
||||
{
|
||||
if (narg < 3) error->all(FLERR,"Illegal compute vacf command");
|
||||
|
||||
|
||||
@ -28,7 +28,8 @@ enum{ONCE,NFREQ,EVERY};
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
ComputeVCMChunk::ComputeVCMChunk(LAMMPS *lmp, int narg, char **arg) :
|
||||
Compute(lmp, narg, arg)
|
||||
Compute(lmp, narg, arg),
|
||||
idchunk(NULL), massproc(NULL), masstotal(NULL), vcm(NULL), vcmall(NULL)
|
||||
{
|
||||
if (narg != 4) error->all(FLERR,"Illegal compute vcm/chunk command");
|
||||
|
||||
@ -50,8 +51,6 @@ ComputeVCMChunk::ComputeVCMChunk(LAMMPS *lmp, int narg, char **arg) :
|
||||
|
||||
nchunk = 1;
|
||||
maxchunk = 0;
|
||||
massproc = masstotal = NULL;
|
||||
vcm = vcmall = NULL;
|
||||
allocate();
|
||||
|
||||
firstflag = massneed = 1;
|
||||
|
||||
@ -1 +1 @@
|
||||
#define LAMMPS_VERSION "23 Aug 2016"
|
||||
#define LAMMPS_VERSION "27 Aug 2016"
|
||||
|
||||
Reference in New Issue
Block a user