Merge branch 'develop' into mpi-stubs-simplify

This commit is contained in:
Axel Kohlmeyer
2022-01-30 17:19:26 -05:00
1595 changed files with 10490 additions and 9769 deletions

View File

@ -129,6 +129,7 @@ OPT.
* :doc:`npt/sphere (o) <fix_npt_sphere>`
* :doc:`npt/uef <fix_nh_uef>`
* :doc:`numdiff <fix_numdiff>`
* :doc:`numdiff/virial <fix_numdiff_virial>`
* :doc:`nve (giko) <fix_nve>`
* :doc:`nve/asphere (gi) <fix_nve_asphere>`
* :doc:`nve/asphere/noforce <fix_nve_asphere_noforce>`

View File

@ -1941,6 +1941,9 @@ Doc page with :doc:`WARNING messages <Errors_warnings>`
*Compute ID for fix numdiff does not exist*
Self-explanatory.
*Compute ID for fix numdiff/virial does not exist*
Self-explanatory.
*Compute ID for fix store/state does not exist*
Self-explanatory.
@ -3796,6 +3799,10 @@ Doc page with :doc:`WARNING messages <Errors_warnings>`
Self-explanatory. Efficient loop over all atoms for numerical
difference requires consecutive atom IDs.
*Fix numdiff/virial must use group all*
Virial contributions computed by this fix are
computed on all atoms.
*Fix nve/asphere requires extended particles*
This fix can only be used for particles with a shape setting.

View File

@ -305,6 +305,40 @@ you are uncertain, please ask.
FILE pointers and only be done on MPI rank 0. Use the :cpp:func:`utils::logmesg`
convenience function where possible.
- Usage of C++11 `virtual`, `override`, `final` keywords: Please follow the
`C++ Core Guideline C.128 <https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rh-override>`_.
That means, you should only use `virtual` to declare a new virtual
function, `override` to indicate you are overriding an existing virtual
function, and `final` to prevent any further overriding.
- Trivial destructors: Prefer not writing destructors when they are empty and `default`.
.. code-block:: c++
// don't write destructors for A or B like this
class A : protected Pointers {
public:
A();
~A() override {}
};
class B : protected Pointers {
public:
B();
~B() override = default;
};
// instead, let the compiler create the implicit default destructor by not writing it
class A : protected Pointers {
public:
A();
};
class B : protected Pointers {
public:
B();
};
- Header files, especially those defining a "style", should only use
the absolute minimum number of include files and **must not** contain
any ``using`` statements. Typically that would be only the header for

View File

@ -141,7 +141,7 @@ Related commands
""""""""""""""""
:doc:`compute temp <compute_temp>`, :doc:`compute stress/atom <compute_stress_atom>`,
:doc:`thermo_style <thermo_style>`,
:doc:`thermo_style <thermo_style>`, :doc:`fix numdiff/virial <fix_numdiff_virial>`,
Default
"""""""

View File

@ -271,7 +271,8 @@ accelerated styles exist.
* :doc:`npt/eff <fix_nh_eff>` - NPT for nuclei and electrons in the electron force field model
* :doc:`npt/sphere <fix_npt_sphere>` - NPT for spherical particles
* :doc:`npt/uef <fix_nh_uef>` - NPT style time integration with diagonal flow
* :doc:`numdiff <fix_numdiff>` - compute derivatives of per-atom data from finite differences
* :doc:`numdiff <fix_numdiff>` - numerically approximate atomic forces using finite energy differences
* :doc:`numdiff/virial <fix_numdiff_virial>` - numerically approximate virial stress tensor using finite energy differences
* :doc:`nve <fix_nve>` - constant NVE time integration
* :doc:`nve/asphere <fix_nve_asphere>` - NVE for aspherical particles
* :doc:`nve/asphere/noforce <fix_nve_asphere_noforce>` - NVE for aspherical particles without forces

View File

@ -20,13 +20,13 @@ Syntax
.. parsed-literal::
keyword = *pH*, *pKa*, *pKb*, *pIp*, *pIm*, *pKs*, *acid_type*, *base_type*, *lunit_nm*, *temp*, *tempfixid*, *nevery*, *nmc*, *xrd*, *seed*, *tag*, *group*, *onlysalt*, *pmcmoves*
keyword = *pH*, *pKa*, *pKb*, *pIp*, *pIm*, *pKs*, *acid_type*, *base_type*, *lunit_nm*, *temp*, *tempfixid*, *nevery*, *nmc*, *rxd*, *seed*, *tag*, *group*, *onlysalt*, *pmcmoves*
*pH* value = pH of the solution (can be specified as an equal-style variable)
*pKa* value = acid dissociation constant
*pKb* value = base dissociation constant
*pIp* value = chemical potential of free cations
*pIm* value = chemical potential of free anions
*pKs* value = solution self-dissociation constant
*pKa* value = acid dissociation constant (in the -log10 representation)
*pKb* value = base dissociation constant (in the -log10 representation)
*pIp* value = activity (effective concentration) of free cations (in the -log10 representation)
*pIm* value = activity (effective concentration) of free anions (in the -log10 representation)
*pKs* value = solvent self-dissociation constant (in the -log10 representation)
*acid_type* = atom type of acid groups
*base_type* = atom type of base groups
*lunit_nm* value = unit length used by LAMMPS (# in the units of nanometers)
@ -34,7 +34,7 @@ Syntax
*tempfixid* value = fix ID of temperature thermostat
*nevery* value = invoke this fix every nevery steps
*nmc* value = number of charge regulation MC moves to attempt every nevery steps
*xrd* value = cutoff distance for acid/base reaction
*rxd* value = cutoff distance for acid/base reaction
*seed* value = random # seed (positive integer)
*tag* value = yes or no (yes: The code assign unique tags to inserted ions; no: The tag of all inserted ions is "0")
*group* value = group-ID, inserted ions are assigned to group group-ID. Can be used multiple times to assign inserted ions to multiple groups.
@ -47,7 +47,7 @@ Examples
""""""""
.. code-block:: LAMMPS
fix chareg all charge/regulation 1 2 acid_type 3 base_type 4 pKa 5 pKb 7 lb 1.0 nevery 200 nexchange 200 seed 123 tempfixid fT
fix chareg all charge/regulation 1 2 acid_type 3 base_type 4 pKa 5.0 pKb 6.0 pH 7.0 pIp 3.0 pIm 3.0 nevery 200 nmc 200 seed 123 tempfixid fT
fix chareg all charge/regulation 1 2 pIp 3 pIm 3 onlysalt yes 2 -1 seed 123 tag yes temp 1.0
@ -92,7 +92,11 @@ where the fix attempts to charge :math:`\mathrm{A}` (discharge
:math:`\mathrm{A}^-`) to :math:`\mathrm{A}^-` (:math:`\mathrm{A}`) and
insert (delete) a proton (atom type 2). Besides, the fix implements
self-ionization reaction of water :math:`\emptyset \rightleftharpoons
\mathrm{H}^++\mathrm{OH}^-`. However, this approach is highly
\mathrm{H}^++\mathrm{OH}^-`.
However, this approach is highly
inefficient at :math:`\mathrm{pH} \approx 7` when the concentration of
both protons and hydroxyl ions is low, resulting in a relatively low
acceptance rate of MC moves.
@ -102,24 +106,31 @@ reactions, which can be easily achieved via
.. code-block:: LAMMPS
fix acid_reaction all charge/regulation 4 5 acid_type 1 pH 7.0 pKa 5.0 pIp 2.0 pIm 2.0
fix acid_reaction2 all charge/regulation 4 5 acid_type 1 pH 7.0 pKa 5.0 pIp 2.0 pIm 2.0
where particles of atom type 4 and 5 are the salt cations and anions,
both at chemical potential pI=2.0, see :ref:`(Curk1) <Curk1>` and
where particles of atom type 4 and 5 are the salt cations and anions, both at activity (effective concentration) of :math:`10^{-2}` mol/l, see :ref:`(Curk1) <Curk1>` and
:ref:`(Landsgesell) <Landsgesell>` for more details.
Similarly, we could have simultaneously added a base ionization reaction
(:math:`\mathrm{B} \rightleftharpoons \mathrm{B}^++\mathrm{OH}^-`)
We could have simultaneously added a base ionization reaction (:math:`\mathrm{B} \rightleftharpoons \mathrm{B}^++\mathrm{OH}^-`)
.. code-block:: LAMMPS
fix base_reaction all charge/regulation 2 3 base_type 6 pH 7.0 pKb 6.0 pIp 7.0 pIm 7.0
fix acid_base_reaction all charge/regulation 2 3 acid_type 1 base_type 6 pH 7.0 pKa 5.0 pKb 6.0 pIp 7.0 pIm 7.0
where the fix will attempt to charge :math:`\mathrm{B}` (discharge
:math:`\mathrm{B}^+`) to :math:`\mathrm{B}^+` (:math:`\mathrm{B}`) and
insert (delete) a hydroxyl ion :math:`\mathrm{OH}^-` of atom type 3. If
neither the acid or the base type is specified, for example,
insert (delete) a hydroxyl ion :math:`\mathrm{OH}^-` of atom type 3.
Dissociated ions and salt ions can be combined into a single particle type, which reduces the number of necessary MC moves and increases sampling performance, see :ref:`(Curk1) <Curk1>`. The :math:`\mathrm{H}^+` and monovalent salt cation (:math:`\mathrm{S}^+`) are combined into a single particle type, :math:`\mathrm{X}^+ = \{\mathrm{H}^+, \mathrm{S}^+\}`. In this case "pIp" refers to the effective concentration of the combined cation type :math:`\mathrm{X}^+` and its value is determined by :math:`10^{-\mathrm{pIp}} = 10^{-\mathrm{pH}} + 10^{-\mathrm{pSp}}`, where :math:`10^{-\mathrm{pSp}}` is the effective concentration of salt cations. For example, at pH=7 and pSp=6 we would find pIp~5.958 and the command that performs reactions with combined ions could read,
.. code-block:: LAMMPS
fix acid_reaction_combined all charge/regulation 2 3 acid_type 1 pH 7.0 pKa 5.0 pIp 5.958 pIm 5.958
If neither the acid or the base type is specified, for example,
.. code-block:: LAMMPS
@ -127,11 +138,11 @@ neither the acid or the base type is specified, for example,
the fix simply inserts or deletes an ion pair of a free cation (atom
type 4) and a free anion (atom type 5) as done in a conventional
grand-canonical MC simulation.
grand-canonical MC simulation. Multivalent ions can be inserted (deleted) by using the *onlysalt* keyword.
The fix is compatible with LAMMPS sub-packages such as *molecule* or
*rigid*. That said, the acid and base particles can be part of larger
*rigid*. The acid and base particles can be part of larger
molecules or rigid bodies. Free ions that are inserted to or deleted
from the system must be defined as single particles (no bonded
interactions allowed) and cannot be part of larger molecules or rigid
@ -153,14 +164,14 @@ Langevin thermostat:
fix fT all langevin 1.0 1.0 1.0 123
fix_modify fT temp dtemp
The chemical potential units (e.g. pH) are in the standard log10
The units of pH, pKa, pKb, pIp, pIm are considered to be in the standard -log10
representation assuming reference concentration :math:`\rho_0 =
\mathrm{mol}/\mathrm{l}`. Therefore, to perform the internal unit
conversion, the length (in nanometers) of the LAMMPS unit length must be
specified via *lunit_nm* (default is set to the Bjerrum length in water
at room temperature *lunit_nm* = 0.71nm). For example, in the dilute
ideal solution limit, the concentration of free ions will be
:math:`c_\mathrm{I} = 10^{-\mathrm{pIp}}\mathrm{mol}/\mathrm{l}`.
\mathrm{mol}/\mathrm{l}`. For example, in the dilute
ideal solution limit, the concentration of free cations will be
:math:`c_\mathrm{I} = 10^{-\mathrm{pIp}}\mathrm{mol}/\mathrm{l}`. To perform the internal unit
conversion, the the value of the LAMMPS unit length must be
specified in nanometers via *lunit_nm*. The default value is set to the Bjerrum length in water
at room temperature (0.71 nm), *lunit_nm* = 0.71.
The temperature used in MC acceptance probability is set by *temp*. This
temperature should be the same as the temperature set by the molecular
@ -171,10 +182,10 @@ thermostat fix-ID is *fT*. The inserted particles attain a random
velocity corresponding to the specified temperature. Using *tempfixid*
overrides any fixed temperature set by *temp*.
The *xrd* keyword can be used to restrict the inserted/deleted
The *rxd* keyword can be used to restrict the inserted/deleted
counterions to a specific radial distance from an acid or base particle
that is currently participating in a reaction. This can be used to
simulate more realist reaction dynamics. If *xrd* = 0 or *xrd* > *L* /
simulate more realist reaction dynamics. If *rxd* = 0 or *rxd* > *L* /
2, where *L* is the smallest box dimension, the radial restriction is
automatically turned off and free ion can be inserted or deleted
anywhere in the simulation box.
@ -258,18 +269,18 @@ Default
pH = 7.0; pKa = 100.0; pKb = 100.0; pIp = 5.0; pIm = 5.0; pKs = 14.0;
acid_type = -1; base_type = -1; lunit_nm = 0.71; temp = 1.0; nevery =
100; nmc = 100; xrd = 0; seed = 0; tag = no; onlysalt = no, pmcmoves =
100; nmc = 100; rxd = 0; seed = 0; tag = no; onlysalt = no, pmcmoves =
[1/3, 1/3, 1/3], group-ID = all
----------
.. _Curk1:
**(Curk1)** T. Curk, J. Yuan, and E. Luijten, "Coarse-grained simulation of charge regulation using LAMMPS", preprint (2021).
**(Curk1)** T. Curk, J. Yuan, and E. Luijten, "Accelerated simulation method for charge regulation effects", JCP 156 (2022).
.. _Curk2:
**(Curk2)** T. Curk and E. Luijten, "Charge-regulation effects in nanoparticle self-assembly", PRL (2021)
**(Curk2)** T. Curk and E. Luijten, "Charge-regulation effects in nanoparticle self-assembly", PRL 126 (2021)
.. _Landsgesell:

View File

@ -13,16 +13,15 @@ Syntax
* ID, group-ID are documented in :doc:`fix <fix>` command
* numdiff = style name of this fix command
* Nevery = calculate force by finite difference every this many timesteps
* delta = finite difference displacement length (distance units)
* delta = size of atom displacements (distance units)
Examples
""""""""
.. code-block:: LAMMPS
fix 1 all numdiff 1 0.0001
fix 1 all numdiff 10 1e-6
fix 1 all numdiff 100 0.01
fix 1 movegroup numdiff 100 0.01
Description
"""""""""""
@ -67,16 +66,17 @@ by two times *delta*.
The cost of each energy evaluation is essentially the cost of an MD
timestep. Thus invoking this fix once for a 3d system has a cost
of 6N timesteps, where N is the total number of atoms in the system
(assuming all atoms are included in the group). So this fix can be
very expensive to use for large systems.
of 6N timesteps, where N is the total number of atoms in the system.
So this fix can be very expensive to use for large systems.
One expedient alternative is to define the fix for a group containing
only a few atoms.
----------
The *Nevery* argument specifies on what timesteps the force will
be used calculated by finite difference.
The *delta* argument specifies the positional displacement each
The *delta* argument specifies the size of the displacement each
atom will undergo.
----------
@ -93,7 +93,12 @@ This fix produces a per-atom array which can be accessed by various
the force on each atom as calculated by finite difference. The
per-atom values can only be accessed on timesteps that are multiples
of *Nevery* since that is when the finite difference forces are
calculated.
calculated. See the examples in *examples/numdiff* directory
to see how this fix can be used to directly compare with
the analytic forces computed by LAMMPS.
The array values calculated by this compute
will be in force :doc:`units <units>`.
No parameter of this fix can be used with the *start/stop* keywords of
the :doc:`run <run>` command. This fix is invoked during :doc:`energy
@ -108,7 +113,7 @@ was built with that package. See the :doc:`Build package <Build_package>` page
Related commands
""""""""""""""""
:doc:`dynamical_matrix <dynamical_matrix>`,
:doc:`dynamical_matrix <dynamical_matrix>`, :doc:`fix numdiff/virial <fix_numdiff_virial>`,
Default
"""""""

View File

@ -0,0 +1,115 @@
.. index:: fix numdiff/virial
fix numdiff/virial command
==========================
Syntax
""""""
.. parsed-literal::
fix ID group-ID numdiff/virial Nevery delta
* ID, group-ID are documented in :doc:`fix <fix>` command
* numdiff/virial = style name of this fix command
* Nevery = calculate virial by finite difference every this many timesteps
* delta = magnitude of strain fields (dimensionless)
Examples
""""""""
.. code-block:: LAMMPS
fix 1 all numdiff/stress 10 1e-6
Description
"""""""""""
Calculate the virial stress tensor through a finite difference calculation of
energy versus strain. These values can be compared to the analytic virial
tensor computed by pair styles, bond styles, etc. This can be useful for
debugging or other purposes. The specified group must be "all".
This fix applies linear strain fields of magnitude *delta* to all the
atoms relative to a point at the center of the box. The
strain fields are in six different directions, corresponding to the
six Cartesian components of the stress tensor defined by LAMMPS.
For each direction it applies the strain field in both the positive
and negative senses, and the new energy of the entire system
is calculated after each. The difference in these two energies
divided by two times *delta*, approximates the corresponding
component of the virial stress tensor, after applying
a suitable unit conversion.
.. note::
It is important to choose a suitable value for delta, the magnitude of
strains that are used to generate finite difference
approximations to the exact virial stress. For typical systems, a value in
the range of 1 part in 1e5 to 1e6 will be sufficient.
However, the best value will depend on a multitude of factors
including the stiffness of the interatomic potential, the thermodynamic
state of the material being probed, and so on. The only way to be sure
that you have made a good choice is to do a sensitivity study on a
representative atomic configuration, sweeping over a wide range of
values of delta. If delta is too small, the output values will vary
erratically due to truncation effects. If delta is increased beyond a
certain point, the output values will start to vary smoothly with
delta, due to growing contributions from higher order derivatives. In
between these two limits, the numerical virial values should be largely
independent of delta.
----------
The *Nevery* argument specifies on what timesteps the force will
be used calculated by finite difference.
The *delta* argument specifies the size of the displacement each
atom will undergo.
----------
Restart, fix_modify, output, run start/stop, minimize info
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
No information about this fix is written to :doc:`binary restart files
<restart>`. None of the :doc:`fix_modify <fix_modify>` options are
relevant to this fix.
This fix produces a global vector which can be accessed by various
:doc:`output commands <Howto_output>`, which stores the components of
the virial stress tensor as calculated by finite difference. The
global vector can only be accessed on timesteps that are multiples
of *Nevery* since that is when the finite difference virial is
calculated. See the examples in *examples/numdiff* directory
to see how this fix can be used to directly compare with
the analytic virial stress tensor computed by LAMMPS.
The order of the virial stress tensor components is *xx*, *yy*, *zz*,
*yz*, *xz*, and *xy*, consistent with Voigt notation. Note that
the vector produced by :doc:`compute pressure <compute_pressure>`
uses a different ordering, with *yz* and *xy* swapped.
The vector values calculated by this compute are
"intensive". The vector values will be in pressure
:doc:`units <units>`.
No parameter of this fix can be used with the *start/stop* keywords of
the :doc:`run <run>` command. This fix is invoked during :doc:`energy
minimization <minimize>`.
Restrictions
""""""""""""
This fix is part of the EXTRA-FIX package. It is only enabled if LAMMPS
was built with that package. See the :doc:`Build package <Build_package>` page for more info.
Related commands
""""""""""""""""
:doc:`fix numdiff <fix_numdiff>`, :doc:`compute pressure <compute_pressure>`
Default
"""""""
none

View File

@ -66,7 +66,10 @@ equivalent to Newton's equations of motion for shear flow by
:ref:`(Evans and Morriss) <Evans3>`. They were later shown to generate
the desired velocity gradient and the correct production of work by
stresses for all forms of homogeneous flow by :ref:`(Daivis and Todd)
<Daivis>`. As implemented in LAMMPS, they are coupled to a
<Daivis>`.
The LAMMPS implementation corresponds to the p-SLLOD variant
of SLLOD. :ref:`(Edwards) <Edwards>`.
The equations of motion are coupled to a
Nose/Hoover chain thermostat in a velocity Verlet formulation, closely
following the implementation used for the :doc:`fix nvt <fix_nh>`
command.
@ -180,6 +183,10 @@ Same as :doc:`fix nvt <fix_nh>`, except tchain = 1.
**(Daivis and Todd)** Daivis and Todd, J Chem Phys, 124, 194103 (2006).
.. _Edwards:
**(Edwards)** Edwards, Baig, and Keffer, J Chem Phys 124, 194104 (2006).
.. _Daivis-sllod:
**(Daivis and Todd)** Daivis and Todd, Nonequilibrium Molecular Dynamics (book),

View File

@ -108,10 +108,11 @@ fluid, in appropriate units. See the :ref:`Muller-Plathe paper <Muller-Plathe2>
An alternative method for calculating a viscosity is to run a NEMD
simulation, as described on the :doc:`Howto nemd <Howto_nemd>` doc page.
NEMD simulations deform the simulation box via the :doc:`fix deform <fix_deform>` command. Thus they cannot be run on a charged
system using a :doc:`PPPM solver <kspace_style>` since PPPM does not
currently support non-orthogonal boxes. Using fix viscosity keeps the
box orthogonal; thus it does not suffer from this limitation.
NEMD simulations deform the simulation box via the :doc:`fix deform <fix_deform>` command.
Some features or combination of settings in LAMMPS do not support
non-orthogonal boxes. Using fix viscosity keeps the box orthogonal;
thus it does not suffer from these limitations.
Restart, fix_modify, output, run start/stop, minimize info
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

View File

@ -194,6 +194,7 @@ Baczewski
Bagchi
Bagi
Bagnold
Baig
Bajaj
Bkappa
Bal
@ -668,6 +669,7 @@ Derlet
Deserno
Destree
destructor
destructors
detils
Devanathan
devel
@ -1569,6 +1571,7 @@ ke
KE
Keblinski
Keefe
Keffer
keflag
Keir
Kelchner
@ -2647,6 +2650,7 @@ pscreen
pscrozi
pseudodynamics
pseudopotential
pSp
Pstart
Pstop
pstyle
@ -2925,6 +2929,7 @@ Runge
runtime
Rutuparna
rx
rxd
rxnave
rxnsum
ry

View File

@ -94,7 +94,7 @@ msst: MSST shock dynamics
nb3b: use of nonbonded 3-body harmonic pair style
neb: nudged elastic band (NEB) calculation for barrier finding
nemd: non-equilibrium MD of 2d sheared system
numdiff: numerical difference computation of forces
numdiff: numerical difference computation of forces and virial
obstacle: flow around two voids in a 2d channel
peptide: dynamics of a small solvated peptide chain (5-mer)
peri: Peridynamic model of cylinder impacted by indenter

View File

@ -1,33 +1,74 @@
# Numerical difference calculation of error in forces
# Numerical difference calculation
# of error in forces and virial stress
units metal
atom_style atomic
# adjustable parameters
atom_modify map yes
lattice fcc 5.358000
region box block 0 6 0 6 0 6
create_box 1 box
create_atoms 1 box
mass 1 39.903
variable nsteps index 500 # length of run
variable nthermo index 10 # thermo output interval
variable ndump index 500 # dump output interval
variable nlat index 3 # size of box
variable fdelta index 1.0e-4 # displacement size
variable vdelta index 1.0e-6 # strain size
variable temp index 10.0 # temperature
velocity all create 10 2357 mom yes dist gaussian
units metal
atom_style atomic
pair_style lj/cubic
pair_coeff * * 0.0102701 3.42
atom_modify map yes
lattice fcc 5.358000
region box block 0 ${nlat} 0 ${nlat} 0 ${nlat}
create_box 1 box
create_atoms 1 box
mass 1 39.903
neighbor 1 bin
velocity all create ${temp} 2357 mom yes dist gaussian
timestep 0.001
pair_style lj/cubic
pair_coeff * * 0.0102701 3.42
fix numdiff all numdiff 200 0.0001
fix nve all nve
neighbor 0.0 bin
neigh_modify every 1 delay 0 check no
variable errx atom fx-f_numdiff[1]
variable erry atom fy-f_numdiff[2]
variable errz atom fz-f_numdiff[3]
timestep 0.001
fix nve all nve
write_dump all custom tmp.error f_numdiff[1] f_numdiff[2] f_numdiff[3]
# define numerical force calculation
dump forces all custom 200 force_error.dump v_errx v_erry v_errz
thermo 200
run 2000
fix numforce all numdiff ${nthermo} ${fdelta}
variable ferrx atom f_numforce[1]-fx
variable ferry atom f_numforce[2]-fy
variable ferrz atom f_numforce[3]-fz
variable ferrsq atom v_ferrx^2+v_ferry^2+v_ferrz^2
compute faverrsq all reduce ave v_ferrsq
variable fsq atom fx^2+fy^2+fz^2
compute favsq all reduce ave v_fsq
variable frelerr equal sqrt(c_faverrsq/c_favsq)
dump errors all custom ${ndump} force_error.dump v_ferrx v_ferry v_ferrz
# define numerical virial stress tensor calculation
compute myvirial all pressure NULL virial
fix numvirial all numdiff/virial ${nthermo} ${vdelta}
variable errxx equal f_numvirial[1]-c_myvirial[1]
variable erryy equal f_numvirial[2]-c_myvirial[2]
variable errzz equal f_numvirial[3]-c_myvirial[3]
variable erryz equal f_numvirial[4]-c_myvirial[6]
variable errxz equal f_numvirial[5]-c_myvirial[5]
variable errxy equal f_numvirial[6]-c_myvirial[4]
variable verrsq equal "v_errxx^2 + &
v_erryy^2 + &
v_errzz^2 + &
v_erryz^2 + &
v_errxz^2 + &
v_errxy^2"
variable vsq equal "c_myvirial[1]^2 + &
c_myvirial[3]^2 + &
c_myvirial[3]^2 + &
c_myvirial[4]^2 + &
c_myvirial[5]^2 + &
c_myvirial[6]^2"
variable vrelerr equal sqrt(v_verrsq/v_vsq)
thermo_style custom step temp pe etotal press v_frelerr v_vrelerr
thermo ${nthermo}
run ${nsteps}

View File

@ -0,0 +1,175 @@
LAMMPS (7 Jan 2022)
# Numerical difference calculation
# of error in forces and virial stress
# adjustable parameters
variable nsteps index 500 # length of run
variable nthermo index 10 # thermo output interval
variable ndump index 500 # dump output interval
variable nlat index 3 # size of box
variable fdelta index 1.0e-4 # displacement size
variable vdelta index 1.0e-6 # strain size
variable temp index 10.0 # temperature
units metal
atom_style atomic
atom_modify map yes
lattice fcc 5.358000
Lattice spacing in x,y,z = 5.358 5.358 5.358
region box block 0 ${nlat} 0 ${nlat} 0 ${nlat}
region box block 0 3 0 ${nlat} 0 ${nlat}
region box block 0 3 0 3 0 ${nlat}
region box block 0 3 0 3 0 3
create_box 1 box
Created orthogonal box = (0 0 0) to (16.074 16.074 16.074)
1 by 1 by 1 MPI processor grid
create_atoms 1 box
Created 108 atoms
using lattice units in orthogonal box = (0 0 0) to (16.074 16.074 16.074)
create_atoms CPU = 0.000 seconds
mass 1 39.903
velocity all create ${temp} 2357 mom yes dist gaussian
velocity all create 10.0 2357 mom yes dist gaussian
pair_style lj/cubic
pair_coeff * * 0.0102701 3.42
neighbor 0.0 bin
neigh_modify every 1 delay 0 check no
timestep 0.001
fix nve all nve
# define numerical force calculation
fix numforce all numdiff ${nthermo} ${fdelta}
fix numforce all numdiff 10 ${fdelta}
fix numforce all numdiff 10 1.0e-4
variable ferrx atom f_numforce[1]-fx
variable ferry atom f_numforce[2]-fy
variable ferrz atom f_numforce[3]-fz
variable ferrsq atom v_ferrx^2+v_ferry^2+v_ferrz^2
compute faverrsq all reduce ave v_ferrsq
variable fsq atom fx^2+fy^2+fz^2
compute favsq all reduce ave v_fsq
variable frelerr equal sqrt(c_faverrsq/c_favsq)
dump errors all custom ${ndump} force_error.dump v_ferrx v_ferry v_ferrz
dump errors all custom 500 force_error.dump v_ferrx v_ferry v_ferrz
# define numerical virial stress tensor calculation
compute myvirial all pressure NULL virial
fix numvirial all numdiff/virial ${nthermo} ${vdelta}
fix numvirial all numdiff/virial 10 ${vdelta}
fix numvirial all numdiff/virial 10 1.0e-6
variable errxx equal f_numvirial[1]-c_myvirial[1]
variable erryy equal f_numvirial[2]-c_myvirial[2]
variable errzz equal f_numvirial[3]-c_myvirial[3]
variable erryz equal f_numvirial[4]-c_myvirial[6]
variable errxz equal f_numvirial[5]-c_myvirial[5]
variable errxy equal f_numvirial[6]-c_myvirial[4]
variable verrsq equal "v_errxx^2 + v_erryy^2 + v_errzz^2 + v_erryz^2 + v_errxz^2 + v_errxy^2"
variable vsq equal "c_myvirial[1]^2 + c_myvirial[3]^2 + c_myvirial[3]^2 + c_myvirial[4]^2 + c_myvirial[5]^2 + c_myvirial[6]^2"
variable vrelerr equal sqrt(v_verrsq/v_vsq)
thermo_style custom step temp pe etotal press v_frelerr v_vrelerr
thermo ${nthermo}
thermo 10
run ${nsteps}
run 500
generated 0 of 0 mixed pair_coeff terms from geometric mixing rule
Neighbor list info ...
update every 1 steps, delay 0 steps, check no
max neighbors/atom: 2000, page size: 100000
master list distance cutoff = 5.9407173
ghost atom cutoff = 5.9407173
binsize = 2.9703587, bins = 6 6 6
1 neighbor lists, perpetual/occasional/extra = 1 0 0
(1) pair lj/cubic, perpetual
attributes: half, newton on
pair build: half/bin/atomonly/newton
stencil: half/bin/3d
bin: standard
Per MPI rank memory allocation (min/avg/max) = 6.083 | 6.083 | 6.083 Mbytes
Step Temp PotEng TotEng Press v_frelerr v_vrelerr
0 10 -7.0259569 -6.8876486 28.564278 19203.344 1.5660292e-06
10 9.9376583 -7.0250947 -6.8876486 30.254762 1.5040965e-08 2.1991382e-07
20 9.7520139 -7.022527 -6.8876485 35.28505 1.4756358e-08 2.6265315e-06
30 9.4477557 -7.0183188 -6.8876485 43.519863 1.4688198e-08 2.6356166e-07
40 9.0330215 -7.0125826 -6.8876484 54.727797 1.4637921e-08 5.2292327e-08
50 8.5192918 -7.0054772 -6.8876483 68.585553 1.4587854e-08 7.1324716e-08
60 7.9212026 -6.997205 -6.8876481 84.684636 1.4525561e-08 3.1108149e-08
70 7.2562592 -6.9880081 -6.8876479 102.54088 1.450885e-08 3.2311094e-08
80 6.5444294 -6.9781627 -6.8876478 121.60715 1.4444738e-08 2.1776998e-08
90 5.8075961 -6.9679715 -6.8876476 141.2895 1.4493562e-08 2.0400898e-08
100 5.0688629 -6.957754 -6.8876474 160.9668 1.445455e-08 1.2636688e-08
110 4.3517145 -6.947835 -6.8876472 180.0135 1.4460371e-08 1.2528038e-08
120 3.6790589 -6.9385314 -6.887647 197.82486 1.4371757e-08 1.4489522e-08
130 3.0721984 -6.9301379 -6.8876468 213.84331 1.4364708e-08 1.2461922e-08
140 2.5497991 -6.9229125 -6.8876467 227.58429 1.4330926e-08 9.3913926e-09
150 2.1269443 -6.917064 -6.8876466 238.6596 1.4287002e-08 4.1510266e-09
160 1.8143642 -6.9127407 -6.8876465 246.79599 1.4282669e-08 7.7048281e-09
170 1.6179191 -6.9100237 -6.8876465 251.84748 1.42726e-08 1.2719973e-08
180 1.5383946 -6.9089239 -6.8876466 253.79991 1.4236534e-08 8.1200831e-09
190 1.5716287 -6.9093836 -6.8876467 252.76745 1.41706e-08 6.5670612e-09
200 1.7089493 -6.911283 -6.8876468 248.98142 1.4096463e-08 1.1685863e-08
210 1.9378716 -6.9144493 -6.8876469 242.77289 1.4008978e-08 1.1226902e-08
220 2.2429731 -6.9186692 -6.887647 234.55055 1.3886901e-08 9.9914102e-09
230 2.606862 -6.9237023 -6.8876472 224.77626 1.3864576e-08 1.1540228e-08
240 3.0111524 -6.9292941 -6.8876474 213.93996 1.3696314e-08 1.1697747e-08
250 3.4373794 -6.9351893 -6.8876475 202.53583 1.3626701e-08 1.0398197e-08
260 3.8678047 -6.9411426 -6.8876476 191.04084 1.3489489e-08 6.6603364e-09
270 4.2860853 -6.9469279 -6.8876478 179.89646 1.3312014e-08 1.1687917e-08
280 4.6777954 -6.9523457 -6.8876479 169.49404 1.3081144e-08 1.1336675e-08
290 5.030805 -6.9572282 -6.887648 160.16371 1.2947385e-08 1.7342825e-08
300 5.3355278 -6.9614428 -6.887648 152.16682 1.2893673e-08 1.7510534e-08
310 5.5850532 -6.964894 -6.887648 145.69148 1.2842022e-08 1.2782546e-08
320 5.7751794 -6.9675236 -6.8876481 140.85102 1.2903488e-08 1.5319437e-08
330 5.9043601 -6.9693103 -6.887648 137.68497 1.3076809e-08 1.1208999e-08
340 5.9735784 -6.9702676 -6.887648 136.16232 1.3296904e-08 1.891087e-08
350 5.9861549 -6.9704415 -6.887648 136.18679 1.3504051e-08 2.5783601e-08
360 5.947496 -6.9699067 -6.8876479 137.60397 1.3731112e-08 2.0556839e-08
370 5.8647874 -6.9687627 -6.8876478 140.2101 1.4009878e-08 2.1771736e-08
380 5.7466376 -6.9671285 -6.8876477 143.76234 1.4092054e-08 1.1085162e-08
390 5.6026773 -6.9651374 -6.8876477 147.99019 1.4282872e-08 2.0221602e-08
400 5.4431231 -6.9629305 -6.8876476 152.60787 1.4317739e-08 1.7076065e-08
410 5.2783192 -6.960651 -6.8876475 157.32722 1.4415075e-08 2.5031776e-08
420 5.1182723 -6.9584374 -6.8876474 161.87063 1.4441435e-08 2.2519289e-08
430 4.9722 -6.956417 -6.8876473 165.98344 1.4550624e-08 2.4512613e-08
440 4.8481153 -6.9547008 -6.8876473 169.44527 1.4544672e-08 1.4758301e-08
450 4.7524707 -6.9533779 -6.8876472 172.07964 1.4546492e-08 1.324687e-08
460 4.6898817 -6.9525122 -6.8876472 173.76132 1.4537475e-08 1.351367e-08
470 4.6629495 -6.9521397 -6.8876472 174.42109 1.4530458e-08 1.521106e-08
480 4.6721922 -6.9522675 -6.8876472 174.04742 1.4543785e-08 1.0905422e-08
490 4.7160887 -6.9528747 -6.8876473 172.68525 1.4545591e-08 2.0128525e-08
500 4.7912313 -6.953914 -6.8876473 170.43183 1.4438981e-08 1.6062775e-08
Loop time of 0.837333 on 1 procs for 500 steps with 108 atoms
Performance: 51.592 ns/day, 0.465 hours/ns, 597.134 timesteps/s
99.8% CPU use with 1 MPI tasks x no OpenMP threads
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 0.0097726 | 0.0097726 | 0.0097726 | 0.0 | 1.17
Neigh | 0.03095 | 0.03095 | 0.03095 | 0.0 | 3.70
Comm | 0.005564 | 0.005564 | 0.005564 | 0.0 | 0.66
Output | 0.0042451 | 0.0042451 | 0.0042451 | 0.0 | 0.51
Modify | 0.78618 | 0.78618 | 0.78618 | 0.0 | 93.89
Other | | 0.0006258 | | | 0.07
Nlocal: 108 ave 108 max 108 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Nghost: 558 ave 558 max 558 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Neighs: 972 ave 972 max 972 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Total # of neighbors = 972
Ave neighs/atom = 9
Neighbor list builds = 500
Dangerous builds not checked
Total wall time: 0:00:00

View File

@ -0,0 +1,175 @@
LAMMPS (7 Jan 2022)
# Numerical difference calculation
# of error in forces and virial stress
# adjustable parameters
variable nsteps index 500 # length of run
variable nthermo index 10 # thermo output interval
variable ndump index 500 # dump output interval
variable nlat index 3 # size of box
variable fdelta index 1.0e-4 # displacement size
variable vdelta index 1.0e-6 # strain size
variable temp index 10.0 # temperature
units metal
atom_style atomic
atom_modify map yes
lattice fcc 5.358000
Lattice spacing in x,y,z = 5.358 5.358 5.358
region box block 0 ${nlat} 0 ${nlat} 0 ${nlat}
region box block 0 3 0 ${nlat} 0 ${nlat}
region box block 0 3 0 3 0 ${nlat}
region box block 0 3 0 3 0 3
create_box 1 box
Created orthogonal box = (0 0 0) to (16.074 16.074 16.074)
1 by 2 by 2 MPI processor grid
create_atoms 1 box
Created 108 atoms
using lattice units in orthogonal box = (0 0 0) to (16.074 16.074 16.074)
create_atoms CPU = 0.000 seconds
mass 1 39.903
velocity all create ${temp} 2357 mom yes dist gaussian
velocity all create 10.0 2357 mom yes dist gaussian
pair_style lj/cubic
pair_coeff * * 0.0102701 3.42
neighbor 0.0 bin
neigh_modify every 1 delay 0 check no
timestep 0.001
fix nve all nve
# define numerical force calculation
fix numforce all numdiff ${nthermo} ${fdelta}
fix numforce all numdiff 10 ${fdelta}
fix numforce all numdiff 10 1.0e-4
variable ferrx atom f_numforce[1]-fx
variable ferry atom f_numforce[2]-fy
variable ferrz atom f_numforce[3]-fz
variable ferrsq atom v_ferrx^2+v_ferry^2+v_ferrz^2
compute faverrsq all reduce ave v_ferrsq
variable fsq atom fx^2+fy^2+fz^2
compute favsq all reduce ave v_fsq
variable frelerr equal sqrt(c_faverrsq/c_favsq)
dump errors all custom ${ndump} force_error.dump v_ferrx v_ferry v_ferrz
dump errors all custom 500 force_error.dump v_ferrx v_ferry v_ferrz
# define numerical virial stress tensor calculation
compute myvirial all pressure NULL virial
fix numvirial all numdiff/virial ${nthermo} ${vdelta}
fix numvirial all numdiff/virial 10 ${vdelta}
fix numvirial all numdiff/virial 10 1.0e-6
variable errxx equal f_numvirial[1]-c_myvirial[1]
variable erryy equal f_numvirial[2]-c_myvirial[2]
variable errzz equal f_numvirial[3]-c_myvirial[3]
variable erryz equal f_numvirial[4]-c_myvirial[6]
variable errxz equal f_numvirial[5]-c_myvirial[5]
variable errxy equal f_numvirial[6]-c_myvirial[4]
variable verrsq equal "v_errxx^2 + v_erryy^2 + v_errzz^2 + v_erryz^2 + v_errxz^2 + v_errxy^2"
variable vsq equal "c_myvirial[1]^2 + c_myvirial[3]^2 + c_myvirial[3]^2 + c_myvirial[4]^2 + c_myvirial[5]^2 + c_myvirial[6]^2"
variable vrelerr equal sqrt(v_verrsq/v_vsq)
thermo_style custom step temp pe etotal press v_frelerr v_vrelerr
thermo ${nthermo}
thermo 10
run ${nsteps}
run 500
generated 0 of 0 mixed pair_coeff terms from geometric mixing rule
Neighbor list info ...
update every 1 steps, delay 0 steps, check no
max neighbors/atom: 2000, page size: 100000
master list distance cutoff = 5.9407173
ghost atom cutoff = 5.9407173
binsize = 2.9703587, bins = 6 6 6
1 neighbor lists, perpetual/occasional/extra = 1 0 0
(1) pair lj/cubic, perpetual
attributes: half, newton on
pair build: half/bin/atomonly/newton
stencil: half/bin/3d
bin: standard
Per MPI rank memory allocation (min/avg/max) = 6.067 | 6.067 | 6.067 Mbytes
Step Temp PotEng TotEng Press v_frelerr v_vrelerr
0 10 -7.0259569 -6.8876486 28.564278 10664.391 9.1481187e-08
10 9.9388179 -7.0251107 -6.8876486 30.21736 1.4771865e-08 1.3452512e-07
20 9.7572185 -7.022599 -6.8876485 35.123527 1.437525e-08 8.0966999e-07
30 9.4606673 -7.0184974 -6.8876484 43.132052 1.4375468e-08 1.990012e-08
40 9.0579092 -7.0129268 -6.8876483 54.000927 1.4350331e-08 1.7239028e-08
50 8.5607685 -7.0060508 -6.8876482 67.403151 1.4353284e-08 7.813181e-09
60 7.9838726 -6.9980717 -6.8876481 82.935358 1.4398078e-08 2.022316e-08
70 7.3442875 -6.9892255 -6.8876479 100.12892 1.434409e-08 7.5938179e-09
80 6.6610579 -6.9797757 -6.8876477 118.46358 1.4324787e-08 7.1972571e-09
90 5.9546462 -6.9700053 -6.8876476 137.38365 1.4322718e-08 4.3978378e-09
100 5.2462727 -6.9602077 -6.8876474 156.31651 1.4273172e-08 4.6728038e-09
110 4.5571706 -6.9506767 -6.8876472 174.69294 1.4266163e-08 3.522225e-09
120 3.9077807 -6.9416949 -6.887647 191.96859 1.42241e-08 3.5357511e-09
130 3.3169241 -6.9335227 -6.8876469 207.64566 1.4203813e-08 2.5182488e-09
140 2.8010028 -6.926387 -6.8876468 221.29333 1.4164215e-08 2.3112509e-09
150 2.3732854 -6.9204712 -6.8876467 232.5658 1.4134122e-08 1.9368963e-09
160 2.0433329 -6.9159076 -6.8876466 241.21647 1.4095473e-08 3.6806452e-09
170 1.8166184 -6.912772 -6.8876466 247.10715 1.4049531e-08 2.5319322e-09
180 1.6943727 -6.9110813 -6.8876467 250.21143 1.3997912e-08 1.952404e-09
190 1.6736731 -6.910795 -6.8876467 250.61203 1.3915487e-08 1.4271767e-09
200 1.7477659 -6.9118199 -6.8876468 248.49223 1.3850618e-08 2.4515718e-09
210 1.9065921 -6.9140167 -6.8876469 244.12226 1.3747916e-08 1.7957531e-09
220 2.1374676 -6.91721 -6.887647 237.84173 1.3674779e-08 2.6613511e-09
230 2.4258607 -6.9211989 -6.8876472 230.0395 1.3565712e-08 3.0777067e-09
240 2.7562034 -6.9257679 -6.8876473 221.13265 1.3440442e-08 1.7111501e-09
250 3.1126827 -6.9306984 -6.8876474 211.54566 1.3270914e-08 1.6690112e-09
260 3.4799641 -6.9357784 -6.8876476 201.69126 1.3105092e-08 2.1637558e-09
270 3.8438148 -6.9408108 -6.8876477 191.95361 1.2962846e-08 4.4613506e-09
280 4.191607 -6.9456212 -6.8876478 182.6745 1.2846383e-08 3.3730203e-09
290 4.5126922 -6.9500621 -6.8876478 174.14285 1.2710692e-08 2.2809889e-09
300 4.7986487 -6.9540172 -6.8876479 166.58747 1.2657778e-08 6.9880891e-09
310 5.0434083 -6.9574025 -6.8876479 160.17316 1.266381e-08 4.2486217e-09
320 5.243275 -6.9601668 -6.8876479 154.99974 1.279856e-08 5.1505673e-09
330 5.3968455 -6.9622908 -6.8876479 151.1038 1.2981831e-08 3.3339333e-09
340 5.5048468 -6.9637845 -6.8876479 148.46296 1.3159021e-08 1.7881393e-09
350 5.569902 -6.9646843 -6.8876479 147.00205 1.3439465e-08 5.6876219e-09
360 5.5962378 -6.9650485 -6.8876478 146.60113 1.3645943e-08 7.233847e-09
370 5.5893468 -6.9649531 -6.8876478 147.10471 1.3829581e-08 4.5514318e-09
380 5.5556199 -6.9644866 -6.8876477 148.33195 1.4005893e-08 4.2971846e-09
390 5.5019639 -6.9637444 -6.8876476 150.08725 1.4157454e-08 3.3564262e-09
400 5.4354239 -6.962824 -6.8876476 152.17073 1.4226422e-08 4.2393923e-09
410 5.3628267 -6.9618199 -6.8876475 154.38825 1.4302679e-08 3.8937698e-09
420 5.2904639 -6.960819 -6.8876475 156.56034 1.4381099e-08 4.315875e-09
430 5.2238282 -6.9598973 -6.8876474 158.52969 1.4426567e-08 4.2658185e-09
440 5.1674149 -6.9591171 -6.8876474 160.16704 1.4453381e-08 5.7055268e-09
450 5.1245913 -6.9585248 -6.8876474 161.37513 1.4449488e-08 4.4308801e-09
460 5.0975361 -6.9581506 -6.8876474 162.09077 1.4445596e-08 5.8269923e-09
470 5.0872416 -6.9580082 -6.8876474 162.28517 1.4444348e-08 4.8263194e-09
480 5.0935712 -6.9580957 -6.8876474 161.96268 1.4411666e-08 6.222228e-09
490 5.115362 -6.9583971 -6.8876474 161.15816 1.4369716e-08 3.3926077e-09
500 5.1505605 -6.958884 -6.8876474 159.9333 1.4288515e-08 3.8845251e-09
Loop time of 0.252598 on 4 procs for 500 steps with 108 atoms
Performance: 171.023 ns/day, 0.140 hours/ns, 1979.430 timesteps/s
99.8% CPU use with 4 MPI tasks x no OpenMP threads
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 0.0021545 | 0.0022845 | 0.0023794 | 0.2 | 0.90
Neigh | 0.0063887 | 0.0067604 | 0.0069752 | 0.3 | 2.68
Comm | 0.01048 | 0.010916 | 0.011408 | 0.3 | 4.32
Output | 0.0026603 | 0.0027399 | 0.0029738 | 0.3 | 1.08
Modify | 0.2295 | 0.22952 | 0.22954 | 0.0 | 90.86
Other | | 0.0003814 | | | 0.15
Nlocal: 27 ave 29 max 25 min
Histogram: 1 0 1 0 0 0 0 1 0 1
Nghost: 325 ave 327 max 323 min
Histogram: 1 0 1 0 0 0 0 1 0 1
Neighs: 243 ave 273 max 228 min
Histogram: 1 1 1 0 0 0 0 0 0 1
Total # of neighbors = 972
Ave neighs/atom = 9
Neighbor list builds = 500
Dangerous builds not checked
Total wall time: 0:00:00

View File

@ -21,17 +21,17 @@ namespace LAMMPS_NS {
class AngleZero2 : public Angle {
public:
AngleZero2(class LAMMPS *);
virtual ~AngleZero2();
virtual void compute(int, int);
virtual void coeff(int, char **);
virtual void settings(int, char **);
~AngleZero2() override;
void compute(int, int) override;
void coeff(int, char **) override;
void settings(int, char **) override;
double equilibrium_angle(int);
void write_restart(FILE *);
void read_restart(FILE *);
void write_data(FILE *);
double equilibrium_angle(int) override;
void write_restart(FILE *) override;
void read_restart(FILE *) override;
void write_data(FILE *) override;
double single(int, int, int, int);
double single(int, int, int, int) override;
protected:
double *theta0;

View File

@ -21,18 +21,18 @@ namespace LAMMPS_NS {
class BondZero2 : public Bond {
public:
BondZero2(class LAMMPS *);
virtual ~BondZero2();
virtual void compute(int, int);
virtual void settings(int, char **);
~BondZero2() override;
void compute(int, int) override;
void settings(int, char **) override;
void coeff(int, char **);
double equilibrium_distance(int);
void write_restart(FILE *);
void read_restart(FILE *);
void write_data(FILE *);
void coeff(int, char **) override;
double equilibrium_distance(int) override;
void write_restart(FILE *) override;
void read_restart(FILE *) override;
void write_data(FILE *) override;
double single(int, double, int, int, double &);
virtual void *extract(const char *, int &);
double single(int, double, int, int, double &) override;
void *extract(const char *, int &) override;
protected:
double *r0;

View File

@ -25,14 +25,14 @@ namespace LAMMPS_NS {
class DihedralZero2 : public Dihedral {
public:
DihedralZero2(class LAMMPS *);
virtual ~DihedralZero2();
virtual void compute(int, int);
virtual void coeff(int, char **);
virtual void settings(int, char **);
~DihedralZero2() override;
void compute(int, int) override;
void coeff(int, char **) override;
void settings(int, char **) override;
void write_restart(FILE *);
void read_restart(FILE *);
void write_data(FILE *);
void write_restart(FILE *) override;
void read_restart(FILE *) override;
void write_data(FILE *) override;
protected:
int coeffflag;

View File

@ -11,12 +11,6 @@
See the README file in the top-level LAMMPS directory.
------------------------------------------------------------------------- */
#ifdef FIX_CLASS
FixStyle(nve2, FixNVE2)
#else
#ifndef LMP_FIX_NVE2_H
#define LMP_FIX_NVE2_H
@ -27,14 +21,14 @@ namespace LAMMPS_NS {
class FixNVE2 : public Fix {
public:
FixNVE2(class LAMMPS *, int, char **);
virtual ~FixNVE2() {}
int setmask();
virtual void init();
virtual void initial_integrate(int);
virtual void final_integrate();
virtual void initial_integrate_respa(int, int, int);
virtual void final_integrate_respa(int, int);
virtual void reset_dt();
int setmask() override;
void init() override;
void initial_integrate(int) override;
void final_integrate() override;
void initial_integrate_respa(int, int, int) override;
void final_integrate_respa(int, int) override;
void reset_dt() override;
protected:
double dtv, dtf;
@ -44,7 +38,6 @@ class FixNVE2 : public Fix {
} // namespace LAMMPS_NS
#endif
#endif
/* ERROR/WARNING messages:

View File

@ -21,14 +21,14 @@ namespace LAMMPS_NS {
class ImproperZero2 : public Improper {
public:
ImproperZero2(class LAMMPS *);
virtual ~ImproperZero2();
virtual void compute(int, int);
virtual void coeff(int, char **);
virtual void settings(int, char **);
~ImproperZero2() override;
void compute(int, int) override;
void coeff(int, char **) override;
void settings(int, char **) override;
void write_restart(FILE *);
void read_restart(FILE *);
void write_data(FILE *);
void write_restart(FILE *) override;
void read_restart(FILE *) override;
void write_data(FILE *) override;
protected:
int coeffflag;

View File

@ -21,20 +21,20 @@ namespace LAMMPS_NS {
class PairMorse2 : public Pair {
public:
PairMorse2(class LAMMPS *);
virtual ~PairMorse2();
virtual void compute(int, int);
~PairMorse2() override;
void compute(int, int) override;
void settings(int, char **);
void coeff(int, char **);
double init_one(int, int);
void write_restart(FILE *);
void read_restart(FILE *);
void write_restart_settings(FILE *);
void read_restart_settings(FILE *);
void write_data(FILE *);
void write_data_all(FILE *);
double single(int, int, int, int, double, double, double, double &);
void *extract(const char *, int &);
void settings(int, char **) override;
void coeff(int, char **) override;
double init_one(int, int) override;
void write_restart(FILE *) override;
void read_restart(FILE *) override;
void write_restart_settings(FILE *) override;
void read_restart_settings(FILE *) override;
void write_data(FILE *) override;
void write_data_all(FILE *) override;
double single(int, int, int, int, double, double, double, double &) override;
void *extract(const char *, int &) override;
protected:
double cut_global;

View File

@ -28,8 +28,8 @@ class PairMorse2OMP : public PairMorse2, public ThrOMP {
public:
PairMorse2OMP(class LAMMPS *);
virtual void compute(int, int);
virtual double memory_usage();
void compute(int, int) override;
double memory_usage() override;
private:
template <int EVFLAG, int EFLAG, int NEWTON_PAIR>

View File

@ -31,19 +31,19 @@ namespace LAMMPS_NS {
class PairZero2 : public Pair {
public:
PairZero2(class LAMMPS *);
virtual ~PairZero2();
virtual void compute(int, int);
virtual void compute_outer(int, int);
void settings(int, char **);
void coeff(int, char **);
double init_one(int, int);
void write_restart(FILE *);
void read_restart(FILE *);
void write_restart_settings(FILE *);
void read_restart_settings(FILE *);
void write_data(FILE *);
void write_data_all(FILE *);
double single(int, int, int, int, double, double, double, double &);
~PairZero2() override;
void compute(int, int) override;
void compute_outer(int, int) override;
void settings(int, char **) override;
void coeff(int, char **) override;
double init_one(int, int) override;
void write_restart(FILE *) override;
void read_restart(FILE *) override;
void write_restart_settings(FILE *) override;
void read_restart_settings(FILE *) override;
void write_data(FILE *) override;
void write_data_all(FILE *) override;
double single(int, int, int, int, double, double, double, double &) override;
protected:
double cut_global;

View File

@ -30,12 +30,12 @@ class DumpAtomADIOS : public DumpAtom {
public:
DumpAtomADIOS(class LAMMPS *, int, char **);
virtual ~DumpAtomADIOS();
~DumpAtomADIOS() override;
protected:
virtual void openfile();
virtual void write();
virtual void init_style();
void openfile() override;
void write() override;
void init_style() override;
private:
DumpAtomADIOSInternal *internal;

View File

@ -29,12 +29,12 @@ class DumpCustomADIOSInternal;
class DumpCustomADIOS : public DumpCustom {
public:
DumpCustomADIOS(class LAMMPS *, int, char **);
virtual ~DumpCustomADIOS();
~DumpCustomADIOS() override;
protected:
virtual void openfile();
virtual void write();
virtual void init_style();
void openfile() override;
void write() override;
void init_style() override;
private:
DumpCustomADIOSInternal *internal;

View File

@ -34,18 +34,18 @@ class ReadADIOSInternal;
class ReaderADIOS : public Reader {
public:
ReaderADIOS(class LAMMPS *);
virtual ~ReaderADIOS();
~ReaderADIOS() override;
virtual void settings(int, char **);
void settings(int, char **) override;
virtual int read_time(bigint &);
virtual void skip();
virtual bigint read_header(double[3][3], int &, int &, int, int, int *, char **, int, int, int &,
int &, int &, int &);
virtual void read_atoms(int, int, double **);
int read_time(bigint &) override;
void skip() override;
bigint read_header(double[3][3], int &, int &, int, int, int *, char **, int, int, int &,
int &, int &, int &) override;
void read_atoms(int, int, double **) override;
virtual void open_file(const char *);
virtual void close_file();
void open_file(const char *) override;
void close_file() override;
private:
int *fieldindex; // mapping of input fields to dump

View File

@ -27,8 +27,8 @@ namespace LAMMPS_NS {
class ComputeERotateAsphere : public Compute {
public:
ComputeERotateAsphere(class LAMMPS *, int, char **);
void init();
double compute_scalar();
void init() override;
double compute_scalar() override;
private:
double pfactor;

View File

@ -27,16 +27,16 @@ namespace LAMMPS_NS {
class ComputeTempAsphere : public Compute {
public:
ComputeTempAsphere(class LAMMPS *, int, char **);
~ComputeTempAsphere();
void init();
void setup();
double compute_scalar();
void compute_vector();
~ComputeTempAsphere() override;
void init() override;
void setup() override;
double compute_scalar() override;
void compute_vector() override;
void remove_bias(int, double *);
void restore_bias(int, double *);
void remove_bias_thr(int, double *, double *);
void restore_bias_thr(int, double *, double *);
void remove_bias(int, double *) override;
void restore_bias(int, double *) override;
void remove_bias_thr(int, double *, double *) override;
void restore_bias_thr(int, double *, double *) override;
private:
int mode;

View File

@ -21,16 +21,15 @@ namespace LAMMPS_NS {
class FixNHAsphere : public FixNH {
public:
FixNHAsphere(class LAMMPS *, int, char **);
virtual ~FixNHAsphere() {}
void init();
void init() override;
protected:
double dtq;
class AtomVecEllipsoid *avec;
void nve_v();
void nve_x();
void nh_v_temp();
void nve_v() override;
void nve_x() override;
void nh_v_temp() override;
};
} // namespace LAMMPS_NS

View File

@ -27,7 +27,6 @@ namespace LAMMPS_NS {
class FixNPHAsphere : public FixNHAsphere {
public:
FixNPHAsphere(class LAMMPS *, int, char **);
~FixNPHAsphere() {}
};
} // namespace LAMMPS_NS

View File

@ -27,7 +27,6 @@ namespace LAMMPS_NS {
class FixNPTAsphere : public FixNHAsphere {
public:
FixNPTAsphere(class LAMMPS *, int, char **);
~FixNPTAsphere() {}
};
} // namespace LAMMPS_NS

View File

@ -27,9 +27,9 @@ namespace LAMMPS_NS {
class FixNVEAsphere : public FixNVE {
public:
FixNVEAsphere(class LAMMPS *, int, char **);
void init();
void initial_integrate(int);
void final_integrate();
void init() override;
void initial_integrate(int) override;
void final_integrate() override;
private:
double dtq;

View File

@ -27,8 +27,8 @@ namespace LAMMPS_NS {
class FixNVEAsphereNoforce : public FixNVENoforce {
public:
FixNVEAsphereNoforce(class LAMMPS *, int, char **);
void initial_integrate(int);
void init();
void initial_integrate(int) override;
void init() override;
private:
double dtq;

View File

@ -27,11 +27,10 @@ namespace LAMMPS_NS {
class FixNVELine : public FixNVE {
public:
FixNVELine(class LAMMPS *, int, char **);
~FixNVELine() {}
int setmask();
void init();
void initial_integrate(int);
void final_integrate();
int setmask() override;
void init() override;
void initial_integrate(int) override;
void final_integrate() override;
private:
double MINUSPI, TWOPI;

View File

@ -27,11 +27,10 @@ namespace LAMMPS_NS {
class FixNVETri : public FixNVE {
public:
FixNVETri(class LAMMPS *, int, char **);
~FixNVETri() {}
int setmask();
void init();
void initial_integrate(int);
void final_integrate();
int setmask() override;
void init() override;
void initial_integrate(int) override;
void final_integrate() override;
private:
double dtq;

View File

@ -27,7 +27,6 @@ namespace LAMMPS_NS {
class FixNVTAsphere : public FixNHAsphere {
public:
FixNVTAsphere(class LAMMPS *, int, char **);
~FixNVTAsphere() {}
};
} // namespace LAMMPS_NS

View File

@ -27,18 +27,18 @@ namespace LAMMPS_NS {
class PairGayBerne : public Pair {
public:
PairGayBerne(LAMMPS *lmp);
virtual ~PairGayBerne();
virtual void compute(int, int);
virtual void settings(int, char **);
void coeff(int, char **);
virtual void init_style();
double init_one(int, int);
void write_restart(FILE *);
void read_restart(FILE *);
void write_restart_settings(FILE *);
void read_restart_settings(FILE *);
void write_data(FILE *);
void write_data_all(FILE *);
~PairGayBerne() override;
void compute(int, int) override;
void settings(int, char **) override;
void coeff(int, char **) override;
void init_style() override;
double init_one(int, int) override;
void write_restart(FILE *) override;
void read_restart(FILE *) override;
void write_restart_settings(FILE *) override;
void read_restart_settings(FILE *) override;
void write_data(FILE *) override;
void write_data_all(FILE *) override;
protected:
enum { SPHERE_SPHERE, SPHERE_ELLIPSE, ELLIPSE_SPHERE, ELLIPSE_ELLIPSE };

View File

@ -27,12 +27,12 @@ namespace LAMMPS_NS {
class PairLineLJ : public Pair {
public:
PairLineLJ(class LAMMPS *);
virtual ~PairLineLJ();
virtual void compute(int, int);
void settings(int, char **);
void coeff(int, char **);
virtual void init_style();
double init_one(int, int);
~PairLineLJ() override;
void compute(int, int) override;
void settings(int, char **) override;
void coeff(int, char **) override;
void init_style() override;
double init_one(int, int) override;
protected:
double cut_global;

View File

@ -27,16 +27,16 @@ namespace LAMMPS_NS {
class PairRESquared : public Pair {
public:
PairRESquared(LAMMPS *lmp);
virtual ~PairRESquared();
virtual void compute(int, int);
void settings(int, char **);
void coeff(int, char **);
virtual void init_style();
double init_one(int, int);
void write_restart(FILE *);
void read_restart(FILE *);
void write_restart_settings(FILE *);
void read_restart_settings(FILE *);
~PairRESquared() override;
void compute(int, int) override;
void settings(int, char **) override;
void coeff(int, char **) override;
void init_style() override;
double init_one(int, int) override;
void write_restart(FILE *) override;
void read_restart(FILE *) override;
void write_restart_settings(FILE *) override;
void read_restart_settings(FILE *) override;
protected:
enum { SPHERE_SPHERE, SPHERE_ELLIPSE, ELLIPSE_SPHERE, ELLIPSE_ELLIPSE };

View File

@ -27,12 +27,12 @@ namespace LAMMPS_NS {
class PairTriLJ : public Pair {
public:
PairTriLJ(class LAMMPS *);
virtual ~PairTriLJ();
virtual void compute(int, int);
void settings(int, char **);
void coeff(int, char **);
virtual void init_style();
double init_one(int, int);
~PairTriLJ() override;
void compute(int, int) override;
void settings(int, char **) override;
void coeff(int, char **) override;
void init_style() override;
double init_one(int, int) override;
protected:
double cut_global;

View File

@ -37,91 +37,91 @@ class FixATC : public Fix {
public:
/** constructor & destructor */
FixATC(class LAMMPS *, int, char **);
~FixATC();
~FixATC() override;
/** initialization functions */
void init();
void init_list(int id, NeighList *ptr);
void setup(int vflag);
void min_setup(int vflag);
void init() override;
void init_list(int id, NeighList *ptr) override;
void setup(int vflag) override;
void min_setup(int vflag) override;
/** setmask: tell LAMMPS which fix methods to call */
int setmask();
int setmask() override;
/** initial_integrate */
void initial_integrate(int vflag);
void initial_integrate(int vflag) override;
/** after first integrate phase */
void post_integrate();
void post_integrate() override;
/** final_integrate */
void final_integrate();
void final_integrate() override;
/** end of step for run or minimize */
void end_of_step();
void end_of_step() override;
/** pre_exchange is used to modify fix-specific data
and is called before domain->pbc() and comm->exchange(). */
void setup_pre_exchange();
void pre_exchange();
void min_pre_exchange();
void setup_pre_exchange() override;
void pre_exchange() override;
void min_pre_exchange() override;
double memory_usage();
void grow_arrays(int);
void copy_arrays(int, int, int);
double memory_usage() override;
void grow_arrays(int) override;
void copy_arrays(int, int, int) override;
/** pack_exchange called from atom_vec->pack_exchange()
and packs fix-specific data for a given real (local)
atom being sent to another processor. */
int pack_exchange(int, double *);
int pack_exchange(int, double *) override;
/** unpack_exchange called from atom_vec->unpack_exchange()
and unpacks fix-specific data for a given real (local)
atom received from another processor. */
int unpack_exchange(int, double *);
int unpack_exchange(int, double *) override;
/** pack_comm called from comm->forward_comm_fix and
packs fix-specific data for a given ghost atom
from exchange with another proc */
int pack_forward_comm(int, int *, double *, int, int *);
int pack_forward_comm(int, int *, double *, int, int *) override;
/** unpack_comm called from comm->forward_comm_fix and
unpacks fix-specific data for a given ghost atom
from exchange with another proc */
void unpack_forward_comm(int, int, double *);
void unpack_forward_comm(int, int, double *) override;
/** pre_neighbor is used to modify fix-specific data
and is called before neighbor list is built in
neighbor->build(). */
void pre_neighbor();
void setup_pre_neighbor();
void pre_neighbor() override;
void setup_pre_neighbor() override;
/** pre/post_force is used to modify fix-specific data
and is before/after the various force computations. */
void pre_force(int vflag);
void post_force(int vflag);
void pre_force(int vflag) override;
void post_force(int vflag) override;
/** post_run is called after a run completes */
void post_run();
void post_run() override;
/** min_pre_force is called before forces are calculated in minimize */
void min_pre_force(int vflag);
void min_pre_force(int vflag) override;
/** min_post_force is called after forces are calculated in minimize */
void min_post_force(int vflag);
void min_post_force(int vflag) override;
/** modify atc parameters (parser) */
int modify_param(int narg, char **arg);
int modify_param(int narg, char **arg) override;
/** calls ATC_Method to handle restarting/checkpointing */
/** these four methods are for writing per-atom quantities */
int pack_restart(int, double *);
void unpack_restart(int, int);
int size_restart(int);
int maxsize_restart();
int pack_restart(int, double *) override;
void unpack_restart(int, int) override;
int size_restart(int) override;
int maxsize_restart() override;
/** these two methods are for writing all other quantities */
void write_restart(FILE *);
void restart(char *);
void write_restart(FILE *) override;
void restart(char *) override;
/** accessor function for ATC_Method class pointer */
const ATC::ATC_Method *atc() { return atc_; }
@ -130,9 +130,9 @@ class FixATC : public Fix {
LAMMPS *lammps_;
/** functions for "thermo" output */
virtual double compute_scalar();
virtual double compute_vector(int n);
virtual double compute_array(int irow, int icol);
double compute_scalar() override;
double compute_vector(int n) override;
double compute_array(int irow, int icol) override;
double dtv, dtf;
ATC::ATC_Method *atc_;
};

View File

@ -28,12 +28,12 @@ class AtomVecWavepacket : public AtomVec {
public:
AtomVecWavepacket(class LAMMPS *);
void grow_pointers();
void force_clear(int, size_t);
void create_atom_post(int);
void data_atom_post(int);
int property_atom(char *);
void pack_property_atom(int, double *, int, int);
void grow_pointers() override;
void force_clear(int, size_t) override;
void create_atom_post(int) override;
void data_atom_post(int) override;
int property_atom(char *) override;
void pack_property_atom(int, double *, int, int) override;
private:
int *spin;

View File

@ -31,13 +31,13 @@ namespace LAMMPS_NS {
class FixNVEAwpmd : public Fix {
public:
FixNVEAwpmd(class LAMMPS *, int, char **);
int setmask();
virtual void init();
virtual void initial_integrate(int);
virtual void final_integrate();
void initial_integrate_respa(int, int, int);
void final_integrate_respa(int, int);
void reset_dt();
int setmask() override;
void init() override;
void initial_integrate(int) override;
void final_integrate() override;
void initial_integrate_respa(int, int, int) override;
void final_integrate_respa(int, int) override;
void reset_dt() override;
protected:
double dtv, dtf;

View File

@ -34,22 +34,22 @@ class PairAWPMDCut : public Pair {
public:
PairAWPMDCut(class LAMMPS *);
virtual ~PairAWPMDCut();
virtual void compute(int, int);
virtual void settings(int, char **);
void coeff(int, char **);
void init_style();
~PairAWPMDCut() override;
void compute(int, int) override;
void settings(int, char **) override;
void coeff(int, char **) override;
void init_style() override;
void min_pointers(double **, double **);
double init_one(int, int);
void write_restart(FILE *);
void read_restart(FILE *);
virtual void write_restart_settings(FILE *);
virtual void read_restart_settings(FILE *);
double init_one(int, int) override;
void write_restart(FILE *) override;
void read_restart(FILE *) override;
void write_restart_settings(FILE *) override;
void read_restart_settings(FILE *) override;
void min_xf_pointers(int, double **, double **);
void min_xf_get(int);
void min_x_set(int);
double memory_usage();
void min_xf_pointers(int, double **, double **) override;
void min_xf_get(int) override;
void min_x_set(int) override;
double memory_usage() override;
private:
int flexible_pressure_flag;

View File

@ -38,11 +38,11 @@ const int NUM_CUBIC_SPLINE_COLUMNS = 5; // cubic spline columns passed to co
class ComputePressureBocs : public Compute {
public:
ComputePressureBocs(class LAMMPS *, int, char **);
virtual ~ComputePressureBocs();
virtual void init();
virtual double compute_scalar();
virtual void compute_vector();
void reset_extra_compute_fix(const char *);
~ComputePressureBocs() override;
void init() override;
double compute_scalar() override;
void compute_vector() override;
void reset_extra_compute_fix(const char *) override;
double compute_cg_scalar();
double get_cg_p_corr(int, double *, int, double, double);

View File

@ -30,26 +30,26 @@ namespace LAMMPS_NS {
class FixBocs : public Fix {
public:
FixBocs(class LAMMPS *, int, char **); // MRD NJD
virtual ~FixBocs(); // MRD NJD
int setmask();
virtual void init();
virtual void setup(int);
virtual void initial_integrate(int);
virtual void final_integrate();
void initial_integrate_respa(int, int, int);
void pre_force_respa(int, int, int);
void final_integrate_respa(int, int);
virtual void pre_exchange();
double compute_scalar();
virtual double compute_vector(int);
void write_restart(FILE *);
~FixBocs() override; // MRD NJD
int setmask() override;
void init() override;
void setup(int) override;
void initial_integrate(int) override;
void final_integrate() override;
void initial_integrate_respa(int, int, int) override;
void pre_force_respa(int, int, int) override;
void final_integrate_respa(int, int) override;
void pre_exchange() override;
double compute_scalar() override;
double compute_vector(int) override;
void write_restart(FILE *) override;
virtual int pack_restart_data(double *); // pack restart data
virtual void restart(char *);
int modify_param(int, char **);
void reset_target(double);
void reset_dt();
virtual void *extract(const char *, int &);
double memory_usage();
void restart(char *) override;
int modify_param(int, char **) override;
void reset_target(double) override;
void reset_dt() override;
void *extract(const char *, int &) override;
double memory_usage() override;
protected:
int dimension, which;

View File

@ -28,21 +28,21 @@ namespace LAMMPS_NS {
class BodyNparticle : public Body {
public:
BodyNparticle(class LAMMPS *, int, char **);
~BodyNparticle();
~BodyNparticle() override;
int nsub(struct AtomVecBody::Bonus *);
double *coords(struct AtomVecBody::Bonus *);
int pack_border_body(struct AtomVecBody::Bonus *, double *);
int unpack_border_body(struct AtomVecBody::Bonus *, double *);
void data_body(int, int, int, int *, double *);
int pack_data_body(tagint, int, double *);
int write_data_body(FILE *, double *);
double radius_body(int, int, int *, double *);
int pack_border_body(struct AtomVecBody::Bonus *, double *) override;
int unpack_border_body(struct AtomVecBody::Bonus *, double *) override;
void data_body(int, int, int, int *, double *) override;
int pack_data_body(tagint, int, double *) override;
int write_data_body(FILE *, double *) override;
double radius_body(int, int, int *, double *) override;
int noutrow(int);
int noutcol();
void output(int, int, double *);
int image(int, double, double, int *&, double **&);
int noutrow(int) override;
int noutcol() override;
void output(int, int, double *) override;
int image(int, double, double, int *&, double **&) override;
private:
int *imflag;

View File

@ -28,7 +28,7 @@ namespace LAMMPS_NS {
class BodyRoundedPolygon : public Body {
public:
BodyRoundedPolygon(class LAMMPS *, int, char **);
~BodyRoundedPolygon();
~BodyRoundedPolygon() override;
int nsub(struct AtomVecBody::Bonus *);
double *coords(struct AtomVecBody::Bonus *);
int nedges(struct AtomVecBody::Bonus *);
@ -36,17 +36,17 @@ class BodyRoundedPolygon : public Body {
double enclosing_radius(struct AtomVecBody::Bonus *);
double rounded_radius(struct AtomVecBody::Bonus *);
int pack_border_body(struct AtomVecBody::Bonus *, double *);
int unpack_border_body(struct AtomVecBody::Bonus *, double *);
void data_body(int, int, int, int *, double *);
int pack_data_body(tagint, int, double *);
int write_data_body(FILE *, double *);
double radius_body(int, int, int *, double *);
int pack_border_body(struct AtomVecBody::Bonus *, double *) override;
int unpack_border_body(struct AtomVecBody::Bonus *, double *) override;
void data_body(int, int, int, int *, double *) override;
int pack_data_body(tagint, int, double *) override;
int write_data_body(FILE *, double *) override;
double radius_body(int, int, int *, double *) override;
int noutrow(int);
int noutcol();
void output(int, int, double *);
int image(int, double, double, int *&, double **&);
int noutrow(int) override;
int noutcol() override;
void output(int, int, double *) override;
int image(int, double, double, int *&, double **&) override;
private:
int *imflag;

View File

@ -28,7 +28,7 @@ namespace LAMMPS_NS {
class BodyRoundedPolyhedron : public Body {
public:
BodyRoundedPolyhedron(class LAMMPS *, int, char **);
~BodyRoundedPolyhedron();
~BodyRoundedPolyhedron() override;
int nsub(struct AtomVecBody::Bonus *);
double *coords(struct AtomVecBody::Bonus *);
int nedges(struct AtomVecBody::Bonus *);
@ -38,17 +38,17 @@ class BodyRoundedPolyhedron : public Body {
double enclosing_radius(struct AtomVecBody::Bonus *);
double rounded_radius(struct AtomVecBody::Bonus *);
int pack_border_body(struct AtomVecBody::Bonus *, double *);
int unpack_border_body(struct AtomVecBody::Bonus *, double *);
void data_body(int, int, int, int *, double *);
int pack_data_body(tagint, int, double *);
int write_data_body(FILE *, double *);
double radius_body(int, int, int *, double *);
int pack_border_body(struct AtomVecBody::Bonus *, double *) override;
int unpack_border_body(struct AtomVecBody::Bonus *, double *) override;
void data_body(int, int, int, int *, double *) override;
int pack_data_body(tagint, int, double *) override;
int write_data_body(FILE *, double *) override;
double radius_body(int, int, int *, double *) override;
int noutrow(int);
int noutcol();
void output(int, int, double *);
int image(int, double, double, int *&, double **&);
int noutrow(int) override;
int noutcol() override;
void output(int, int, double *) override;
int image(int, double, double, int *&, double **&) override;
private:
int *imflag;

View File

@ -27,10 +27,10 @@ namespace LAMMPS_NS {
class ComputeBodyLocal : public Compute {
public:
ComputeBodyLocal(class LAMMPS *, int, char **);
~ComputeBodyLocal();
void init();
void compute_local();
double memory_usage();
~ComputeBodyLocal() override;
void init() override;
void compute_local() override;
double memory_usage() override;
private:
int nvalues;

View File

@ -27,14 +27,14 @@ namespace LAMMPS_NS {
class ComputeTempBody : public Compute {
public:
ComputeTempBody(class LAMMPS *, int, char **);
~ComputeTempBody();
void init();
void setup();
double compute_scalar();
void compute_vector();
~ComputeTempBody() override;
void init() override;
void setup() override;
double compute_scalar() override;
void compute_vector() override;
void remove_bias(int, double *);
void restore_bias(int, double *);
void remove_bias(int, double *) override;
void restore_bias(int, double *) override;
private:
int mode;

View File

@ -21,16 +21,15 @@ namespace LAMMPS_NS {
class FixNHBody : public FixNH {
public:
FixNHBody(class LAMMPS *, int, char **);
virtual ~FixNHBody() {}
void init();
void init() override;
protected:
double dtq;
class AtomVecBody *avec;
void nve_v();
void nve_x();
void nh_v_temp();
void nve_v() override;
void nve_x() override;
void nh_v_temp() override;
};
} // namespace LAMMPS_NS

View File

@ -27,7 +27,6 @@ namespace LAMMPS_NS {
class FixNPHBody : public FixNHBody {
public:
FixNPHBody(class LAMMPS *, int, char **);
~FixNPHBody() {}
};
} // namespace LAMMPS_NS

View File

@ -27,7 +27,6 @@ namespace LAMMPS_NS {
class FixNPTBody : public FixNHBody {
public:
FixNPTBody(class LAMMPS *, int, char **);
~FixNPTBody() {}
};
} // namespace LAMMPS_NS

View File

@ -27,9 +27,9 @@ namespace LAMMPS_NS {
class FixNVEBody : public FixNVE {
public:
FixNVEBody(class LAMMPS *, int, char **);
void init();
void initial_integrate(int);
void final_integrate();
void init() override;
void initial_integrate(int) override;
void final_integrate() override;
private:
double dtq;

View File

@ -27,7 +27,6 @@ namespace LAMMPS_NS {
class FixNVTBody : public FixNHBody {
public:
FixNVTBody(class LAMMPS *, int, char **);
~FixNVTBody() {}
};
} // namespace LAMMPS_NS

View File

@ -27,12 +27,12 @@ namespace LAMMPS_NS {
class FixWallBodyPolygon : public Fix {
public:
FixWallBodyPolygon(class LAMMPS *, int, char **);
virtual ~FixWallBodyPolygon();
int setmask();
void init();
void setup(int);
virtual void post_force(int);
void reset_dt();
~FixWallBodyPolygon() override;
int setmask() override;
void init() override;
void setup(int) override;
void post_force(int) override;
void reset_dt() override;
struct Contact {
int ibody, jbody; // body (i.e. atom) indices (not tags)

View File

@ -27,12 +27,12 @@ namespace LAMMPS_NS {
class FixWallBodyPolyhedron : public Fix {
public:
FixWallBodyPolyhedron(class LAMMPS *, int, char **);
virtual ~FixWallBodyPolyhedron();
int setmask();
void init();
void setup(int);
virtual void post_force(int);
void reset_dt();
~FixWallBodyPolyhedron() override;
int setmask() override;
void init() override;
void setup(int) override;
void post_force(int) override;
void reset_dt() override;
struct Contact {
int ibody, jbody; // body (i.e. atom) indices (not tags)

View File

@ -27,12 +27,12 @@ namespace LAMMPS_NS {
class PairBodyNparticle : public Pair {
public:
PairBodyNparticle(class LAMMPS *);
~PairBodyNparticle();
void compute(int, int);
void settings(int, char **);
void coeff(int, char **);
void init_style();
double init_one(int, int);
~PairBodyNparticle() override;
void compute(int, int) override;
void settings(int, char **) override;
void coeff(int, char **) override;
void init_style() override;
double init_one(int, int) override;
protected:
double cut_global;

View File

@ -27,12 +27,12 @@ namespace LAMMPS_NS {
class PairBodyRoundedPolygon : public Pair {
public:
PairBodyRoundedPolygon(class LAMMPS *);
~PairBodyRoundedPolygon();
void compute(int, int);
void settings(int, char **);
void coeff(int, char **);
void init_style();
double init_one(int, int);
~PairBodyRoundedPolygon() override;
void compute(int, int) override;
void settings(int, char **) override;
void coeff(int, char **) override;
void init_style() override;
double init_one(int, int) override;
struct Contact {
int ibody, jbody; // body (i.e. atom) indices (not tags)

View File

@ -27,12 +27,12 @@ namespace LAMMPS_NS {
class PairBodyRoundedPolyhedron : public Pair {
public:
PairBodyRoundedPolyhedron(class LAMMPS *);
~PairBodyRoundedPolyhedron();
void compute(int, int);
void settings(int, char **);
void coeff(int, char **);
void init_style();
double init_one(int, int);
~PairBodyRoundedPolyhedron() override;
void compute(int, int) override;
void settings(int, char **) override;
void coeff(int, char **) override;
void init_style() override;
double init_one(int, int) override;
virtual void kernel_force(double R, int itype, int jtype, double &energy, double &fpair);

View File

@ -27,9 +27,9 @@ namespace LAMMPS_NS {
class FixBrownian : public FixBrownianBase {
public:
FixBrownian(class LAMMPS *, int, char **);
virtual ~FixBrownian(){};
void init();
void initial_integrate(int);
void init() override;
void initial_integrate(int) override;
private:
template <int Tp_UNIFORM, int Tp_GAUSS, int Tp_2D> void initial_integrate_templated();

View File

@ -27,9 +27,9 @@ namespace LAMMPS_NS {
class FixBrownianAsphere : public FixBrownianBase {
public:
FixBrownianAsphere(class LAMMPS *, int, char **);
virtual ~FixBrownianAsphere(){};
void initial_integrate(int);
void init();
void initial_integrate(int) override;
void init() override;
protected:
class AtomVecEllipsoid *avec;

View File

@ -21,10 +21,10 @@ namespace LAMMPS_NS {
class FixBrownianBase : public Fix {
public:
FixBrownianBase(class LAMMPS *, int, char **);
virtual ~FixBrownianBase();
void init();
int setmask();
void reset_dt();
~FixBrownianBase() override;
void init() override;
int setmask() override;
void reset_dt() override;
protected:
int seed; // RNG seed

View File

@ -27,9 +27,9 @@ namespace LAMMPS_NS {
class FixBrownianSphere : public FixBrownianBase {
public:
FixBrownianSphere(class LAMMPS *, int, char **);
virtual ~FixBrownianSphere(){};
void init();
void initial_integrate(int);
void init() override;
void initial_integrate(int) override;
private:
template <int Tp_UNIFORM, int Tp_GAUSS, int Tp_2D> void initial_integrate_templated();

View File

@ -26,11 +26,11 @@ namespace LAMMPS_NS {
class FixPropelSelf : public Fix {
public:
FixPropelSelf(class LAMMPS *, int, char **);
virtual ~FixPropelSelf(){};
void init();
void post_force(int);
void setup(int);
int setmask();
void init() override;
void post_force(int) override;
void setup(int) override;
int setmask() override;
private:
double magnitude;

View File

@ -27,11 +27,10 @@ namespace LAMMPS_NS {
class AtomVecOxdna : public AtomVec {
public:
AtomVecOxdna(class LAMMPS *);
~AtomVecOxdna() = default;
void grow_pointers();
void data_atom_post(int);
void data_bonds_post(int, int, tagint, tagint, tagint);
void grow_pointers() override;
void data_atom_post(int) override;
void data_bonds_post(int, int, tagint, tagint, tagint) override;
private:
tagint *id5p;

View File

@ -27,8 +27,7 @@ namespace LAMMPS_NS {
class BondOxdna2Fene : public BondOxdnaFene {
public:
BondOxdna2Fene(class LAMMPS *lmp) : BondOxdnaFene(lmp) {}
virtual ~BondOxdna2Fene() {}
virtual void compute_interaction_sites(double *, double *, double *, double *) const;
void compute_interaction_sites(double *, double *, double *, double *) const override;
};
} // namespace LAMMPS_NS

View File

@ -27,16 +27,16 @@ namespace LAMMPS_NS {
class BondOxdnaFene : public Bond {
public:
BondOxdnaFene(class LAMMPS *lmp) : Bond(lmp) {}
virtual ~BondOxdnaFene();
~BondOxdnaFene() override;
virtual void compute_interaction_sites(double *, double *, double *, double *) const;
virtual void compute(int, int);
void coeff(int, char **);
void init_style();
double equilibrium_distance(int);
void write_restart(FILE *);
void read_restart(FILE *);
void write_data(FILE *);
double single(int, double, int, int, double &);
void compute(int, int) override;
void coeff(int, char **) override;
void init_style() override;
double equilibrium_distance(int) override;
void write_restart(FILE *) override;
void read_restart(FILE *) override;
void write_data(FILE *) override;
double single(int, double, int, int, double &) override;
protected:
double *k, *Delta, *r0; // FENE

View File

@ -27,9 +27,8 @@ namespace LAMMPS_NS {
class BondOxrna2Fene : public BondOxdnaFene {
public:
BondOxrna2Fene(class LAMMPS *lmp) : BondOxdnaFene(lmp) {}
virtual ~BondOxrna2Fene() {}
virtual void compute_interaction_sites(double *, double *, double *, double *) const;
void compute_interaction_sites(double *, double *, double *, double *) const override;
};
} // namespace LAMMPS_NS

View File

@ -27,9 +27,9 @@ namespace LAMMPS_NS {
class FixNVEDot : public FixNVE {
public:
FixNVEDot(class LAMMPS *, int, char **);
void init();
void initial_integrate(int);
void final_integrate();
void init() override;
void initial_integrate(int) override;
void final_integrate() override;
private:
double dt, dthlf, dthlfm;

View File

@ -27,10 +27,10 @@ namespace LAMMPS_NS {
class FixNVEDotcLangevin : public FixNVE {
public:
FixNVEDotcLangevin(class LAMMPS *, int, char **);
virtual ~FixNVEDotcLangevin();
void init();
void initial_integrate(int);
void final_integrate();
~FixNVEDotcLangevin() override;
void init() override;
void initial_integrate(int) override;
void final_integrate() override;
private:
double dt, dthlf, dthlfm, dtqrt;

View File

@ -27,19 +27,19 @@ namespace LAMMPS_NS {
class PairOxdna2Coaxstk : public Pair {
public:
PairOxdna2Coaxstk(class LAMMPS *);
virtual ~PairOxdna2Coaxstk();
virtual void compute(int, int);
void settings(int, char **);
void coeff(int, char **);
void init_list(int, class NeighList *);
double init_one(int, int);
void write_restart(FILE *);
void read_restart(FILE *);
void write_restart_settings(FILE *);
void read_restart_settings(FILE *);
void write_data(FILE *);
void write_data_all(FILE *);
void *extract(const char *, int &);
~PairOxdna2Coaxstk() override;
void compute(int, int) override;
void settings(int, char **) override;
void coeff(int, char **) override;
void init_list(int, class NeighList *) override;
double init_one(int, int) override;
void write_restart(FILE *) override;
void read_restart(FILE *) override;
void write_restart_settings(FILE *) override;
void read_restart_settings(FILE *) override;
void write_data(FILE *) override;
void write_data_all(FILE *) override;
void *extract(const char *, int &) override;
protected:
// coaxial stacking interaction

View File

@ -27,20 +27,20 @@ namespace LAMMPS_NS {
class PairOxdna2Dh : public Pair {
public:
PairOxdna2Dh(class LAMMPS *);
virtual ~PairOxdna2Dh();
~PairOxdna2Dh() override;
virtual void compute_interaction_sites(double *, double *, double *, double *);
virtual void compute(int, int);
void settings(int, char **);
void coeff(int, char **);
void init_list(int, class NeighList *);
double init_one(int, int);
void write_restart(FILE *);
void read_restart(FILE *);
void write_restart_settings(FILE *);
void read_restart_settings(FILE *);
void write_data(FILE *);
void write_data_all(FILE *);
void *extract(const char *, int &);
void compute(int, int) override;
void settings(int, char **) override;
void coeff(int, char **) override;
void init_list(int, class NeighList *) override;
double init_one(int, int) override;
void write_restart(FILE *) override;
void read_restart(FILE *) override;
void write_restart_settings(FILE *) override;
void read_restart_settings(FILE *) override;
void write_data(FILE *) override;
void write_data_all(FILE *) override;
void *extract(const char *, int &) override;
protected:
double **qeff_dh_pf, **kappa_dh;

View File

@ -27,8 +27,8 @@ namespace LAMMPS_NS {
class PairOxdna2Excv : public PairOxdnaExcv {
public:
PairOxdna2Excv(class LAMMPS *lmp) : PairOxdnaExcv(lmp) {}
virtual ~PairOxdna2Excv() {}
virtual void compute_interaction_sites(double *, double *, double *, double *, double *);
void compute_interaction_sites(double *, double *, double *, double *, double *) override;
};
} // namespace LAMMPS_NS

View File

@ -28,19 +28,19 @@ namespace LAMMPS_NS {
class PairOxdnaCoaxstk : public Pair {
public:
PairOxdnaCoaxstk(class LAMMPS *);
virtual ~PairOxdnaCoaxstk();
virtual void compute(int, int);
void settings(int, char **);
void coeff(int, char **);
void init_list(int, class NeighList *);
double init_one(int, int);
void write_restart(FILE *);
void read_restart(FILE *);
void write_restart_settings(FILE *);
void read_restart_settings(FILE *);
void write_data(FILE *);
void write_data_all(FILE *);
void *extract(const char *, int &);
~PairOxdnaCoaxstk() override;
void compute(int, int) override;
void settings(int, char **) override;
void coeff(int, char **) override;
void init_list(int, class NeighList *) override;
double init_one(int, int) override;
void write_restart(FILE *) override;
void read_restart(FILE *) override;
void write_restart_settings(FILE *) override;
void read_restart_settings(FILE *) override;
void write_data(FILE *) override;
void write_data_all(FILE *) override;
void *extract(const char *, int &) override;
protected:
// coaxial stacking interaction

View File

@ -27,20 +27,20 @@ namespace LAMMPS_NS {
class PairOxdnaExcv : public Pair {
public:
PairOxdnaExcv(class LAMMPS *);
virtual ~PairOxdnaExcv();
~PairOxdnaExcv() override;
virtual void compute_interaction_sites(double *, double *, double *, double *, double *);
virtual void compute(int, int);
void settings(int, char **);
void coeff(int, char **);
void init_list(int, class NeighList *);
double init_one(int, int);
void write_restart(FILE *);
void read_restart(FILE *);
void write_restart_settings(FILE *);
void read_restart_settings(FILE *);
void write_data(FILE *);
void write_data_all(FILE *);
void *extract(const char *, int &);
void compute(int, int) override;
void settings(int, char **) override;
void coeff(int, char **) override;
void init_list(int, class NeighList *) override;
double init_one(int, int) override;
void write_restart(FILE *) override;
void read_restart(FILE *) override;
void write_restart_settings(FILE *) override;
void read_restart_settings(FILE *) override;
void write_data(FILE *) override;
void write_data_all(FILE *) override;
void *extract(const char *, int &) override;
protected:
// s=sugar-phosphate backbone site, b=base site, st=stacking site

View File

@ -28,19 +28,19 @@ namespace LAMMPS_NS {
class PairOxdnaHbond : public Pair {
public:
PairOxdnaHbond(class LAMMPS *);
virtual ~PairOxdnaHbond();
virtual void compute(int, int);
void settings(int, char **);
void coeff(int, char **);
void init_list(int, class NeighList *);
double init_one(int, int);
void write_restart(FILE *);
void read_restart(FILE *);
void write_restart_settings(FILE *);
void read_restart_settings(FILE *);
void write_data(FILE *);
void write_data_all(FILE *);
void *extract(const char *, int &);
~PairOxdnaHbond() override;
void compute(int, int) override;
void settings(int, char **) override;
void coeff(int, char **) override;
void init_list(int, class NeighList *) override;
double init_one(int, int) override;
void write_restart(FILE *) override;
void read_restart(FILE *) override;
void write_restart_settings(FILE *) override;
void read_restart_settings(FILE *) override;
void write_data(FILE *) override;
void write_data_all(FILE *) override;
void *extract(const char *, int &) override;
protected:
// h-bonding interaction

View File

@ -28,20 +28,20 @@ namespace LAMMPS_NS {
class PairOxdnaStk : public Pair {
public:
PairOxdnaStk(class LAMMPS *);
virtual ~PairOxdnaStk();
virtual void compute(int, int);
void settings(int, char **);
void coeff(int, char **);
void init_style();
void init_list(int, class NeighList *);
double init_one(int, int);
void write_restart(FILE *);
void read_restart(FILE *);
void write_restart_settings(FILE *);
void read_restart_settings(FILE *);
void write_data(FILE *);
void write_data_all(FILE *);
void *extract(const char *, int &);
~PairOxdnaStk() override;
void compute(int, int) override;
void settings(int, char **) override;
void coeff(int, char **) override;
void init_style() override;
void init_list(int, class NeighList *) override;
double init_one(int, int) override;
void write_restart(FILE *) override;
void read_restart(FILE *) override;
void write_restart_settings(FILE *) override;
void read_restart_settings(FILE *) override;
void write_data(FILE *) override;
void write_data_all(FILE *) override;
void *extract(const char *, int &) override;
protected:
// stacking interaction

View File

@ -28,19 +28,19 @@ namespace LAMMPS_NS {
class PairOxdnaXstk : public Pair {
public:
PairOxdnaXstk(class LAMMPS *);
virtual ~PairOxdnaXstk();
virtual void compute(int, int);
void settings(int, char **);
void coeff(int, char **);
void init_list(int, class NeighList *);
double init_one(int, int);
void write_restart(FILE *);
void read_restart(FILE *);
void write_restart_settings(FILE *);
void read_restart_settings(FILE *);
void write_data(FILE *);
void write_data_all(FILE *);
void *extract(const char *, int &);
~PairOxdnaXstk() override;
void compute(int, int) override;
void settings(int, char **) override;
void coeff(int, char **) override;
void init_list(int, class NeighList *) override;
double init_one(int, int) override;
void write_restart(FILE *) override;
void read_restart(FILE *) override;
void write_restart_settings(FILE *) override;
void read_restart_settings(FILE *) override;
void write_data(FILE *) override;
void write_data_all(FILE *) override;
void *extract(const char *, int &) override;
protected:
// cross-stacking interaction

View File

@ -27,8 +27,8 @@ namespace LAMMPS_NS {
class PairOxrna2Dh : public PairOxdna2Dh {
public:
PairOxrna2Dh(class LAMMPS *lmp) : PairOxdna2Dh(lmp) {}
virtual ~PairOxrna2Dh() {}
virtual void compute_interaction_sites(double *, double *, double *, double *);
void compute_interaction_sites(double *, double *, double *, double *) override;
};
} // namespace LAMMPS_NS

View File

@ -27,8 +27,8 @@ namespace LAMMPS_NS {
class PairOxrna2Excv : public PairOxdnaExcv {
public:
PairOxrna2Excv(class LAMMPS *lmp) : PairOxdnaExcv(lmp) {}
virtual ~PairOxrna2Excv() {}
virtual void compute_interaction_sites(double *, double *, double *, double *, double *);
void compute_interaction_sites(double *, double *, double *, double *, double *) override;
};
} // namespace LAMMPS_NS

View File

@ -27,7 +27,6 @@ namespace LAMMPS_NS {
class PairOxrna2Hbond : public PairOxdnaHbond {
public:
PairOxrna2Hbond(class LAMMPS *);
virtual ~PairOxrna2Hbond() {}
};
} // namespace LAMMPS_NS

View File

@ -27,20 +27,20 @@ namespace LAMMPS_NS {
class PairOxrna2Stk : public Pair {
public:
PairOxrna2Stk(class LAMMPS *);
virtual ~PairOxrna2Stk();
virtual void compute(int, int);
void settings(int, char **);
void coeff(int, char **);
void init_style();
void init_list(int, class NeighList *);
double init_one(int, int);
void write_restart(FILE *);
void read_restart(FILE *);
void write_restart_settings(FILE *);
void read_restart_settings(FILE *);
void write_data(FILE *);
void write_data_all(FILE *);
void *extract(const char *, int &);
~PairOxrna2Stk() override;
void compute(int, int) override;
void settings(int, char **) override;
void coeff(int, char **) override;
void init_style() override;
void init_list(int, class NeighList *) override;
double init_one(int, int) override;
void write_restart(FILE *) override;
void read_restart(FILE *) override;
void write_restart_settings(FILE *) override;
void read_restart_settings(FILE *) override;
void write_data(FILE *) override;
void write_data_all(FILE *) override;
void *extract(const char *, int &) override;
protected:
// stacking interaction

View File

@ -27,19 +27,19 @@ namespace LAMMPS_NS {
class PairOxrna2Xstk : public Pair {
public:
PairOxrna2Xstk(class LAMMPS *);
virtual ~PairOxrna2Xstk();
virtual void compute(int, int);
void settings(int, char **);
void coeff(int, char **);
void init_list(int, class NeighList *);
double init_one(int, int);
void write_restart(FILE *);
void read_restart(FILE *);
void write_restart_settings(FILE *);
void read_restart_settings(FILE *);
void write_data(FILE *);
void write_data_all(FILE *);
void *extract(const char *, int &);
~PairOxrna2Xstk() override;
void compute(int, int) override;
void settings(int, char **) override;
void coeff(int, char **) override;
void init_list(int, class NeighList *) override;
double init_one(int, int) override;
void write_restart(FILE *) override;
void read_restart(FILE *) override;
void write_restart_settings(FILE *) override;
void read_restart_settings(FILE *) override;
void write_data(FILE *) override;
void write_data_all(FILE *) override;
void *extract(const char *, int &) override;
protected:
// cross-stacking interaction

View File

@ -27,15 +27,15 @@ namespace LAMMPS_NS {
class AngleSDK : public Angle {
public:
AngleSDK(class LAMMPS *);
virtual ~AngleSDK();
virtual void compute(int, int);
void coeff(int, char **);
void init_style();
double equilibrium_angle(int);
void write_restart(FILE *);
void read_restart(FILE *);
void write_data(FILE *);
double single(int, int, int, int);
~AngleSDK() override;
void compute(int, int) override;
void coeff(int, char **) override;
void init_style() override;
double equilibrium_angle(int) override;
void write_restart(FILE *) override;
void read_restart(FILE *) override;
void write_data(FILE *) override;
double single(int, int, int, int) override;
protected:
double *k, *theta0;

View File

@ -31,20 +31,20 @@ namespace LAMMPS_NS {
class PairLJSDK : public Pair {
public:
PairLJSDK(LAMMPS *);
virtual ~PairLJSDK();
virtual void compute(int, int);
virtual void settings(int, char **);
virtual void coeff(int, char **);
virtual double init_one(int, int);
void write_restart(FILE *);
void read_restart(FILE *);
void write_restart_settings(FILE *);
void read_restart_settings(FILE *);
void write_data(FILE *);
void write_data_all(FILE *);
double single(int, int, int, int, double, double, double, double &);
void *extract(const char *, int &);
virtual double memory_usage();
~PairLJSDK() override;
void compute(int, int) override;
void settings(int, char **) override;
void coeff(int, char **) override;
double init_one(int, int) override;
void write_restart(FILE *) override;
void read_restart(FILE *) override;
void write_restart_settings(FILE *) override;
void read_restart_settings(FILE *) override;
void write_data(FILE *) override;
void write_data_all(FILE *) override;
double single(int, int, int, int, double, double, double, double &) override;
void *extract(const char *, int &) override;
double memory_usage() override;
protected:
int **lj_type; // type of lennard jones potential

View File

@ -31,21 +31,21 @@ namespace LAMMPS_NS {
class PairLJSDKCoulLong : public Pair {
public:
PairLJSDKCoulLong(class LAMMPS *);
virtual ~PairLJSDKCoulLong();
virtual void compute(int, int);
virtual void settings(int, char **);
void coeff(int, char **);
void init_style();
double init_one(int, int);
void write_restart(FILE *);
void read_restart(FILE *);
void write_data(FILE *);
void write_data_all(FILE *);
virtual void write_restart_settings(FILE *);
virtual void read_restart_settings(FILE *);
virtual double single(int, int, int, int, double, double, double, double &);
virtual void *extract(const char *, int &);
virtual double memory_usage();
~PairLJSDKCoulLong() override;
void compute(int, int) override;
void settings(int, char **) override;
void coeff(int, char **) override;
void init_style() override;
double init_one(int, int) override;
void write_restart(FILE *) override;
void read_restart(FILE *) override;
void write_data(FILE *) override;
void write_data_all(FILE *) override;
void write_restart_settings(FILE *) override;
void read_restart_settings(FILE *) override;
double single(int, int, int, int, double, double, double, double &) override;
void *extract(const char *, int &) override;
double memory_usage() override;
protected:
double **cut_lj, **cut_ljsq;

View File

@ -31,10 +31,9 @@ namespace LAMMPS_NS {
class PairLJSDKCoulMSM : public PairLJSDKCoulLong {
public:
PairLJSDKCoulMSM(class LAMMPS *);
virtual ~PairLJSDKCoulMSM(){};
virtual void compute(int, int);
virtual double single(int, int, int, int, double, double, double, double &);
virtual void *extract(const char *, int &);
void compute(int, int) override;
double single(int, int, int, int, double, double, double, double &) override;
void *extract(const char *, int &) override;
private:
template <int EVFLAG, int EFLAG, int NEWTON_PAIR> void eval_msm();

View File

@ -27,14 +27,14 @@ namespace LAMMPS_NS {
class AngleClass2 : public Angle {
public:
AngleClass2(class LAMMPS *);
virtual ~AngleClass2();
virtual void compute(int, int);
virtual void coeff(int, char **);
double equilibrium_angle(int);
virtual void write_restart(FILE *);
void read_restart(FILE *);
void write_data(FILE *);
double single(int, int, int, int);
~AngleClass2() override;
void compute(int, int) override;
void coeff(int, char **) override;
double equilibrium_angle(int) override;
void write_restart(FILE *) override;
void read_restart(FILE *) override;
void write_data(FILE *) override;
double single(int, int, int, int) override;
protected:
double *theta0, *k2, *k3, *k4;

View File

@ -27,15 +27,15 @@ namespace LAMMPS_NS {
class BondClass2 : public Bond {
public:
BondClass2(class LAMMPS *);
virtual ~BondClass2();
virtual void compute(int, int);
virtual void coeff(int, char **);
double equilibrium_distance(int);
void write_restart(FILE *);
virtual void read_restart(FILE *);
void write_data(FILE *);
double single(int, double, int, int, double &);
virtual void *extract(const char *, int &);
~BondClass2() override;
void compute(int, int) override;
void coeff(int, char **) override;
double equilibrium_distance(int) override;
void write_restart(FILE *) override;
void read_restart(FILE *) override;
void write_data(FILE *) override;
double single(int, double, int, int, double &) override;
void *extract(const char *, int &) override;
protected:
double *r0, *k2, *k3, *k4;

View File

@ -27,12 +27,12 @@ namespace LAMMPS_NS {
class DihedralClass2 : public Dihedral {
public:
DihedralClass2(class LAMMPS *);
virtual ~DihedralClass2();
virtual void compute(int, int);
virtual void coeff(int, char **);
void write_restart(FILE *);
virtual void read_restart(FILE *);
void write_data(FILE *);
~DihedralClass2() override;
void compute(int, int) override;
void coeff(int, char **) override;
void write_restart(FILE *) override;
void read_restart(FILE *) override;
void write_data(FILE *) override;
protected:
double *k1, *k2, *k3;

View File

@ -27,12 +27,12 @@ namespace LAMMPS_NS {
class ImproperClass2 : public Improper {
public:
ImproperClass2(class LAMMPS *);
virtual ~ImproperClass2();
virtual void compute(int, int);
virtual void coeff(int, char **);
void write_restart(FILE *);
virtual void read_restart(FILE *);
void write_data(FILE *);
~ImproperClass2() override;
void compute(int, int) override;
void coeff(int, char **) override;
void write_restart(FILE *) override;
void read_restart(FILE *) override;
void write_data(FILE *) override;
protected:
double *k0, *chi0;

View File

@ -25,24 +25,24 @@ namespace LAMMPS_NS {
class PairLJClass2 : public Pair {
public:
PairLJClass2(class LAMMPS *);
virtual ~PairLJClass2();
virtual void compute(int, int);
virtual void settings(int, char **);
void coeff(int, char **);
void init_style();
virtual double init_one(int, int);
void write_restart(FILE *);
void read_restart(FILE *);
void write_restart_settings(FILE *);
void read_restart_settings(FILE *);
void write_data(FILE *);
void write_data_all(FILE *);
double single(int, int, int, int, double, double, double, double &);
void *extract(const char *, int &);
~PairLJClass2() override;
void compute(int, int) override;
void settings(int, char **) override;
void coeff(int, char **) override;
void init_style() override;
double init_one(int, int) override;
void write_restart(FILE *) override;
void read_restart(FILE *) override;
void write_restart_settings(FILE *) override;
void read_restart_settings(FILE *) override;
void write_data(FILE *) override;
void write_data_all(FILE *) override;
double single(int, int, int, int, double, double, double, double &) override;
void *extract(const char *, int &) override;
void compute_inner();
void compute_middle();
void compute_outer(int, int);
void compute_inner() override;
void compute_middle() override;
void compute_outer(int, int) override;
protected:
double cut_global;

View File

@ -27,20 +27,20 @@ namespace LAMMPS_NS {
class PairLJClass2CoulCut : public Pair {
public:
PairLJClass2CoulCut(class LAMMPS *);
virtual ~PairLJClass2CoulCut();
virtual void compute(int, int);
virtual void settings(int, char **);
void coeff(int, char **);
virtual void init_style();
virtual double init_one(int, int);
void write_restart(FILE *);
void read_restart(FILE *);
void write_restart_settings(FILE *);
void read_restart_settings(FILE *);
void write_data(FILE *);
void write_data_all(FILE *);
double single(int, int, int, int, double, double, double, double &);
void *extract(const char *, int &);
~PairLJClass2CoulCut() override;
void compute(int, int) override;
void settings(int, char **) override;
void coeff(int, char **) override;
void init_style() override;
double init_one(int, int) override;
void write_restart(FILE *) override;
void read_restart(FILE *) override;
void write_restart_settings(FILE *) override;
void read_restart_settings(FILE *) override;
void write_data(FILE *) override;
void write_data_all(FILE *) override;
double single(int, int, int, int, double, double, double, double &) override;
void *extract(const char *, int &) override;
protected:
double cut_lj_global, cut_coul_global;

View File

@ -27,24 +27,24 @@ namespace LAMMPS_NS {
class PairLJClass2CoulLong : public Pair {
public:
PairLJClass2CoulLong(class LAMMPS *);
virtual ~PairLJClass2CoulLong();
virtual void compute(int, int);
virtual void settings(int, char **);
void coeff(int, char **);
virtual void init_style();
virtual double init_one(int, int);
void write_restart(FILE *);
void read_restart(FILE *);
void write_restart_settings(FILE *);
void read_restart_settings(FILE *);
void write_data(FILE *);
void write_data_all(FILE *);
double single(int, int, int, int, double, double, double, double &);
~PairLJClass2CoulLong() override;
void compute(int, int) override;
void settings(int, char **) override;
void coeff(int, char **) override;
void init_style() override;
double init_one(int, int) override;
void write_restart(FILE *) override;
void read_restart(FILE *) override;
void write_restart_settings(FILE *) override;
void read_restart_settings(FILE *) override;
void write_data(FILE *) override;
void write_data_all(FILE *) override;
double single(int, int, int, int, double, double, double, double &) override;
void compute_inner();
void compute_middle();
void compute_outer(int, int);
void *extract(const char *, int &);
void compute_inner() override;
void compute_middle() override;
void compute_outer(int, int) override;
void *extract(const char *, int &) override;
protected:
double cut_lj_global;

View File

@ -27,9 +27,9 @@ namespace LAMMPS_NS {
class FixWallColloid : public FixWall {
public:
FixWallColloid(class LAMMPS *, int, char **);
void init();
void precompute(int);
void wall_particle(int, int, double);
void init() override;
void precompute(int) override;
void wall_particle(int, int, double) override;
private:
double coeff1[6], coeff2[6], coeff3[6], coeff4[6];

View File

@ -27,16 +27,16 @@ namespace LAMMPS_NS {
class PairBrownian : public Pair {
public:
PairBrownian(class LAMMPS *);
virtual ~PairBrownian();
virtual void compute(int, int);
void settings(int, char **);
void coeff(int, char **);
virtual double init_one(int, int);
virtual void init_style();
void write_restart(FILE *);
void read_restart(FILE *);
void write_restart_settings(FILE *);
void read_restart_settings(FILE *);
~PairBrownian() override;
void compute(int, int) override;
void settings(int, char **) override;
void coeff(int, char **) override;
double init_one(int, int) override;
void init_style() override;
void write_restart(FILE *) override;
void read_restart(FILE *) override;
void write_restart_settings(FILE *) override;
void read_restart_settings(FILE *) override;
protected:
double cut_inner_global, cut_global;

View File

@ -27,10 +27,10 @@ namespace LAMMPS_NS {
class PairBrownianPoly : public PairBrownian {
public:
PairBrownianPoly(class LAMMPS *);
~PairBrownianPoly() {}
void compute(int, int);
double init_one(int, int);
void init_style();
void compute(int, int) override;
double init_one(int, int) override;
void init_style() override;
};
} // namespace LAMMPS_NS

View File

@ -27,18 +27,18 @@ namespace LAMMPS_NS {
class PairColloid : public Pair {
public:
PairColloid(class LAMMPS *);
virtual ~PairColloid();
virtual void compute(int, int);
void settings(int, char **);
void coeff(int, char **);
double init_one(int, int);
void write_restart(FILE *);
void read_restart(FILE *);
void write_restart_settings(FILE *);
void read_restart_settings(FILE *);
void write_data(FILE *);
void write_data_all(FILE *);
double single(int, int, int, int, double, double, double, double &);
~PairColloid() override;
void compute(int, int) override;
void settings(int, char **) override;
void coeff(int, char **) override;
double init_one(int, int) override;
void write_restart(FILE *) override;
void read_restart(FILE *) override;
void write_restart_settings(FILE *) override;
void read_restart_settings(FILE *) override;
void write_data(FILE *) override;
void write_data_all(FILE *) override;
double single(int, int, int, int, double, double, double, double &) override;
protected:
enum { SMALL_SMALL, SMALL_LARGE, LARGE_LARGE };

Some files were not shown because too many files have changed in this diff Show More