@ -104,7 +104,7 @@ set(OTHER_PACKAGES KIM PYTHON MSCG MPIIO VORONOI POEMS LATTE
|
||||
USER-ATC USER-AWPMD USER-CGDNA USER-MESO
|
||||
USER-CGSDK USER-COLVARS USER-DIFFRACTION USER-DPD USER-DRUDE USER-EFF
|
||||
USER-FEP USER-H5MD USER-LB USER-MANIFOLD USER-MEAMC USER-MGPT USER-MISC
|
||||
USER-MOLFILE USER-NETCDF USER-PHONON USER-QTB USER-REAXC USER-SMD
|
||||
USER-MOFFF USER-MOLFILE USER-NETCDF USER-PHONON USER-QTB USER-REAXC USER-SMD
|
||||
USER-SMTBQ USER-SPH USER-TALLY USER-UEF USER-VTK USER-QUIP USER-QMMM)
|
||||
set(ACCEL_PACKAGES USER-OMP KOKKOS OPT USER-INTEL GPU)
|
||||
foreach(PKG ${DEFAULT_PACKAGES})
|
||||
@ -170,13 +170,6 @@ if(ENABLE_KSPACE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(ENABLE_MISC)
|
||||
option(LAMMPS_XDR "include XDR compatibility files for doing particle dumps in XTC format" OFF)
|
||||
if(LAMMPS_XDR)
|
||||
add_definitions(-DLAMMPS_XDR) # for liblammps
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(ENABLE_MSCG OR ENABLE_USER-ATC OR ENABLE_USER-AWPMD OR ENABLE_USER-QUIP OR ENABLE_LATTE)
|
||||
find_package(LAPACK)
|
||||
if(NOT LAPACK_FOUND)
|
||||
|
||||
BIN
doc/src/Eqs/angle_class2_p6.jpg
Normal file
BIN
doc/src/Eqs/angle_class2_p6.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 14 KiB |
BIN
doc/src/Eqs/angle_cosine_buck6d.jpg
Normal file
BIN
doc/src/Eqs/angle_cosine_buck6d.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.2 KiB |
BIN
doc/src/Eqs/improper_inversion_harmonic.jpg
Normal file
BIN
doc/src/Eqs/improper_inversion_harmonic.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.5 KiB |
BIN
doc/src/Eqs/pair_buck6d.jpg
Normal file
BIN
doc/src/Eqs/pair_buck6d.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.9 KiB |
9
doc/src/Eqs/pair_buck6d.txt
Normal file
9
doc/src/Eqs/pair_buck6d.txt
Normal file
@ -0,0 +1,9 @@
|
||||
\documentclass[12pt]{article}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\begin{eqnarray*}
|
||||
E = A e^{-\kappa r} - \frac{C}{r^6} \cdot \frac{1}{1 + D r^{14}} \qquad r < r_c \\
|
||||
\end{eqnarray*}
|
||||
|
||||
\end{document}
|
||||
BIN
doc/src/Eqs/pair_coul_gauss.jpg
Normal file
BIN
doc/src/Eqs/pair_coul_gauss.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 7.1 KiB |
BIN
doc/src/Eqs/pair_ufm.jpg
Normal file
BIN
doc/src/Eqs/pair_ufm.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 17 KiB |
14
doc/src/Eqs/pair_ufm.tex
Normal file
14
doc/src/Eqs/pair_ufm.tex
Normal file
@ -0,0 +1,14 @@
|
||||
\documentclass[12pt]{article}
|
||||
|
||||
\begin{document}
|
||||
|
||||
$$
|
||||
E = -\varepsilon\, \ln{\left[1-\exp{\left(-r^{2}/\sigma^{2}\right)}\right]} \qquad r < r_c
|
||||
$$
|
||||
|
||||
$$
|
||||
\varepsilon = p\,k_B\,T
|
||||
$$
|
||||
|
||||
\end{document}
|
||||
|
||||
@ -1022,6 +1022,7 @@ KOKKOS, o = USER-OMP, t = OPT.
|
||||
"tip4p/cut (o)"_pair_coul.html,
|
||||
"tip4p/long (o)"_pair_coul.html,
|
||||
"tri/lj"_pair_tri_lj.html,
|
||||
"ufm (got)"_pair_ufm.html,
|
||||
"vashishta (ko)"_pair_vashishta.html,
|
||||
"vashishta/table (o)"_pair_vashishta.html,
|
||||
"yukawa (gok)"_pair_yukawa.html,
|
||||
|
||||
@ -138,6 +138,7 @@ Package, Description, Doc page, Example, Library
|
||||
"USER-MESO"_#USER-MESO, mesoscale DPD models, "pair_style edpd"_pair_meso.html, USER/meso, -
|
||||
"USER-MGPT"_#USER-MGPT, fast MGPT multi-ion potentials, "pair_style mgpt"_pair_mgpt.html, USER/mgpt, -
|
||||
"USER-MISC"_#USER-MISC, single-file contributions, USER-MISC/README, USER/misc, -
|
||||
"USER-MOFFF"_#USER-MOFFF, styles for "MOF-FF"_MOFplus force field, "pair_style buck6d/coul/gauss"_pair_buck6d_coul_gauss.html, USER/mofff, -
|
||||
"USER-MOLFILE"_#USER-MOLFILE, "VMD"_vmd_home molfile plug-ins,"dump molfile"_dump_molfile.html, -, ext
|
||||
"USER-NETCDF"_#USER-NETCDF, dump output via NetCDF,"dump netcdf"_dump_netcdf.html, -, ext
|
||||
"USER-OMP"_#USER-OMP, OpenMP-enabled styles,"Section 5.3.4"_accelerate_omp.html, "Benchmarks"_http://lammps.sandia.gov/bench.html, -
|
||||
@ -2259,6 +2260,44 @@ http://lammps.sandia.gov/movies.html#mesodpd :ul
|
||||
|
||||
:line
|
||||
|
||||
USER-MOFFF package :link(USER-MOFFF),h4
|
||||
|
||||
[Contents:]
|
||||
|
||||
Pair, angle and improper styles needed to employ the MOF-FF
|
||||
force field by Schmid and coworkers with LAMMPS.
|
||||
MOF-FF is a first principles derived force field with the primary aim
|
||||
to simulate MOFs and related porous framework materials, using spherical
|
||||
Gaussian charges. It is described in S. Bureekaew et al., Phys. Stat. Sol. B
|
||||
2013, 250, 1128-1141.
|
||||
For the usage of MOF-FF see the example in the example directory as
|
||||
well as the "MOF+"_MOFplus website.
|
||||
|
||||
:link(MOFplus,https://www.mofplus.org/content/show/MOF-FF)
|
||||
|
||||
[Author:] Hendrik Heenen (Technical U of Munich),
|
||||
Rochus Schmid (Ruhr-University Bochum).
|
||||
|
||||
[Install or un-install:]
|
||||
|
||||
make yes-user-mofff
|
||||
make machine :pre
|
||||
|
||||
make no-user-mofff
|
||||
make machine :pre
|
||||
|
||||
[Supporting info:]
|
||||
|
||||
src/USER-MOFFF: filenames -> commands
|
||||
src/USER-MOFFF/README
|
||||
"pair_style buck6d/coul/gauss"_pair_buck6d_coul_gauss.html
|
||||
"angle_style class2"_angle_class2.html
|
||||
"angle_style cosine/buck6d"_angle_cosine_buck6d.html
|
||||
"improper_style inversion/harmonic"_improper_inversion_harmonic.html
|
||||
examples/USER/mofff :ul
|
||||
|
||||
:line
|
||||
|
||||
USER-MOLFILE package :link(USER-MOLFILE),h4
|
||||
|
||||
[Contents:]
|
||||
|
||||
@ -259,7 +259,6 @@ within the LAMMPS code. The options that are currently recognized are:
|
||||
-DLAMMPS_PNG
|
||||
-DLAMMPS_FFMPEG
|
||||
-DLAMMPS_MEMALIGN
|
||||
-DLAMMPS_XDR
|
||||
-DLAMMPS_SMALLBIG
|
||||
-DLAMMPS_BIGBIG
|
||||
-DLAMMPS_SMALLSMALL
|
||||
@ -308,11 +307,6 @@ has to be aligned on larger than default byte boundaries (e.g. 16
|
||||
bytes instead of 8 bytes on x86 type platforms) for optimal
|
||||
performance.
|
||||
|
||||
If you use -DLAMMPS_XDR, the build will include XDR compatibility
|
||||
files for doing particle dumps in XTC format. This is only necessary
|
||||
if your platform does have its own XDR files available. See the
|
||||
Restrictions section of the "dump"_dump.html command for details.
|
||||
|
||||
Use at most one of the -DLAMMPS_SMALLBIG, -DLAMMPS_BIGBIG,
|
||||
-DLAMMPS_SMALLSMALL settings. The default is -DLAMMPS_SMALLBIG. These
|
||||
settings refer to use of 4-byte (small) vs 8-byte (big) integers
|
||||
|
||||
@ -111,14 +111,21 @@ back-and-forth between the CHARMM MD code and LAMMPS.
|
||||
They are intended to make it easy to use CHARMM as a builder and as a
|
||||
post-processor for LAMMPS. Using charmm2lammps.pl, you can convert a
|
||||
PDB file with associated CHARMM info, including CHARMM force field
|
||||
data, into its LAMMPS equivalent. Using lammps2pdb.pl you can convert
|
||||
LAMMPS atom dumps into PDB files.
|
||||
data, into its LAMMPS equivalent. Support for the CMAP correction of
|
||||
CHARMM22 and later is available as an option. This tool can also add
|
||||
solvent water molecules and Na+ or Cl- ions to the system.
|
||||
Using lammps2pdb.pl you can convert LAMMPS atom dumps into PDB files.
|
||||
|
||||
See the README file in the ch2lmp sub-directory for more information.
|
||||
|
||||
These tools were created by Pieter in't Veld (pjintve at sandia.gov)
|
||||
and Paul Crozier (pscrozi at sandia.gov) at Sandia.
|
||||
|
||||
CMAP support added and tested by Xiaohu Hu (hux2 at ornl.gov) and
|
||||
Robert A. Latour (latourr at clemson.edu), David Hyde-Volpe, and
|
||||
Tigran Abramyan, (Clemson University) and
|
||||
Chris Lorenz (chris.lorenz at kcl.ac.uk), King's College London.
|
||||
|
||||
:line
|
||||
|
||||
chain tool :h4,link(chain)
|
||||
@ -177,7 +184,7 @@ doxygen tool :h4,link(doxygen)
|
||||
|
||||
The tools/doxygen directory contains a shell script called
|
||||
doxygen.sh which can generate a call graph and API lists using
|
||||
the Doxygen_http://doxygen.org software.
|
||||
the "Doxygen"_http://doxygen.org software.
|
||||
|
||||
See the included README file for details.
|
||||
|
||||
|
||||
@ -9,6 +9,7 @@
|
||||
angle_style class2 command :h3
|
||||
angle_style class2/omp command :h3
|
||||
angle_style class2/kk command :h3
|
||||
angle_style class2/p6 command :h3
|
||||
|
||||
[Syntax:]
|
||||
|
||||
@ -102,11 +103,29 @@ more instructions on how to use the accelerated styles effectively.
|
||||
|
||||
:line
|
||||
|
||||
The {class2/p6} angle style uses the {class2} potential expanded to sixth order:
|
||||
|
||||
:c,image(Eqs/angle_class2_p6.jpg)
|
||||
|
||||
In this expanded term 6 coefficients for the Ea formula need to be set:
|
||||
|
||||
theta0 (degrees)
|
||||
K2 (energy/radian^2)
|
||||
K3 (energy/radian^3)
|
||||
K4 (energy/radian^4)
|
||||
K5 (energy/radian^5)
|
||||
K6 (energy/radian^6) :ul
|
||||
|
||||
The bond-bond and bond-angle terms remain unchanged.
|
||||
|
||||
:line
|
||||
|
||||
[Restrictions:]
|
||||
|
||||
This angle style can only be used if LAMMPS was built with the CLASS2
|
||||
package. See the "Making LAMMPS"_Section_start.html#start_3 section
|
||||
for more info on packages.
|
||||
package. For the {class2/p6} style LAMMPS needs to be built with the
|
||||
USER-MOFFF package. See the "Making LAMMPS"_Section_start.html#start_3
|
||||
section for more info on packages.
|
||||
|
||||
[Related commands:]
|
||||
|
||||
|
||||
65
doc/src/angle_cosine_buck6d.txt
Normal file
65
doc/src/angle_cosine_buck6d.txt
Normal file
@ -0,0 +1,65 @@
|
||||
"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
|
||||
|
||||
:link(lws,http://lammps.sandia.gov)
|
||||
:link(ld,Manual.html)
|
||||
:link(lc,Section_commands.html#comm)
|
||||
|
||||
:line
|
||||
|
||||
angle_style cosine/buck6d command :h3
|
||||
|
||||
[Syntax:]
|
||||
|
||||
angle_style cosine/buck6d :pre
|
||||
|
||||
[Examples:]
|
||||
|
||||
angle_style cosine/buck6d
|
||||
angle_coeff 1 cosine/buck6d 1.978350 4 180.000000 :pre
|
||||
|
||||
[Description:]
|
||||
|
||||
The {cosine/buck6d} angle style uses the potential
|
||||
|
||||
:c,image(Eqs/angle_cosine_buck6d.jpg)
|
||||
|
||||
where K is the energy constant, n is the periodic multiplicity and
|
||||
Theta0 is the equilibrium angle.
|
||||
|
||||
The coefficients must be defined for each angle type via the
|
||||
"angle_coeff"_angle_coeff.html command as in the example above, or in
|
||||
the data file or restart files read by the "read_data"_read_data.html
|
||||
or "read_restart"_read_restart.html commands in the following order:
|
||||
|
||||
K (energy)
|
||||
n
|
||||
Theta0 (degrees) :ul
|
||||
|
||||
Theta0 is specified in degrees, but LAMMPS converts it to radians
|
||||
internally.
|
||||
|
||||
Additional to the cosine term the {cosine/buck6d} angle style computes
|
||||
the short range (vdW) interaction belonging to the
|
||||
"pair_buck6d"_pair_buck6d_coul_gauss.html between the end atoms of
|
||||
the angle. For this reason this angle style only works in combination
|
||||
with the "pair_buck6d"_pair_buck6d_coul_gauss.html styles and needs
|
||||
the "special_bonds"_special_bonds.html 1-3 interactions to be weighted
|
||||
0.0 to prevent double counting.
|
||||
|
||||
:line
|
||||
|
||||
[Restrictions:]
|
||||
|
||||
{cosine/buck6d} can only be used in combination with the
|
||||
"pair_buck6d"_pair_buck6d_coul_gauss.html style and with a
|
||||
"special_bonds"_special_bonds.html 0.0 weighting of 1-3 interactions.
|
||||
|
||||
This angle style can only be used if LAMMPS was built with the
|
||||
USER-MOFFF package. See the "Making
|
||||
LAMMPS"_Section_start.html#start_3 section for more info on packages.
|
||||
|
||||
[Related commands:]
|
||||
|
||||
"angle_coeff"_angle_coeff.html
|
||||
|
||||
[Default:] none
|
||||
@ -8,6 +8,7 @@ Angle Styles :h1
|
||||
angle_charmm
|
||||
angle_class2
|
||||
angle_cosine
|
||||
angle_cosine_buck6d
|
||||
angle_cosine_delta
|
||||
angle_cosine_periodic
|
||||
angle_cosine_shift
|
||||
|
||||
@ -45,7 +45,7 @@ args = list of arguments for a particular style :l
|
||||
{xyz/gz} args = none
|
||||
{xyz/mpiio} args = none :pre
|
||||
|
||||
{custom} or {custom/gz} or {custom/mpiio} args = list of atom attributes :l
|
||||
{custom} or {custom/gz} or {custom/mpiio} or {netcdf} or {netcdf/mpiio} args = list of atom attributes :l
|
||||
possible attributes = id, mol, proc, procp1, type, element, mass,
|
||||
x, y, z, xs, ys, zs, xu, yu, zu,
|
||||
xsu, ysu, zsu, ix, iy, iz,
|
||||
@ -649,20 +649,7 @@ LAMMPS"_Section_start.html#start_3 section for more info.
|
||||
|
||||
The {xtc} style is part of the MISC package. It is only enabled if
|
||||
LAMMPS was built with that package. See the "Making
|
||||
LAMMPS"_Section_start.html#start_3 section for more info. This is
|
||||
because some machines may not support the low-level XDR data format
|
||||
that XTC files are written with, which will result in a compile-time
|
||||
error when a low-level include file is not found. Putting this style
|
||||
in a package makes it easy to exclude from a LAMMPS build for those
|
||||
machines. However, the MISC package also includes two compatibility
|
||||
header files and associated functions, which should be a suitable
|
||||
substitute on machines that do not have the appropriate native header
|
||||
files. This option can be invoked at build time by adding
|
||||
-DLAMMPS_XDR to the CCFLAGS variable in the appropriate low-level
|
||||
Makefile, e.g. src/MAKE/Makefile.foo. This compatibility mode has
|
||||
been tested successfully on Cray XT3/XT4/XT5 and IBM BlueGene/L
|
||||
machines and should also work on IBM BG/P, and Windows XP/Vista/7
|
||||
machines.
|
||||
LAMMPS"_Section_start.html#start_3 section for more info.
|
||||
|
||||
[Related commands:]
|
||||
|
||||
|
||||
@ -120,6 +120,10 @@ quantity being minimized), you MUST enable the
|
||||
|
||||
[Restrictions:]
|
||||
|
||||
To function as expected this fix command must be issued {before} a
|
||||
"read_data"_read_data.html command but {after} a
|
||||
"read_restart"_read_restart.html command.
|
||||
|
||||
This fix can only be used if LAMMPS was built with the MOLECULE
|
||||
package. See the "Making
|
||||
LAMMPS"_Section_start.html#start_3 section for more info on packages.
|
||||
|
||||
@ -26,16 +26,20 @@ zero or more keyword/value pairs may be appended to args :l
|
||||
keyword = {mol}, {region}, {maxangle}, {pressure}, {fugacity_coeff}, {full_energy}, {charge}, {group}, {grouptype}, {intra_energy}, {tfac_insert}, or {overlap_cutoff}
|
||||
{mol} value = template-ID
|
||||
template-ID = ID of molecule template specified in a separate "molecule"_molecule.html command
|
||||
{mcmoves} values = Patomtrans Pmoltrans Pmolrotate
|
||||
Patomtrans = proportion of atom translation MC moves
|
||||
Pmoltrans = proportion of molecule translation MC moves
|
||||
Pmolrotate = proportion of molecule rotation MC moves
|
||||
{rigid} value = fix-ID
|
||||
fix-ID = ID of "fix rigid/small"_fix_rigid.html command
|
||||
{shake} value = fix-ID
|
||||
fix-ID = ID of "fix shake"_fix_shake.html command
|
||||
{region} value = region-ID
|
||||
region-ID = ID of region where MC moves are allowed
|
||||
region-ID = ID of region where GCMC exchanges and MC moves are allowed
|
||||
{maxangle} value = maximum molecular rotation angle (degrees)
|
||||
{pressure} value = pressure of the gas reservoir (pressure units)
|
||||
{fugacity_coeff} value = fugacity coefficient of the gas reservoir (unitless)
|
||||
{full_energy} = compute the entire system energy when performing MC moves
|
||||
{full_energy} = compute the entire system energy when performing GCMC exchanges and MC moves
|
||||
{charge} value = charge of inserted atoms (charge units)
|
||||
{group} value = group-ID
|
||||
group-ID = group-ID for inserted atoms (string)
|
||||
@ -56,34 +60,42 @@ fix 4 my_gas gcmc 1 10 10 1 123456543 300.0 -12.5 1.0 region disk :pre
|
||||
[Description:]
|
||||
|
||||
This fix performs grand canonical Monte Carlo (GCMC) exchanges of
|
||||
atoms or molecules of the given type with an imaginary ideal gas
|
||||
atoms or molecules with an imaginary ideal gas
|
||||
reservoir at the specified T and chemical potential (mu) as discussed
|
||||
in "(Frenkel)"_#Frenkel. If used with the "fix nvt"_fix_nh.html
|
||||
in "(Frenkel)"_#Frenkel. It also
|
||||
attempts Monte Carlo (MC) moves (translations and molecule
|
||||
rotations) within the simulation cell or
|
||||
region. If used with the "fix nvt"_fix_nh.html
|
||||
command, simulations in the grand canonical ensemble (muVT, constant
|
||||
chemical potential, constant volume, and constant temperature) can be
|
||||
performed. Specific uses include computing isotherms in microporous
|
||||
materials, or computing vapor-liquid coexistence curves.
|
||||
|
||||
Every N timesteps the fix attempts a number of GCMC exchanges
|
||||
(insertions or deletions) of gas atoms or molecules of the given type
|
||||
between the simulation cell and the imaginary reservoir. It also
|
||||
attempts a number of Monte Carlo moves (translations and molecule
|
||||
rotations) of gas of the given type within the simulation cell or
|
||||
region. The average number of attempted GCMC exchanges is X. The
|
||||
average number of attempted MC moves is M. M should typically be
|
||||
Every N timesteps the fix attempts both GCMC exchanges
|
||||
(insertions or deletions) and MC moves of gas atoms or molecules.
|
||||
On those timesteps, the average number of attempted GCMC exchanges is X,
|
||||
while the average number of attempted MC moves is M.
|
||||
For GCMC exchanges of either molecular or atomic gasses,
|
||||
these exchanges can be either deletions or insertions,
|
||||
with equal probability.
|
||||
|
||||
The possible choices for MC moves are translation of an atom,
|
||||
translation of a molecule, and rotation of a molecule.
|
||||
The relative amounts of each are determined by the optional
|
||||
{mcmoves} keyword (see below).
|
||||
The default behavior is as follows.
|
||||
If the {mol} keyword is used, only molecule translations
|
||||
and molecule rotations are performed with equal probability.
|
||||
Conversely, if the {mol} keyword is not used, only atom
|
||||
translations are performed.
|
||||
M should typically be
|
||||
chosen to be approximately equal to the expected number of gas atoms
|
||||
or molecules of the given type within the simulation cell or region,
|
||||
which will result in roughly one MC translation per atom or molecule
|
||||
which will result in roughly one MC move per atom or molecule
|
||||
per MC cycle.
|
||||
|
||||
For MC moves of molecular gasses, rotations and translations are each
|
||||
attempted with 50% probability. For MC moves of atomic gasses,
|
||||
translations are attempted 100% of the time. For MC exchanges of
|
||||
either molecular or atomic gasses, deletions and insertions are each
|
||||
attempted with 50% probability.
|
||||
|
||||
All inserted particles are always assigned to two groups: the default
|
||||
group "all" and the group specified in the fix gcmc command (which can
|
||||
All inserted particles are always added to two groups: the default
|
||||
group "all" and the fix group specified in the fix command (which can
|
||||
also be "all"). In addition, particles are also added to any groups
|
||||
specified by the {group} and {grouptype} keywords. If inserted
|
||||
particles are individual atoms, they are assigned the atom type given
|
||||
@ -92,9 +104,9 @@ effect and must be set to zero. Instead, the type of each atom in the
|
||||
inserted molecule is specified in the file read by the
|
||||
"molecule"_molecule.html command.
|
||||
|
||||
This fix cannot be used to perform MC insertions of gas atoms or
|
||||
molecules other than the exchanged type, but MC deletions,
|
||||
translations, and rotations can be performed on any atom/molecule in
|
||||
This fix cannot be used to perform GCMC insertions of gas atoms or
|
||||
molecules other than the exchanged type, but GCMC deletions,
|
||||
and MC translations, and rotations can be performed on any atom/molecule in
|
||||
the fix group. All atoms in the simulation cell can be moved using
|
||||
regular time integration translations, e.g. via "fix nvt"_fix_nh.html,
|
||||
resulting in a hybrid GCMC+MD simulation. A smaller-than-usual
|
||||
@ -150,8 +162,8 @@ about this point.
|
||||
Individual atoms are inserted, unless the {mol} keyword is used. It
|
||||
specifies a {template-ID} previously defined using the
|
||||
"molecule"_molecule.html command, which reads a file that defines the
|
||||
molecule. The coordinates, atom types, charges, etc, as well as any
|
||||
bond/angle/etc and special neighbor information for the molecule can
|
||||
molecule. The coordinates, atom types, charges, etc., as well as any
|
||||
bonding and special neighbor information for the molecule can
|
||||
be specified in the molecule file. See the "molecule"_molecule.html
|
||||
command for details. The only settings required to be in this file
|
||||
are the coordinates and types of atoms in the molecule.
|
||||
@ -162,7 +174,7 @@ error when it tries to find bonded neighbors. LAMMPS will warn you if
|
||||
any of the atoms eligible for deletion have a non-zero molecule ID,
|
||||
but does not check for this at the time of deletion.
|
||||
|
||||
If you wish to insert molecules via the {mol} keyword, that will be
|
||||
If you wish to insert molecules using the {mol} keyword that will be
|
||||
treated as rigid bodies, use the {rigid} keyword, specifying as its
|
||||
value the ID of a separate "fix rigid/small"_fix_rigid.html command
|
||||
which also appears in your input script.
|
||||
@ -178,6 +190,15 @@ their bonds or angles constrained via SHAKE, use the {shake} keyword,
|
||||
specifying as its value the ID of a separate "fix
|
||||
shake"_fix_shake.html command which also appears in your input script.
|
||||
|
||||
Optionally, users may specify the relative amounts of different MC
|
||||
moves using the {mcmoves} keyword. The values {Patomtrans},
|
||||
{Pmoltrans}, {Pmolrotate} specify the average proportion of
|
||||
atom translations, molecule translations, and molecule rotations,
|
||||
respectively. The values must be non-negative integers or real
|
||||
numbers, with at least one non-zero value. For example, (10,30,0)
|
||||
would result in 25% of the MC moves being atomic translations, 75%
|
||||
molecular translations, and no molecular rotations.
|
||||
|
||||
Optionally, users may specify the maximum rotation angle for molecular
|
||||
rotations using the {maxangle} keyword and specifying the angle in
|
||||
degrees. Rotations are performed by generating a random point on the
|
||||
@ -188,19 +209,19 @@ to the unit vector defined by the point on the unit sphere. The same
|
||||
procedure is used for randomly rotating molecules when they are
|
||||
inserted, except that the maximum angle is 360 degrees.
|
||||
|
||||
Note that fix GCMC does not use configurational bias MC or any other
|
||||
Note that fix gcmc does not use configurational bias MC or any other
|
||||
kind of sampling of intramolecular degrees of freedom. Inserted
|
||||
molecules can have different orientations, but they will all have the
|
||||
same intramolecular configuration, which was specified in the molecule
|
||||
command input.
|
||||
|
||||
For atomic gasses, inserted atoms have the specified atom type, but
|
||||
deleted atoms are any atoms that have been inserted or that belong to
|
||||
the user-specified fix group. For molecular gasses, exchanged
|
||||
deleted atoms are any atoms that have been inserted or that already
|
||||
belong to the fix group. For molecular gasses, exchanged
|
||||
molecules use the same atom types as in the template molecule supplied
|
||||
by the user. In both cases, exchanged atoms/molecules are assigned to
|
||||
two groups: the default group "all" and the group specified in the fix
|
||||
gcmc command (which can also be "all").
|
||||
two groups: the default group "all" and the fix group
|
||||
(which can also be "all").
|
||||
|
||||
The chemical potential is a user-specified input parameter defined
|
||||
as:
|
||||
@ -241,13 +262,16 @@ which case the user-specified chemical potential is ignored. The user
|
||||
may also specify the fugacity coefficient phi using the
|
||||
{fugacity_coeff} keyword, which defaults to unity.
|
||||
|
||||
The {full_energy} option means that fix GCMC will compute the total
|
||||
potential energy of the entire simulated system. The total system
|
||||
energy before and after the proposed GCMC move is then used in the
|
||||
The {full_energy} option means that the fix calculates the total
|
||||
potential energy of the entire simulated system, instead of just
|
||||
the energy of the part that is changed. The total system
|
||||
energy before and after the proposed GCMC exchange or MC move
|
||||
is then used in the
|
||||
Metropolis criterion to determine whether or not to accept the
|
||||
proposed GCMC move. By default, this option is off, in which case only
|
||||
partial energies are computed to determine the difference in energy
|
||||
that would be caused by the proposed GCMC move.
|
||||
proposed change. By default, this option is off,
|
||||
in which case only
|
||||
partial energies are computed to determine the energy difference
|
||||
due to the proposed change.
|
||||
|
||||
The {full_energy} option is needed for systems with complicated
|
||||
potential energy calculations, including the following:
|
||||
@ -263,10 +287,11 @@ In these cases, LAMMPS will automatically apply the {full_energy}
|
||||
keyword and issue a warning message.
|
||||
|
||||
When the {mol} keyword is used, the {full_energy} option also includes
|
||||
the intramolecular energy of inserted and deleted molecules. If this
|
||||
the intramolecular energy of inserted and deleted molecules, whereas
|
||||
this energy is not included when {full_energy} is not used. If this
|
||||
is not desired, the {intra_energy} keyword can be used to define an
|
||||
amount of energy that is subtracted from the final energy when a
|
||||
molecule is inserted, and added to the initial energy when a molecule
|
||||
molecule is inserted, and subtracted from the initial energy when a molecule
|
||||
is deleted. For molecules that have a non-zero intramolecular energy,
|
||||
this will ensure roughly the same behavior whether or not the
|
||||
{full_energy} option is used.
|
||||
@ -291,7 +316,8 @@ include: "efield"_fix_efield.html, "gravity"_fix_gravity.html,
|
||||
"temp/berendsen"_fix_temp_berendsen.html,
|
||||
"temp/rescale"_fix_temp_rescale.html, and "wall fixes"_fix_wall.html.
|
||||
For that energy to be included in the total potential energy of the
|
||||
system (the quantity used when performing GCMC moves), you MUST enable
|
||||
system (the quantity used when performing GCMC exchange and MC moves),
|
||||
you MUST enable
|
||||
the "fix_modify"_fix_modify.html {energy} option for that fix. The
|
||||
doc pages for individual "fix"_fix.html commands specify if this
|
||||
should be done.
|
||||
@ -305,9 +331,14 @@ about simulating non-neutral systems with kspace on.
|
||||
|
||||
Use of this fix typically will cause the number of atoms to fluctuate,
|
||||
therefore, you will want to use the
|
||||
"compute_modify"_compute_modify.html command to insure that the
|
||||
"compute_modify dynamic/dof"_compute_modify.html command to insure that the
|
||||
current number of atoms is used as a normalizing factor each time
|
||||
temperature is computed. Here is the necessary command:
|
||||
temperature is computed. A simple example of this is:
|
||||
|
||||
compute_modify thermo_temp dynamic yes :pre
|
||||
|
||||
A more complicated example is listed earlier on this page
|
||||
in the context of NVT dynamics.
|
||||
|
||||
NOTE: If the density of the cell is initially very small or zero, and
|
||||
increases to a much larger density after a period of equilibration,
|
||||
@ -327,17 +358,9 @@ assigning an infinite positive energy to all new configurations that
|
||||
place any pair of atoms closer than the specified overlap cutoff
|
||||
distance.
|
||||
|
||||
compute_modify thermo_temp dynamic yes :pre
|
||||
|
||||
If LJ units are used, note that a value of 0.18292026 is used by this
|
||||
fix as the reduced value for Planck's constant. This value was
|
||||
derived from LJ parameters for argon, where h* = h/sqrt(sigma^2 *
|
||||
epsilon * mass), sigma = 3.429 angstroms, epsilon/k = 121.85 K, and
|
||||
mass = 39.948 amu.
|
||||
|
||||
The {group} keyword assigns all inserted atoms to the
|
||||
The {group} keyword adds all inserted atoms to the
|
||||
"group"_group.html of the group-ID value. The {grouptype} keyword
|
||||
assigns all inserted atoms of the specified type to the
|
||||
adds all inserted atoms of the specified type to the
|
||||
"group"_group.html of the group-ID value.
|
||||
|
||||
[Restart, fix_modify, output, run start/stop, minimize info:]
|
||||
@ -384,7 +407,8 @@ Can be run in parallel, but aspects of the GCMC part will not scale
|
||||
well in parallel. Only usable for 3D simulations.
|
||||
|
||||
When using fix gcmc in combination with fix shake or fix rigid,
|
||||
only gcmc exchange moves are supported.
|
||||
only GCMC exchange moves are supported, so the argument
|
||||
{M} must be zero.
|
||||
|
||||
Note that very lengthy simulations involving insertions/deletions of
|
||||
billions of gas molecules may run out of atom or molecule IDs and
|
||||
@ -409,7 +433,9 @@ the user for each subsequent fix gcmc command.
|
||||
[Default:]
|
||||
|
||||
The option defaults are mol = no, maxangle = 10, overlap_cutoff = 0.0,
|
||||
fugacity_coeff = 1, and full_energy = no,
|
||||
fugacity_coeff = 1.0, intra_energy = 0.0, tfac_insert = 1.0.
|
||||
(Patomtrans, Pmoltrans, Pmolrotate) = (1, 0, 0) for mol = no and
|
||||
(0, 1, 1) for mol = yes. full_energy = no,
|
||||
except for the situations where full_energy is required, as
|
||||
listed above.
|
||||
|
||||
|
||||
@ -34,7 +34,7 @@ by performing a nonequilibrium thermodynamic integration between the
|
||||
solid of interest and an Einstein crystal. A detailed explanation of
|
||||
how to use this command and choose its parameters for optimal
|
||||
performance and accuracy is given in the paper by
|
||||
"Freitas"_#Freitas. The paper also presents a short summary of the
|
||||
"Freitas"_#Freitas1. The paper also presents a short summary of the
|
||||
theory of nonequilibrium thermodynamic integrations.
|
||||
|
||||
The thermodynamic integration procedure is performed by rescaling the
|
||||
@ -67,13 +67,13 @@ of lambda is kept equal to zero and the fix has no other effect on the
|
||||
dynamics of the system.
|
||||
|
||||
The processes described above is known as nonequilibrium thermodynamic
|
||||
integration and is has been shown ("Freitas"_#Freitas) to present a
|
||||
integration and is has been shown ("Freitas"_#Freitas1) to present a
|
||||
much superior efficiency when compared to standard equilibrium
|
||||
methods. The reason why the switching it is made in both directions
|
||||
(potential to Einstein crystal and back) is to eliminate the
|
||||
dissipated heat due to the nonequilibrium process. Further details
|
||||
about nonequilibrium thermodynamic integration and its implementation
|
||||
in LAMMPS is available in "Freitas"_#Freitas.
|
||||
in LAMMPS is available in "Freitas"_#Freitas1.
|
||||
|
||||
The {function} keyword allows the use of two different lambda
|
||||
paths. Option {1} results in a constant rate of change of lambda with
|
||||
@ -94,7 +94,7 @@ thermodynamic integration. The use of option {2} is recommended since
|
||||
it results in better accuracy and less dissipation without any
|
||||
increase in computational resources cost.
|
||||
|
||||
NOTE: As described in "Freitas"_#Freitas, it is important to keep the
|
||||
NOTE: As described in "Freitas"_#Freitas1, it is important to keep the
|
||||
center-of-mass fixed during the thermodynamic integration. A nonzero
|
||||
total velocity will result in divergences during the integration due
|
||||
to the fact that the atoms are 'attached' to their equilibrium
|
||||
@ -156,7 +156,7 @@ The keyword default is function = 1.
|
||||
|
||||
:line
|
||||
|
||||
:link(Freitas)
|
||||
:link(Freitas1)
|
||||
[(Freitas)] Freitas, Asta, and de Koning, Computational Materials
|
||||
Science, 112, 333 (2016).
|
||||
|
||||
|
||||
65
doc/src/improper_inversion_harmonic.txt
Normal file
65
doc/src/improper_inversion_harmonic.txt
Normal file
@ -0,0 +1,65 @@
|
||||
"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
|
||||
|
||||
:link(lws,http://lammps.sandia.gov)
|
||||
:link(ld,Manual.html)
|
||||
:link(lc,Section_commands.html#comm)
|
||||
|
||||
:line
|
||||
|
||||
improper_style inversion/harmonic command :h3
|
||||
|
||||
[Syntax:]
|
||||
|
||||
improper_style inversion/harmonic :pre
|
||||
|
||||
[Examples:]
|
||||
|
||||
improper_style inversion/harmonic
|
||||
improper_coeff 1 18.776340 0.000000 :pre
|
||||
|
||||
[Description:]
|
||||
|
||||
The {inversion/harmonic} improper style follows the Wilson-Decius
|
||||
out-of-plane angle definition and uses an harmonic potential:
|
||||
|
||||
:c,image(Eqs/improper_inversion_harmonic.jpg)
|
||||
|
||||
where K is the force constant and omega is the angle evaluated for
|
||||
all three axis-plane combinations centered around the atom I. For
|
||||
the IL axis and the IJK plane omega looks as follows:
|
||||
|
||||
:c,image(Eqs/umbrella.jpg)
|
||||
|
||||
Note that the {inversion/harmonic} angle term evaluation differs to
|
||||
the "improper_umbrella"_improper_umbrella.html due to the cyclic
|
||||
evaluation of all possible angles omega.
|
||||
|
||||
The following coefficients must be defined for each improper type via
|
||||
the "improper_coeff"_improper_coeff.html command as in the example
|
||||
above, or in the data file or restart files read by the
|
||||
"read_data"_read_data.html or "read_restart"_read_restart.html
|
||||
commands:
|
||||
|
||||
K (energy)
|
||||
omega0 (degrees) :ul
|
||||
|
||||
If omega0 = 0 the potential term has a minimum for the planar
|
||||
structure. Otherwise it has two minima at +/- omega0, with a barrier
|
||||
in between.
|
||||
|
||||
:line
|
||||
|
||||
[Restrictions:]
|
||||
|
||||
This improper style can only be used if LAMMPS was built with the
|
||||
USER-MOFFF package. See the "Making
|
||||
LAMMPS"_Section_start.html#start_3 section for more info on packages.
|
||||
|
||||
[Related commands:]
|
||||
|
||||
"improper_coeff"_improper_coeff.html
|
||||
|
||||
[Default:] none
|
||||
|
||||
:line
|
||||
|
||||
@ -12,6 +12,7 @@ Improper Styles :h1
|
||||
improper_fourier
|
||||
improper_harmonic
|
||||
improper_hybrid
|
||||
improper_inversion_harmonic
|
||||
improper_none
|
||||
improper_ring
|
||||
improper_umbrella
|
||||
|
||||
@ -512,6 +512,7 @@ pair_tersoff_mod.html
|
||||
pair_tersoff_zbl.html
|
||||
pair_thole.html
|
||||
pair_tri_lj.html
|
||||
pair_ufm.html
|
||||
pair_vashishta.html
|
||||
pair_yukawa.html
|
||||
pair_yukawa_colloid.html
|
||||
|
||||
138
doc/src/pair_buck6d_coul_gauss.txt
Normal file
138
doc/src/pair_buck6d_coul_gauss.txt
Normal file
@ -0,0 +1,138 @@
|
||||
"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
|
||||
|
||||
:link(lws,http://lammps.sandia.gov)
|
||||
:link(ld,Manual.html)
|
||||
:link(lc,Section_commands.html#comm)
|
||||
|
||||
:line
|
||||
|
||||
pair_style buck6d/coul/gauss/dsf :h3
|
||||
pair_style buck6d/coul/gauss/long :h3
|
||||
|
||||
[Syntax:]
|
||||
|
||||
pair_style style args :pre
|
||||
|
||||
style = {buck6d/coul/gauss/dsf} or {buck6d/coul/gauss/long}
|
||||
args = list of arguments for a particular style :ul
|
||||
{buck6d/coul/gauss/dsf} args = smooth cutoff (cutoff2)
|
||||
smooth = smoothing onset within Buckingham cutoff (ratio)
|
||||
cutoff = global cutoff for Buckingham (and Coulombic if only 1 arg) (distance units)
|
||||
cutoff2 = global cutoff for Coulombic (optional) (distance units)
|
||||
{buck6d/coul/gauss/long} args = smooth smooth2 cutoff (cutoff2)
|
||||
smooth = smoothing onset within Buckingham cutoff (ratio)
|
||||
smooth2 = smoothing onset within Coulombic cutoff (ratio)
|
||||
cutoff = global cutoff for Buckingham (and Coulombic if only 1 arg) (distance units)
|
||||
cutoff2 = global cutoff for Coulombic (optional) (distance units) :pre
|
||||
|
||||
[Examples:]
|
||||
|
||||
pair_style buck6d/coul/gauss/dsf 0.9000 12.0000
|
||||
pair_coeff 1 1 1030. 3.061 457.179 4.521 0.608 :pre
|
||||
|
||||
pair_style buck6d/coul/gauss/long 0.9000 1.0000 12.0000
|
||||
pair_coeff 1 1 1030. 3.061 457.179 4.521 0.608 :pre
|
||||
|
||||
[Description:]
|
||||
|
||||
The {buck6d/coul/gauss} styles evaluate vdW and Coulomb
|
||||
interactions following the MOF-FF force field after
|
||||
"(Schmid)"_#Schmid. The vdW term of the {buck6d} styles
|
||||
computes a dispersion damped Buckingham potential:
|
||||
|
||||
:c,image(Eqs/pair_buck6d.jpg)
|
||||
|
||||
where A and C are a force constant, kappa is an ionic-pair dependent
|
||||
reciprocal length parameter, D is a dispersion correction parameter,
|
||||
and the cutoff Rc truncates the interaction distance.
|
||||
The first term in the potential corresponds to the Buckingham
|
||||
repulsion term and the second term to the dispersion attraction with
|
||||
a damping correction analog to the Grimme correction used in DFT.
|
||||
The latter corrects for artifacts occurring at short distances which
|
||||
become an issue for soft vdW potentials.
|
||||
|
||||
The {buck6d} styles include a smoothing function which is invoked
|
||||
according to the global smooting parameter within the specified
|
||||
cutoff. Hereby a parameter of i.e. 0.9 invokes the smoothing
|
||||
within 90% of the cutoff. No smoothing is applied at a value
|
||||
of 1.0. For the {gauss/dsf} style this smoothing is only applicable
|
||||
for the dispersion damped Buckingham potential. For the {gauss/long}
|
||||
styles the smoothing function can also be invoked for the real
|
||||
space coulomb interactions which enforce continous energies and
|
||||
forces at the cutoff.
|
||||
|
||||
Both styles {buck6d/coul/gauss/dsf} and {buck6d/coul/gauss/long}
|
||||
evaluate a Coulomb potential using spherical Gaussian type charge
|
||||
distributions which effectively dampen electrostatic ineractions
|
||||
for high charges at close distances. The electrostatic potential
|
||||
is thus evaluated as:
|
||||
|
||||
:c,image(Eqs/pair_coul_gauss.jpg)
|
||||
|
||||
where C is an energy-conversion constant, Qi and Qj are the
|
||||
charges on the 2 atoms, epsilon is the dielectric constant which
|
||||
can be set by the "dielectric"_dielectric.html command, alpha is
|
||||
ion pair dependent damping parameter and erf() is the error-function.
|
||||
The cutoff Rc truncates the interaction distance.
|
||||
|
||||
The style {buck6d/coul/gauss/dsf} computes the Coulomb interaction
|
||||
via the damped shifted force model described in "(Fennell)"_#Fennell
|
||||
approximating an Ewald sum similar to the "pair coul/dsf"_pair_coul.html
|
||||
styles. In {buck6d/coul/gauss/long} an additional damping factor is
|
||||
applied to the Coulombic term so it can be used in conjunction with the
|
||||
"kspace_style"_kspace_style.html command and its {ewald} or {pppm}
|
||||
options. The Coulombic cutoff in this case separates the real and
|
||||
reciprocal space evaluation of the Ewald sum.
|
||||
|
||||
If one cutoff is specified it is used for both the vdW and Coulomb
|
||||
terms. If two cutoffs are specified, the first is used as the cutoff
|
||||
for the vdW terms, and the second is the cutoff for the Coulombic term.
|
||||
|
||||
The following coefficients must be defined for each pair of atoms
|
||||
types via the "pair_coeff"_pair_coeff.html command as in the examples
|
||||
above, or in the data file or restart files read by the
|
||||
"read_data"_read_data.html or "read_restart"_read_restart.html
|
||||
commands:
|
||||
|
||||
A (energy units)
|
||||
rho (distance^-1 units)
|
||||
C (energy-distance^6 units)
|
||||
D (distance^14 units)
|
||||
alpha (distance^-1 units)
|
||||
cutoff (distance units) :ul
|
||||
|
||||
The second coefficient, rho, must be greater than zero. The latter
|
||||
coefficient is optional. If not specified, the global vdW cutoff
|
||||
is used.
|
||||
|
||||
:line
|
||||
|
||||
[Mixing, shift, table, tail correction, restart, rRESPA info]:
|
||||
|
||||
These pair styles do not support mixing. Thus, coefficients for all
|
||||
I,J pairs must be specified explicitly.
|
||||
|
||||
These styles do not support the "pair_modify"_pair_modify.html shift
|
||||
option for the energy. Instead the smoothing function should be applied
|
||||
by setting the global smoothing parameter to a value < 1.0.
|
||||
|
||||
These styles write their information to "binary restart
|
||||
files"_restart.html, so pair_style and pair_coeff commands do not need
|
||||
to be specified in an input script that reads a restart file.
|
||||
|
||||
[Restrictions:]
|
||||
|
||||
These styles are part of the USER-MOFFF package. They are only enabled
|
||||
if LAMMPS was built with that package. See the
|
||||
"Making LAMMPS"_Section_start.html#start_3 section for more info.
|
||||
|
||||
[Related commands:]
|
||||
|
||||
"pair_coeff"_pair_coeff.html
|
||||
|
||||
[Default:] none
|
||||
|
||||
:link(Schmid)
|
||||
[(Schmid)] S. Bureekaew, S. Amirjalayer, M. Tafipolsky, C. Spickermann, T.K. Roy and R. Schmid, Phys. Status Solidi B, 6, 1128 (2013).
|
||||
:link(Fennell)
|
||||
[(Fennell)] C. J. Fennell, J. D. Gezelter, J Chem Phys, 124, 234104 (2006).
|
||||
135
doc/src/pair_ufm.txt
Normal file
135
doc/src/pair_ufm.txt
Normal file
@ -0,0 +1,135 @@
|
||||
"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
|
||||
|
||||
:link(lws,http://lammps.sandia.gov)
|
||||
:link(ld,Manual.html)
|
||||
:link(lc,Section_commands.html#comm)
|
||||
|
||||
:line
|
||||
|
||||
pair_style ufm command :h3
|
||||
pair_style ufm/gpu command :h3
|
||||
pair_style ufm/omp command :h3
|
||||
pair_style ufm/opt command :h3
|
||||
|
||||
[Syntax:]
|
||||
|
||||
pair_style ufm cutoff :pre
|
||||
|
||||
cutoff = global cutoff for {ufm} interactions (distance units) :ul
|
||||
|
||||
[Examples:]
|
||||
|
||||
pair_style ufm 4.0
|
||||
pair_coeff 1 1 100.0 1.0 2.5
|
||||
pair_coeff * * 100.0 1.0 :pre
|
||||
|
||||
|
||||
pair_style ufm 4.0
|
||||
pair_coeff * * 10.0 1.0
|
||||
variable prefactor equal ramp(10,100)
|
||||
fix 1 all adapt 1 pair ufm epsilon * * v_prefactor :pre
|
||||
|
||||
[Description:]
|
||||
|
||||
Style {ufm} computes pairwise interactions using the Uhlenbeck-Ford model (UFM) potential "(Paula Leite2016)"_#PL2 which is given by
|
||||
|
||||
:c,image(Eqs/pair_ufm.jpg)
|
||||
|
||||
where rc is the cutoff, sigma is a distance-scale and epsilon is an energy-scale, i.e., a product of Boltzmann constant kB, temperature T and the Uhlenbeck-Ford p-parameter which is responsible
|
||||
to control the softness of the interactions "(Paula Leite2017)"_#PL1.
|
||||
This model is useful as a reference system for fluid-phase free-energy calculations "(Paula Leite2016)"_#PL2.
|
||||
|
||||
The following coefficients must be defined for each pair of atom types
|
||||
via the "pair_coeff"_pair_coeff.html command as in the examples above,
|
||||
or in the data file or restart files read by the
|
||||
"read_data"_read_data.html or "read_restart"_read_restart.html
|
||||
commands, or by mixing as described below:
|
||||
|
||||
epsilon (energy units)
|
||||
sigma (distance units)
|
||||
cutoff (distance units) :ul
|
||||
|
||||
The last coefficient is optional. If not specified, the global {ufm}
|
||||
cutoff is used.
|
||||
|
||||
|
||||
The "fix adapt"_fix_adapt.html command can be used to vary epsilon and sigma for this pair style over the course of a simulation, in which case
|
||||
pair_coeff settings for epsilon and sigma must still be specified, but will be
|
||||
overridden. For example these commands will vary the prefactor epsilon for
|
||||
all pairwise interactions from 10.0 at the beginning to 100.0 at the end
|
||||
of a run:
|
||||
|
||||
variable prefactor equal ramp(10,100)
|
||||
fix 1 all adapt 1 pair ufm epsilon * * v_prefactor :pre
|
||||
|
||||
NOTE: The thermodynamic integration procedure can be performed with this potential using "fix adapt"_fix_adapt.html. This command will rescale the force on each atom by varying a scale variable, which always starts with value 1.0. The syntax is the same described above, however, changing epsilon to scale. A detailed explanation of how to use this command and perform nonequilibrium thermodynamic integration in LAMMPS is given in the paper by "(Freitas)"_#Freitas2.
|
||||
|
||||
:line
|
||||
|
||||
Styles with a {gpu}, {intel}, {kk}, {omp}, or {opt} suffix are
|
||||
functionally the same as the corresponding style without the suffix.
|
||||
They have been optimized to run faster, depending on your available
|
||||
hardware, as discussed in "Section 5"_Section_accelerate.html
|
||||
of the manual. The accelerated styles take the same arguments and
|
||||
should produce the same results, except for round-off and precision
|
||||
issues.
|
||||
|
||||
These accelerated styles are part of the GPU, USER-INTEL, KOKKOS,
|
||||
USER-OMP and OPT packages, respectively. They are only enabled if
|
||||
LAMMPS was built with those packages. See the "Making
|
||||
LAMMPS"_Section_start.html#start_3 section for more info.
|
||||
|
||||
You can specify the accelerated styles explicitly in your input script
|
||||
by including their suffix, or you can use the "-suffix command-line
|
||||
switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can
|
||||
use the "suffix"_suffix.html command in your input script.
|
||||
|
||||
See "Section 5"_Section_accelerate.html of the manual for
|
||||
more instructions on how to use the accelerated styles effectively.
|
||||
|
||||
:line
|
||||
|
||||
[Mixing, shift, table, tail correction, restart, rRESPA info]:
|
||||
|
||||
For atom type pairs I,J and I != J, the A coefficient and cutoff
|
||||
distance for this pair style can be mixed. A is always mixed via a
|
||||
{geometric} rule. The cutoff is mixed according to the pair_modify
|
||||
mix value. The default mix value is {geometric}. See the
|
||||
"pair_modify" command for details.
|
||||
|
||||
This pair style support the "pair_modify"_pair_modify.html shift option for the energy of the pair interaction.
|
||||
|
||||
The "pair_modify"_pair_modify.html table and tail are not relevant for this
|
||||
pair style.
|
||||
|
||||
This pair style does not support the "pair_modify"_pair_modify.html tail option for adding long-range tail corrections to energy and pressure.
|
||||
|
||||
This pair style writes its information to "binary restart
|
||||
files"_restart.html, so pair_style and pair_coeff commands do not need
|
||||
to be specified in an input script that reads a restart file.
|
||||
|
||||
This pair style can only be used via the {pair} keyword of the
|
||||
"run_style respa"_run_style.html command. It does not support the
|
||||
{inner}, {middle}, {outer} keywords.
|
||||
|
||||
:line
|
||||
|
||||
[Restrictions:] none
|
||||
|
||||
[Related commands:]
|
||||
|
||||
"pair_coeff"_pair_coeff.html, "fix adapt"_fix_adapt.html
|
||||
|
||||
[Default:] none
|
||||
|
||||
|
||||
:link(PL1)
|
||||
[(Paula Leite2017)] Paula Leite, Santos-Florez, and de Koning, Phys Rev E, 96,
|
||||
32115 (2017).
|
||||
|
||||
:link(PL2)
|
||||
[(Paula Leite2016)] Paula Leite , Freitas, Azevedo, and de Koning, J Chem Phys, 126,
|
||||
044509 (2016).
|
||||
|
||||
:link(Freitas2)
|
||||
[(Freitas)] Freitas, Asta, and de Koning, Computational Materials Science, 112, 333 (2016).
|
||||
@ -17,6 +17,7 @@ Pair Styles :h1
|
||||
pair_brownian
|
||||
pair_buck
|
||||
pair_buck_long
|
||||
pair_buck6d_coul_gauss
|
||||
pair_charmm
|
||||
pair_class2
|
||||
pair_colloid
|
||||
@ -102,6 +103,7 @@ Pair Styles :h1
|
||||
pair_tersoff_zbl
|
||||
pair_thole
|
||||
pair_tri_lj
|
||||
pair_ufm
|
||||
pair_vashishta
|
||||
pair_yukawa
|
||||
pair_yukawa_colloid
|
||||
|
||||
5970
examples/USER/mofff/hkust1.data
Normal file
5970
examples/USER/mofff/hkust1.data
Normal file
File diff suppressed because it is too large
Load Diff
93
examples/USER/mofff/in.hkust1
Normal file
93
examples/USER/mofff/in.hkust1
Normal file
@ -0,0 +1,93 @@
|
||||
clear
|
||||
units real
|
||||
boundary p p p
|
||||
atom_style full
|
||||
read_data hkust1.data
|
||||
|
||||
neighbor 2.0 bin
|
||||
|
||||
|
||||
# ------------------------ MOF-FF FORCE FIELD ------------------------------
|
||||
|
||||
pair_style buck6d/coul/gauss/dsf 0.9000 12.0000
|
||||
|
||||
pair_coeff 1 1 10304 3.0612245 457.17971 4.5218516 0.60800971 # buck6d->(c3_c2h1@ph)|benzene/gaussian->(c3_c3@ph)|CuPW <--> buck6d->(c3_c2h1@ph)|benzene/gaussian->(c3_c3@ph)|CuPW
|
||||
pair_coeff 1 2 10304 3.0612245 457.17971 4.5218516 0.60800971 # buck6d->(c3_c2h1@ph)|benzene/gaussian->(c3_c3@ph)|CuPW <--> buck6d->(c3_c2h1@ph)|benzene/gaussian->(c3_c2h1@ph)|benzene
|
||||
pair_coeff 1 3 6157.8178 3.4682081 129.19572 0.78772886 0.73006542 # buck6d->(c3_c2h1@ph)|benzene/gaussian->(c3_c3@ph)|CuPW <--> buck6d->(h1_c1@ph)|benzene/gaussian->(h1_c1@ph)|benzene
|
||||
pair_coeff 1 4 23689.598 2.8436019 1636.052 12.696549 0.42066711 # buck6d->(c3_c2h1@ph)|benzene/gaussian->(c3_c3@ph)|CuPW <--> buck6d->(cu5_cu1o4@cu2)|CuPW/gaussian->(cu5_cu1o4@cu2)|CuPW
|
||||
pair_coeff 1 5 10576.399 3.1746032 377.27092 2.7176691 0.61999948 # buck6d->(c3_c2h1@ph)|benzene/gaussian->(c3_c3@ph)|CuPW <--> buck6d->(o2_c1cu1@co2)|CuPW/gaussian->(o2_c1cu1@co2)|CuPW
|
||||
pair_coeff 1 6 10304 3.0769231 443.36171 4.2093581 0.60800971 # buck6d->(c3_c2h1@ph)|benzene/gaussian->(c3_c3@ph)|CuPW <--> buck6d->(c3_c1o2@co2)|CuPW/gaussian->(c3_c1o2@co2)|CuPW
|
||||
pair_coeff 2 2 10304 3.0612245 457.17971 4.5218516 0.60800971 # buck6d->(c3_c2h1@ph)|benzene/gaussian->(c3_c2h1@ph)|benzene <--> buck6d->(c3_c2h1@ph)|benzene/gaussian->(c3_c2h1@ph)|benzene
|
||||
pair_coeff 2 3 6157.8178 3.4682081 129.19572 0.78772886 0.73006542 # buck6d->(c3_c2h1@ph)|benzene/gaussian->(c3_c2h1@ph)|benzene <--> buck6d->(h1_c1@ph)|benzene/gaussian->(h1_c1@ph)|benzene
|
||||
pair_coeff 2 4 23689.598 2.8436019 1636.052 12.696549 0.42066711 # buck6d->(c3_c2h1@ph)|benzene/gaussian->(c3_c2h1@ph)|benzene <--> buck6d->(cu5_cu1o4@cu2)|CuPW/gaussian->(cu5_cu1o4@cu2)|CuPW
|
||||
pair_coeff 2 5 10576.399 3.1746032 377.27092 2.7176691 0.61999948 # buck6d->(c3_c2h1@ph)|benzene/gaussian->(c3_c2h1@ph)|benzene <--> buck6d->(o2_c1cu1@co2)|CuPW/gaussian->(o2_c1cu1@co2)|CuPW
|
||||
pair_coeff 2 6 10304 3.0769231 443.36171 4.2093581 0.60800971 # buck6d->(c3_c2h1@ph)|benzene/gaussian->(c3_c2h1@ph)|benzene <--> buck6d->(c3_c1o2@co2)|CuPW/gaussian->(c3_c1o2@co2)|CuPW
|
||||
pair_coeff 3 3 3680 4 32.805 0.10690769 0.9771554 # buck6d->(h1_c1@ph)|benzene/gaussian->(h1_c1@ph)|benzene <--> buck6d->(h1_c1@ph)|benzene/gaussian->(h1_c1@ph)|benzene
|
||||
pair_coeff 3 4 14157.243 3.1914894 489.18197 2.5231391 0.45538909 # buck6d->(h1_c1@ph)|benzene/gaussian->(h1_c1@ph)|benzene <--> buck6d->(cu5_cu1o4@cu2)|CuPW/gaussian->(cu5_cu1o4@cu2)|CuPW
|
||||
pair_coeff 3 5 6320.6076 3.6144578 103.50278 0.44181916 0.75109952 # buck6d->(h1_c1@ph)|benzene/gaussian->(h1_c1@ph)|benzene <--> buck6d->(o2_c1cu1@co2)|CuPW/gaussian->(o2_c1cu1@co2)|CuPW
|
||||
pair_coeff 3 6 6157.8178 3.4883721 124.7792 0.72632262 0.73006542 # buck6d->(h1_c1@ph)|benzene/gaussian->(h1_c1@ph)|benzene <--> buck6d->(c3_c1o2@co2)|CuPW/gaussian->(c3_c1o2@co2)|CuPW
|
||||
pair_coeff 4 4 54464 2.6548673 5679.4311 33.208515 0.34105936 # buck6d->(cu5_cu1o4@cu2)|CuPW/gaussian->(cu5_cu1o4@cu2)|CuPW <--> buck6d->(cu5_cu1o4@cu2)|CuPW/gaussian->(cu5_cu1o4@cu2)|CuPW
|
||||
pair_coeff 4 5 24315.863 2.9411765 1371.5617 7.9168726 0.42457748 # buck6d->(cu5_cu1o4@cu2)|CuPW/gaussian->(cu5_cu1o4@cu2)|CuPW <--> buck6d->(o2_c1cu1@co2)|CuPW/gaussian->(o2_c1cu1@co2)|CuPW
|
||||
pair_coeff 4 6 23689.598 2.8571429 1590.0769 11.87959 0.42066711 # buck6d->(cu5_cu1o4@cu2)|CuPW/gaussian->(cu5_cu1o4@cu2)|CuPW <--> buck6d->(c3_c1o2@co2)|CuPW/gaussian->(c3_c1o2@co2)|CuPW
|
||||
pair_coeff 5 5 10856 3.2967033 308.7755 1.6022517 0.63272774 # buck6d->(o2_c1cu1@co2)|CuPW/gaussian->(o2_c1cu1@co2)|CuPW <--> buck6d->(o2_c1cu1@co2)|CuPW/gaussian->(o2_c1cu1@co2)|CuPW
|
||||
pair_coeff 5 6 10576.399 3.1914894 365.45138 2.5231391 0.61999948 # buck6d->(o2_c1cu1@co2)|CuPW/gaussian->(o2_c1cu1@co2)|CuPW <--> buck6d->(c3_c1o2@co2)|CuPW/gaussian->(c3_c1o2@co2)|CuPW
|
||||
pair_coeff 6 6 10304 3.0927835 429.89352 3.9170177 0.60800971 # buck6d->(c3_c1o2@co2)|CuPW/gaussian->(c3_c1o2@co2)|CuPW <--> buck6d->(c3_c1o2@co2)|CuPW/gaussian->(c3_c1o2@co2)|CuPW
|
||||
|
||||
bond_style hybrid class2 morse
|
||||
|
||||
bond_coeff 5 morse 50.000000 1.451345 1.914000 # morse->(cu5_cu1o4@cu2,o2_c1cu1@co2)|CuPW
|
||||
bond_coeff 4 class2 2.536000 75.465060 -192.435903 286.248406 # mm3->(cu5_cu1o4@cu2,cu5_cu1o4@cu2)|CuPW
|
||||
bond_coeff 3 class2 1.094000 390.634200 -996.117210 1481.724350 # mm3->(c3_c2h1@ph,h1_c1@ph)|benzene
|
||||
bond_coeff 6 class2 1.278000 585.591600 -1493.258580 2221.222138 # mm3->(c3_c1o2@co2,o2_c1cu1@co2)|CuPW
|
||||
bond_coeff 1 class2 1.394000 509.335200 -1298.804760 1931.972080 # mm3->(c3_c2h1@ph,c3_c2h1@ph)|benzene
|
||||
bond_coeff 2 class2 1.485000 360.635220 -919.619811 1367.934469 # mm3->(c3_c1o2@co2,c3_c3@ph)|CuPW
|
||||
|
||||
angle_style hybrid class2/p6 cosine/buck6d
|
||||
|
||||
angle_coeff 2 class2/p6 117.711000 57.408120 -46.049402 10.553745 -7.558563 13.610890 # mm3->(c3_c1o2@co2,c3_c3@ph,c3_c2h1@ph)|CuPW
|
||||
angle_coeff 2 class2/p6 bb 0.0 1.0 1.0
|
||||
angle_coeff 2 class2/p6 ba 0.0 0.0 1.0 1.0
|
||||
angle_coeff 6 class2/p6 126.814000 13.740540 -11.021849 2.526022 -1.809130 3.257744 # mm3->(c3_c1o2@co2,o2_c1cu1@co2,cu5_cu1o4@cu2)|CuPW
|
||||
angle_coeff 6 class2/p6 bb 0.0 1.0 1.0
|
||||
angle_coeff 6 class2/p6 ba 0.0 0.0 1.0 1.0
|
||||
angle_coeff 7 class2/p6 123.490000 111.075360 -89.098091 20.419778 -14.624589 26.334856 # mm3->(o2_c1cu1@co2,c3_c1o2@co2,o2_c1cu1@co2)|CuPW
|
||||
angle_coeff 7 class2/p6 bb 14.244120 1.278000 1.278000
|
||||
angle_coeff 7 class2/p6 ba 3.309240 3.309240 1.278000 1.278000
|
||||
angle_coeff 1 class2/p6 127.050000 53.307540 -42.760159 9.799907 -7.018666 12.638684 # mm3->(c3_c2h1@ph,c3_c2h1@ph,c3_c2h1@ph)|benzene
|
||||
angle_coeff 1 class2/p6 bb 71.796120 1.394000 1.394000
|
||||
angle_coeff 1 class2/p6 ba 6.762360 6.762360 1.394000 1.394000
|
||||
angle_coeff 4 class2/p6 84.336000 29.351520 -23.544055 5.395900 -3.864529 6.958951 # mm3->(cu5_cu1o4@cu2,cu5_cu1o4@cu2,o2_c1cu1@co2)|CuPW
|
||||
angle_coeff 4 class2/p6 bb 0.0 1.0 1.0
|
||||
angle_coeff 4 class2/p6 ba 0.0 0.0 1.0 1.0
|
||||
angle_coeff 3 class2/p6 120.350000 36.185820 -29.026127 6.652298 -4.764358 8.579296 # mm3->(c3_c2h1@ph,c3_c2h1@ph,h1_c1@ph)|benzene
|
||||
angle_coeff 3 class2/p6 bb 93.378120 1.394000 1.094000
|
||||
angle_coeff 3 class2/p6 ba -25.179000 53.523360 1.394000 1.094000
|
||||
angle_coeff 8 class2/p6 115.098000 79.493700 -63.765149 14.613896 -10.466432 18.847160 # mm3->(c3_c3@ph,c3_c1o2@co2,o2_c1cu1@co2)|CuPW
|
||||
angle_coeff 8 class2/p6 bb 0.0 1.0 1.0
|
||||
angle_coeff 8 class2/p6 ba 0.0 0.0 1.0 1.0
|
||||
angle_coeff 5 cosine/buck6d 1.978350 4 180.000000 # fourier->(o2_c1cu1@co2,cu5_cu1o4@cu2,o2_c1cu1@co2)|CuPW
|
||||
|
||||
dihedral_style opls
|
||||
|
||||
dihedral_coeff 3 0.000000 0.000000 0.000000 0.000000 # cos3->(c3_c3@ph,c3_c2h1@ph,c3_c3@ph,c3_c1o2@co2)|CuPW
|
||||
dihedral_coeff 9 0.000000 4.528000 0.000000 0.000000 # cos3->(o2_c1cu1@co2,c3_c1o2@co2,o2_c1cu1@co2,cu5_cu1o4@cu2)|CuPW
|
||||
dihedral_coeff 8 0.000000 0.000000 0.000000 0.000000 # cos3->(o2_c1cu1@co2,cu5_cu1o4@cu2,o2_c1cu1@co2,c3_c1o2@co2)|CuPW
|
||||
dihedral_coeff 5 0.000000 1.741000 0.000000 0.000000 # cos3->(o2_c1cu1@co2,c3_c1o2@co2,c3_c3@ph,c3_c2h1@ph)|CuPW
|
||||
dihedral_coeff 2 0.000000 6.316000 0.000000 0.000000 # cos3->(c3_c2h1@ph,c3_c2h1@ph,c3_c2h1@ph,h1_c1@ph)|benzene
|
||||
dihedral_coeff 1 0.000000 4.379000 0.000000 0.000000 # cos3->(c3_c2h1@ph,c3_c2h1@ph,c3_c2h1@ph,c3_c2h1@ph)|benzene
|
||||
dihedral_coeff 6 0.000000 0.000000 0.000000 0.609000 # cos4->(o2_c1cu1@co2,cu5_cu1o4@cu2,cu5_cu1o4@cu2,o2_c1cu1@co2)|CuPW
|
||||
dihedral_coeff 4 0.000000 0.000000 0.000000 0.000000 # cos3->(h1_c1@ph,c3_c2h1@ph,c3_c3@ph,c3_c1o2@co2)|CuPW
|
||||
dihedral_coeff 10 0.000000 0.000000 0.000000 0.000000 # cos3->(c3_c3@ph,c3_c1o2@co2,o2_c1cu1@co2,cu5_cu1o4@cu2)|CuPW
|
||||
dihedral_coeff 7 0.000000 0.000000 0.000000 0.000000 # cos3->(cu5_cu1o4@cu2,cu5_cu1o4@cu2,o2_c1cu1@co2,c3_c1o2@co2)|CuPW
|
||||
|
||||
improper_style inversion/harmonic
|
||||
|
||||
improper_coeff 1 18.776340 0.000000 # harm->(c3_c3@ph,c3_c2h1@ph,c3_c2h1@ph,c3_c1o2@co2)|CuPW
|
||||
improper_coeff 3 41.005800 0.000000 # harm->(c3_c1o2@co2,c3_c3@ph,o2_c1cu1@co2,o2_c1cu1@co2)|CuPW
|
||||
improper_coeff 2 4.100580 0.000000 # harm->(c3_c2h1@ph,c3_c2h1@ph,c3_c2h1@ph,h1_c1@ph)|benzene
|
||||
|
||||
special_bonds lj 0.0 0.0 1.0 coul 1.0 1.0 1.0
|
||||
|
||||
# ------------------------ MOF-FF FORCE FIELD END --------------------------
|
||||
|
||||
run 0
|
||||
94
examples/USER/mofff/in.hkust1_long
Normal file
94
examples/USER/mofff/in.hkust1_long
Normal file
@ -0,0 +1,94 @@
|
||||
clear
|
||||
units real
|
||||
boundary p p p
|
||||
atom_style full
|
||||
read_data hkust1.data
|
||||
|
||||
neighbor 2.0 bin
|
||||
|
||||
|
||||
# ------------------------ MOF-FF FORCE FIELD ------------------------------
|
||||
kspace_style ewald 1.0e-6
|
||||
|
||||
pair_style buck6d/coul/gauss/long 0.9 0.9 12.0000
|
||||
|
||||
pair_coeff 1 1 10304 3.0612245 457.17971 4.5218516 0.60800971 # buck6d->(c3_c2h1@ph)|benzene/gaussian->(c3_c3@ph)|CuPW <--> buck6d->(c3_c2h1@ph)|benzene/gaussian->(c3_c3@ph)|CuPW
|
||||
pair_coeff 1 2 10304 3.0612245 457.17971 4.5218516 0.60800971 # buck6d->(c3_c2h1@ph)|benzene/gaussian->(c3_c3@ph)|CuPW <--> buck6d->(c3_c2h1@ph)|benzene/gaussian->(c3_c2h1@ph)|benzene
|
||||
pair_coeff 1 3 6157.8178 3.4682081 129.19572 0.78772886 0.73006542 # buck6d->(c3_c2h1@ph)|benzene/gaussian->(c3_c3@ph)|CuPW <--> buck6d->(h1_c1@ph)|benzene/gaussian->(h1_c1@ph)|benzene
|
||||
pair_coeff 1 4 23689.598 2.8436019 1636.052 12.696549 0.42066711 # buck6d->(c3_c2h1@ph)|benzene/gaussian->(c3_c3@ph)|CuPW <--> buck6d->(cu5_cu1o4@cu2)|CuPW/gaussian->(cu5_cu1o4@cu2)|CuPW
|
||||
pair_coeff 1 5 10576.399 3.1746032 377.27092 2.7176691 0.61999948 # buck6d->(c3_c2h1@ph)|benzene/gaussian->(c3_c3@ph)|CuPW <--> buck6d->(o2_c1cu1@co2)|CuPW/gaussian->(o2_c1cu1@co2)|CuPW
|
||||
pair_coeff 1 6 10304 3.0769231 443.36171 4.2093581 0.60800971 # buck6d->(c3_c2h1@ph)|benzene/gaussian->(c3_c3@ph)|CuPW <--> buck6d->(c3_c1o2@co2)|CuPW/gaussian->(c3_c1o2@co2)|CuPW
|
||||
pair_coeff 2 2 10304 3.0612245 457.17971 4.5218516 0.60800971 # buck6d->(c3_c2h1@ph)|benzene/gaussian->(c3_c2h1@ph)|benzene <--> buck6d->(c3_c2h1@ph)|benzene/gaussian->(c3_c2h1@ph)|benzene
|
||||
pair_coeff 2 3 6157.8178 3.4682081 129.19572 0.78772886 0.73006542 # buck6d->(c3_c2h1@ph)|benzene/gaussian->(c3_c2h1@ph)|benzene <--> buck6d->(h1_c1@ph)|benzene/gaussian->(h1_c1@ph)|benzene
|
||||
pair_coeff 2 4 23689.598 2.8436019 1636.052 12.696549 0.42066711 # buck6d->(c3_c2h1@ph)|benzene/gaussian->(c3_c2h1@ph)|benzene <--> buck6d->(cu5_cu1o4@cu2)|CuPW/gaussian->(cu5_cu1o4@cu2)|CuPW
|
||||
pair_coeff 2 5 10576.399 3.1746032 377.27092 2.7176691 0.61999948 # buck6d->(c3_c2h1@ph)|benzene/gaussian->(c3_c2h1@ph)|benzene <--> buck6d->(o2_c1cu1@co2)|CuPW/gaussian->(o2_c1cu1@co2)|CuPW
|
||||
pair_coeff 2 6 10304 3.0769231 443.36171 4.2093581 0.60800971 # buck6d->(c3_c2h1@ph)|benzene/gaussian->(c3_c2h1@ph)|benzene <--> buck6d->(c3_c1o2@co2)|CuPW/gaussian->(c3_c1o2@co2)|CuPW
|
||||
pair_coeff 3 3 3680 4 32.805 0.10690769 0.9771554 # buck6d->(h1_c1@ph)|benzene/gaussian->(h1_c1@ph)|benzene <--> buck6d->(h1_c1@ph)|benzene/gaussian->(h1_c1@ph)|benzene
|
||||
pair_coeff 3 4 14157.243 3.1914894 489.18197 2.5231391 0.45538909 # buck6d->(h1_c1@ph)|benzene/gaussian->(h1_c1@ph)|benzene <--> buck6d->(cu5_cu1o4@cu2)|CuPW/gaussian->(cu5_cu1o4@cu2)|CuPW
|
||||
pair_coeff 3 5 6320.6076 3.6144578 103.50278 0.44181916 0.75109952 # buck6d->(h1_c1@ph)|benzene/gaussian->(h1_c1@ph)|benzene <--> buck6d->(o2_c1cu1@co2)|CuPW/gaussian->(o2_c1cu1@co2)|CuPW
|
||||
pair_coeff 3 6 6157.8178 3.4883721 124.7792 0.72632262 0.73006542 # buck6d->(h1_c1@ph)|benzene/gaussian->(h1_c1@ph)|benzene <--> buck6d->(c3_c1o2@co2)|CuPW/gaussian->(c3_c1o2@co2)|CuPW
|
||||
pair_coeff 4 4 54464 2.6548673 5679.4311 33.208515 0.34105936 # buck6d->(cu5_cu1o4@cu2)|CuPW/gaussian->(cu5_cu1o4@cu2)|CuPW <--> buck6d->(cu5_cu1o4@cu2)|CuPW/gaussian->(cu5_cu1o4@cu2)|CuPW
|
||||
pair_coeff 4 5 24315.863 2.9411765 1371.5617 7.9168726 0.42457748 # buck6d->(cu5_cu1o4@cu2)|CuPW/gaussian->(cu5_cu1o4@cu2)|CuPW <--> buck6d->(o2_c1cu1@co2)|CuPW/gaussian->(o2_c1cu1@co2)|CuPW
|
||||
pair_coeff 4 6 23689.598 2.8571429 1590.0769 11.87959 0.42066711 # buck6d->(cu5_cu1o4@cu2)|CuPW/gaussian->(cu5_cu1o4@cu2)|CuPW <--> buck6d->(c3_c1o2@co2)|CuPW/gaussian->(c3_c1o2@co2)|CuPW
|
||||
pair_coeff 5 5 10856 3.2967033 308.7755 1.6022517 0.63272774 # buck6d->(o2_c1cu1@co2)|CuPW/gaussian->(o2_c1cu1@co2)|CuPW <--> buck6d->(o2_c1cu1@co2)|CuPW/gaussian->(o2_c1cu1@co2)|CuPW
|
||||
pair_coeff 5 6 10576.399 3.1914894 365.45138 2.5231391 0.61999948 # buck6d->(o2_c1cu1@co2)|CuPW/gaussian->(o2_c1cu1@co2)|CuPW <--> buck6d->(c3_c1o2@co2)|CuPW/gaussian->(c3_c1o2@co2)|CuPW
|
||||
pair_coeff 6 6 10304 3.0927835 429.89352 3.9170177 0.60800971 # buck6d->(c3_c1o2@co2)|CuPW/gaussian->(c3_c1o2@co2)|CuPW <--> buck6d->(c3_c1o2@co2)|CuPW/gaussian->(c3_c1o2@co2)|CuPW
|
||||
|
||||
bond_style hybrid class2 morse
|
||||
|
||||
bond_coeff 5 morse 50.000000 1.451345 1.914000 # morse->(cu5_cu1o4@cu2,o2_c1cu1@co2)|CuPW
|
||||
bond_coeff 4 class2 2.536000 75.465060 -192.435903 286.248406 # mm3->(cu5_cu1o4@cu2,cu5_cu1o4@cu2)|CuPW
|
||||
bond_coeff 3 class2 1.094000 390.634200 -996.117210 1481.724350 # mm3->(c3_c2h1@ph,h1_c1@ph)|benzene
|
||||
bond_coeff 6 class2 1.278000 585.591600 -1493.258580 2221.222138 # mm3->(c3_c1o2@co2,o2_c1cu1@co2)|CuPW
|
||||
bond_coeff 1 class2 1.394000 509.335200 -1298.804760 1931.972080 # mm3->(c3_c2h1@ph,c3_c2h1@ph)|benzene
|
||||
bond_coeff 2 class2 1.485000 360.635220 -919.619811 1367.934469 # mm3->(c3_c1o2@co2,c3_c3@ph)|CuPW
|
||||
|
||||
angle_style hybrid class2/p6 cosine/buck6d
|
||||
|
||||
angle_coeff 2 class2/p6 117.711000 57.408120 -46.049402 10.553745 -7.558563 13.610890 # mm3->(c3_c1o2@co2,c3_c3@ph,c3_c2h1@ph)|CuPW
|
||||
angle_coeff 2 class2/p6 bb 0.0 1.0 1.0
|
||||
angle_coeff 2 class2/p6 ba 0.0 0.0 1.0 1.0
|
||||
angle_coeff 6 class2/p6 126.814000 13.740540 -11.021849 2.526022 -1.809130 3.257744 # mm3->(c3_c1o2@co2,o2_c1cu1@co2,cu5_cu1o4@cu2)|CuPW
|
||||
angle_coeff 6 class2/p6 bb 0.0 1.0 1.0
|
||||
angle_coeff 6 class2/p6 ba 0.0 0.0 1.0 1.0
|
||||
angle_coeff 7 class2/p6 123.490000 111.075360 -89.098091 20.419778 -14.624589 26.334856 # mm3->(o2_c1cu1@co2,c3_c1o2@co2,o2_c1cu1@co2)|CuPW
|
||||
angle_coeff 7 class2/p6 bb 14.244120 1.278000 1.278000
|
||||
angle_coeff 7 class2/p6 ba 3.309240 3.309240 1.278000 1.278000
|
||||
angle_coeff 1 class2/p6 127.050000 53.307540 -42.760159 9.799907 -7.018666 12.638684 # mm3->(c3_c2h1@ph,c3_c2h1@ph,c3_c2h1@ph)|benzene
|
||||
angle_coeff 1 class2/p6 bb 71.796120 1.394000 1.394000
|
||||
angle_coeff 1 class2/p6 ba 6.762360 6.762360 1.394000 1.394000
|
||||
angle_coeff 4 class2/p6 84.336000 29.351520 -23.544055 5.395900 -3.864529 6.958951 # mm3->(cu5_cu1o4@cu2,cu5_cu1o4@cu2,o2_c1cu1@co2)|CuPW
|
||||
angle_coeff 4 class2/p6 bb 0.0 1.0 1.0
|
||||
angle_coeff 4 class2/p6 ba 0.0 0.0 1.0 1.0
|
||||
angle_coeff 3 class2/p6 120.350000 36.185820 -29.026127 6.652298 -4.764358 8.579296 # mm3->(c3_c2h1@ph,c3_c2h1@ph,h1_c1@ph)|benzene
|
||||
angle_coeff 3 class2/p6 bb 93.378120 1.394000 1.094000
|
||||
angle_coeff 3 class2/p6 ba -25.179000 53.523360 1.394000 1.094000
|
||||
angle_coeff 8 class2/p6 115.098000 79.493700 -63.765149 14.613896 -10.466432 18.847160 # mm3->(c3_c3@ph,c3_c1o2@co2,o2_c1cu1@co2)|CuPW
|
||||
angle_coeff 8 class2/p6 bb 0.0 1.0 1.0
|
||||
angle_coeff 8 class2/p6 ba 0.0 0.0 1.0 1.0
|
||||
angle_coeff 5 cosine/buck6d 1.978350 4 180.000000 #1.0 # fourier->(o2_c1cu1@co2,cu5_cu1o4@cu2,o2_c1cu1@co2)|CuPW
|
||||
|
||||
dihedral_style opls
|
||||
|
||||
dihedral_coeff 3 0.000000 0.000000 0.000000 0.000000 # cos3->(c3_c3@ph,c3_c2h1@ph,c3_c3@ph,c3_c1o2@co2)|CuPW
|
||||
dihedral_coeff 9 0.000000 4.528000 0.000000 0.000000 # cos3->(o2_c1cu1@co2,c3_c1o2@co2,o2_c1cu1@co2,cu5_cu1o4@cu2)|CuPW
|
||||
dihedral_coeff 8 0.000000 0.000000 0.000000 0.000000 # cos3->(o2_c1cu1@co2,cu5_cu1o4@cu2,o2_c1cu1@co2,c3_c1o2@co2)|CuPW
|
||||
dihedral_coeff 5 0.000000 1.741000 0.000000 0.000000 # cos3->(o2_c1cu1@co2,c3_c1o2@co2,c3_c3@ph,c3_c2h1@ph)|CuPW
|
||||
dihedral_coeff 2 0.000000 6.316000 0.000000 0.000000 # cos3->(c3_c2h1@ph,c3_c2h1@ph,c3_c2h1@ph,h1_c1@ph)|benzene
|
||||
dihedral_coeff 1 0.000000 4.379000 0.000000 0.000000 # cos3->(c3_c2h1@ph,c3_c2h1@ph,c3_c2h1@ph,c3_c2h1@ph)|benzene
|
||||
dihedral_coeff 6 0.000000 0.000000 0.000000 0.609000 # cos4->(o2_c1cu1@co2,cu5_cu1o4@cu2,cu5_cu1o4@cu2,o2_c1cu1@co2)|CuPW
|
||||
dihedral_coeff 4 0.000000 0.000000 0.000000 0.000000 # cos3->(h1_c1@ph,c3_c2h1@ph,c3_c3@ph,c3_c1o2@co2)|CuPW
|
||||
dihedral_coeff 10 0.000000 0.000000 0.000000 0.000000 # cos3->(c3_c3@ph,c3_c1o2@co2,o2_c1cu1@co2,cu5_cu1o4@cu2)|CuPW
|
||||
dihedral_coeff 7 0.000000 0.000000 0.000000 0.000000 # cos3->(cu5_cu1o4@cu2,cu5_cu1o4@cu2,o2_c1cu1@co2,c3_c1o2@co2)|CuPW
|
||||
|
||||
improper_style inversion/harmonic
|
||||
|
||||
improper_coeff 1 18.776340 0.000000 # harm->(c3_c3@ph,c3_c2h1@ph,c3_c2h1@ph,c3_c1o2@co2)|CuPW
|
||||
improper_coeff 3 41.005800 0.000000 # harm->(c3_c1o2@co2,c3_c3@ph,o2_c1cu1@co2,o2_c1cu1@co2)|CuPW
|
||||
improper_coeff 2 4.100580 0.000000 # harm->(c3_c2h1@ph,c3_c2h1@ph,c3_c2h1@ph,h1_c1@ph)|benzene
|
||||
|
||||
special_bonds lj 0.0 0.0 1.0 coul 1.0 1.0 1.0
|
||||
|
||||
# ------------------------ MOF-FF FORCE FIELD END --------------------------
|
||||
|
||||
run 0
|
||||
166
examples/USER/mofff/log.17Jan18.hkust1.g++.1
Normal file
166
examples/USER/mofff/log.17Jan18.hkust1.g++.1
Normal file
@ -0,0 +1,166 @@
|
||||
LAMMPS (17 Jan 2018)
|
||||
clear
|
||||
units real
|
||||
boundary p p p
|
||||
atom_style full
|
||||
read_data hkust1.data
|
||||
triclinic box = (0 0 0) to (26.4408 26.4408 26.4408) with tilt (0 0 0)
|
||||
1 by 1 by 1 MPI processor grid
|
||||
reading atoms ...
|
||||
624 atoms
|
||||
scanning bonds ...
|
||||
5 = max bonds/atom
|
||||
scanning angles ...
|
||||
10 = max angles/atom
|
||||
scanning dihedrals ...
|
||||
32 = max dihedrals/atom
|
||||
scanning impropers ...
|
||||
2 = max impropers/atom
|
||||
reading bonds ...
|
||||
792 bonds
|
||||
reading angles ...
|
||||
1536 angles
|
||||
reading dihedrals ...
|
||||
2688 dihedrals
|
||||
reading impropers ...
|
||||
288 impropers
|
||||
5 = max # of 1-2 neighbors
|
||||
8 = max # of 1-3 neighbors
|
||||
20 = max # of 1-4 neighbors
|
||||
17 = max # of special neighbors
|
||||
|
||||
neighbor 2.0 bin
|
||||
|
||||
|
||||
# ------------------------ MOF-FF FORCE FIELD ------------------------------
|
||||
|
||||
pair_style buck6d/coul/gauss/dsf 0.9000 12.0000
|
||||
|
||||
pair_coeff 1 1 10304 3.0612245 457.17971 4.5218516 0.60800971 # buck6d->(c3_c2h1@ph)|benzene/gaussian->(c3_c3@ph)|CuPW <--> buck6d->(c3_c2h1@ph)|benzene/gaussian->(c3_c3@ph)|CuPW
|
||||
pair_coeff 1 2 10304 3.0612245 457.17971 4.5218516 0.60800971 # buck6d->(c3_c2h1@ph)|benzene/gaussian->(c3_c3@ph)|CuPW <--> buck6d->(c3_c2h1@ph)|benzene/gaussian->(c3_c2h1@ph)|benzene
|
||||
pair_coeff 1 3 6157.8178 3.4682081 129.19572 0.78772886 0.73006542 # buck6d->(c3_c2h1@ph)|benzene/gaussian->(c3_c3@ph)|CuPW <--> buck6d->(h1_c1@ph)|benzene/gaussian->(h1_c1@ph)|benzene
|
||||
pair_coeff 1 4 23689.598 2.8436019 1636.052 12.696549 0.42066711 # buck6d->(c3_c2h1@ph)|benzene/gaussian->(c3_c3@ph)|CuPW <--> buck6d->(cu5_cu1o4@cu2)|CuPW/gaussian->(cu5_cu1o4@cu2)|CuPW
|
||||
pair_coeff 1 5 10576.399 3.1746032 377.27092 2.7176691 0.61999948 # buck6d->(c3_c2h1@ph)|benzene/gaussian->(c3_c3@ph)|CuPW <--> buck6d->(o2_c1cu1@co2)|CuPW/gaussian->(o2_c1cu1@co2)|CuPW
|
||||
pair_coeff 1 6 10304 3.0769231 443.36171 4.2093581 0.60800971 # buck6d->(c3_c2h1@ph)|benzene/gaussian->(c3_c3@ph)|CuPW <--> buck6d->(c3_c1o2@co2)|CuPW/gaussian->(c3_c1o2@co2)|CuPW
|
||||
pair_coeff 2 2 10304 3.0612245 457.17971 4.5218516 0.60800971 # buck6d->(c3_c2h1@ph)|benzene/gaussian->(c3_c2h1@ph)|benzene <--> buck6d->(c3_c2h1@ph)|benzene/gaussian->(c3_c2h1@ph)|benzene
|
||||
pair_coeff 2 3 6157.8178 3.4682081 129.19572 0.78772886 0.73006542 # buck6d->(c3_c2h1@ph)|benzene/gaussian->(c3_c2h1@ph)|benzene <--> buck6d->(h1_c1@ph)|benzene/gaussian->(h1_c1@ph)|benzene
|
||||
pair_coeff 2 4 23689.598 2.8436019 1636.052 12.696549 0.42066711 # buck6d->(c3_c2h1@ph)|benzene/gaussian->(c3_c2h1@ph)|benzene <--> buck6d->(cu5_cu1o4@cu2)|CuPW/gaussian->(cu5_cu1o4@cu2)|CuPW
|
||||
pair_coeff 2 5 10576.399 3.1746032 377.27092 2.7176691 0.61999948 # buck6d->(c3_c2h1@ph)|benzene/gaussian->(c3_c2h1@ph)|benzene <--> buck6d->(o2_c1cu1@co2)|CuPW/gaussian->(o2_c1cu1@co2)|CuPW
|
||||
pair_coeff 2 6 10304 3.0769231 443.36171 4.2093581 0.60800971 # buck6d->(c3_c2h1@ph)|benzene/gaussian->(c3_c2h1@ph)|benzene <--> buck6d->(c3_c1o2@co2)|CuPW/gaussian->(c3_c1o2@co2)|CuPW
|
||||
pair_coeff 3 3 3680 4 32.805 0.10690769 0.9771554 # buck6d->(h1_c1@ph)|benzene/gaussian->(h1_c1@ph)|benzene <--> buck6d->(h1_c1@ph)|benzene/gaussian->(h1_c1@ph)|benzene
|
||||
pair_coeff 3 4 14157.243 3.1914894 489.18197 2.5231391 0.45538909 # buck6d->(h1_c1@ph)|benzene/gaussian->(h1_c1@ph)|benzene <--> buck6d->(cu5_cu1o4@cu2)|CuPW/gaussian->(cu5_cu1o4@cu2)|CuPW
|
||||
pair_coeff 3 5 6320.6076 3.6144578 103.50278 0.44181916 0.75109952 # buck6d->(h1_c1@ph)|benzene/gaussian->(h1_c1@ph)|benzene <--> buck6d->(o2_c1cu1@co2)|CuPW/gaussian->(o2_c1cu1@co2)|CuPW
|
||||
pair_coeff 3 6 6157.8178 3.4883721 124.7792 0.72632262 0.73006542 # buck6d->(h1_c1@ph)|benzene/gaussian->(h1_c1@ph)|benzene <--> buck6d->(c3_c1o2@co2)|CuPW/gaussian->(c3_c1o2@co2)|CuPW
|
||||
pair_coeff 4 4 54464 2.6548673 5679.4311 33.208515 0.34105936 # buck6d->(cu5_cu1o4@cu2)|CuPW/gaussian->(cu5_cu1o4@cu2)|CuPW <--> buck6d->(cu5_cu1o4@cu2)|CuPW/gaussian->(cu5_cu1o4@cu2)|CuPW
|
||||
pair_coeff 4 5 24315.863 2.9411765 1371.5617 7.9168726 0.42457748 # buck6d->(cu5_cu1o4@cu2)|CuPW/gaussian->(cu5_cu1o4@cu2)|CuPW <--> buck6d->(o2_c1cu1@co2)|CuPW/gaussian->(o2_c1cu1@co2)|CuPW
|
||||
pair_coeff 4 6 23689.598 2.8571429 1590.0769 11.87959 0.42066711 # buck6d->(cu5_cu1o4@cu2)|CuPW/gaussian->(cu5_cu1o4@cu2)|CuPW <--> buck6d->(c3_c1o2@co2)|CuPW/gaussian->(c3_c1o2@co2)|CuPW
|
||||
pair_coeff 5 5 10856 3.2967033 308.7755 1.6022517 0.63272774 # buck6d->(o2_c1cu1@co2)|CuPW/gaussian->(o2_c1cu1@co2)|CuPW <--> buck6d->(o2_c1cu1@co2)|CuPW/gaussian->(o2_c1cu1@co2)|CuPW
|
||||
pair_coeff 5 6 10576.399 3.1914894 365.45138 2.5231391 0.61999948 # buck6d->(o2_c1cu1@co2)|CuPW/gaussian->(o2_c1cu1@co2)|CuPW <--> buck6d->(c3_c1o2@co2)|CuPW/gaussian->(c3_c1o2@co2)|CuPW
|
||||
pair_coeff 6 6 10304 3.0927835 429.89352 3.9170177 0.60800971 # buck6d->(c3_c1o2@co2)|CuPW/gaussian->(c3_c1o2@co2)|CuPW <--> buck6d->(c3_c1o2@co2)|CuPW/gaussian->(c3_c1o2@co2)|CuPW
|
||||
|
||||
bond_style hybrid class2 morse
|
||||
|
||||
bond_coeff 5 morse 50.000000 1.451345 1.914000 # morse->(cu5_cu1o4@cu2,o2_c1cu1@co2)|CuPW
|
||||
bond_coeff 4 class2 2.536000 75.465060 -192.435903 286.248406 # mm3->(cu5_cu1o4@cu2,cu5_cu1o4@cu2)|CuPW
|
||||
bond_coeff 3 class2 1.094000 390.634200 -996.117210 1481.724350 # mm3->(c3_c2h1@ph,h1_c1@ph)|benzene
|
||||
bond_coeff 6 class2 1.278000 585.591600 -1493.258580 2221.222138 # mm3->(c3_c1o2@co2,o2_c1cu1@co2)|CuPW
|
||||
bond_coeff 1 class2 1.394000 509.335200 -1298.804760 1931.972080 # mm3->(c3_c2h1@ph,c3_c2h1@ph)|benzene
|
||||
bond_coeff 2 class2 1.485000 360.635220 -919.619811 1367.934469 # mm3->(c3_c1o2@co2,c3_c3@ph)|CuPW
|
||||
|
||||
angle_style hybrid class2/p6 cosine/buck6d
|
||||
|
||||
angle_coeff 2 class2/p6 117.711000 57.408120 -46.049402 10.553745 -7.558563 13.610890 # mm3->(c3_c1o2@co2,c3_c3@ph,c3_c2h1@ph)|CuPW
|
||||
angle_coeff 2 class2/p6 bb 0.0 1.0 1.0
|
||||
angle_coeff 2 class2/p6 ba 0.0 0.0 1.0 1.0
|
||||
angle_coeff 6 class2/p6 126.814000 13.740540 -11.021849 2.526022 -1.809130 3.257744 # mm3->(c3_c1o2@co2,o2_c1cu1@co2,cu5_cu1o4@cu2)|CuPW
|
||||
angle_coeff 6 class2/p6 bb 0.0 1.0 1.0
|
||||
angle_coeff 6 class2/p6 ba 0.0 0.0 1.0 1.0
|
||||
angle_coeff 7 class2/p6 123.490000 111.075360 -89.098091 20.419778 -14.624589 26.334856 # mm3->(o2_c1cu1@co2,c3_c1o2@co2,o2_c1cu1@co2)|CuPW
|
||||
angle_coeff 7 class2/p6 bb 14.244120 1.278000 1.278000
|
||||
angle_coeff 7 class2/p6 ba 3.309240 3.309240 1.278000 1.278000
|
||||
angle_coeff 1 class2/p6 127.050000 53.307540 -42.760159 9.799907 -7.018666 12.638684 # mm3->(c3_c2h1@ph,c3_c2h1@ph,c3_c2h1@ph)|benzene
|
||||
angle_coeff 1 class2/p6 bb 71.796120 1.394000 1.394000
|
||||
angle_coeff 1 class2/p6 ba 6.762360 6.762360 1.394000 1.394000
|
||||
angle_coeff 4 class2/p6 84.336000 29.351520 -23.544055 5.395900 -3.864529 6.958951 # mm3->(cu5_cu1o4@cu2,cu5_cu1o4@cu2,o2_c1cu1@co2)|CuPW
|
||||
angle_coeff 4 class2/p6 bb 0.0 1.0 1.0
|
||||
angle_coeff 4 class2/p6 ba 0.0 0.0 1.0 1.0
|
||||
angle_coeff 3 class2/p6 120.350000 36.185820 -29.026127 6.652298 -4.764358 8.579296 # mm3->(c3_c2h1@ph,c3_c2h1@ph,h1_c1@ph)|benzene
|
||||
angle_coeff 3 class2/p6 bb 93.378120 1.394000 1.094000
|
||||
angle_coeff 3 class2/p6 ba -25.179000 53.523360 1.394000 1.094000
|
||||
angle_coeff 8 class2/p6 115.098000 79.493700 -63.765149 14.613896 -10.466432 18.847160 # mm3->(c3_c3@ph,c3_c1o2@co2,o2_c1cu1@co2)|CuPW
|
||||
angle_coeff 8 class2/p6 bb 0.0 1.0 1.0
|
||||
angle_coeff 8 class2/p6 ba 0.0 0.0 1.0 1.0
|
||||
angle_coeff 5 cosine/buck6d 1.978350 4 180.000000 # fourier->(o2_c1cu1@co2,cu5_cu1o4@cu2,o2_c1cu1@co2)|CuPW
|
||||
|
||||
dihedral_style opls
|
||||
|
||||
dihedral_coeff 3 0.000000 0.000000 0.000000 0.000000 # cos3->(c3_c3@ph,c3_c2h1@ph,c3_c3@ph,c3_c1o2@co2)|CuPW
|
||||
dihedral_coeff 9 0.000000 4.528000 0.000000 0.000000 # cos3->(o2_c1cu1@co2,c3_c1o2@co2,o2_c1cu1@co2,cu5_cu1o4@cu2)|CuPW
|
||||
dihedral_coeff 8 0.000000 0.000000 0.000000 0.000000 # cos3->(o2_c1cu1@co2,cu5_cu1o4@cu2,o2_c1cu1@co2,c3_c1o2@co2)|CuPW
|
||||
dihedral_coeff 5 0.000000 1.741000 0.000000 0.000000 # cos3->(o2_c1cu1@co2,c3_c1o2@co2,c3_c3@ph,c3_c2h1@ph)|CuPW
|
||||
dihedral_coeff 2 0.000000 6.316000 0.000000 0.000000 # cos3->(c3_c2h1@ph,c3_c2h1@ph,c3_c2h1@ph,h1_c1@ph)|benzene
|
||||
dihedral_coeff 1 0.000000 4.379000 0.000000 0.000000 # cos3->(c3_c2h1@ph,c3_c2h1@ph,c3_c2h1@ph,c3_c2h1@ph)|benzene
|
||||
dihedral_coeff 6 0.000000 0.000000 0.000000 0.609000 # cos4->(o2_c1cu1@co2,cu5_cu1o4@cu2,cu5_cu1o4@cu2,o2_c1cu1@co2)|CuPW
|
||||
dihedral_coeff 4 0.000000 0.000000 0.000000 0.000000 # cos3->(h1_c1@ph,c3_c2h1@ph,c3_c3@ph,c3_c1o2@co2)|CuPW
|
||||
dihedral_coeff 10 0.000000 0.000000 0.000000 0.000000 # cos3->(c3_c3@ph,c3_c1o2@co2,o2_c1cu1@co2,cu5_cu1o4@cu2)|CuPW
|
||||
dihedral_coeff 7 0.000000 0.000000 0.000000 0.000000 # cos3->(cu5_cu1o4@cu2,cu5_cu1o4@cu2,o2_c1cu1@co2,c3_c1o2@co2)|CuPW
|
||||
|
||||
improper_style inversion/harmonic
|
||||
|
||||
improper_coeff 1 18.776340 0.000000 # harm->(c3_c3@ph,c3_c2h1@ph,c3_c2h1@ph,c3_c1o2@co2)|CuPW
|
||||
improper_coeff 3 41.005800 0.000000 # harm->(c3_c1o2@co2,c3_c3@ph,o2_c1cu1@co2,o2_c1cu1@co2)|CuPW
|
||||
improper_coeff 2 4.100580 0.000000 # harm->(c3_c2h1@ph,c3_c2h1@ph,c3_c2h1@ph,h1_c1@ph)|benzene
|
||||
|
||||
special_bonds lj 0.0 0.0 1.0 coul 1.0 1.0 1.0
|
||||
5 = max # of 1-2 neighbors
|
||||
8 = max # of 1-3 neighbors
|
||||
17 = max # of special neighbors
|
||||
|
||||
# ------------------------ MOF-FF FORCE FIELD END --------------------------
|
||||
|
||||
run 0
|
||||
WARNING: No fixes defined, atoms won't move (../verlet.cpp:55)
|
||||
Neighbor list info ...
|
||||
update every 1 steps, delay 10 steps, check yes
|
||||
max neighbors/atom: 2000, page size: 100000
|
||||
master list distance cutoff = 14
|
||||
ghost atom cutoff = 14
|
||||
binsize = 7, bins = 4 4 4
|
||||
1 neighbor lists, perpetual/occasional/extra = 1 0 0
|
||||
(1) pair buck6d/coul/gauss/dsf, perpetual
|
||||
attributes: half, newton on
|
||||
pair build: half/bin/newton/tri
|
||||
stencil: half/bin/3d/newton/tri
|
||||
bin: standard
|
||||
WARNING: Inconsistent image flags (../domain.cpp:786)
|
||||
Per MPI rank memory allocation (min/avg/max) = 21.23 | 21.23 | 21.23 Mbytes
|
||||
Step Temp E_pair E_mol TotEng Press
|
||||
0 0 -11833.81 343.7619 -11490.048 -5.8508834
|
||||
Loop time of 9.53674e-07 on 1 procs for 0 steps with 624 atoms
|
||||
|
||||
0.0% 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 | 0 | 0 | 0.0 | 0.00
|
||||
Bond | 0 | 0 | 0 | 0.0 | 0.00
|
||||
Neigh | 0 | 0 | 0 | 0.0 | 0.00
|
||||
Comm | 0 | 0 | 0 | 0.0 | 0.00
|
||||
Output | 0 | 0 | 0 | 0.0 | 0.00
|
||||
Modify | 0 | 0 | 0 | 0.0 | 0.00
|
||||
Other | | 9.537e-07 | | |100.00
|
||||
|
||||
Nlocal: 624 ave 624 max 624 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
Nghost: 4464 ave 4464 max 4464 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
Neighs: 115368 ave 115368 max 115368 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
|
||||
Total # of neighbors = 115368
|
||||
Ave neighs/atom = 184.885
|
||||
Ave special neighs/atom = 7.46154
|
||||
Neighbor list builds = 0
|
||||
Dangerous builds = 0
|
||||
Total wall time: 0:00:00
|
||||
166
examples/USER/mofff/log.17Jan18.hkust1.g++.4
Normal file
166
examples/USER/mofff/log.17Jan18.hkust1.g++.4
Normal file
@ -0,0 +1,166 @@
|
||||
LAMMPS (17 Jan 2018)
|
||||
clear
|
||||
units real
|
||||
boundary p p p
|
||||
atom_style full
|
||||
read_data hkust1.data
|
||||
triclinic box = (0 0 0) to (26.4408 26.4408 26.4408) with tilt (0 0 0)
|
||||
1 by 2 by 2 MPI processor grid
|
||||
reading atoms ...
|
||||
624 atoms
|
||||
scanning bonds ...
|
||||
5 = max bonds/atom
|
||||
scanning angles ...
|
||||
10 = max angles/atom
|
||||
scanning dihedrals ...
|
||||
32 = max dihedrals/atom
|
||||
scanning impropers ...
|
||||
2 = max impropers/atom
|
||||
reading bonds ...
|
||||
792 bonds
|
||||
reading angles ...
|
||||
1536 angles
|
||||
reading dihedrals ...
|
||||
2688 dihedrals
|
||||
reading impropers ...
|
||||
288 impropers
|
||||
5 = max # of 1-2 neighbors
|
||||
8 = max # of 1-3 neighbors
|
||||
20 = max # of 1-4 neighbors
|
||||
17 = max # of special neighbors
|
||||
|
||||
neighbor 2.0 bin
|
||||
|
||||
|
||||
# ------------------------ MOF-FF FORCE FIELD ------------------------------
|
||||
|
||||
pair_style buck6d/coul/gauss/dsf 0.9000 12.0000
|
||||
|
||||
pair_coeff 1 1 10304 3.0612245 457.17971 4.5218516 0.60800971 # buck6d->(c3_c2h1@ph)|benzene/gaussian->(c3_c3@ph)|CuPW <--> buck6d->(c3_c2h1@ph)|benzene/gaussian->(c3_c3@ph)|CuPW
|
||||
pair_coeff 1 2 10304 3.0612245 457.17971 4.5218516 0.60800971 # buck6d->(c3_c2h1@ph)|benzene/gaussian->(c3_c3@ph)|CuPW <--> buck6d->(c3_c2h1@ph)|benzene/gaussian->(c3_c2h1@ph)|benzene
|
||||
pair_coeff 1 3 6157.8178 3.4682081 129.19572 0.78772886 0.73006542 # buck6d->(c3_c2h1@ph)|benzene/gaussian->(c3_c3@ph)|CuPW <--> buck6d->(h1_c1@ph)|benzene/gaussian->(h1_c1@ph)|benzene
|
||||
pair_coeff 1 4 23689.598 2.8436019 1636.052 12.696549 0.42066711 # buck6d->(c3_c2h1@ph)|benzene/gaussian->(c3_c3@ph)|CuPW <--> buck6d->(cu5_cu1o4@cu2)|CuPW/gaussian->(cu5_cu1o4@cu2)|CuPW
|
||||
pair_coeff 1 5 10576.399 3.1746032 377.27092 2.7176691 0.61999948 # buck6d->(c3_c2h1@ph)|benzene/gaussian->(c3_c3@ph)|CuPW <--> buck6d->(o2_c1cu1@co2)|CuPW/gaussian->(o2_c1cu1@co2)|CuPW
|
||||
pair_coeff 1 6 10304 3.0769231 443.36171 4.2093581 0.60800971 # buck6d->(c3_c2h1@ph)|benzene/gaussian->(c3_c3@ph)|CuPW <--> buck6d->(c3_c1o2@co2)|CuPW/gaussian->(c3_c1o2@co2)|CuPW
|
||||
pair_coeff 2 2 10304 3.0612245 457.17971 4.5218516 0.60800971 # buck6d->(c3_c2h1@ph)|benzene/gaussian->(c3_c2h1@ph)|benzene <--> buck6d->(c3_c2h1@ph)|benzene/gaussian->(c3_c2h1@ph)|benzene
|
||||
pair_coeff 2 3 6157.8178 3.4682081 129.19572 0.78772886 0.73006542 # buck6d->(c3_c2h1@ph)|benzene/gaussian->(c3_c2h1@ph)|benzene <--> buck6d->(h1_c1@ph)|benzene/gaussian->(h1_c1@ph)|benzene
|
||||
pair_coeff 2 4 23689.598 2.8436019 1636.052 12.696549 0.42066711 # buck6d->(c3_c2h1@ph)|benzene/gaussian->(c3_c2h1@ph)|benzene <--> buck6d->(cu5_cu1o4@cu2)|CuPW/gaussian->(cu5_cu1o4@cu2)|CuPW
|
||||
pair_coeff 2 5 10576.399 3.1746032 377.27092 2.7176691 0.61999948 # buck6d->(c3_c2h1@ph)|benzene/gaussian->(c3_c2h1@ph)|benzene <--> buck6d->(o2_c1cu1@co2)|CuPW/gaussian->(o2_c1cu1@co2)|CuPW
|
||||
pair_coeff 2 6 10304 3.0769231 443.36171 4.2093581 0.60800971 # buck6d->(c3_c2h1@ph)|benzene/gaussian->(c3_c2h1@ph)|benzene <--> buck6d->(c3_c1o2@co2)|CuPW/gaussian->(c3_c1o2@co2)|CuPW
|
||||
pair_coeff 3 3 3680 4 32.805 0.10690769 0.9771554 # buck6d->(h1_c1@ph)|benzene/gaussian->(h1_c1@ph)|benzene <--> buck6d->(h1_c1@ph)|benzene/gaussian->(h1_c1@ph)|benzene
|
||||
pair_coeff 3 4 14157.243 3.1914894 489.18197 2.5231391 0.45538909 # buck6d->(h1_c1@ph)|benzene/gaussian->(h1_c1@ph)|benzene <--> buck6d->(cu5_cu1o4@cu2)|CuPW/gaussian->(cu5_cu1o4@cu2)|CuPW
|
||||
pair_coeff 3 5 6320.6076 3.6144578 103.50278 0.44181916 0.75109952 # buck6d->(h1_c1@ph)|benzene/gaussian->(h1_c1@ph)|benzene <--> buck6d->(o2_c1cu1@co2)|CuPW/gaussian->(o2_c1cu1@co2)|CuPW
|
||||
pair_coeff 3 6 6157.8178 3.4883721 124.7792 0.72632262 0.73006542 # buck6d->(h1_c1@ph)|benzene/gaussian->(h1_c1@ph)|benzene <--> buck6d->(c3_c1o2@co2)|CuPW/gaussian->(c3_c1o2@co2)|CuPW
|
||||
pair_coeff 4 4 54464 2.6548673 5679.4311 33.208515 0.34105936 # buck6d->(cu5_cu1o4@cu2)|CuPW/gaussian->(cu5_cu1o4@cu2)|CuPW <--> buck6d->(cu5_cu1o4@cu2)|CuPW/gaussian->(cu5_cu1o4@cu2)|CuPW
|
||||
pair_coeff 4 5 24315.863 2.9411765 1371.5617 7.9168726 0.42457748 # buck6d->(cu5_cu1o4@cu2)|CuPW/gaussian->(cu5_cu1o4@cu2)|CuPW <--> buck6d->(o2_c1cu1@co2)|CuPW/gaussian->(o2_c1cu1@co2)|CuPW
|
||||
pair_coeff 4 6 23689.598 2.8571429 1590.0769 11.87959 0.42066711 # buck6d->(cu5_cu1o4@cu2)|CuPW/gaussian->(cu5_cu1o4@cu2)|CuPW <--> buck6d->(c3_c1o2@co2)|CuPW/gaussian->(c3_c1o2@co2)|CuPW
|
||||
pair_coeff 5 5 10856 3.2967033 308.7755 1.6022517 0.63272774 # buck6d->(o2_c1cu1@co2)|CuPW/gaussian->(o2_c1cu1@co2)|CuPW <--> buck6d->(o2_c1cu1@co2)|CuPW/gaussian->(o2_c1cu1@co2)|CuPW
|
||||
pair_coeff 5 6 10576.399 3.1914894 365.45138 2.5231391 0.61999948 # buck6d->(o2_c1cu1@co2)|CuPW/gaussian->(o2_c1cu1@co2)|CuPW <--> buck6d->(c3_c1o2@co2)|CuPW/gaussian->(c3_c1o2@co2)|CuPW
|
||||
pair_coeff 6 6 10304 3.0927835 429.89352 3.9170177 0.60800971 # buck6d->(c3_c1o2@co2)|CuPW/gaussian->(c3_c1o2@co2)|CuPW <--> buck6d->(c3_c1o2@co2)|CuPW/gaussian->(c3_c1o2@co2)|CuPW
|
||||
|
||||
bond_style hybrid class2 morse
|
||||
|
||||
bond_coeff 5 morse 50.000000 1.451345 1.914000 # morse->(cu5_cu1o4@cu2,o2_c1cu1@co2)|CuPW
|
||||
bond_coeff 4 class2 2.536000 75.465060 -192.435903 286.248406 # mm3->(cu5_cu1o4@cu2,cu5_cu1o4@cu2)|CuPW
|
||||
bond_coeff 3 class2 1.094000 390.634200 -996.117210 1481.724350 # mm3->(c3_c2h1@ph,h1_c1@ph)|benzene
|
||||
bond_coeff 6 class2 1.278000 585.591600 -1493.258580 2221.222138 # mm3->(c3_c1o2@co2,o2_c1cu1@co2)|CuPW
|
||||
bond_coeff 1 class2 1.394000 509.335200 -1298.804760 1931.972080 # mm3->(c3_c2h1@ph,c3_c2h1@ph)|benzene
|
||||
bond_coeff 2 class2 1.485000 360.635220 -919.619811 1367.934469 # mm3->(c3_c1o2@co2,c3_c3@ph)|CuPW
|
||||
|
||||
angle_style hybrid class2/p6 cosine/buck6d
|
||||
|
||||
angle_coeff 2 class2/p6 117.711000 57.408120 -46.049402 10.553745 -7.558563 13.610890 # mm3->(c3_c1o2@co2,c3_c3@ph,c3_c2h1@ph)|CuPW
|
||||
angle_coeff 2 class2/p6 bb 0.0 1.0 1.0
|
||||
angle_coeff 2 class2/p6 ba 0.0 0.0 1.0 1.0
|
||||
angle_coeff 6 class2/p6 126.814000 13.740540 -11.021849 2.526022 -1.809130 3.257744 # mm3->(c3_c1o2@co2,o2_c1cu1@co2,cu5_cu1o4@cu2)|CuPW
|
||||
angle_coeff 6 class2/p6 bb 0.0 1.0 1.0
|
||||
angle_coeff 6 class2/p6 ba 0.0 0.0 1.0 1.0
|
||||
angle_coeff 7 class2/p6 123.490000 111.075360 -89.098091 20.419778 -14.624589 26.334856 # mm3->(o2_c1cu1@co2,c3_c1o2@co2,o2_c1cu1@co2)|CuPW
|
||||
angle_coeff 7 class2/p6 bb 14.244120 1.278000 1.278000
|
||||
angle_coeff 7 class2/p6 ba 3.309240 3.309240 1.278000 1.278000
|
||||
angle_coeff 1 class2/p6 127.050000 53.307540 -42.760159 9.799907 -7.018666 12.638684 # mm3->(c3_c2h1@ph,c3_c2h1@ph,c3_c2h1@ph)|benzene
|
||||
angle_coeff 1 class2/p6 bb 71.796120 1.394000 1.394000
|
||||
angle_coeff 1 class2/p6 ba 6.762360 6.762360 1.394000 1.394000
|
||||
angle_coeff 4 class2/p6 84.336000 29.351520 -23.544055 5.395900 -3.864529 6.958951 # mm3->(cu5_cu1o4@cu2,cu5_cu1o4@cu2,o2_c1cu1@co2)|CuPW
|
||||
angle_coeff 4 class2/p6 bb 0.0 1.0 1.0
|
||||
angle_coeff 4 class2/p6 ba 0.0 0.0 1.0 1.0
|
||||
angle_coeff 3 class2/p6 120.350000 36.185820 -29.026127 6.652298 -4.764358 8.579296 # mm3->(c3_c2h1@ph,c3_c2h1@ph,h1_c1@ph)|benzene
|
||||
angle_coeff 3 class2/p6 bb 93.378120 1.394000 1.094000
|
||||
angle_coeff 3 class2/p6 ba -25.179000 53.523360 1.394000 1.094000
|
||||
angle_coeff 8 class2/p6 115.098000 79.493700 -63.765149 14.613896 -10.466432 18.847160 # mm3->(c3_c3@ph,c3_c1o2@co2,o2_c1cu1@co2)|CuPW
|
||||
angle_coeff 8 class2/p6 bb 0.0 1.0 1.0
|
||||
angle_coeff 8 class2/p6 ba 0.0 0.0 1.0 1.0
|
||||
angle_coeff 5 cosine/buck6d 1.978350 4 180.000000 # fourier->(o2_c1cu1@co2,cu5_cu1o4@cu2,o2_c1cu1@co2)|CuPW
|
||||
|
||||
dihedral_style opls
|
||||
|
||||
dihedral_coeff 3 0.000000 0.000000 0.000000 0.000000 # cos3->(c3_c3@ph,c3_c2h1@ph,c3_c3@ph,c3_c1o2@co2)|CuPW
|
||||
dihedral_coeff 9 0.000000 4.528000 0.000000 0.000000 # cos3->(o2_c1cu1@co2,c3_c1o2@co2,o2_c1cu1@co2,cu5_cu1o4@cu2)|CuPW
|
||||
dihedral_coeff 8 0.000000 0.000000 0.000000 0.000000 # cos3->(o2_c1cu1@co2,cu5_cu1o4@cu2,o2_c1cu1@co2,c3_c1o2@co2)|CuPW
|
||||
dihedral_coeff 5 0.000000 1.741000 0.000000 0.000000 # cos3->(o2_c1cu1@co2,c3_c1o2@co2,c3_c3@ph,c3_c2h1@ph)|CuPW
|
||||
dihedral_coeff 2 0.000000 6.316000 0.000000 0.000000 # cos3->(c3_c2h1@ph,c3_c2h1@ph,c3_c2h1@ph,h1_c1@ph)|benzene
|
||||
dihedral_coeff 1 0.000000 4.379000 0.000000 0.000000 # cos3->(c3_c2h1@ph,c3_c2h1@ph,c3_c2h1@ph,c3_c2h1@ph)|benzene
|
||||
dihedral_coeff 6 0.000000 0.000000 0.000000 0.609000 # cos4->(o2_c1cu1@co2,cu5_cu1o4@cu2,cu5_cu1o4@cu2,o2_c1cu1@co2)|CuPW
|
||||
dihedral_coeff 4 0.000000 0.000000 0.000000 0.000000 # cos3->(h1_c1@ph,c3_c2h1@ph,c3_c3@ph,c3_c1o2@co2)|CuPW
|
||||
dihedral_coeff 10 0.000000 0.000000 0.000000 0.000000 # cos3->(c3_c3@ph,c3_c1o2@co2,o2_c1cu1@co2,cu5_cu1o4@cu2)|CuPW
|
||||
dihedral_coeff 7 0.000000 0.000000 0.000000 0.000000 # cos3->(cu5_cu1o4@cu2,cu5_cu1o4@cu2,o2_c1cu1@co2,c3_c1o2@co2)|CuPW
|
||||
|
||||
improper_style inversion/harmonic
|
||||
|
||||
improper_coeff 1 18.776340 0.000000 # harm->(c3_c3@ph,c3_c2h1@ph,c3_c2h1@ph,c3_c1o2@co2)|CuPW
|
||||
improper_coeff 3 41.005800 0.000000 # harm->(c3_c1o2@co2,c3_c3@ph,o2_c1cu1@co2,o2_c1cu1@co2)|CuPW
|
||||
improper_coeff 2 4.100580 0.000000 # harm->(c3_c2h1@ph,c3_c2h1@ph,c3_c2h1@ph,h1_c1@ph)|benzene
|
||||
|
||||
special_bonds lj 0.0 0.0 1.0 coul 1.0 1.0 1.0
|
||||
5 = max # of 1-2 neighbors
|
||||
8 = max # of 1-3 neighbors
|
||||
17 = max # of special neighbors
|
||||
|
||||
# ------------------------ MOF-FF FORCE FIELD END --------------------------
|
||||
|
||||
run 0
|
||||
WARNING: No fixes defined, atoms won't move (../verlet.cpp:55)
|
||||
Neighbor list info ...
|
||||
update every 1 steps, delay 10 steps, check yes
|
||||
max neighbors/atom: 2000, page size: 100000
|
||||
master list distance cutoff = 14
|
||||
ghost atom cutoff = 14
|
||||
binsize = 7, bins = 4 4 4
|
||||
1 neighbor lists, perpetual/occasional/extra = 1 0 0
|
||||
(1) pair buck6d/coul/gauss/dsf, perpetual
|
||||
attributes: half, newton on
|
||||
pair build: half/bin/newton/tri
|
||||
stencil: half/bin/3d/newton/tri
|
||||
bin: standard
|
||||
WARNING: Inconsistent image flags (../domain.cpp:786)
|
||||
Per MPI rank memory allocation (min/avg/max) = 20.68 | 20.68 | 20.68 Mbytes
|
||||
Step Temp E_pair E_mol TotEng Press
|
||||
0 0 -11833.81 343.7619 -11490.048 -5.8508834
|
||||
Loop time of 2.20537e-06 on 4 procs for 0 steps with 624 atoms
|
||||
|
||||
0.0% 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 | 0 | 0 | 0.0 | 0.00
|
||||
Bond | 0 | 0 | 0 | 0.0 | 0.00
|
||||
Neigh | 0 | 0 | 0 | 0.0 | 0.00
|
||||
Comm | 0 | 0 | 0 | 0.0 | 0.00
|
||||
Output | 0 | 0 | 0 | 0.0 | 0.00
|
||||
Modify | 0 | 0 | 0 | 0.0 | 0.00
|
||||
Other | | 2.205e-06 | | |100.00
|
||||
|
||||
Nlocal: 156 ave 156 max 156 min
|
||||
Histogram: 4 0 0 0 0 0 0 0 0 0
|
||||
Nghost: 2718 ave 2718 max 2718 min
|
||||
Histogram: 4 0 0 0 0 0 0 0 0 0
|
||||
Neighs: 28842 ave 28870 max 28814 min
|
||||
Histogram: 1 1 0 0 0 0 0 0 1 1
|
||||
|
||||
Total # of neighbors = 115368
|
||||
Ave neighs/atom = 184.885
|
||||
Ave special neighs/atom = 7.46154
|
||||
Neighbor list builds = 0
|
||||
Dangerous builds = 0
|
||||
Total wall time: 0:00:00
|
||||
175
examples/USER/mofff/log.17Jan18.hkust1_long.g++.1
Normal file
175
examples/USER/mofff/log.17Jan18.hkust1_long.g++.1
Normal file
@ -0,0 +1,175 @@
|
||||
LAMMPS (17 Jan 2018)
|
||||
clear
|
||||
units real
|
||||
boundary p p p
|
||||
atom_style full
|
||||
read_data hkust1.data
|
||||
triclinic box = (0 0 0) to (26.4408 26.4408 26.4408) with tilt (0 0 0)
|
||||
1 by 1 by 1 MPI processor grid
|
||||
reading atoms ...
|
||||
624 atoms
|
||||
scanning bonds ...
|
||||
5 = max bonds/atom
|
||||
scanning angles ...
|
||||
10 = max angles/atom
|
||||
scanning dihedrals ...
|
||||
32 = max dihedrals/atom
|
||||
scanning impropers ...
|
||||
2 = max impropers/atom
|
||||
reading bonds ...
|
||||
792 bonds
|
||||
reading angles ...
|
||||
1536 angles
|
||||
reading dihedrals ...
|
||||
2688 dihedrals
|
||||
reading impropers ...
|
||||
288 impropers
|
||||
5 = max # of 1-2 neighbors
|
||||
8 = max # of 1-3 neighbors
|
||||
20 = max # of 1-4 neighbors
|
||||
17 = max # of special neighbors
|
||||
|
||||
neighbor 2.0 bin
|
||||
|
||||
|
||||
# ------------------------ MOF-FF FORCE FIELD ------------------------------
|
||||
kspace_style ewald 1.0e-6
|
||||
|
||||
pair_style buck6d/coul/gauss/long 0.9 0.9 12.0000
|
||||
|
||||
pair_coeff 1 1 10304 3.0612245 457.17971 4.5218516 0.60800971 # buck6d->(c3_c2h1@ph)|benzene/gaussian->(c3_c3@ph)|CuPW <--> buck6d->(c3_c2h1@ph)|benzene/gaussian->(c3_c3@ph)|CuPW
|
||||
pair_coeff 1 2 10304 3.0612245 457.17971 4.5218516 0.60800971 # buck6d->(c3_c2h1@ph)|benzene/gaussian->(c3_c3@ph)|CuPW <--> buck6d->(c3_c2h1@ph)|benzene/gaussian->(c3_c2h1@ph)|benzene
|
||||
pair_coeff 1 3 6157.8178 3.4682081 129.19572 0.78772886 0.73006542 # buck6d->(c3_c2h1@ph)|benzene/gaussian->(c3_c3@ph)|CuPW <--> buck6d->(h1_c1@ph)|benzene/gaussian->(h1_c1@ph)|benzene
|
||||
pair_coeff 1 4 23689.598 2.8436019 1636.052 12.696549 0.42066711 # buck6d->(c3_c2h1@ph)|benzene/gaussian->(c3_c3@ph)|CuPW <--> buck6d->(cu5_cu1o4@cu2)|CuPW/gaussian->(cu5_cu1o4@cu2)|CuPW
|
||||
pair_coeff 1 5 10576.399 3.1746032 377.27092 2.7176691 0.61999948 # buck6d->(c3_c2h1@ph)|benzene/gaussian->(c3_c3@ph)|CuPW <--> buck6d->(o2_c1cu1@co2)|CuPW/gaussian->(o2_c1cu1@co2)|CuPW
|
||||
pair_coeff 1 6 10304 3.0769231 443.36171 4.2093581 0.60800971 # buck6d->(c3_c2h1@ph)|benzene/gaussian->(c3_c3@ph)|CuPW <--> buck6d->(c3_c1o2@co2)|CuPW/gaussian->(c3_c1o2@co2)|CuPW
|
||||
pair_coeff 2 2 10304 3.0612245 457.17971 4.5218516 0.60800971 # buck6d->(c3_c2h1@ph)|benzene/gaussian->(c3_c2h1@ph)|benzene <--> buck6d->(c3_c2h1@ph)|benzene/gaussian->(c3_c2h1@ph)|benzene
|
||||
pair_coeff 2 3 6157.8178 3.4682081 129.19572 0.78772886 0.73006542 # buck6d->(c3_c2h1@ph)|benzene/gaussian->(c3_c2h1@ph)|benzene <--> buck6d->(h1_c1@ph)|benzene/gaussian->(h1_c1@ph)|benzene
|
||||
pair_coeff 2 4 23689.598 2.8436019 1636.052 12.696549 0.42066711 # buck6d->(c3_c2h1@ph)|benzene/gaussian->(c3_c2h1@ph)|benzene <--> buck6d->(cu5_cu1o4@cu2)|CuPW/gaussian->(cu5_cu1o4@cu2)|CuPW
|
||||
pair_coeff 2 5 10576.399 3.1746032 377.27092 2.7176691 0.61999948 # buck6d->(c3_c2h1@ph)|benzene/gaussian->(c3_c2h1@ph)|benzene <--> buck6d->(o2_c1cu1@co2)|CuPW/gaussian->(o2_c1cu1@co2)|CuPW
|
||||
pair_coeff 2 6 10304 3.0769231 443.36171 4.2093581 0.60800971 # buck6d->(c3_c2h1@ph)|benzene/gaussian->(c3_c2h1@ph)|benzene <--> buck6d->(c3_c1o2@co2)|CuPW/gaussian->(c3_c1o2@co2)|CuPW
|
||||
pair_coeff 3 3 3680 4 32.805 0.10690769 0.9771554 # buck6d->(h1_c1@ph)|benzene/gaussian->(h1_c1@ph)|benzene <--> buck6d->(h1_c1@ph)|benzene/gaussian->(h1_c1@ph)|benzene
|
||||
pair_coeff 3 4 14157.243 3.1914894 489.18197 2.5231391 0.45538909 # buck6d->(h1_c1@ph)|benzene/gaussian->(h1_c1@ph)|benzene <--> buck6d->(cu5_cu1o4@cu2)|CuPW/gaussian->(cu5_cu1o4@cu2)|CuPW
|
||||
pair_coeff 3 5 6320.6076 3.6144578 103.50278 0.44181916 0.75109952 # buck6d->(h1_c1@ph)|benzene/gaussian->(h1_c1@ph)|benzene <--> buck6d->(o2_c1cu1@co2)|CuPW/gaussian->(o2_c1cu1@co2)|CuPW
|
||||
pair_coeff 3 6 6157.8178 3.4883721 124.7792 0.72632262 0.73006542 # buck6d->(h1_c1@ph)|benzene/gaussian->(h1_c1@ph)|benzene <--> buck6d->(c3_c1o2@co2)|CuPW/gaussian->(c3_c1o2@co2)|CuPW
|
||||
pair_coeff 4 4 54464 2.6548673 5679.4311 33.208515 0.34105936 # buck6d->(cu5_cu1o4@cu2)|CuPW/gaussian->(cu5_cu1o4@cu2)|CuPW <--> buck6d->(cu5_cu1o4@cu2)|CuPW/gaussian->(cu5_cu1o4@cu2)|CuPW
|
||||
pair_coeff 4 5 24315.863 2.9411765 1371.5617 7.9168726 0.42457748 # buck6d->(cu5_cu1o4@cu2)|CuPW/gaussian->(cu5_cu1o4@cu2)|CuPW <--> buck6d->(o2_c1cu1@co2)|CuPW/gaussian->(o2_c1cu1@co2)|CuPW
|
||||
pair_coeff 4 6 23689.598 2.8571429 1590.0769 11.87959 0.42066711 # buck6d->(cu5_cu1o4@cu2)|CuPW/gaussian->(cu5_cu1o4@cu2)|CuPW <--> buck6d->(c3_c1o2@co2)|CuPW/gaussian->(c3_c1o2@co2)|CuPW
|
||||
pair_coeff 5 5 10856 3.2967033 308.7755 1.6022517 0.63272774 # buck6d->(o2_c1cu1@co2)|CuPW/gaussian->(o2_c1cu1@co2)|CuPW <--> buck6d->(o2_c1cu1@co2)|CuPW/gaussian->(o2_c1cu1@co2)|CuPW
|
||||
pair_coeff 5 6 10576.399 3.1914894 365.45138 2.5231391 0.61999948 # buck6d->(o2_c1cu1@co2)|CuPW/gaussian->(o2_c1cu1@co2)|CuPW <--> buck6d->(c3_c1o2@co2)|CuPW/gaussian->(c3_c1o2@co2)|CuPW
|
||||
pair_coeff 6 6 10304 3.0927835 429.89352 3.9170177 0.60800971 # buck6d->(c3_c1o2@co2)|CuPW/gaussian->(c3_c1o2@co2)|CuPW <--> buck6d->(c3_c1o2@co2)|CuPW/gaussian->(c3_c1o2@co2)|CuPW
|
||||
|
||||
bond_style hybrid class2 morse
|
||||
|
||||
bond_coeff 5 morse 50.000000 1.451345 1.914000 # morse->(cu5_cu1o4@cu2,o2_c1cu1@co2)|CuPW
|
||||
bond_coeff 4 class2 2.536000 75.465060 -192.435903 286.248406 # mm3->(cu5_cu1o4@cu2,cu5_cu1o4@cu2)|CuPW
|
||||
bond_coeff 3 class2 1.094000 390.634200 -996.117210 1481.724350 # mm3->(c3_c2h1@ph,h1_c1@ph)|benzene
|
||||
bond_coeff 6 class2 1.278000 585.591600 -1493.258580 2221.222138 # mm3->(c3_c1o2@co2,o2_c1cu1@co2)|CuPW
|
||||
bond_coeff 1 class2 1.394000 509.335200 -1298.804760 1931.972080 # mm3->(c3_c2h1@ph,c3_c2h1@ph)|benzene
|
||||
bond_coeff 2 class2 1.485000 360.635220 -919.619811 1367.934469 # mm3->(c3_c1o2@co2,c3_c3@ph)|CuPW
|
||||
|
||||
angle_style hybrid class2/p6 cosine/buck6d
|
||||
|
||||
angle_coeff 2 class2/p6 117.711000 57.408120 -46.049402 10.553745 -7.558563 13.610890 # mm3->(c3_c1o2@co2,c3_c3@ph,c3_c2h1@ph)|CuPW
|
||||
angle_coeff 2 class2/p6 bb 0.0 1.0 1.0
|
||||
angle_coeff 2 class2/p6 ba 0.0 0.0 1.0 1.0
|
||||
angle_coeff 6 class2/p6 126.814000 13.740540 -11.021849 2.526022 -1.809130 3.257744 # mm3->(c3_c1o2@co2,o2_c1cu1@co2,cu5_cu1o4@cu2)|CuPW
|
||||
angle_coeff 6 class2/p6 bb 0.0 1.0 1.0
|
||||
angle_coeff 6 class2/p6 ba 0.0 0.0 1.0 1.0
|
||||
angle_coeff 7 class2/p6 123.490000 111.075360 -89.098091 20.419778 -14.624589 26.334856 # mm3->(o2_c1cu1@co2,c3_c1o2@co2,o2_c1cu1@co2)|CuPW
|
||||
angle_coeff 7 class2/p6 bb 14.244120 1.278000 1.278000
|
||||
angle_coeff 7 class2/p6 ba 3.309240 3.309240 1.278000 1.278000
|
||||
angle_coeff 1 class2/p6 127.050000 53.307540 -42.760159 9.799907 -7.018666 12.638684 # mm3->(c3_c2h1@ph,c3_c2h1@ph,c3_c2h1@ph)|benzene
|
||||
angle_coeff 1 class2/p6 bb 71.796120 1.394000 1.394000
|
||||
angle_coeff 1 class2/p6 ba 6.762360 6.762360 1.394000 1.394000
|
||||
angle_coeff 4 class2/p6 84.336000 29.351520 -23.544055 5.395900 -3.864529 6.958951 # mm3->(cu5_cu1o4@cu2,cu5_cu1o4@cu2,o2_c1cu1@co2)|CuPW
|
||||
angle_coeff 4 class2/p6 bb 0.0 1.0 1.0
|
||||
angle_coeff 4 class2/p6 ba 0.0 0.0 1.0 1.0
|
||||
angle_coeff 3 class2/p6 120.350000 36.185820 -29.026127 6.652298 -4.764358 8.579296 # mm3->(c3_c2h1@ph,c3_c2h1@ph,h1_c1@ph)|benzene
|
||||
angle_coeff 3 class2/p6 bb 93.378120 1.394000 1.094000
|
||||
angle_coeff 3 class2/p6 ba -25.179000 53.523360 1.394000 1.094000
|
||||
angle_coeff 8 class2/p6 115.098000 79.493700 -63.765149 14.613896 -10.466432 18.847160 # mm3->(c3_c3@ph,c3_c1o2@co2,o2_c1cu1@co2)|CuPW
|
||||
angle_coeff 8 class2/p6 bb 0.0 1.0 1.0
|
||||
angle_coeff 8 class2/p6 ba 0.0 0.0 1.0 1.0
|
||||
angle_coeff 5 cosine/buck6d 1.978350 4 180.000000 #1.0 # fourier->(o2_c1cu1@co2,cu5_cu1o4@cu2,o2_c1cu1@co2)|CuPW
|
||||
|
||||
dihedral_style opls
|
||||
|
||||
dihedral_coeff 3 0.000000 0.000000 0.000000 0.000000 # cos3->(c3_c3@ph,c3_c2h1@ph,c3_c3@ph,c3_c1o2@co2)|CuPW
|
||||
dihedral_coeff 9 0.000000 4.528000 0.000000 0.000000 # cos3->(o2_c1cu1@co2,c3_c1o2@co2,o2_c1cu1@co2,cu5_cu1o4@cu2)|CuPW
|
||||
dihedral_coeff 8 0.000000 0.000000 0.000000 0.000000 # cos3->(o2_c1cu1@co2,cu5_cu1o4@cu2,o2_c1cu1@co2,c3_c1o2@co2)|CuPW
|
||||
dihedral_coeff 5 0.000000 1.741000 0.000000 0.000000 # cos3->(o2_c1cu1@co2,c3_c1o2@co2,c3_c3@ph,c3_c2h1@ph)|CuPW
|
||||
dihedral_coeff 2 0.000000 6.316000 0.000000 0.000000 # cos3->(c3_c2h1@ph,c3_c2h1@ph,c3_c2h1@ph,h1_c1@ph)|benzene
|
||||
dihedral_coeff 1 0.000000 4.379000 0.000000 0.000000 # cos3->(c3_c2h1@ph,c3_c2h1@ph,c3_c2h1@ph,c3_c2h1@ph)|benzene
|
||||
dihedral_coeff 6 0.000000 0.000000 0.000000 0.609000 # cos4->(o2_c1cu1@co2,cu5_cu1o4@cu2,cu5_cu1o4@cu2,o2_c1cu1@co2)|CuPW
|
||||
dihedral_coeff 4 0.000000 0.000000 0.000000 0.000000 # cos3->(h1_c1@ph,c3_c2h1@ph,c3_c3@ph,c3_c1o2@co2)|CuPW
|
||||
dihedral_coeff 10 0.000000 0.000000 0.000000 0.000000 # cos3->(c3_c3@ph,c3_c1o2@co2,o2_c1cu1@co2,cu5_cu1o4@cu2)|CuPW
|
||||
dihedral_coeff 7 0.000000 0.000000 0.000000 0.000000 # cos3->(cu5_cu1o4@cu2,cu5_cu1o4@cu2,o2_c1cu1@co2,c3_c1o2@co2)|CuPW
|
||||
|
||||
improper_style inversion/harmonic
|
||||
|
||||
improper_coeff 1 18.776340 0.000000 # harm->(c3_c3@ph,c3_c2h1@ph,c3_c2h1@ph,c3_c1o2@co2)|CuPW
|
||||
improper_coeff 3 41.005800 0.000000 # harm->(c3_c1o2@co2,c3_c3@ph,o2_c1cu1@co2,o2_c1cu1@co2)|CuPW
|
||||
improper_coeff 2 4.100580 0.000000 # harm->(c3_c2h1@ph,c3_c2h1@ph,c3_c2h1@ph,h1_c1@ph)|benzene
|
||||
|
||||
special_bonds lj 0.0 0.0 1.0 coul 1.0 1.0 1.0
|
||||
5 = max # of 1-2 neighbors
|
||||
8 = max # of 1-3 neighbors
|
||||
17 = max # of special neighbors
|
||||
|
||||
# ------------------------ MOF-FF FORCE FIELD END --------------------------
|
||||
|
||||
run 0
|
||||
WARNING: No fixes defined, atoms won't move (../verlet.cpp:55)
|
||||
Ewald initialization ...
|
||||
WARNING: Using 12-bit tables for long-range coulomb (../kspace.cpp:321)
|
||||
G vector (1/distance) = 0.267593
|
||||
estimated absolute RMS force accuracy = 0.000333665
|
||||
estimated relative force accuracy = 1.00482e-06
|
||||
KSpace vectors: actual max1d max3d = 1054 8 2456
|
||||
kxmax kymax kzmax = 8 8 8
|
||||
Neighbor list info ...
|
||||
update every 1 steps, delay 10 steps, check yes
|
||||
max neighbors/atom: 2000, page size: 100000
|
||||
master list distance cutoff = 14
|
||||
ghost atom cutoff = 14
|
||||
binsize = 7, bins = 4 4 4
|
||||
1 neighbor lists, perpetual/occasional/extra = 1 0 0
|
||||
(1) pair buck6d/coul/gauss/long, perpetual
|
||||
attributes: half, newton on
|
||||
pair build: half/bin/newton/tri
|
||||
stencil: half/bin/3d/newton/tri
|
||||
bin: standard
|
||||
WARNING: Inconsistent image flags (../domain.cpp:786)
|
||||
Per MPI rank memory allocation (min/avg/max) = 34.64 | 34.64 | 34.64 Mbytes
|
||||
Step Temp E_pair E_mol TotEng Press
|
||||
0 0 -16541.109 343.7619 -16197.347 -629.64956
|
||||
Loop time of 9.53674e-07 on 1 procs for 0 steps with 624 atoms
|
||||
|
||||
0.0% 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 | 0 | 0 | 0.0 | 0.00
|
||||
Bond | 0 | 0 | 0 | 0.0 | 0.00
|
||||
Kspace | 0 | 0 | 0 | 0.0 | 0.00
|
||||
Neigh | 0 | 0 | 0 | 0.0 | 0.00
|
||||
Comm | 0 | 0 | 0 | 0.0 | 0.00
|
||||
Output | 0 | 0 | 0 | 0.0 | 0.00
|
||||
Modify | 0 | 0 | 0 | 0.0 | 0.00
|
||||
Other | | 9.537e-07 | | |100.00
|
||||
|
||||
Nlocal: 624 ave 624 max 624 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
Nghost: 4464 ave 4464 max 4464 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
Neighs: 115368 ave 115368 max 115368 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
|
||||
Total # of neighbors = 115368
|
||||
Ave neighs/atom = 184.885
|
||||
Ave special neighs/atom = 7.46154
|
||||
Neighbor list builds = 0
|
||||
Dangerous builds = 0
|
||||
Total wall time: 0:00:00
|
||||
175
examples/USER/mofff/log.17Jan18.hkust1_long.g++.4
Normal file
175
examples/USER/mofff/log.17Jan18.hkust1_long.g++.4
Normal file
@ -0,0 +1,175 @@
|
||||
LAMMPS (17 Jan 2018)
|
||||
clear
|
||||
units real
|
||||
boundary p p p
|
||||
atom_style full
|
||||
read_data hkust1.data
|
||||
triclinic box = (0 0 0) to (26.4408 26.4408 26.4408) with tilt (0 0 0)
|
||||
1 by 2 by 2 MPI processor grid
|
||||
reading atoms ...
|
||||
624 atoms
|
||||
scanning bonds ...
|
||||
5 = max bonds/atom
|
||||
scanning angles ...
|
||||
10 = max angles/atom
|
||||
scanning dihedrals ...
|
||||
32 = max dihedrals/atom
|
||||
scanning impropers ...
|
||||
2 = max impropers/atom
|
||||
reading bonds ...
|
||||
792 bonds
|
||||
reading angles ...
|
||||
1536 angles
|
||||
reading dihedrals ...
|
||||
2688 dihedrals
|
||||
reading impropers ...
|
||||
288 impropers
|
||||
5 = max # of 1-2 neighbors
|
||||
8 = max # of 1-3 neighbors
|
||||
20 = max # of 1-4 neighbors
|
||||
17 = max # of special neighbors
|
||||
|
||||
neighbor 2.0 bin
|
||||
|
||||
|
||||
# ------------------------ MOF-FF FORCE FIELD ------------------------------
|
||||
kspace_style ewald 1.0e-6
|
||||
|
||||
pair_style buck6d/coul/gauss/long 0.9 0.9 12.0000
|
||||
|
||||
pair_coeff 1 1 10304 3.0612245 457.17971 4.5218516 0.60800971 # buck6d->(c3_c2h1@ph)|benzene/gaussian->(c3_c3@ph)|CuPW <--> buck6d->(c3_c2h1@ph)|benzene/gaussian->(c3_c3@ph)|CuPW
|
||||
pair_coeff 1 2 10304 3.0612245 457.17971 4.5218516 0.60800971 # buck6d->(c3_c2h1@ph)|benzene/gaussian->(c3_c3@ph)|CuPW <--> buck6d->(c3_c2h1@ph)|benzene/gaussian->(c3_c2h1@ph)|benzene
|
||||
pair_coeff 1 3 6157.8178 3.4682081 129.19572 0.78772886 0.73006542 # buck6d->(c3_c2h1@ph)|benzene/gaussian->(c3_c3@ph)|CuPW <--> buck6d->(h1_c1@ph)|benzene/gaussian->(h1_c1@ph)|benzene
|
||||
pair_coeff 1 4 23689.598 2.8436019 1636.052 12.696549 0.42066711 # buck6d->(c3_c2h1@ph)|benzene/gaussian->(c3_c3@ph)|CuPW <--> buck6d->(cu5_cu1o4@cu2)|CuPW/gaussian->(cu5_cu1o4@cu2)|CuPW
|
||||
pair_coeff 1 5 10576.399 3.1746032 377.27092 2.7176691 0.61999948 # buck6d->(c3_c2h1@ph)|benzene/gaussian->(c3_c3@ph)|CuPW <--> buck6d->(o2_c1cu1@co2)|CuPW/gaussian->(o2_c1cu1@co2)|CuPW
|
||||
pair_coeff 1 6 10304 3.0769231 443.36171 4.2093581 0.60800971 # buck6d->(c3_c2h1@ph)|benzene/gaussian->(c3_c3@ph)|CuPW <--> buck6d->(c3_c1o2@co2)|CuPW/gaussian->(c3_c1o2@co2)|CuPW
|
||||
pair_coeff 2 2 10304 3.0612245 457.17971 4.5218516 0.60800971 # buck6d->(c3_c2h1@ph)|benzene/gaussian->(c3_c2h1@ph)|benzene <--> buck6d->(c3_c2h1@ph)|benzene/gaussian->(c3_c2h1@ph)|benzene
|
||||
pair_coeff 2 3 6157.8178 3.4682081 129.19572 0.78772886 0.73006542 # buck6d->(c3_c2h1@ph)|benzene/gaussian->(c3_c2h1@ph)|benzene <--> buck6d->(h1_c1@ph)|benzene/gaussian->(h1_c1@ph)|benzene
|
||||
pair_coeff 2 4 23689.598 2.8436019 1636.052 12.696549 0.42066711 # buck6d->(c3_c2h1@ph)|benzene/gaussian->(c3_c2h1@ph)|benzene <--> buck6d->(cu5_cu1o4@cu2)|CuPW/gaussian->(cu5_cu1o4@cu2)|CuPW
|
||||
pair_coeff 2 5 10576.399 3.1746032 377.27092 2.7176691 0.61999948 # buck6d->(c3_c2h1@ph)|benzene/gaussian->(c3_c2h1@ph)|benzene <--> buck6d->(o2_c1cu1@co2)|CuPW/gaussian->(o2_c1cu1@co2)|CuPW
|
||||
pair_coeff 2 6 10304 3.0769231 443.36171 4.2093581 0.60800971 # buck6d->(c3_c2h1@ph)|benzene/gaussian->(c3_c2h1@ph)|benzene <--> buck6d->(c3_c1o2@co2)|CuPW/gaussian->(c3_c1o2@co2)|CuPW
|
||||
pair_coeff 3 3 3680 4 32.805 0.10690769 0.9771554 # buck6d->(h1_c1@ph)|benzene/gaussian->(h1_c1@ph)|benzene <--> buck6d->(h1_c1@ph)|benzene/gaussian->(h1_c1@ph)|benzene
|
||||
pair_coeff 3 4 14157.243 3.1914894 489.18197 2.5231391 0.45538909 # buck6d->(h1_c1@ph)|benzene/gaussian->(h1_c1@ph)|benzene <--> buck6d->(cu5_cu1o4@cu2)|CuPW/gaussian->(cu5_cu1o4@cu2)|CuPW
|
||||
pair_coeff 3 5 6320.6076 3.6144578 103.50278 0.44181916 0.75109952 # buck6d->(h1_c1@ph)|benzene/gaussian->(h1_c1@ph)|benzene <--> buck6d->(o2_c1cu1@co2)|CuPW/gaussian->(o2_c1cu1@co2)|CuPW
|
||||
pair_coeff 3 6 6157.8178 3.4883721 124.7792 0.72632262 0.73006542 # buck6d->(h1_c1@ph)|benzene/gaussian->(h1_c1@ph)|benzene <--> buck6d->(c3_c1o2@co2)|CuPW/gaussian->(c3_c1o2@co2)|CuPW
|
||||
pair_coeff 4 4 54464 2.6548673 5679.4311 33.208515 0.34105936 # buck6d->(cu5_cu1o4@cu2)|CuPW/gaussian->(cu5_cu1o4@cu2)|CuPW <--> buck6d->(cu5_cu1o4@cu2)|CuPW/gaussian->(cu5_cu1o4@cu2)|CuPW
|
||||
pair_coeff 4 5 24315.863 2.9411765 1371.5617 7.9168726 0.42457748 # buck6d->(cu5_cu1o4@cu2)|CuPW/gaussian->(cu5_cu1o4@cu2)|CuPW <--> buck6d->(o2_c1cu1@co2)|CuPW/gaussian->(o2_c1cu1@co2)|CuPW
|
||||
pair_coeff 4 6 23689.598 2.8571429 1590.0769 11.87959 0.42066711 # buck6d->(cu5_cu1o4@cu2)|CuPW/gaussian->(cu5_cu1o4@cu2)|CuPW <--> buck6d->(c3_c1o2@co2)|CuPW/gaussian->(c3_c1o2@co2)|CuPW
|
||||
pair_coeff 5 5 10856 3.2967033 308.7755 1.6022517 0.63272774 # buck6d->(o2_c1cu1@co2)|CuPW/gaussian->(o2_c1cu1@co2)|CuPW <--> buck6d->(o2_c1cu1@co2)|CuPW/gaussian->(o2_c1cu1@co2)|CuPW
|
||||
pair_coeff 5 6 10576.399 3.1914894 365.45138 2.5231391 0.61999948 # buck6d->(o2_c1cu1@co2)|CuPW/gaussian->(o2_c1cu1@co2)|CuPW <--> buck6d->(c3_c1o2@co2)|CuPW/gaussian->(c3_c1o2@co2)|CuPW
|
||||
pair_coeff 6 6 10304 3.0927835 429.89352 3.9170177 0.60800971 # buck6d->(c3_c1o2@co2)|CuPW/gaussian->(c3_c1o2@co2)|CuPW <--> buck6d->(c3_c1o2@co2)|CuPW/gaussian->(c3_c1o2@co2)|CuPW
|
||||
|
||||
bond_style hybrid class2 morse
|
||||
|
||||
bond_coeff 5 morse 50.000000 1.451345 1.914000 # morse->(cu5_cu1o4@cu2,o2_c1cu1@co2)|CuPW
|
||||
bond_coeff 4 class2 2.536000 75.465060 -192.435903 286.248406 # mm3->(cu5_cu1o4@cu2,cu5_cu1o4@cu2)|CuPW
|
||||
bond_coeff 3 class2 1.094000 390.634200 -996.117210 1481.724350 # mm3->(c3_c2h1@ph,h1_c1@ph)|benzene
|
||||
bond_coeff 6 class2 1.278000 585.591600 -1493.258580 2221.222138 # mm3->(c3_c1o2@co2,o2_c1cu1@co2)|CuPW
|
||||
bond_coeff 1 class2 1.394000 509.335200 -1298.804760 1931.972080 # mm3->(c3_c2h1@ph,c3_c2h1@ph)|benzene
|
||||
bond_coeff 2 class2 1.485000 360.635220 -919.619811 1367.934469 # mm3->(c3_c1o2@co2,c3_c3@ph)|CuPW
|
||||
|
||||
angle_style hybrid class2/p6 cosine/buck6d
|
||||
|
||||
angle_coeff 2 class2/p6 117.711000 57.408120 -46.049402 10.553745 -7.558563 13.610890 # mm3->(c3_c1o2@co2,c3_c3@ph,c3_c2h1@ph)|CuPW
|
||||
angle_coeff 2 class2/p6 bb 0.0 1.0 1.0
|
||||
angle_coeff 2 class2/p6 ba 0.0 0.0 1.0 1.0
|
||||
angle_coeff 6 class2/p6 126.814000 13.740540 -11.021849 2.526022 -1.809130 3.257744 # mm3->(c3_c1o2@co2,o2_c1cu1@co2,cu5_cu1o4@cu2)|CuPW
|
||||
angle_coeff 6 class2/p6 bb 0.0 1.0 1.0
|
||||
angle_coeff 6 class2/p6 ba 0.0 0.0 1.0 1.0
|
||||
angle_coeff 7 class2/p6 123.490000 111.075360 -89.098091 20.419778 -14.624589 26.334856 # mm3->(o2_c1cu1@co2,c3_c1o2@co2,o2_c1cu1@co2)|CuPW
|
||||
angle_coeff 7 class2/p6 bb 14.244120 1.278000 1.278000
|
||||
angle_coeff 7 class2/p6 ba 3.309240 3.309240 1.278000 1.278000
|
||||
angle_coeff 1 class2/p6 127.050000 53.307540 -42.760159 9.799907 -7.018666 12.638684 # mm3->(c3_c2h1@ph,c3_c2h1@ph,c3_c2h1@ph)|benzene
|
||||
angle_coeff 1 class2/p6 bb 71.796120 1.394000 1.394000
|
||||
angle_coeff 1 class2/p6 ba 6.762360 6.762360 1.394000 1.394000
|
||||
angle_coeff 4 class2/p6 84.336000 29.351520 -23.544055 5.395900 -3.864529 6.958951 # mm3->(cu5_cu1o4@cu2,cu5_cu1o4@cu2,o2_c1cu1@co2)|CuPW
|
||||
angle_coeff 4 class2/p6 bb 0.0 1.0 1.0
|
||||
angle_coeff 4 class2/p6 ba 0.0 0.0 1.0 1.0
|
||||
angle_coeff 3 class2/p6 120.350000 36.185820 -29.026127 6.652298 -4.764358 8.579296 # mm3->(c3_c2h1@ph,c3_c2h1@ph,h1_c1@ph)|benzene
|
||||
angle_coeff 3 class2/p6 bb 93.378120 1.394000 1.094000
|
||||
angle_coeff 3 class2/p6 ba -25.179000 53.523360 1.394000 1.094000
|
||||
angle_coeff 8 class2/p6 115.098000 79.493700 -63.765149 14.613896 -10.466432 18.847160 # mm3->(c3_c3@ph,c3_c1o2@co2,o2_c1cu1@co2)|CuPW
|
||||
angle_coeff 8 class2/p6 bb 0.0 1.0 1.0
|
||||
angle_coeff 8 class2/p6 ba 0.0 0.0 1.0 1.0
|
||||
angle_coeff 5 cosine/buck6d 1.978350 4 180.000000 #1.0 # fourier->(o2_c1cu1@co2,cu5_cu1o4@cu2,o2_c1cu1@co2)|CuPW
|
||||
|
||||
dihedral_style opls
|
||||
|
||||
dihedral_coeff 3 0.000000 0.000000 0.000000 0.000000 # cos3->(c3_c3@ph,c3_c2h1@ph,c3_c3@ph,c3_c1o2@co2)|CuPW
|
||||
dihedral_coeff 9 0.000000 4.528000 0.000000 0.000000 # cos3->(o2_c1cu1@co2,c3_c1o2@co2,o2_c1cu1@co2,cu5_cu1o4@cu2)|CuPW
|
||||
dihedral_coeff 8 0.000000 0.000000 0.000000 0.000000 # cos3->(o2_c1cu1@co2,cu5_cu1o4@cu2,o2_c1cu1@co2,c3_c1o2@co2)|CuPW
|
||||
dihedral_coeff 5 0.000000 1.741000 0.000000 0.000000 # cos3->(o2_c1cu1@co2,c3_c1o2@co2,c3_c3@ph,c3_c2h1@ph)|CuPW
|
||||
dihedral_coeff 2 0.000000 6.316000 0.000000 0.000000 # cos3->(c3_c2h1@ph,c3_c2h1@ph,c3_c2h1@ph,h1_c1@ph)|benzene
|
||||
dihedral_coeff 1 0.000000 4.379000 0.000000 0.000000 # cos3->(c3_c2h1@ph,c3_c2h1@ph,c3_c2h1@ph,c3_c2h1@ph)|benzene
|
||||
dihedral_coeff 6 0.000000 0.000000 0.000000 0.609000 # cos4->(o2_c1cu1@co2,cu5_cu1o4@cu2,cu5_cu1o4@cu2,o2_c1cu1@co2)|CuPW
|
||||
dihedral_coeff 4 0.000000 0.000000 0.000000 0.000000 # cos3->(h1_c1@ph,c3_c2h1@ph,c3_c3@ph,c3_c1o2@co2)|CuPW
|
||||
dihedral_coeff 10 0.000000 0.000000 0.000000 0.000000 # cos3->(c3_c3@ph,c3_c1o2@co2,o2_c1cu1@co2,cu5_cu1o4@cu2)|CuPW
|
||||
dihedral_coeff 7 0.000000 0.000000 0.000000 0.000000 # cos3->(cu5_cu1o4@cu2,cu5_cu1o4@cu2,o2_c1cu1@co2,c3_c1o2@co2)|CuPW
|
||||
|
||||
improper_style inversion/harmonic
|
||||
|
||||
improper_coeff 1 18.776340 0.000000 # harm->(c3_c3@ph,c3_c2h1@ph,c3_c2h1@ph,c3_c1o2@co2)|CuPW
|
||||
improper_coeff 3 41.005800 0.000000 # harm->(c3_c1o2@co2,c3_c3@ph,o2_c1cu1@co2,o2_c1cu1@co2)|CuPW
|
||||
improper_coeff 2 4.100580 0.000000 # harm->(c3_c2h1@ph,c3_c2h1@ph,c3_c2h1@ph,h1_c1@ph)|benzene
|
||||
|
||||
special_bonds lj 0.0 0.0 1.0 coul 1.0 1.0 1.0
|
||||
5 = max # of 1-2 neighbors
|
||||
8 = max # of 1-3 neighbors
|
||||
17 = max # of special neighbors
|
||||
|
||||
# ------------------------ MOF-FF FORCE FIELD END --------------------------
|
||||
|
||||
run 0
|
||||
WARNING: No fixes defined, atoms won't move (../verlet.cpp:55)
|
||||
Ewald initialization ...
|
||||
WARNING: Using 12-bit tables for long-range coulomb (../kspace.cpp:321)
|
||||
G vector (1/distance) = 0.267593
|
||||
estimated absolute RMS force accuracy = 0.000333665
|
||||
estimated relative force accuracy = 1.00482e-06
|
||||
KSpace vectors: actual max1d max3d = 1054 8 2456
|
||||
kxmax kymax kzmax = 8 8 8
|
||||
Neighbor list info ...
|
||||
update every 1 steps, delay 10 steps, check yes
|
||||
max neighbors/atom: 2000, page size: 100000
|
||||
master list distance cutoff = 14
|
||||
ghost atom cutoff = 14
|
||||
binsize = 7, bins = 4 4 4
|
||||
1 neighbor lists, perpetual/occasional/extra = 1 0 0
|
||||
(1) pair buck6d/coul/gauss/long, perpetual
|
||||
attributes: half, newton on
|
||||
pair build: half/bin/newton/tri
|
||||
stencil: half/bin/3d/newton/tri
|
||||
bin: standard
|
||||
WARNING: Inconsistent image flags (../domain.cpp:786)
|
||||
Per MPI rank memory allocation (min/avg/max) = 34.1 | 34.1 | 34.1 Mbytes
|
||||
Step Temp E_pair E_mol TotEng Press
|
||||
0 0 -16541.109 343.7619 -16197.347 -629.64956
|
||||
Loop time of 6.13928e-06 on 4 procs for 0 steps with 624 atoms
|
||||
|
||||
0.0% 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 | 0 | 0 | 0.0 | 0.00
|
||||
Bond | 0 | 0 | 0 | 0.0 | 0.00
|
||||
Kspace | 0 | 0 | 0 | 0.0 | 0.00
|
||||
Neigh | 0 | 0 | 0 | 0.0 | 0.00
|
||||
Comm | 0 | 0 | 0 | 0.0 | 0.00
|
||||
Output | 0 | 0 | 0 | 0.0 | 0.00
|
||||
Modify | 0 | 0 | 0 | 0.0 | 0.00
|
||||
Other | | 6.139e-06 | | |100.00
|
||||
|
||||
Nlocal: 156 ave 156 max 156 min
|
||||
Histogram: 4 0 0 0 0 0 0 0 0 0
|
||||
Nghost: 2718 ave 2718 max 2718 min
|
||||
Histogram: 4 0 0 0 0 0 0 0 0 0
|
||||
Neighs: 28842 ave 28870 max 28814 min
|
||||
Histogram: 1 1 0 0 0 0 0 0 1 1
|
||||
|
||||
Total # of neighbors = 115368
|
||||
Ave neighs/atom = 184.885
|
||||
Ave special neighs/atom = 7.46154
|
||||
Neighbor list builds = 0
|
||||
Dangerous builds = 0
|
||||
Total wall time: 0:00:00
|
||||
@ -76,7 +76,8 @@ OBJS = $(OBJ_DIR)/lal_atom.o $(OBJ_DIR)/lal_ans.o \
|
||||
$(OBJ_DIR)/lal_coul.o $(OBJ_DIR)/lal_coul_ext.o \
|
||||
$(OBJ_DIR)/lal_coul_debye.o $(OBJ_DIR)/lal_coul_debye_ext.o \
|
||||
$(OBJ_DIR)/lal_zbl.o $(OBJ_DIR)/lal_zbl_ext.o \
|
||||
$(OBJ_DIR)/lal_lj_cubic.o $(OBJ_DIR)/lal_lj_cubic_ext.o
|
||||
$(OBJ_DIR)/lal_lj_cubic.o $(OBJ_DIR)/lal_lj_cubic_ext.o \
|
||||
$(OBJ_DIR)/lal_ufm.o $(OBJ_DIR)/lal_ufm_ext.o
|
||||
|
||||
CBNS = $(OBJ_DIR)/device.cubin $(OBJ_DIR)/device_cubin.h \
|
||||
$(OBJ_DIR)/atom.cubin $(OBJ_DIR)/atom_cubin.h \
|
||||
@ -131,7 +132,8 @@ CBNS = $(OBJ_DIR)/device.cubin $(OBJ_DIR)/device_cubin.h \
|
||||
$(OBJ_DIR)/coul.cubin $(OBJ_DIR)/coul_cubin.h \
|
||||
$(OBJ_DIR)/coul_debye.cubin $(OBJ_DIR)/coul_debye_cubin.h \
|
||||
$(OBJ_DIR)/zbl.cubin $(OBJ_DIR)/zbl_cubin.h \
|
||||
$(OBJ_DIR)/lj_cubic.cubin $(OBJ_DIR)/lj_cubic_cubin.h
|
||||
$(OBJ_DIR)/lj_cubic.cubin $(OBJ_DIR)/lj_cubic_cubin.h \
|
||||
$(OBJ_DIR)/ufm.cubin $(OBJ_DIR)/ufm_cubin.h
|
||||
|
||||
all: $(OBJ_DIR) $(GPU_LIB) $(EXECS)
|
||||
|
||||
@ -705,6 +707,18 @@ $(OBJ_DIR)/dpd.cubin: lal_dpd.cu lal_precision.h lal_preprocessor.h
|
||||
$(OBJ_DIR)/dpd_cubin.h: $(OBJ_DIR)/dpd.cubin $(OBJ_DIR)/dpd.cubin
|
||||
$(BIN2C) -c -n dpd $(OBJ_DIR)/dpd.cubin > $(OBJ_DIR)/dpd_cubin.h
|
||||
|
||||
$(OBJ_DIR)/ufm.cubin: lal_ufm.cu lal_precision.h lal_preprocessor.h
|
||||
$(CUDA) --cubin -DNV_KERNEL -o $@ lal_ufm.cu
|
||||
|
||||
$(OBJ_DIR)/ufm_cubin.h: $(OBJ_DIR)/ufm.cubin $(OBJ_DIR)/ufm.cubin
|
||||
$(BIN2C) -c -n ufm $(OBJ_DIR)/ufm.cubin > $(OBJ_DIR)/ufm_cubin.h
|
||||
|
||||
$(OBJ_DIR)/lal_ufm.o: $(ALL_H) lal_ufm.h lal_ufm.cpp $(OBJ_DIR)/ufm_cubin.h $(OBJ_DIR)/lal_base_atomic.o
|
||||
$(CUDR) -o $@ -c lal_ufm.cpp -I$(OBJ_DIR)
|
||||
|
||||
$(OBJ_DIR)/lal_ufm_ext.o: $(ALL_H) lal_ufm.h lal_ufm_ext.cpp lal_base_atomic.h
|
||||
$(CUDR) -o $@ -c lal_ufm_ext.cpp -I$(OBJ_DIR)
|
||||
|
||||
$(OBJ_DIR)/lal_dpd.o: $(ALL_H) lal_dpd.h lal_dpd.cpp $(OBJ_DIR)/dpd_cubin.h $(OBJ_DIR)/lal_base_dpd.o
|
||||
$(CUDR) -o $@ -c lal_dpd.cpp -I$(OBJ_DIR)
|
||||
|
||||
|
||||
@ -135,6 +135,7 @@ Current styles supporting GPU acceleration:
|
||||
38 yukawa/colloid
|
||||
39 yukawa
|
||||
40 pppm
|
||||
41 ufm
|
||||
|
||||
|
||||
MULTIPLE LAMMPS PROCESSES
|
||||
|
||||
172
lib/gpu/lal_ufm.cpp
Normal file
172
lib/gpu/lal_ufm.cpp
Normal file
@ -0,0 +1,172 @@
|
||||
/***************************************************************************
|
||||
ufm.cpp
|
||||
-------------------
|
||||
Rodolfo Paula Leite (Unicamp/Brazil)
|
||||
Maurice de Koning (Unicamp/Brazil)
|
||||
|
||||
Class for acceleration of the ufm pair style.
|
||||
|
||||
__________________________________________________________________________
|
||||
This file is part of the LAMMPS Accelerator Library (LAMMPS_AL)
|
||||
__________________________________________________________________________
|
||||
|
||||
begin :
|
||||
email : pl.rodolfo@gmail.com
|
||||
dekoning@ifi.unicamp.br
|
||||
***************************************************************************/
|
||||
|
||||
#if defined(USE_OPENCL)
|
||||
#include "ufm_cl.h"
|
||||
#elif defined(USE_CUDART)
|
||||
const char *ufm=0;
|
||||
#else
|
||||
#include "ufm_cubin.h"
|
||||
#endif
|
||||
|
||||
#include "lal_ufm.h"
|
||||
#include <cassert>
|
||||
using namespace LAMMPS_AL;
|
||||
#define UFMT UFM<numtyp, acctyp>
|
||||
|
||||
extern Device<PRECISION,ACC_PRECISION> device;
|
||||
|
||||
template <class numtyp, class acctyp>
|
||||
UFMT::UFM() : BaseAtomic<numtyp,acctyp>(), _allocated(false) {
|
||||
}
|
||||
|
||||
template <class numtyp, class acctyp>
|
||||
UFMT::~UFM() {
|
||||
clear();
|
||||
}
|
||||
|
||||
template <class numtyp, class acctyp>
|
||||
int UFMT::bytes_per_atom(const int max_nbors) const {
|
||||
return this->bytes_per_atom_atomic(max_nbors);
|
||||
}
|
||||
|
||||
template <class numtyp, class acctyp>
|
||||
int UFMT::init(const int ntypes,
|
||||
double **host_cutsq, double **host_uf1,
|
||||
double **host_uf2, double **host_uf3,
|
||||
double **host_uf4, double **host_offset,
|
||||
double *host_special_lj, const int nlocal,
|
||||
const int nall, const int max_nbors,
|
||||
const int maxspecial, const double cell_size,
|
||||
const double gpu_split, FILE *_screen) {
|
||||
int success;
|
||||
success=this->init_atomic(nlocal,nall,max_nbors,maxspecial,cell_size,gpu_split,
|
||||
_screen,ufm,"k_ufm");
|
||||
if (success!=0)
|
||||
return success;
|
||||
|
||||
// If atom type constants fit in shared memory use fast kernel
|
||||
int lj_types=ntypes;
|
||||
shared_types=false;
|
||||
int max_shared_types=this->device->max_shared_types();
|
||||
if (lj_types<=max_shared_types && this->_block_size>=max_shared_types) {
|
||||
lj_types=max_shared_types;
|
||||
shared_types=true;
|
||||
}
|
||||
_lj_types=lj_types;
|
||||
|
||||
// Allocate a host write buffer for data initialization
|
||||
UCL_H_Vec<numtyp> host_write(lj_types*lj_types*32,*(this->ucl_device),
|
||||
UCL_WRITE_ONLY);
|
||||
|
||||
for (int i=0; i<lj_types*lj_types; i++)
|
||||
host_write[i]=0.0;
|
||||
|
||||
uf1.alloc(lj_types*lj_types,*(this->ucl_device),UCL_READ_ONLY);
|
||||
this->atom->type_pack4(ntypes,lj_types,uf1,host_write,host_uf1,host_uf2,
|
||||
host_cutsq);
|
||||
|
||||
uf3.alloc(lj_types*lj_types,*(this->ucl_device),UCL_READ_ONLY);
|
||||
this->atom->type_pack4(ntypes,lj_types,uf3,host_write,host_uf3,host_uf4,
|
||||
host_offset);
|
||||
|
||||
UCL_H_Vec<double> dview;
|
||||
sp_lj.alloc(4,*(this->ucl_device),UCL_READ_ONLY);
|
||||
dview.view(host_special_lj,4,*(this->ucl_device));
|
||||
ucl_copy(sp_lj,dview,false);
|
||||
|
||||
_allocated=true;
|
||||
this->_max_bytes=uf1.row_bytes()+uf3.row_bytes()+sp_lj.row_bytes();
|
||||
return 0;
|
||||
}
|
||||
|
||||
template <class numtyp, class acctyp>
|
||||
void UFMT::reinit(const int ntypes, double **host_cutsq, double **host_uf1,
|
||||
double **host_uf2, double **host_uf3,
|
||||
double **host_uf4, double **host_offset) {
|
||||
// Allocate a host write buffer for data initialization
|
||||
UCL_H_Vec<numtyp> host_write(_lj_types*_lj_types*32,*(this->ucl_device),
|
||||
UCL_WRITE_ONLY);
|
||||
|
||||
for (int i=0; i<_lj_types*_lj_types; i++)
|
||||
host_write[i]=0.0;
|
||||
|
||||
this->atom->type_pack4(ntypes,_lj_types,uf1,host_write,host_uf1,host_uf2,
|
||||
host_cutsq);
|
||||
this->atom->type_pack4(ntypes,_lj_types,uf3,host_write,host_uf3,host_uf4,
|
||||
host_offset);
|
||||
}
|
||||
|
||||
template <class numtyp, class acctyp>
|
||||
void UFMT::clear() {
|
||||
if (!_allocated)
|
||||
return;
|
||||
_allocated=false;
|
||||
|
||||
uf1.clear();
|
||||
uf3.clear();
|
||||
sp_lj.clear();
|
||||
this->clear_atomic();
|
||||
}
|
||||
|
||||
template <class numtyp, class acctyp>
|
||||
double UFMT::host_memory_usage() const {
|
||||
return this->host_memory_usage_atomic()+sizeof(UFM<numtyp,acctyp>);
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Calculate energies, forces, and torques
|
||||
// ---------------------------------------------------------------------------
|
||||
template <class numtyp, class acctyp>
|
||||
void UFMT::loop(const bool _eflag, const bool _vflag) {
|
||||
// Compute the block size and grid size to keep all cores busy
|
||||
const int BX=this->block_size();
|
||||
int eflag, vflag;
|
||||
if (_eflag)
|
||||
eflag=1;
|
||||
else
|
||||
eflag=0;
|
||||
|
||||
if (_vflag)
|
||||
vflag=1;
|
||||
else
|
||||
vflag=0;
|
||||
|
||||
int GX=static_cast<int>(ceil(static_cast<double>(this->ans->inum())/
|
||||
(BX/this->_threads_per_atom)));
|
||||
|
||||
int ainum=this->ans->inum();
|
||||
int nbor_pitch=this->nbor->nbor_pitch();
|
||||
this->time_pair.start();
|
||||
if (shared_types) {
|
||||
this->k_pair_fast.set_size(GX,BX);
|
||||
this->k_pair_fast.run(&this->atom->x, &uf1, &uf3, &sp_lj,
|
||||
&this->nbor->dev_nbor, &this->_nbor_data->begin(),
|
||||
&this->ans->force, &this->ans->engv, &eflag,
|
||||
&vflag, &ainum, &nbor_pitch,
|
||||
&this->_threads_per_atom);
|
||||
} else {
|
||||
this->k_pair.set_size(GX,BX);
|
||||
this->k_pair.run(&this->atom->x, &uf1, &uf3, &_lj_types, &sp_lj,
|
||||
&this->nbor->dev_nbor, &this->_nbor_data->begin(),
|
||||
&this->ans->force, &this->ans->engv, &eflag, &vflag,
|
||||
&ainum, &nbor_pitch, &this->_threads_per_atom);
|
||||
}
|
||||
this->time_pair.stop();
|
||||
}
|
||||
|
||||
template class UFM<PRECISION,ACC_PRECISION>;
|
||||
188
lib/gpu/lal_ufm.cu
Normal file
188
lib/gpu/lal_ufm.cu
Normal file
@ -0,0 +1,188 @@
|
||||
/***************************************************************************
|
||||
ufm.cu
|
||||
-------------------
|
||||
Rodolfo Paula Leite (Unicamp/Brazil)
|
||||
Maurice de Koning (Unicamp/Brazil)
|
||||
|
||||
Device code for acceleration of the ufm pair style
|
||||
|
||||
__________________________________________________________________________
|
||||
This file is part of the LAMMPS Accelerator Library (LAMMPS_AL)
|
||||
__________________________________________________________________________
|
||||
|
||||
begin :
|
||||
email : pl.rodolfo@gmail.com
|
||||
dekoning@ifi.unicamp.br
|
||||
***************************************************************************/
|
||||
|
||||
#ifdef NV_KERNEL
|
||||
#include "lal_aux_fun1.h"
|
||||
#ifndef _DOUBLE_DOUBLE
|
||||
texture<float4> pos_tex;
|
||||
#else
|
||||
texture<int4,1> pos_tex;
|
||||
#endif
|
||||
#else
|
||||
#define pos_tex x_
|
||||
#endif
|
||||
|
||||
__kernel void k_ufm(const __global numtyp4 *restrict x_,
|
||||
const __global numtyp4 *restrict uf1,
|
||||
const __global numtyp4 *restrict uf3,
|
||||
const int lj_types,
|
||||
const __global numtyp *restrict sp_lj,
|
||||
const __global int * dev_nbor,
|
||||
const __global int * dev_packed,
|
||||
__global acctyp4 *restrict ans,
|
||||
__global acctyp *restrict engv,
|
||||
const int eflag, const int vflag, const int inum,
|
||||
const int nbor_pitch, const int t_per_atom) {
|
||||
int tid, ii, offset;
|
||||
atom_info(t_per_atom,ii,tid,offset);
|
||||
|
||||
acctyp energy=(acctyp)0;
|
||||
acctyp4 f;
|
||||
f.x=(acctyp)0; f.y=(acctyp)0; f.z=(acctyp)0;
|
||||
acctyp virial[6];
|
||||
for (int i=0; i<6; i++)
|
||||
virial[i]=(acctyp)0;
|
||||
|
||||
if (ii<inum) {
|
||||
int i, numj, nbor, nbor_end;
|
||||
__local int n_stride;
|
||||
nbor_info(dev_nbor,dev_packed,nbor_pitch,t_per_atom,ii,offset,i,numj,
|
||||
n_stride,nbor_end,nbor);
|
||||
|
||||
numtyp4 ix; fetch4(ix,i,pos_tex); //x_[i];
|
||||
int itype=ix.w;
|
||||
|
||||
numtyp factor_lj;
|
||||
for ( ; nbor<nbor_end; nbor+=n_stride) {
|
||||
|
||||
int j=dev_packed[nbor];
|
||||
factor_lj = sp_lj[sbmask(j)];
|
||||
j &= NEIGHMASK;
|
||||
|
||||
numtyp4 jx; fetch4(jx,j,pos_tex); //x_[j];
|
||||
int jtype=jx.w;
|
||||
|
||||
// Compute r12
|
||||
numtyp delx = ix.x-jx.x;
|
||||
numtyp dely = ix.y-jx.y;
|
||||
numtyp delz = ix.z-jx.z;
|
||||
numtyp rsq = delx*delx+dely*dely+delz*delz;
|
||||
|
||||
int mtype=itype*lj_types+jtype;
|
||||
if (rsq<uf1[mtype].z) {
|
||||
numtyp expuf = exp(- rsq * uf1[mtype].y);
|
||||
numtyp force = factor_lj * uf1[mtype].x * expuf / (1.0 - expuf);
|
||||
|
||||
f.x += delx*force;
|
||||
f.y += dely*force;
|
||||
f.z += delz*force;
|
||||
|
||||
if (eflag>0) {
|
||||
energy += - factor_lj * uf3[mtype].x*log(1.0 - expuf) - uf3[mtype].z;
|
||||
}
|
||||
if (vflag>0) {
|
||||
virial[0] += delx*delx*force;
|
||||
virial[1] += dely*dely*force;
|
||||
virial[2] += delz*delz*force;
|
||||
virial[3] += delx*dely*force;
|
||||
virial[4] += delx*delz*force;
|
||||
virial[5] += dely*delz*force;
|
||||
}
|
||||
}
|
||||
|
||||
} // for nbor
|
||||
store_answers(f,energy,virial,ii,inum,tid,t_per_atom,offset,eflag,vflag,
|
||||
ans,engv);
|
||||
} // if ii
|
||||
}
|
||||
|
||||
__kernel void k_ufm_fast(const __global numtyp4 *restrict x_,
|
||||
const __global numtyp4 *restrict uf1_in,
|
||||
const __global numtyp4 *restrict uf3_in,
|
||||
const __global numtyp *restrict sp_lj_in,
|
||||
const __global int * dev_nbor,
|
||||
const __global int * dev_packed,
|
||||
__global acctyp4 *restrict ans,
|
||||
__global acctyp *restrict engv,
|
||||
const int eflag, const int vflag, const int inum,
|
||||
const int nbor_pitch, const int t_per_atom) {
|
||||
int tid, ii, offset;
|
||||
atom_info(t_per_atom,ii,tid,offset);
|
||||
|
||||
__local numtyp4 uf1[MAX_SHARED_TYPES*MAX_SHARED_TYPES];
|
||||
__local numtyp4 uf3[MAX_SHARED_TYPES*MAX_SHARED_TYPES];
|
||||
__local numtyp sp_lj[4];
|
||||
if (tid<4)
|
||||
sp_lj[tid]=sp_lj_in[tid];
|
||||
if (tid<MAX_SHARED_TYPES*MAX_SHARED_TYPES) {
|
||||
uf1[tid]=uf1_in[tid];
|
||||
if (eflag>0)
|
||||
uf3[tid]=uf3_in[tid];
|
||||
}
|
||||
|
||||
acctyp energy=(acctyp)0;
|
||||
acctyp4 f;
|
||||
f.x=(acctyp)0; f.y=(acctyp)0; f.z=(acctyp)0;
|
||||
acctyp virial[6];
|
||||
for (int i=0; i<6; i++)
|
||||
virial[i]=(acctyp)0;
|
||||
|
||||
__syncthreads();
|
||||
|
||||
if (ii<inum) {
|
||||
int i, numj, nbor, nbor_end;
|
||||
__local int n_stride;
|
||||
nbor_info(dev_nbor,dev_packed,nbor_pitch,t_per_atom,ii,offset,i,numj,
|
||||
n_stride,nbor_end,nbor);
|
||||
|
||||
numtyp4 ix; fetch4(ix,i,pos_tex); //x_[i];
|
||||
int iw=ix.w;
|
||||
int itype=fast_mul((int)MAX_SHARED_TYPES,iw);
|
||||
|
||||
numtyp factor_lj;
|
||||
for ( ; nbor<nbor_end; nbor+=n_stride) {
|
||||
|
||||
int j=dev_packed[nbor];
|
||||
factor_lj = sp_lj[sbmask(j)];
|
||||
j &= NEIGHMASK;
|
||||
|
||||
numtyp4 jx; fetch4(jx,j,pos_tex); //x_[j];
|
||||
int mtype=itype+jx.w;
|
||||
|
||||
// Compute r12
|
||||
numtyp delx = ix.x-jx.x;
|
||||
numtyp dely = ix.y-jx.y;
|
||||
numtyp delz = ix.z-jx.z;
|
||||
numtyp rsq = delx*delx+dely*dely+delz*delz;
|
||||
|
||||
if (rsq<uf1[mtype].z) {
|
||||
numtyp expuf = exp(- rsq * uf1[mtype].y);
|
||||
numtyp force = factor_lj * uf1[mtype].x * expuf / (1.0 - expuf);
|
||||
|
||||
f.x += delx*force;
|
||||
f.y += dely*force;
|
||||
f.z += delz*force;
|
||||
|
||||
if (eflag>0) {
|
||||
energy += - factor_lj * uf3[mtype].x * log(1.0 - expuf) - uf3[mtype].z;
|
||||
}
|
||||
if (vflag>0) {
|
||||
virial[0] += delx*delx*force;
|
||||
virial[1] += dely*dely*force;
|
||||
virial[2] += delz*delz*force;
|
||||
virial[3] += delx*dely*force;
|
||||
virial[4] += delx*delz*force;
|
||||
virial[5] += dely*delz*force;
|
||||
}
|
||||
}
|
||||
|
||||
} // for nbor
|
||||
store_answers(f,energy,virial,ii,inum,tid,t_per_atom,offset,eflag,vflag,
|
||||
ans,engv);
|
||||
} // if ii
|
||||
}
|
||||
|
||||
86
lib/gpu/lal_ufm.h
Normal file
86
lib/gpu/lal_ufm.h
Normal file
@ -0,0 +1,86 @@
|
||||
/***************************************************************************
|
||||
ufm.h
|
||||
-------------------
|
||||
Rodolfo Paula Leite (Unicamp/Brazil)
|
||||
Maurice de Koning (Unicamp/Brazil)
|
||||
|
||||
Class for acceleration of the ufm pair style.
|
||||
|
||||
__________________________________________________________________________
|
||||
This file is part of the LAMMPS Accelerator Library (LAMMPS_AL)
|
||||
__________________________________________________________________________
|
||||
|
||||
begin :
|
||||
email : pl.rodolfo@gmail.com
|
||||
dekoning@ifi.unicamp.br
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef LAL_UFM_H
|
||||
#define LAL_UFM_H
|
||||
|
||||
#include "lal_base_atomic.h"
|
||||
|
||||
namespace LAMMPS_AL {
|
||||
|
||||
template <class numtyp, class acctyp>
|
||||
class UFM : public BaseAtomic<numtyp, acctyp> {
|
||||
public:
|
||||
UFM();
|
||||
~UFM();
|
||||
|
||||
/// Clear any previous data and set up for a new LAMMPS run
|
||||
/** \param max_nbors initial number of rows in the neighbor matrix
|
||||
* \param cell_size cutoff + skin
|
||||
* \param gpu_split fraction of particles handled by device
|
||||
*
|
||||
* Returns:
|
||||
* - 0 if successfull
|
||||
* - -1 if fix gpu not found
|
||||
* - -3 if there is an out of memory error
|
||||
* - -4 if the GPU library was not compiled for GPU
|
||||
* - -5 Double precision is not supported on card **/
|
||||
int init(const int ntypes, double **host_cutsq,
|
||||
double **host_uf1, double **host_uf2, double **host_uf3,
|
||||
double **host_uf4, double **host_offset, double *host_special_lj,
|
||||
const int nlocal, const int nall, const int max_nbors,
|
||||
const int maxspecial, const double cell_size,
|
||||
const double gpu_split, FILE *screen);
|
||||
|
||||
/// Send updated coeffs from host to device (to be compatible with fix adapt)
|
||||
void reinit(const int ntypes, double **host_cutsq,
|
||||
double **host_uf1, double **host_uf2, double **host_uf3,
|
||||
double **host_uf4, double **host_offset);
|
||||
|
||||
/// Clear all host and device data
|
||||
/** \note This is called at the beginning of the init() routine **/
|
||||
void clear();
|
||||
|
||||
/// Returns memory usage on device per atom
|
||||
int bytes_per_atom(const int max_nbors) const;
|
||||
|
||||
/// Total host memory used by library for pair style
|
||||
double host_memory_usage() const;
|
||||
|
||||
// --------------------------- TYPE DATA --------------------------
|
||||
|
||||
/// uf1.x = uf1, uf1.y = uf2, uf1.z = cutsq
|
||||
UCL_D_Vec<numtyp4> uf1;
|
||||
/// uf3.x = uf3, uf3.y = uf4, uf3.z = offset
|
||||
UCL_D_Vec<numtyp4> uf3;
|
||||
/// Special LJ values
|
||||
UCL_D_Vec<numtyp> sp_lj;
|
||||
|
||||
/// If atom type constants fit in shared memory, use fast kernels
|
||||
bool shared_types;
|
||||
|
||||
/// Number of atom types
|
||||
int _lj_types;
|
||||
|
||||
private:
|
||||
bool _allocated;
|
||||
void loop(const bool _eflag, const bool _vflag);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
143
lib/gpu/lal_ufm_ext.cpp
Normal file
143
lib/gpu/lal_ufm_ext.cpp
Normal file
@ -0,0 +1,143 @@
|
||||
/***************************************************************************
|
||||
ufm_ext.cpp
|
||||
------------------------------
|
||||
Rodolfo Paula Leite (Unicamp/Brazil)
|
||||
Maurice de Koning (Unicamp/Brazil)
|
||||
|
||||
Functions for LAMMPS access to ufm acceleration routines.
|
||||
|
||||
__________________________________________________________________________
|
||||
This file is part of the LAMMPS Accelerator Library (LAMMPS_AL)
|
||||
__________________________________________________________________________
|
||||
|
||||
begin :
|
||||
email : pl.rodolfo@gmail.com
|
||||
dekoning@ifi.unicamp.br
|
||||
***************************************************************************/
|
||||
|
||||
#include <iostream>
|
||||
#include <cassert>
|
||||
#include <math.h>
|
||||
|
||||
#include "lal_ufm.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace LAMMPS_AL;
|
||||
|
||||
static UFM<PRECISION,ACC_PRECISION> UFMLMF;
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Allocate memory on host and device and copy constants to device
|
||||
// ---------------------------------------------------------------------------
|
||||
int ufml_gpu_init(const int ntypes, double **cutsq, double **host_uf1,
|
||||
double **host_uf2, double **host_uf3, double **host_uf4,
|
||||
double **offset, double *special_lj, const int inum, const int nall,
|
||||
const int max_nbors, const int maxspecial, const double cell_size,
|
||||
int &gpu_mode, FILE *screen) {
|
||||
UFMLMF.clear();
|
||||
gpu_mode=UFMLMF.device->gpu_mode();
|
||||
double gpu_split=UFMLMF.device->particle_split();
|
||||
int first_gpu=UFMLMF.device->first_device();
|
||||
int last_gpu=UFMLMF.device->last_device();
|
||||
int world_me=UFMLMF.device->world_me();
|
||||
int gpu_rank=UFMLMF.device->gpu_rank();
|
||||
int procs_per_gpu=UFMLMF.device->procs_per_gpu();
|
||||
|
||||
UFMLMF.device->init_message(screen,"ufm",first_gpu,last_gpu);
|
||||
|
||||
bool message=false;
|
||||
if (UFMLMF.device->replica_me()==0 && screen)
|
||||
message=true;
|
||||
|
||||
if (message) {
|
||||
fprintf(screen,"Initializing Device and compiling on process 0...");
|
||||
fflush(screen);
|
||||
}
|
||||
|
||||
int init_ok=0;
|
||||
if (world_me==0)
|
||||
init_ok=UFMLMF.init(ntypes, cutsq, host_uf1, host_uf2, host_uf3,
|
||||
host_uf4, offset, special_lj, inum, nall, 300,
|
||||
maxspecial, cell_size, gpu_split, screen);
|
||||
|
||||
UFMLMF.device->world_barrier();
|
||||
if (message)
|
||||
fprintf(screen,"Done.\n");
|
||||
|
||||
for (int i=0; i<procs_per_gpu; i++) {
|
||||
if (message) {
|
||||
if (last_gpu-first_gpu==0)
|
||||
fprintf(screen,"Initializing Device %d on core %d...",first_gpu,i);
|
||||
else
|
||||
fprintf(screen,"Initializing Devices %d-%d on core %d...",first_gpu,
|
||||
last_gpu,i);
|
||||
fflush(screen);
|
||||
}
|
||||
if (gpu_rank==i && world_me!=0)
|
||||
init_ok=UFMLMF.init(ntypes, cutsq, host_uf1, host_uf2, host_uf3, host_uf4,
|
||||
offset, special_lj, inum, nall, 300, maxspecial,
|
||||
cell_size, gpu_split, screen);
|
||||
|
||||
UFMLMF.device->gpu_barrier();
|
||||
if (message)
|
||||
fprintf(screen,"Done.\n");
|
||||
}
|
||||
if (message)
|
||||
fprintf(screen,"\n");
|
||||
|
||||
if (init_ok==0)
|
||||
UFMLMF.estimate_gpu_overhead();
|
||||
return init_ok;
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Copy updated coeffs from host to device
|
||||
// ---------------------------------------------------------------------------
|
||||
void ufml_gpu_reinit(const int ntypes, double **cutsq, double **host_uf1,
|
||||
double **host_uf2, double **host_uf3, double **host_uf4,
|
||||
double **offset) {
|
||||
int world_me=UFMLMF.device->world_me();
|
||||
int gpu_rank=UFMLMF.device->gpu_rank();
|
||||
int procs_per_gpu=UFMLMF.device->procs_per_gpu();
|
||||
|
||||
if (world_me==0)
|
||||
UFMLMF.reinit(ntypes, cutsq, host_uf1, host_uf2, host_uf3, host_uf4, offset);
|
||||
UFMLMF.device->world_barrier();
|
||||
|
||||
for (int i=0; i<procs_per_gpu; i++) {
|
||||
if (gpu_rank==i && world_me!=0)
|
||||
UFMLMF.reinit(ntypes, cutsq, host_uf1, host_uf2, host_uf3, host_uf4, offset);
|
||||
UFMLMF.device->gpu_barrier();
|
||||
}
|
||||
}
|
||||
|
||||
void ufml_gpu_clear() {
|
||||
UFMLMF.clear();
|
||||
}
|
||||
|
||||
int ** ufml_gpu_compute_n(const int ago, const int inum_full,
|
||||
const int nall, double **host_x, int *host_type,
|
||||
double *sublo, double *subhi, tagint *tag, int **nspecial,
|
||||
tagint **special, const bool eflag, const bool vflag,
|
||||
const bool eatom, const bool vatom, int &host_start,
|
||||
int **ilist, int **jnum, const double cpu_time,
|
||||
bool &success) {
|
||||
return UFMLMF.compute(ago, inum_full, nall, host_x, host_type, sublo,
|
||||
subhi, tag, nspecial, special, eflag, vflag, eatom,
|
||||
vatom, host_start, ilist, jnum, cpu_time, success);
|
||||
}
|
||||
|
||||
void ufml_gpu_compute(const int ago, const int inum_full, const int nall,
|
||||
double **host_x, int *host_type, int *ilist, int *numj,
|
||||
int **firstneigh, const bool eflag, const bool vflag,
|
||||
const bool eatom, const bool vatom, int &host_start,
|
||||
const double cpu_time, bool &success) {
|
||||
UFMLMF.compute(ago,inum_full,nall,host_x,host_type,ilist,numj,
|
||||
firstneigh,eflag,vflag,eatom,vatom,host_start,cpu_time,success);
|
||||
}
|
||||
|
||||
double ufml_gpu_bytes() {
|
||||
return UFMLMF.host_memory_usage();
|
||||
}
|
||||
|
||||
|
||||
10
src/.gitignore
vendored
10
src/.gitignore
vendored
@ -134,6 +134,10 @@
|
||||
/angle_charmm.h
|
||||
/angle_class2.cpp
|
||||
/angle_class2.h
|
||||
/angle_class2_p6.cpp
|
||||
/angle_class2_p6.h
|
||||
/angle_cosine_buck6d.cpp
|
||||
/angle_cosine_buck6d.h
|
||||
/angle_cosine.cpp
|
||||
/angle_cosine.h
|
||||
/angle_cosine_delta.cpp
|
||||
@ -604,6 +608,8 @@
|
||||
/improper_harmonic.h
|
||||
/improper_hybrid.cpp
|
||||
/improper_hybrid.h
|
||||
/improper_inversion_harmonic.cpp
|
||||
/improper_inversion_harmonic.h
|
||||
/improper_ring.cpp
|
||||
/improper_ring.h
|
||||
/improper_umbrella.cpp
|
||||
@ -649,6 +655,10 @@
|
||||
/pair_buck_coul.h
|
||||
/pair_buck_long_coul_long.cpp
|
||||
/pair_buck_long_coul_long.h
|
||||
/pair_buck6d_coul_gauss_dsf.cpp
|
||||
/pair_buck6d_coul_gauss_dsf.h
|
||||
/pair_buck6d_coul_gauss_long.cpp
|
||||
/pair_buck6d_coul_gauss_long.h
|
||||
/pair_cdeam.cpp
|
||||
/pair_cdeam.h
|
||||
/pair_cg_cmm.cpp
|
||||
|
||||
@ -131,6 +131,8 @@ action pair_zbl_gpu.cpp
|
||||
action pair_zbl_gpu.h
|
||||
action pppm_gpu.cpp pppm.cpp
|
||||
action pppm_gpu.h pppm.cpp
|
||||
action pair_ufm_gpu.cpp
|
||||
action pair_ufm_gpu.h
|
||||
|
||||
# edit 2 Makefile.package files to include/exclude package info
|
||||
|
||||
|
||||
240
src/GPU/pair_ufm_gpu.cpp
Normal file
240
src/GPU/pair_ufm_gpu.cpp
Normal file
@ -0,0 +1,240 @@
|
||||
/* -*- c++ -*- ----------------------------------------------------------
|
||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
http://lammps.sandia.gov, Sandia National Laboratories
|
||||
Steve Plimpton, sjplimp@sandia.gov
|
||||
|
||||
Copyright (2003) Sandia Corporation. Under the terms of Contract
|
||||
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
|
||||
certain rights in this software. This software is distributed under
|
||||
the GNU General Public License.
|
||||
|
||||
See the README file in the top-level LAMMPS directory.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
Contributing author:
|
||||
Rodolfo Paula Leite (Unicamp/Brazil) - pl.rodolfo@gmail.com
|
||||
Maurice de Koning (Unicamp/Brazil) - dekoning@ifi.unicamp.br
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include "pair_ufm_gpu.h"
|
||||
#include "atom.h"
|
||||
#include "atom_vec.h"
|
||||
#include "comm.h"
|
||||
#include "force.h"
|
||||
#include "neighbor.h"
|
||||
#include "neigh_list.h"
|
||||
#include "integrate.h"
|
||||
#include "memory.h"
|
||||
#include "error.h"
|
||||
#include "neigh_request.h"
|
||||
#include "universe.h"
|
||||
#include "update.h"
|
||||
#include "domain.h"
|
||||
#include <string.h>
|
||||
#include "gpu_extra.h"
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
|
||||
// External functions from cuda library for atom decomposition
|
||||
|
||||
int ufml_gpu_init(const int ntypes, double **cutsq, double **host_uf1,
|
||||
double **host_uf2, double **host_uf3, double **host_uf4,
|
||||
double **offset, double *special_lj, const int nlocal,
|
||||
const int nall, const int max_nbors, const int maxspecial,
|
||||
const double cell_size, int &gpu_mode, FILE *screen);
|
||||
|
||||
int ufml_gpu_reinit(const int ntypes, double **cutsq, double **host_uf1,
|
||||
double **host_uf2, double **host_uf3, double **host_uf4,
|
||||
double **offset);
|
||||
|
||||
void ufml_gpu_clear();
|
||||
int ** ufml_gpu_compute_n(const int ago, const int inum,
|
||||
const int nall, double **host_x, int *host_type,
|
||||
double *sublo, double *subhi, tagint *tag, int **nspecial,
|
||||
tagint **special, const bool eflag, const bool vflag,
|
||||
const bool eatom, const bool vatom, int &host_start,
|
||||
int **ilist, int **jnum,
|
||||
const double cpu_time, bool &success);
|
||||
void ufml_gpu_compute(const int ago, const int inum, const int nall,
|
||||
double **host_x, int *host_type, int *ilist, int *numj,
|
||||
int **firstneigh, const bool eflag, const bool vflag,
|
||||
const bool eatom, const bool vatom, int &host_start,
|
||||
const double cpu_time, bool &success);
|
||||
double ufml_gpu_bytes();
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
PairUFMGPU::PairUFMGPU(LAMMPS *lmp) : PairUFM(lmp), gpu_mode(GPU_FORCE)
|
||||
{
|
||||
respa_enable = 0;
|
||||
cpu_time = 0.0;
|
||||
GPU_EXTRA::gpu_ready(lmp->modify, lmp->error);
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
free all arrays
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
PairUFMGPU::~PairUFMGPU()
|
||||
{
|
||||
ufml_gpu_clear();
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void PairUFMGPU::compute(int eflag, int vflag)
|
||||
{
|
||||
if (eflag || vflag) ev_setup(eflag,vflag);
|
||||
else evflag = vflag_fdotr = 0;
|
||||
|
||||
int nall = atom->nlocal + atom->nghost;
|
||||
int inum, host_start;
|
||||
|
||||
bool success = true;
|
||||
int *ilist, *numneigh, **firstneigh;
|
||||
if (gpu_mode != GPU_FORCE) {
|
||||
inum = atom->nlocal;
|
||||
firstneigh = ufml_gpu_compute_n(neighbor->ago, inum, nall,
|
||||
atom->x, atom->type, domain->sublo,
|
||||
domain->subhi, atom->tag, atom->nspecial,
|
||||
atom->special, eflag, vflag, eflag_atom,
|
||||
vflag_atom, host_start,
|
||||
&ilist, &numneigh, cpu_time, success);
|
||||
} else {
|
||||
inum = list->inum;
|
||||
ilist = list->ilist;
|
||||
numneigh = list->numneigh;
|
||||
firstneigh = list->firstneigh;
|
||||
ufml_gpu_compute(neighbor->ago, inum, nall, atom->x, atom->type,
|
||||
ilist, numneigh, firstneigh, eflag, vflag, eflag_atom,
|
||||
vflag_atom, host_start, cpu_time, success);
|
||||
}
|
||||
if (!success)
|
||||
error->one(FLERR,"Insufficient memory on accelerator");
|
||||
|
||||
if (host_start<inum) {
|
||||
cpu_time = MPI_Wtime();
|
||||
cpu_compute(host_start, inum, eflag, vflag, ilist, numneigh, firstneigh);
|
||||
cpu_time = MPI_Wtime() - cpu_time;
|
||||
}
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
init specific to this pair style
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void PairUFMGPU::init_style()
|
||||
{
|
||||
// cut_respa = NULL;
|
||||
|
||||
if (force->newton_pair)
|
||||
error->all(FLERR,"Cannot use newton pair with ufm/gpu pair style");
|
||||
|
||||
// Repeat cutsq calculation because done after call to init_style
|
||||
double maxcut = -1.0;
|
||||
double cut;
|
||||
for (int i = 1; i <= atom->ntypes; i++) {
|
||||
for (int j = i; j <= atom->ntypes; j++) {
|
||||
if (setflag[i][j] != 0 || (setflag[i][i] != 0 && setflag[j][j] != 0)) {
|
||||
cut = init_one(i,j);
|
||||
cut *= cut;
|
||||
if (cut > maxcut)
|
||||
maxcut = cut;
|
||||
cutsq[i][j] = cutsq[j][i] = cut;
|
||||
} else
|
||||
cutsq[i][j] = cutsq[j][i] = 0.0;
|
||||
}
|
||||
}
|
||||
double cell_size = sqrt(maxcut) + neighbor->skin;
|
||||
|
||||
int maxspecial=0;
|
||||
if (atom->molecular)
|
||||
maxspecial=atom->maxspecial;
|
||||
int success = ufml_gpu_init(atom->ntypes+1, cutsq, uf1, uf2, uf3, uf4,
|
||||
offset, force->special_lj, atom->nlocal,
|
||||
atom->nlocal+atom->nghost, 300, maxspecial,
|
||||
cell_size, gpu_mode, screen);
|
||||
GPU_EXTRA::check_flag(success,error,world);
|
||||
|
||||
if (gpu_mode == GPU_FORCE) {
|
||||
int irequest = neighbor->request(this,instance_me);
|
||||
neighbor->requests[irequest]->half = 0;
|
||||
neighbor->requests[irequest]->full = 1;
|
||||
}
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void PairUFMGPU::reinit()
|
||||
{
|
||||
Pair::reinit();
|
||||
|
||||
ufml_gpu_reinit(atom->ntypes+1, cutsq, uf1, uf2, uf3, uf4, offset);
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
double PairUFMGPU::memory_usage()
|
||||
{
|
||||
double bytes = Pair::memory_usage();
|
||||
return bytes + ufml_gpu_bytes();
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void PairUFMGPU::cpu_compute(int start, int inum, int eflag, int vflag,
|
||||
int *ilist, int *numneigh, int **firstneigh) {
|
||||
int i,j,ii,jj,jnum,itype,jtype;
|
||||
double xtmp,ytmp,ztmp,delx,dely,delz,evdwl,fpair;
|
||||
double rsq,expuf,factor_lj;
|
||||
int *jlist;
|
||||
|
||||
double **x = atom->x;
|
||||
double **f = atom->f;
|
||||
int *type = atom->type;
|
||||
double *special_lj = force->special_lj;
|
||||
|
||||
|
||||
// loop over neighbors of my atoms
|
||||
|
||||
for (ii = start; ii < inum; ii++) {
|
||||
i = ilist[ii];
|
||||
xtmp = x[i][0];
|
||||
ytmp = x[i][1];
|
||||
ztmp = x[i][2];
|
||||
itype = type[i];
|
||||
jlist = firstneigh[i];
|
||||
jnum = numneigh[i];
|
||||
|
||||
for (jj = 0; jj < jnum; jj++) {
|
||||
j = jlist[jj];
|
||||
factor_lj = special_lj[sbmask(j)];
|
||||
j &= NEIGHMASK;
|
||||
|
||||
delx = xtmp - x[j][0];
|
||||
dely = ytmp - x[j][1];
|
||||
delz = ztmp - x[j][2];
|
||||
rsq = delx*delx + dely*dely + delz*delz;
|
||||
jtype = type[j];
|
||||
|
||||
if (rsq < cutsq[itype][jtype]) {
|
||||
expuf = exp(- rsq * uf2[itype][jtype]);
|
||||
fpair = factor_lj * uf1[itype][jtype] * expuf /(1.0 - expuf);
|
||||
|
||||
f[i][0] += delx*fpair;
|
||||
f[i][1] += dely*fpair;
|
||||
f[i][2] += delz*fpair;
|
||||
|
||||
if (eflag) {
|
||||
evdwl = -factor_lj * uf3[itype][jtype] * log(1.0 - expuf) - offset[itype][jtype];
|
||||
}
|
||||
|
||||
if (evflag) ev_tally_full(i,evdwl,0.0,fpair,delx,dely,delz);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
65
src/GPU/pair_ufm_gpu.h
Normal file
65
src/GPU/pair_ufm_gpu.h
Normal file
@ -0,0 +1,65 @@
|
||||
/* -*- c++ -*- ----------------------------------------------------------
|
||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
http://lammps.sandia.gov, Sandia National Laboratories
|
||||
Steve Plimpton, sjplimp@sandia.gov
|
||||
|
||||
Copyright (2003) Sandia Corporation. Under the terms of Contract
|
||||
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
|
||||
certain rights in this software. This software is distributed under
|
||||
the GNU General Public License.
|
||||
|
||||
See the README file in the top-level LAMMPS directory.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
Contributing author:
|
||||
Rodolfo Paula Leite (Unicamp/Brazil) - pl.rodolfo@gmail.com
|
||||
Maurice de Koning (Unicamp/Brazil) - dekoning@ifi.unicamp.br
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#ifdef PAIR_CLASS
|
||||
|
||||
PairStyle(ufm/gpu,PairUFMGPU)
|
||||
|
||||
#else
|
||||
|
||||
#ifndef LMP_PAIR_UFM_GPU_H
|
||||
#define LMP_PAIR_UFM_GPU_H
|
||||
|
||||
#include "pair_ufm.h"
|
||||
|
||||
namespace LAMMPS_NS {
|
||||
|
||||
class PairUFMGPU : public PairUFM {
|
||||
public:
|
||||
PairUFMGPU(LAMMPS *lmp);
|
||||
~PairUFMGPU();
|
||||
void cpu_compute(int, int, int, int, int *, int *, int **);
|
||||
void compute(int, int);
|
||||
void init_style();
|
||||
void reinit();
|
||||
double memory_usage();
|
||||
|
||||
enum { GPU_FORCE, GPU_NEIGH, GPU_HYB_NEIGH };
|
||||
|
||||
private:
|
||||
int gpu_mode;
|
||||
double cpu_time;
|
||||
};
|
||||
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* ERROR/WARNING messages:
|
||||
|
||||
E: Insufficient memory on accelerator
|
||||
|
||||
There is insufficient memory on one of the devices specified for the gpu
|
||||
package
|
||||
|
||||
E: Cannot use newton pair with ufm/gpu pair style
|
||||
|
||||
Self-explanatory.
|
||||
|
||||
*/
|
||||
@ -31,6 +31,7 @@ FixPropertyAtomKokkos::FixPropertyAtomKokkos(LAMMPS *lmp, int narg, char **arg)
|
||||
FixPropertyAtom(lmp, narg, arg)
|
||||
{
|
||||
atomKK = (AtomKokkos *) atom;
|
||||
grow_arrays(atom->nmax);
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
|
||||
@ -7,7 +7,7 @@ SHELL = /bin/sh
|
||||
# specify flags and libraries needed for your compiler
|
||||
|
||||
CC = mpiicpc
|
||||
OPTFLAGS = -xHost -O2 -fp-model fast=2 -no-prec-div -qoverride-limits
|
||||
OPTFLAGS = -xHost -O2 -fp-model fast=2 -no-prec-div -qoverride-limits \
|
||||
-qopt-zmm-usage=high
|
||||
CCFLAGS = -qopenmp -qno-offload -fno-alias -ansi-alias -restrict \
|
||||
-DLMP_INTEL_USELRT -DLMP_USE_MKL_RNG $(OPTFLAGS)
|
||||
|
||||
@ -7,7 +7,7 @@ SHELL = /bin/sh
|
||||
# specify flags and libraries needed for your compiler
|
||||
|
||||
CC = mpiicpc
|
||||
OPTFLAGS = -xHost -O2 -fp-model fast=2 -no-prec-div -qoverride-limits
|
||||
OPTFLAGS = -xHost -O2 -fp-model fast=2 -no-prec-div -qoverride-limits \
|
||||
-qopt-zmm-usage=high
|
||||
CCFLAGS = -qopenmp -qno-offload -fno-alias -ansi-alias -restrict \
|
||||
-DLMP_INTEL_USELRT -DLMP_USE_MKL_RNG $(OPTFLAGS)
|
||||
|
||||
@ -507,14 +507,20 @@ void PairTersoff::read_file(char *file)
|
||||
|
||||
params[nparams].powermint = int(params[nparams].powerm);
|
||||
|
||||
if (params[nparams].c < 0.0 || params[nparams].d < 0.0 ||
|
||||
params[nparams].powern < 0.0 || params[nparams].beta < 0.0 ||
|
||||
params[nparams].lam2 < 0.0 || params[nparams].bigb < 0.0 ||
|
||||
params[nparams].bigr < 0.0 ||params[nparams].bigd < 0.0 ||
|
||||
if (params[nparams].c < 0.0 ||
|
||||
params[nparams].d < 0.0 ||
|
||||
params[nparams].powern < 0.0 ||
|
||||
params[nparams].beta < 0.0 ||
|
||||
params[nparams].lam2 < 0.0 ||
|
||||
params[nparams].bigb < 0.0 ||
|
||||
params[nparams].bigr < 0.0 ||
|
||||
params[nparams].bigd < 0.0 ||
|
||||
params[nparams].bigd > params[nparams].bigr ||
|
||||
params[nparams].lam1 < 0.0 || params[nparams].biga < 0.0 ||
|
||||
params[nparams].lam1 < 0.0 ||
|
||||
params[nparams].biga < 0.0 ||
|
||||
params[nparams].powerm - params[nparams].powermint != 0.0 ||
|
||||
(params[nparams].powermint != 3 && params[nparams].powermint != 1) ||
|
||||
(params[nparams].powermint != 3 &&
|
||||
params[nparams].powermint != 1) ||
|
||||
params[nparams].gamma < 0.0)
|
||||
error->all(FLERR,"Illegal Tersoff parameter");
|
||||
|
||||
|
||||
@ -162,19 +162,23 @@ void PairTersoffMOD::read_file(char *file)
|
||||
params[nparams].c4 = atof(words[18]);
|
||||
params[nparams].c5 = atof(words[19]);
|
||||
|
||||
// currently only allow m exponent of 1
|
||||
// currently only allow m exponent of 1 or 3
|
||||
|
||||
params[nparams].powermint = int(params[nparams].powerm);
|
||||
|
||||
if (
|
||||
params[nparams].lam3 < 0.0 || params[nparams].powern < 0.0 ||
|
||||
params[nparams].beta < 0.0 || params[nparams].lam2 < 0.0 ||
|
||||
params[nparams].bigb < 0.0 || params[nparams].bigr < 0.0 ||
|
||||
params[nparams].bigd < 0.0 ||
|
||||
params[nparams].bigd > params[nparams].bigr ||
|
||||
params[nparams].lam3 < 0.0 || params[nparams].biga < 0.0 ||
|
||||
params[nparams].powerm - params[nparams].powermint != 0.0 ||
|
||||
(params[nparams].powermint != 3 && params[nparams].powermint != 1))
|
||||
if (params[nparams].powern < 0.0 ||
|
||||
params[nparams].beta < 0.0 ||
|
||||
params[nparams].lam2 < 0.0 ||
|
||||
params[nparams].bigb < 0.0 ||
|
||||
params[nparams].bigr < 0.0 ||
|
||||
params[nparams].bigd < 0.0 ||
|
||||
params[nparams].bigd > params[nparams].bigr ||
|
||||
params[nparams].lam1 < 0.0 ||
|
||||
params[nparams].biga < 0.0 ||
|
||||
params[nparams].powerm - params[nparams].powermint != 0.0 ||
|
||||
(params[nparams].powermint != 3 &&
|
||||
params[nparams].powermint != 1)
|
||||
)
|
||||
error->all(FLERR,"Illegal Tersoff parameter");
|
||||
|
||||
nparams++;
|
||||
|
||||
@ -158,19 +158,24 @@ void PairTersoffMODC::read_file(char *file)
|
||||
params[nparams].c5 = atof(words[19]);
|
||||
params[nparams].c0 = atof(words[20]);
|
||||
|
||||
// currently only allow m exponent of 1
|
||||
// currently only allow m exponent of 1 or 3
|
||||
|
||||
params[nparams].powermint = int(params[nparams].powerm);
|
||||
|
||||
if (
|
||||
params[nparams].lam3 < 0.0 || params[nparams].powern < 0.0 ||
|
||||
params[nparams].beta < 0.0 || params[nparams].lam2 < 0.0 ||
|
||||
params[nparams].bigb < 0.0 || params[nparams].bigr < 0.0 ||
|
||||
params[nparams].bigd < 0.0 ||
|
||||
params[nparams].bigd > params[nparams].bigr ||
|
||||
params[nparams].lam3 < 0.0 || params[nparams].biga < 0.0 ||
|
||||
params[nparams].powerm - params[nparams].powermint != 0.0 ||
|
||||
(params[nparams].powermint != 3 && params[nparams].powermint != 1))
|
||||
params[nparams].powern < 0.0 ||
|
||||
params[nparams].beta < 0.0 ||
|
||||
params[nparams].lam2 < 0.0 ||
|
||||
params[nparams].bigb < 0.0 ||
|
||||
params[nparams].bigr < 0.0 ||
|
||||
params[nparams].bigd < 0.0 ||
|
||||
params[nparams].bigd > params[nparams].bigr ||
|
||||
params[nparams].lam1 < 0.0 ||
|
||||
params[nparams].biga < 0.0 ||
|
||||
params[nparams].powerm - params[nparams].powermint != 0.0 ||
|
||||
(params[nparams].powermint != 3 &&
|
||||
params[nparams].powermint != 1)
|
||||
)
|
||||
error->all(FLERR,"Illegal Tersoff parameter");
|
||||
|
||||
nparams++;
|
||||
|
||||
@ -184,19 +184,25 @@ void PairTersoffZBL::read_file(char *file)
|
||||
|
||||
params[nparams].powermint = int(params[nparams].powerm);
|
||||
|
||||
if (
|
||||
params[nparams].lam3 < 0.0 || params[nparams].c < 0.0 ||
|
||||
params[nparams].d < 0.0 || params[nparams].powern < 0.0 ||
|
||||
params[nparams].beta < 0.0 || params[nparams].lam2 < 0.0 ||
|
||||
params[nparams].bigb < 0.0 || params[nparams].bigr < 0.0 ||
|
||||
if (params[nparams].c < 0.0 ||
|
||||
params[nparams].d < 0.0 ||
|
||||
params[nparams].powern < 0.0 ||
|
||||
params[nparams].beta < 0.0 ||
|
||||
params[nparams].lam2 < 0.0 ||
|
||||
params[nparams].bigb < 0.0 ||
|
||||
params[nparams].bigr < 0.0 ||
|
||||
params[nparams].bigd < 0.0 ||
|
||||
params[nparams].bigd > params[nparams].bigr ||
|
||||
params[nparams].lam3 < 0.0 || params[nparams].biga < 0.0 ||
|
||||
params[nparams].lam1 < 0.0 ||
|
||||
params[nparams].biga < 0.0 ||
|
||||
params[nparams].powerm - params[nparams].powermint != 0.0 ||
|
||||
(params[nparams].powermint != 3 && params[nparams].powermint != 1) ||
|
||||
(params[nparams].powermint != 3 &&
|
||||
params[nparams].powermint != 1) ||
|
||||
params[nparams].gamma < 0.0 ||
|
||||
params[nparams].Z_i < 1.0 || params[nparams].Z_j < 1.0 ||
|
||||
params[nparams].ZBLcut < 0.0 || params[nparams].ZBLexpscale < 0.0)
|
||||
params[nparams].Z_i < 1.0 ||
|
||||
params[nparams].Z_j < 1.0 ||
|
||||
params[nparams].ZBLcut < 0.0 ||
|
||||
params[nparams].ZBLexpscale < 0.0)
|
||||
error->all(FLERR,"Illegal Tersoff parameter");
|
||||
|
||||
nparams++;
|
||||
|
||||
@ -64,15 +64,16 @@ using namespace MathConst;
|
||||
|
||||
#define MAXENERGYTEST 1.0e50
|
||||
|
||||
enum{ATOM,MOLECULE};
|
||||
enum{EXCHATOM,EXCHMOL}; // exchmode
|
||||
enum{MOVEATOM,MOVEMOL}; // movemode
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
FixGCMC::FixGCMC(LAMMPS *lmp, int narg, char **arg) :
|
||||
Fix(lmp, narg, arg),
|
||||
idregion(NULL), full_flag(0), ngroups(0), groupstrings(NULL), ngrouptypes(0), grouptypestrings(NULL),
|
||||
grouptypebits(NULL), grouptypes(NULL), local_gas_list(NULL), atom_coord(NULL), random_equal(NULL), random_unequal(NULL),
|
||||
coords(NULL), imageflags(NULL), fixrigid(NULL), fixshake(NULL), idrigid(NULL), idshake(NULL)
|
||||
grouptypebits(NULL), grouptypes(NULL), local_gas_list(NULL), molcoords(NULL), random_equal(NULL), random_unequal(NULL),
|
||||
fixrigid(NULL), fixshake(NULL), idrigid(NULL), idshake(NULL)
|
||||
{
|
||||
if (narg < 11) error->all(FLERR,"Illegal fix gcmc command");
|
||||
|
||||
@ -161,9 +162,9 @@ FixGCMC::FixGCMC(LAMMPS *lmp, int narg, char **arg) :
|
||||
static_cast<double> (attempts);
|
||||
}
|
||||
|
||||
// error check and further setup for mode = MOLECULE
|
||||
// error check and further setup for exchmode = EXCHMOL
|
||||
|
||||
if (mode == MOLECULE) {
|
||||
if (exchmode == EXCHMOL) {
|
||||
if (onemols[imol]->xflag == 0)
|
||||
error->all(FLERR,"Fix gcmc molecule must have coordinates");
|
||||
if (onemols[imol]->typeflag == 0)
|
||||
@ -182,9 +183,9 @@ FixGCMC::FixGCMC(LAMMPS *lmp, int narg, char **arg) :
|
||||
if (charge_flag && atom->q == NULL)
|
||||
error->all(FLERR,"Fix gcmc atom has charge, but atom style does not");
|
||||
|
||||
if (rigidflag && mode == ATOM)
|
||||
if (rigidflag && exchmode == EXCHATOM)
|
||||
error->all(FLERR,"Cannot use fix gcmc rigid and not molecule");
|
||||
if (shakeflag && mode == ATOM)
|
||||
if (shakeflag && exchmode == EXCHATOM)
|
||||
error->all(FLERR,"Cannot use fix gcmc shake and not molecule");
|
||||
if (rigidflag && shakeflag)
|
||||
error->all(FLERR,"Cannot use fix gcmc rigid and shake");
|
||||
@ -193,13 +194,13 @@ FixGCMC::FixGCMC(LAMMPS *lmp, int narg, char **arg) :
|
||||
if (shakeflag && (nmcmoves > 0))
|
||||
error->all(FLERR,"Cannot use fix gcmc shake with MC moves");
|
||||
|
||||
// setup of coords and imageflags array
|
||||
|
||||
if (mode == ATOM) natoms_per_molecule = 1;
|
||||
// setup of array of coordinates for molecule insertion
|
||||
// also used by rotation moves for any molecule
|
||||
|
||||
if (exchmode == EXCHATOM) natoms_per_molecule = 1;
|
||||
else natoms_per_molecule = onemols[imol]->natoms;
|
||||
memory->create(coords,natoms_per_molecule,3,"gcmc:coords");
|
||||
memory->create(imageflags,natoms_per_molecule,"gcmc:imageflags");
|
||||
memory->create(atom_coord,natoms_per_molecule,3,"gcmc:atom_coord");
|
||||
nmaxmolcoords = natoms_per_molecule;
|
||||
memory->create(molcoords,nmaxmolcoords,3,"gcmc:molcoords");
|
||||
|
||||
// compute the number of MC cycles that occur nevery timesteps
|
||||
|
||||
@ -235,7 +236,12 @@ void FixGCMC::options(int narg, char **arg)
|
||||
|
||||
// defaults
|
||||
|
||||
mode = ATOM;
|
||||
exchmode = EXCHATOM;
|
||||
movemode = MOVEATOM;
|
||||
patomtrans = 0.0;
|
||||
pmoltrans = 0.0;
|
||||
pmolrotate = 0.0;
|
||||
pmctot = 0.0;
|
||||
max_rotation_angle = 10*MY_PI/180;
|
||||
regionflag = 0;
|
||||
iregion = -1;
|
||||
@ -277,10 +283,21 @@ void FixGCMC::options(int narg, char **arg)
|
||||
if (atom->molecules[imol]->nset > 1 && comm->me == 0)
|
||||
error->warning(FLERR,"Molecule template for "
|
||||
"fix gcmc has multiple molecules");
|
||||
mode = MOLECULE;
|
||||
exchmode = EXCHMOL;
|
||||
onemols = atom->molecules;
|
||||
nmol = onemols[imol]->nset;
|
||||
iarg += 2;
|
||||
} else if (strcmp(arg[iarg],"mcmoves") == 0) {
|
||||
if (iarg+4 > narg) error->all(FLERR,"Illegal fix gcmc command");
|
||||
patomtrans = force->numeric(FLERR,arg[iarg+1]);
|
||||
pmoltrans = force->numeric(FLERR,arg[iarg+2]);
|
||||
pmolrotate = force->numeric(FLERR,arg[iarg+3]);
|
||||
if (patomtrans < 0 || pmoltrans < 0 || pmolrotate < 0)
|
||||
error->all(FLERR,"Illegal fix gcmc command");
|
||||
pmctot = patomtrans + pmoltrans + pmolrotate;
|
||||
if (pmctot <= 0)
|
||||
error->all(FLERR,"Illegal fix gcmc command");
|
||||
iarg += 4;
|
||||
} else if (strcmp(arg[iarg],"region") == 0) {
|
||||
if (iarg+2 > narg) error->all(FLERR,"Illegal fix gcmc command");
|
||||
iregion = domain->find_region(arg[iarg+1]);
|
||||
@ -387,9 +404,7 @@ FixGCMC::~FixGCMC()
|
||||
delete random_unequal;
|
||||
|
||||
memory->destroy(local_gas_list);
|
||||
memory->destroy(atom_coord);
|
||||
memory->destroy(coords);
|
||||
memory->destroy(imageflags);
|
||||
memory->destroy(molcoords);
|
||||
|
||||
delete [] idrigid;
|
||||
delete [] idshake;
|
||||
@ -430,6 +445,30 @@ void FixGCMC::init()
|
||||
|
||||
triclinic = domain->triclinic;
|
||||
|
||||
// set probabilities for MC moves
|
||||
|
||||
if (pmctot == 0.0)
|
||||
if (exchmode == EXCHATOM) {
|
||||
movemode = MOVEATOM;
|
||||
patomtrans = 1.0;
|
||||
pmoltrans = 0.0;
|
||||
pmolrotate = 0.0;
|
||||
} else {
|
||||
movemode = MOVEMOL;
|
||||
patomtrans = 0.0;
|
||||
pmoltrans = 0.5;
|
||||
pmolrotate = 0.5;
|
||||
}
|
||||
else {
|
||||
if (pmoltrans == 0.0 && pmolrotate == 0.0)
|
||||
movemode = MOVEATOM;
|
||||
else
|
||||
movemode = MOVEMOL;
|
||||
patomtrans /= pmctot;
|
||||
pmoltrans /= pmctot;
|
||||
pmolrotate /= pmctot;
|
||||
}
|
||||
|
||||
// decide whether to switch to the full_energy option
|
||||
|
||||
if (!full_flag) {
|
||||
@ -454,14 +493,14 @@ void FixGCMC::init()
|
||||
|
||||
int *type = atom->type;
|
||||
|
||||
if (mode == ATOM) {
|
||||
if (exchmode == EXCHATOM) {
|
||||
if (ngcmc_type <= 0 || ngcmc_type > atom->ntypes)
|
||||
error->all(FLERR,"Invalid atom type in fix gcmc command");
|
||||
}
|
||||
|
||||
// if mode == ATOM, warn if any deletable atom has a mol ID
|
||||
// if atoms are exchanged, warn if any deletable atom has a mol ID
|
||||
|
||||
if ((mode == ATOM) && atom->molecule_flag) {
|
||||
if ((exchmode == EXCHATOM) && atom->molecule_flag) {
|
||||
tagint *molecule = atom->molecule;
|
||||
int flag = 0;
|
||||
for (int i = 0; i < atom->nlocal; i++)
|
||||
@ -474,9 +513,9 @@ void FixGCMC::init()
|
||||
"Fix gcmc cannot exchange individual atoms belonging to a molecule");
|
||||
}
|
||||
|
||||
// if mode == MOLECULE, check for unset mol IDs
|
||||
// if molecules are exchanged are moves, check for unset mol IDs
|
||||
|
||||
if (mode == MOLECULE) {
|
||||
if (exchmode == EXCHMOL || movemode == MOVEMOL) {
|
||||
tagint *molecule = atom->molecule;
|
||||
int *mask = atom->mask;
|
||||
int flag = 0;
|
||||
@ -490,11 +529,11 @@ void FixGCMC::init()
|
||||
"All mol IDs should be set for fix gcmc group atoms");
|
||||
}
|
||||
|
||||
if (((mode == MOLECULE) && (atom->molecule_flag == 0)) ||
|
||||
((mode == MOLECULE) && (!atom->tag_enable || !atom->map_style)))
|
||||
error->all(FLERR,
|
||||
"Fix gcmc molecule command requires that "
|
||||
"atoms have molecule attributes");
|
||||
if (exchmode == EXCHMOL || movemode == MOVEMOL)
|
||||
if (atom->molecule_flag == 0 || !atom->tag_enable || !atom->map_style)
|
||||
error->all(FLERR,
|
||||
"Fix gcmc molecule command requires that "
|
||||
"atoms have molecule attributes");
|
||||
|
||||
// if rigidflag defined, check for rigid/small fix
|
||||
// its molecule template must be same as this one
|
||||
@ -566,7 +605,7 @@ void FixGCMC::init()
|
||||
|
||||
// create a new group for temporary use with selected molecules
|
||||
|
||||
if (mode == MOLECULE) {
|
||||
if (exchmode == EXCHMOL || movemode == MOVEMOL) {
|
||||
char **group_arg = new char*[3];
|
||||
// create unique group name for atoms to be rotated
|
||||
int len = strlen(id) + 30;
|
||||
@ -586,10 +625,10 @@ void FixGCMC::init()
|
||||
delete [] group_arg;
|
||||
}
|
||||
|
||||
// get all of the needed molecule data if mode == MOLECULE,
|
||||
// otherwise just get the gas mass
|
||||
// get all of the needed molecule data if exchanging
|
||||
// or moving molecules, otherwise just get the gas mass
|
||||
|
||||
if (mode == MOLECULE) {
|
||||
if (exchmode == EXCHMOL || movemode == MOVEMOL) {
|
||||
|
||||
onemols[imol]->compute_mass();
|
||||
onemols[imol]->compute_com();
|
||||
@ -713,27 +752,21 @@ void FixGCMC::pre_exchange()
|
||||
error->warning(FLERR,"Energy of old configuration in "
|
||||
"fix gcmc is > MAXENERGYTEST.");
|
||||
|
||||
if (mode == MOLECULE) {
|
||||
for (int i = 0; i < ncycles; i++) {
|
||||
int random_int_fraction =
|
||||
static_cast<int>(random_equal->uniform()*ncycles) + 1;
|
||||
if (random_int_fraction <= nmcmoves) {
|
||||
if (random_equal->uniform() < 0.5) attempt_molecule_translation_full();
|
||||
else attempt_molecule_rotation_full();
|
||||
} else {
|
||||
if (random_equal->uniform() < 0.5) attempt_molecule_deletion_full();
|
||||
else attempt_molecule_insertion_full();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for (int i = 0; i < ncycles; i++) {
|
||||
int random_int_fraction =
|
||||
static_cast<int>(random_equal->uniform()*ncycles) + 1;
|
||||
if (random_int_fraction <= nmcmoves) {
|
||||
attempt_atomic_translation_full();
|
||||
} else {
|
||||
if (random_equal->uniform() < 0.5) attempt_atomic_deletion_full();
|
||||
for (int i = 0; i < ncycles; i++) {
|
||||
int ixm = static_cast<int>(random_equal->uniform()*ncycles) + 1;
|
||||
if (ixm <= nmcmoves) {
|
||||
double xmcmove = random_equal->uniform();
|
||||
if (xmcmove < patomtrans) attempt_atomic_translation_full();
|
||||
else if (xmcmove < patomtrans+pmoltrans) attempt_molecule_translation_full();
|
||||
else attempt_molecule_rotation_full();
|
||||
} else {
|
||||
double xgcmc = random_equal->uniform();
|
||||
if (exchmode == EXCHATOM) {
|
||||
if (xgcmc < 0.5) attempt_atomic_deletion_full();
|
||||
else attempt_atomic_insertion_full();
|
||||
} else {
|
||||
if (xgcmc < 0.5) attempt_molecule_deletion_full();
|
||||
else attempt_molecule_insertion_full();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -746,27 +779,21 @@ void FixGCMC::pre_exchange()
|
||||
|
||||
} else {
|
||||
|
||||
if (mode == MOLECULE) {
|
||||
for (int i = 0; i < ncycles; i++) {
|
||||
int random_int_fraction =
|
||||
static_cast<int>(random_equal->uniform()*ncycles) + 1;
|
||||
if (random_int_fraction <= nmcmoves) {
|
||||
if (random_equal->uniform() < 0.5) attempt_molecule_translation();
|
||||
else attempt_molecule_rotation();
|
||||
} else {
|
||||
if (random_equal->uniform() < 0.5) attempt_molecule_deletion();
|
||||
else attempt_molecule_insertion();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for (int i = 0; i < ncycles; i++) {
|
||||
int random_int_fraction =
|
||||
static_cast<int>(random_equal->uniform()*ncycles) + 1;
|
||||
if (random_int_fraction <= nmcmoves) {
|
||||
attempt_atomic_translation();
|
||||
} else {
|
||||
if (random_equal->uniform() < 0.5) attempt_atomic_deletion();
|
||||
for (int i = 0; i < ncycles; i++) {
|
||||
int ixm = static_cast<int>(random_equal->uniform()*ncycles) + 1;
|
||||
if (ixm <= nmcmoves) {
|
||||
double xmcmove = random_equal->uniform();
|
||||
if (xmcmove < patomtrans) attempt_atomic_translation();
|
||||
else if (xmcmove < patomtrans+pmoltrans) attempt_molecule_translation();
|
||||
else attempt_molecule_rotation();
|
||||
} else {
|
||||
double xgcmc = random_equal->uniform();
|
||||
if (exchmode == EXCHATOM) {
|
||||
if (xgcmc < 0.5) attempt_atomic_deletion();
|
||||
else attempt_atomic_insertion();
|
||||
} else {
|
||||
if (xgcmc < 0.5) attempt_molecule_deletion();
|
||||
else attempt_molecule_insertion();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1116,14 +1143,21 @@ void FixGCMC::attempt_molecule_rotation()
|
||||
"fix gcmc is > MAXENERGYTEST.");
|
||||
|
||||
int *mask = atom->mask;
|
||||
int nmolcoords = 0;
|
||||
for (int i = 0; i < atom->nlocal; i++) {
|
||||
if (atom->molecule[i] == rotation_molecule) {
|
||||
mask[i] |= molecule_group_bit;
|
||||
nmolcoords++;
|
||||
} else {
|
||||
mask[i] &= molecule_group_inversebit;
|
||||
}
|
||||
}
|
||||
|
||||
if (nmolcoords > nmaxmolcoords) {
|
||||
nmaxmolcoords = nmolcoords;
|
||||
molcoords = memory->grow(molcoords,nmaxmolcoords,3,"gcmc:molcoords");
|
||||
}
|
||||
|
||||
double com[3];
|
||||
com[0] = com[1] = com[2] = 0.0;
|
||||
group->xcm(molecule_group,gas_mass,com);
|
||||
@ -1156,13 +1190,13 @@ void FixGCMC::attempt_molecule_rotation()
|
||||
xtmp[0] -= com[0];
|
||||
xtmp[1] -= com[1];
|
||||
xtmp[2] -= com[2];
|
||||
MathExtra::matvec(rotmat,xtmp,atom_coord[n]);
|
||||
atom_coord[n][0] += com[0];
|
||||
atom_coord[n][1] += com[1];
|
||||
atom_coord[n][2] += com[2];
|
||||
xtmp[0] = atom_coord[n][0];
|
||||
xtmp[1] = atom_coord[n][1];
|
||||
xtmp[2] = atom_coord[n][2];
|
||||
MathExtra::matvec(rotmat,xtmp,molcoords[n]);
|
||||
molcoords[n][0] += com[0];
|
||||
molcoords[n][1] += com[1];
|
||||
molcoords[n][2] += com[2];
|
||||
xtmp[0] = molcoords[n][0];
|
||||
xtmp[1] = molcoords[n][1];
|
||||
xtmp[2] = molcoords[n][2];
|
||||
domain->remap(xtmp);
|
||||
if (!domain->inside(xtmp))
|
||||
error->one(FLERR,"Fix gcmc put atom outside box");
|
||||
@ -1181,9 +1215,9 @@ void FixGCMC::attempt_molecule_rotation()
|
||||
for (int i = 0; i < atom->nlocal; i++) {
|
||||
if (mask[i] & molecule_group_bit) {
|
||||
image[i] = imagezero;
|
||||
x[i][0] = atom_coord[n][0];
|
||||
x[i][1] = atom_coord[n][1];
|
||||
x[i][2] = atom_coord[n][2];
|
||||
x[i][0] = molcoords[n][0];
|
||||
x[i][1] = molcoords[n][1];
|
||||
x[i][2] = molcoords[n][2];
|
||||
domain->remap(x[i],image[i]);
|
||||
n++;
|
||||
}
|
||||
@ -1303,18 +1337,18 @@ void FixGCMC::attempt_molecule_insertion()
|
||||
bool procflag[natoms_per_molecule];
|
||||
|
||||
for (int i = 0; i < natoms_per_molecule; i++) {
|
||||
MathExtra::matvec(rotmat,onemols[imol]->x[i],atom_coord[i]);
|
||||
atom_coord[i][0] += com_coord[0];
|
||||
atom_coord[i][1] += com_coord[1];
|
||||
atom_coord[i][2] += com_coord[2];
|
||||
MathExtra::matvec(rotmat,onemols[imol]->x[i],molcoords[i]);
|
||||
molcoords[i][0] += com_coord[0];
|
||||
molcoords[i][1] += com_coord[1];
|
||||
molcoords[i][2] += com_coord[2];
|
||||
|
||||
// use temporary variable for remapped position
|
||||
// so unmapped position is preserved in atom_coord
|
||||
// so unmapped position is preserved in molcoords
|
||||
|
||||
double xtmp[3];
|
||||
xtmp[0] = atom_coord[i][0];
|
||||
xtmp[1] = atom_coord[i][1];
|
||||
xtmp[2] = atom_coord[i][2];
|
||||
xtmp[0] = molcoords[i][0];
|
||||
xtmp[1] = molcoords[i][1];
|
||||
xtmp[2] = molcoords[i][2];
|
||||
domain->remap(xtmp);
|
||||
if (!domain->inside(xtmp))
|
||||
error->one(FLERR,"Fix gcmc put atom outside box");
|
||||
@ -1372,7 +1406,7 @@ void FixGCMC::attempt_molecule_insertion()
|
||||
|
||||
for (int i = 0; i < natoms_per_molecule; i++) {
|
||||
if (procflag[i]) {
|
||||
atom->avec->create_atom(onemols[imol]->type[i],atom_coord[i]);
|
||||
atom->avec->create_atom(onemols[imol]->type[i],molcoords[i]);
|
||||
int m = atom->nlocal - 1;
|
||||
|
||||
// add to groups
|
||||
@ -1772,14 +1806,21 @@ void FixGCMC::attempt_molecule_rotation_full()
|
||||
double energy_before = energy_stored;
|
||||
|
||||
int *mask = atom->mask;
|
||||
int nmolcoords = 0;
|
||||
for (int i = 0; i < atom->nlocal; i++) {
|
||||
if (atom->molecule[i] == rotation_molecule) {
|
||||
mask[i] |= molecule_group_bit;
|
||||
nmolcoords++;
|
||||
} else {
|
||||
mask[i] &= molecule_group_inversebit;
|
||||
}
|
||||
}
|
||||
|
||||
if (nmolcoords > nmaxmolcoords) {
|
||||
nmaxmolcoords = nmolcoords;
|
||||
molcoords = memory->grow(molcoords,nmaxmolcoords,3,"gcmc:molcoords");
|
||||
}
|
||||
|
||||
double com[3];
|
||||
com[0] = com[1] = com[2] = 0.0;
|
||||
group->xcm(molecule_group,gas_mass,com);
|
||||
@ -1807,9 +1848,9 @@ void FixGCMC::attempt_molecule_rotation_full()
|
||||
int n = 0;
|
||||
for (int i = 0; i < atom->nlocal; i++) {
|
||||
if (mask[i] & molecule_group_bit) {
|
||||
atom_coord[n][0] = x[i][0];
|
||||
atom_coord[n][1] = x[i][1];
|
||||
atom_coord[n][2] = x[i][2];
|
||||
molcoords[n][0] = x[i][0];
|
||||
molcoords[n][1] = x[i][1];
|
||||
molcoords[n][2] = x[i][2];
|
||||
image_orig[n] = image[i];
|
||||
double xtmp[3];
|
||||
domain->unmap(x[i],image[i],xtmp);
|
||||
@ -1840,9 +1881,9 @@ void FixGCMC::attempt_molecule_rotation_full()
|
||||
int n = 0;
|
||||
for (int i = 0; i < atom->nlocal; i++) {
|
||||
if (mask[i] & molecule_group_bit) {
|
||||
x[i][0] = atom_coord[n][0];
|
||||
x[i][1] = atom_coord[n][1];
|
||||
x[i][2] = atom_coord[n][2];
|
||||
x[i][0] = molcoords[n][0];
|
||||
x[i][1] = molcoords[n][1];
|
||||
x[i][2] = molcoords[n][2];
|
||||
image[i] = image_orig[n];
|
||||
n++;
|
||||
}
|
||||
@ -2140,7 +2181,7 @@ double FixGCMC::energy(int i, int itype, tagint imolecule, double *coord)
|
||||
for (int j = 0; j < nall; j++) {
|
||||
|
||||
if (i == j) continue;
|
||||
if (mode == MOLECULE)
|
||||
if (exchmode == EXCHMOL || movemode == MOVEMOL)
|
||||
if (imolecule == molecule[j]) continue;
|
||||
|
||||
delx = coord[0] - x[j][0];
|
||||
@ -2212,9 +2253,10 @@ double FixGCMC::energy_full()
|
||||
tagint *molecule = atom->molecule;
|
||||
int nall = atom->nlocal + atom->nghost;
|
||||
for (int i = 0; i < atom->nlocal; i++) {
|
||||
if (mode == MOLECULE) imolecule = molecule[i];
|
||||
if (exchmode == EXCHMOL || movemode == MOVEMOL)
|
||||
imolecule = molecule[i];
|
||||
for (int j = i+1; j < nall; j++) {
|
||||
if (mode == MOLECULE)
|
||||
if (exchmode == EXCHMOL || movemode == MOVEMOL)
|
||||
if (imolecule == molecule[j]) continue;
|
||||
|
||||
delx = x[i][0] - x[j][0];
|
||||
@ -2352,7 +2394,7 @@ void FixGCMC::update_gas_atoms_list()
|
||||
|
||||
if (regionflag) {
|
||||
|
||||
if (mode == MOLECULE) {
|
||||
if (exchmode == EXCHMOL || movemode == MOVEMOL) {
|
||||
|
||||
tagint maxmol = 0;
|
||||
for (int i = 0; i < nlocal; i++) maxmol = MAX(maxmol,molecule[i]);
|
||||
|
||||
@ -64,10 +64,12 @@ class FixGCMC : public Fix {
|
||||
int exclusion_group,exclusion_group_bit;
|
||||
int ngcmc_type,nevery,seed;
|
||||
int ncycles,nexchanges,nmcmoves;
|
||||
double patomtrans, pmoltrans, pmolrotate, pmctot;
|
||||
int ngas; // # of gas atoms on all procs
|
||||
int ngas_local; // # of gas atoms on this proc
|
||||
int ngas_before; // # of gas atoms on procs < this proc
|
||||
int mode; // ATOM or MOLECULE
|
||||
int exchmode; // exchange ATOM or MOLECULE
|
||||
int movemode; // move ATOM or MOLECULE
|
||||
int regionflag; // 0 = anywhere in box, 1 = specific region
|
||||
int iregion; // gcmc region
|
||||
char *idregion; // gcmc region id
|
||||
@ -75,7 +77,8 @@ class FixGCMC : public Fix {
|
||||
bool charge_flag; // true if user specified atomic charge
|
||||
bool full_flag; // true if doing full system energy calculations
|
||||
|
||||
int natoms_per_molecule; // number of atoms in each gas molecule
|
||||
int natoms_per_molecule; // number of atoms in each inserted molecule
|
||||
int nmaxmolcoords; // number of atoms allocated for molcoords
|
||||
|
||||
int groupbitall; // group bitmask for inserted atoms
|
||||
int ngroups; // number of group-ids for inserted atoms
|
||||
@ -110,7 +113,7 @@ class FixGCMC : public Fix {
|
||||
double *sublo,*subhi;
|
||||
int *local_gas_list;
|
||||
double **cutsq;
|
||||
double **atom_coord;
|
||||
double **molcoords;
|
||||
imageint imagezero;
|
||||
double overlap_cutoffsq; // square distance cutoff for overlap
|
||||
int overlap_flag;
|
||||
@ -126,8 +129,6 @@ class FixGCMC : public Fix {
|
||||
|
||||
class Molecule **onemols;
|
||||
int imol,nmol;
|
||||
double **coords;
|
||||
imageint *imageflags;
|
||||
class Fix *fixrigid, *fixshake;
|
||||
int rigidflag, shakeflag;
|
||||
char *idrigid, *idshake;
|
||||
|
||||
@ -21,13 +21,7 @@ DumpStyle(xtc,DumpXTC)
|
||||
#define LMP_DUMP_XTC_H
|
||||
|
||||
#include "dump.h"
|
||||
|
||||
#ifdef LAMMPS_XDR
|
||||
#include "xdr_compat.h"
|
||||
#else
|
||||
#include "rpc/rpc.h"
|
||||
#include "rpc/xdr.h"
|
||||
#endif
|
||||
|
||||
namespace LAMMPS_NS {
|
||||
|
||||
|
||||
@ -1,5 +1,3 @@
|
||||
#ifdef LAMMPS_XDR
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <limits.h>
|
||||
#include <string.h>
|
||||
@ -714,9 +712,3 @@ xdrstdio_putuint32 (XDR *xdrs, xdr_uint32_t *ip)
|
||||
}
|
||||
#endif
|
||||
|
||||
#else
|
||||
/* satisfy compilers that do not like to compile empty files. */
|
||||
static void i_am_a_dummy_subroutine(void) {
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -46,3 +46,5 @@ action pair_lj_long_coul_long_opt.cpp pair_lj_long_coul_long.cpp
|
||||
action pair_lj_long_coul_long_opt.h pair_lj_long_coul_long.cpp
|
||||
action pair_morse_opt.cpp
|
||||
action pair_morse_opt.h
|
||||
action pair_ufm_opt.cpp
|
||||
action pair_ufm_opt.h
|
||||
|
||||
198
src/OPT/pair_ufm_opt.cpp
Normal file
198
src/OPT/pair_ufm_opt.cpp
Normal file
@ -0,0 +1,198 @@
|
||||
/* ----------------------------------------------------------------------
|
||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
http://lammps.sandia.gov, Sandia National Laboratories
|
||||
Steve Plimpton, sjplimp@sandia.gov
|
||||
|
||||
Copyright (2003) Sandia Corporation. Under the terms of Contract
|
||||
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
|
||||
certain rights in this software. This software is distributed under
|
||||
the GNU General Public License.
|
||||
|
||||
See the README file in the top-level LAMMPS directory.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
Contributing author:
|
||||
Rodolfo Paula Leite (Unicamp/Brazil) - pl.rodolfo@gmail.com
|
||||
Maurice de Koning (Unicamp/Brazil) - dekoning@ifi.unicamp.br
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
#include "pair_ufm_opt.h"
|
||||
#include "atom.h"
|
||||
#include "force.h"
|
||||
#include "neigh_list.h"
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
PairUFMOpt::PairUFMOpt(LAMMPS *lmp) : PairUFM(lmp) {}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void PairUFMOpt::compute(int eflag, int vflag)
|
||||
{
|
||||
if (eflag || vflag) ev_setup(eflag,vflag);
|
||||
else evflag = vflag_fdotr = 0;
|
||||
|
||||
if (evflag) {
|
||||
if (eflag) {
|
||||
if (force->newton_pair) return eval<1,1,1>();
|
||||
else return eval<1,1,0>();
|
||||
} else {
|
||||
if (force->newton_pair) return eval<1,0,1>();
|
||||
else return eval<1,0,0>();
|
||||
}
|
||||
} else {
|
||||
if (force->newton_pair) return eval<0,0,1>();
|
||||
else return eval<0,0,0>();
|
||||
}
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
template < int EVFLAG, int EFLAG, int NEWTON_PAIR >
|
||||
void PairUFMOpt::eval()
|
||||
{
|
||||
typedef struct { double x,y,z; } vec3_t;
|
||||
|
||||
typedef struct {
|
||||
double cutsq,uf1,uf2,uf3,uf4,scale,offset;
|
||||
double _pad[2];
|
||||
} fast_alpha_t;
|
||||
|
||||
int i,j,ii,jj,inum,jnum,itype,jtype,sbindex;
|
||||
double factor_lj;
|
||||
double evdwl = 0.0;
|
||||
|
||||
double** _noalias x = atom->x;
|
||||
double** _noalias f = atom->f;
|
||||
int* _noalias type = atom->type;
|
||||
int nlocal = atom->nlocal;
|
||||
double* _noalias special_lj = force->special_lj;
|
||||
|
||||
inum = list->inum;
|
||||
int* _noalias ilist = list->ilist;
|
||||
int** _noalias firstneigh = list->firstneigh;
|
||||
int* _noalias numneigh = list->numneigh;
|
||||
|
||||
vec3_t* _noalias xx = (vec3_t*)x[0];
|
||||
vec3_t* _noalias ff = (vec3_t*)f[0];
|
||||
|
||||
int ntypes = atom->ntypes;
|
||||
int ntypes2 = ntypes*ntypes;
|
||||
|
||||
fast_alpha_t* _noalias fast_alpha =
|
||||
(fast_alpha_t*) malloc(ntypes2*sizeof(fast_alpha_t));
|
||||
for (i = 0; i < ntypes; i++) for (j = 0; j < ntypes; j++) {
|
||||
fast_alpha_t& a = fast_alpha[i*ntypes+j];
|
||||
a.cutsq = cutsq[i+1][j+1];
|
||||
a.uf1 = uf1[i+1][j+1];
|
||||
a.uf2 = uf2[i+1][j+1];
|
||||
a.uf3 = uf3[i+1][j+1];
|
||||
a.uf4 = uf4[i+1][j+1];
|
||||
a.scale = scale[i+1][j+1];
|
||||
a.offset = offset[i+1][j+1];
|
||||
}
|
||||
fast_alpha_t* _noalias tabsix = fast_alpha;
|
||||
|
||||
// loop over neighbors of my atoms
|
||||
|
||||
for (ii = 0; ii < inum; ii++) {
|
||||
i = ilist[ii];
|
||||
double xtmp = xx[i].x;
|
||||
double ytmp = xx[i].y;
|
||||
double ztmp = xx[i].z;
|
||||
itype = type[i] - 1;
|
||||
int* _noalias jlist = firstneigh[i];
|
||||
jnum = numneigh[i];
|
||||
|
||||
double tmpfx = 0.0;
|
||||
double tmpfy = 0.0;
|
||||
double tmpfz = 0.0;
|
||||
|
||||
fast_alpha_t* _noalias tabsixi = (fast_alpha_t*)&tabsix[itype*ntypes];
|
||||
|
||||
for (jj = 0; jj < jnum; jj++) {
|
||||
j = jlist[jj];
|
||||
sbindex = sbmask(j);
|
||||
|
||||
if (sbindex == 0) {
|
||||
double delx = xtmp - xx[j].x;
|
||||
double dely = ytmp - xx[j].y;
|
||||
double delz = ztmp - xx[j].z;
|
||||
double rsq = delx*delx + dely*dely + delz*delz;
|
||||
|
||||
jtype = type[j] - 1;
|
||||
|
||||
fast_alpha_t& a = tabsixi[jtype];
|
||||
|
||||
if (rsq < a.cutsq) {
|
||||
double expuf = exp(- rsq * a.uf2);
|
||||
double fpair = a.scale * a.uf1 * expuf / (1.0 - expuf);
|
||||
|
||||
tmpfx += delx*fpair;
|
||||
tmpfy += dely*fpair;
|
||||
tmpfz += delz*fpair;
|
||||
if (NEWTON_PAIR || j < nlocal) {
|
||||
ff[j].x -= delx*fpair;
|
||||
ff[j].y -= dely*fpair;
|
||||
ff[j].z -= delz*fpair;
|
||||
}
|
||||
|
||||
if (EFLAG) evdwl = - a.uf3 * log(1.0 - expuf) - a.offset;
|
||||
|
||||
if (EVFLAG)
|
||||
ev_tally(i,j,nlocal,NEWTON_PAIR,
|
||||
evdwl,0.0,fpair,delx,dely,delz);
|
||||
}
|
||||
|
||||
} else {
|
||||
factor_lj = special_lj[sbindex];
|
||||
j &= NEIGHMASK;
|
||||
|
||||
double delx = xtmp - xx[j].x;
|
||||
double dely = ytmp - xx[j].y;
|
||||
double delz = ztmp - xx[j].z;
|
||||
double rsq = delx*delx + dely*dely + delz*delz;
|
||||
|
||||
int jtype1 = type[j];
|
||||
jtype = jtype1 - 1;
|
||||
|
||||
fast_alpha_t& a = tabsixi[jtype];
|
||||
if (rsq < a.cutsq) {
|
||||
fast_alpha_t& a = tabsixi[jtype];
|
||||
double expuf = exp(- rsq * a.uf2);
|
||||
double fpair = a.scale * factor_lj * a.uf1 * expuf / (1.0 - expuf);
|
||||
|
||||
tmpfx += delx*fpair;
|
||||
tmpfy += dely*fpair;
|
||||
tmpfz += delz*fpair;
|
||||
if (NEWTON_PAIR || j < nlocal) {
|
||||
ff[j].x -= delx*fpair;
|
||||
ff[j].y -= dely*fpair;
|
||||
ff[j].z -= delz*fpair;
|
||||
}
|
||||
|
||||
if (EFLAG) {
|
||||
evdwl = - a.uf3 * log(1.0 - expuf) - a.offset;
|
||||
evdwl *= factor_lj;
|
||||
}
|
||||
|
||||
if (EVFLAG) ev_tally(i,j,nlocal,NEWTON_PAIR,
|
||||
evdwl,0.0,fpair,delx,dely,delz);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ff[i].x += tmpfx;
|
||||
ff[i].y += tmpfy;
|
||||
ff[i].z += tmpfz;
|
||||
}
|
||||
|
||||
free(fast_alpha); fast_alpha = 0;
|
||||
|
||||
if (vflag_fdotr) virial_fdotr_compute();
|
||||
}
|
||||
45
src/OPT/pair_ufm_opt.h
Normal file
45
src/OPT/pair_ufm_opt.h
Normal file
@ -0,0 +1,45 @@
|
||||
/* -*- c++ -*- ----------------------------------------------------------
|
||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
http://lammps.sandia.gov, Sandia National Laboratories
|
||||
Steve Plimpton, sjplimp@sandia.gov
|
||||
|
||||
Copyright (2003) Sandia Corporation. Under the terms of Contract
|
||||
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
|
||||
certain rights in this software. This software is distributed under
|
||||
the GNU General Public License.
|
||||
|
||||
See the README file in the top-level LAMMPS directory.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
Contributing author:
|
||||
Rodolfo Paula Leite (Unicamp/Brazil) - pl.rodolfo@gmail.com
|
||||
Maurice de Koning (Unicamp/Brazil) - dekoning@ifi.unicamp.br
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#ifdef PAIR_CLASS
|
||||
|
||||
PairStyle(ufm/opt,PairUFMOpt)
|
||||
|
||||
#else
|
||||
|
||||
#ifndef LMP_PAIR_UFM_OPT_H
|
||||
#define LMP_PAIR_UFM_OPT_H
|
||||
|
||||
#include "pair_ufm.h"
|
||||
|
||||
namespace LAMMPS_NS {
|
||||
|
||||
class PairUFMOpt : public PairUFM {
|
||||
public:
|
||||
PairUFMOpt(class LAMMPS *);
|
||||
void compute(int, int);
|
||||
|
||||
private:
|
||||
template < int EVFLAG, int EFLAG, int NEWTON_PAIR > void eval();
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
@ -26,6 +26,16 @@ action () {
|
||||
fi
|
||||
}
|
||||
|
||||
# ATC library has a reference to PairEAM, so we must
|
||||
# require the MANYBODY package to be installed.
|
||||
|
||||
if (test $1 = 1) then
|
||||
if (test ! -e ../pair_eam.cpp) then
|
||||
echo "Must install MANYBODY package with USER-ATC"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# all package files with no dependencies
|
||||
|
||||
for file in *.cpp *.h; do
|
||||
|
||||
@ -939,8 +939,10 @@ void PairTersoffTable::read_file(char *file)
|
||||
params[nparams].beta = atof(words[10]);
|
||||
params[nparams].lam2 = atof(words[11]);
|
||||
params[nparams].bigb = atof(words[12]);
|
||||
|
||||
// current implementation is based on functional form
|
||||
// of tersoff_2 as reported in the reference paper
|
||||
|
||||
double bigr = atof(words[13]);
|
||||
double bigd = atof(words[14]);
|
||||
params[nparams].cutoffR = bigr - bigd;
|
||||
@ -948,15 +950,17 @@ void PairTersoffTable::read_file(char *file)
|
||||
params[nparams].lam1 = atof(words[15]);
|
||||
params[nparams].biga = atof(words[16]);
|
||||
|
||||
// currently only allow m exponent of 1 or 3
|
||||
params[nparams].powermint = int(params[nparams].powerm);
|
||||
|
||||
if (params[nparams].c < 0.0 || params[nparams].d < 0.0 ||
|
||||
params[nparams].powern < 0.0 || params[nparams].beta < 0.0 ||
|
||||
params[nparams].lam2 < 0.0 || params[nparams].bigb < 0.0 ||
|
||||
params[nparams].cutoffR < 0.0 ||params[nparams].cutoffS < 0.0 ||
|
||||
if (params[nparams].c < 0.0 ||
|
||||
params[nparams].d < 0.0 ||
|
||||
params[nparams].powern < 0.0 ||
|
||||
params[nparams].beta < 0.0 ||
|
||||
params[nparams].lam2 < 0.0 ||
|
||||
params[nparams].bigb < 0.0 ||
|
||||
params[nparams].cutoffR < 0.0 ||
|
||||
params[nparams].cutoffS < 0.0 ||
|
||||
params[nparams].cutoffR > params[nparams].cutoffS ||
|
||||
params[nparams].lam1 < 0.0 || params[nparams].biga < 0.0
|
||||
params[nparams].lam1 < 0.0 ||
|
||||
params[nparams].biga < 0.0
|
||||
) error->all(FLERR,"Illegal Tersoff parameter");
|
||||
|
||||
// only tersoff_2 parametrization is implemented
|
||||
|
||||
32
src/USER-MOFFF/README
Normal file
32
src/USER-MOFFF/README
Normal file
@ -0,0 +1,32 @@
|
||||
This Package implements pair, angle and improper styles needed to employ
|
||||
the MOF-FF force field by Schmid and coworkers with LAMMPS.
|
||||
MOF-FF is a first principles derived force field with the primary aim
|
||||
to simulate MOFs and related porous framework materials, using spherical
|
||||
Gaussian charges. It is described in S. Bureekaew et al., Phys. Stat. Sol. B
|
||||
2013, 250, 1128-1141.
|
||||
For the usage of MOF-FF see the example in the example directory as
|
||||
well as the "MOF+" website (https://www.mofplus.org/content/show/MOF-FF).
|
||||
The package provides the following features:
|
||||
|
||||
* a dispersion damped Buckhingham potential with spherical Gaussian type
|
||||
charges (dsf and long-range treatment of charges)
|
||||
|
||||
* a modified angle/class2 including 6th order polynomial
|
||||
|
||||
* a modified angle/cosine style which adds a dispersion damped Buckhingham
|
||||
1-3 interaction analog to the dihedral/charmm style
|
||||
|
||||
* an improper style following the Wilson-Decius definition of the
|
||||
out-of-plane angle
|
||||
|
||||
See the file doc/drude_tutorial.html for getting started.
|
||||
See the doc pages for "pair_style buck6d/coul/gauss", "anlge_style class2",
|
||||
"angle_style cosine/buck6d", and "improper_style inversion/harmonic"
|
||||
commands to get started. Also see the above mentioned website and
|
||||
literature for further documentation about the force field.
|
||||
|
||||
There are example scripts for using this force field in examples/USER/mofff.
|
||||
|
||||
The creators of this package are Hendrik Heenen (hendrik.heenen at mytum.de)
|
||||
and Rochus Schmid (rochus.schmid at rub.de). Contact them directly if you
|
||||
have questions.
|
||||
487
src/USER-MOFFF/angle_class2_p6.cpp
Normal file
487
src/USER-MOFFF/angle_class2_p6.cpp
Normal file
@ -0,0 +1,487 @@
|
||||
/* ----------------------------------------------------------------------
|
||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
http://lammps.sandia.gov, Sandia National Laboratories
|
||||
Steve Plimpton, sjplimp@sandia.gov
|
||||
|
||||
Copyright (2003) Sandia Corporation. Under the terms of Contract
|
||||
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
|
||||
certain rights in this software. This software is distributed under
|
||||
the GNU General Public License.
|
||||
|
||||
See the README file in the top-level LAMMPS directory.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
Contributing author: Hendrik Heenen (Technical University of Munich)
|
||||
and Rochus Schmid (Ruhr-Universitaet Bochum)
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include <math.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include "angle_class2_p6.h"
|
||||
#include "atom.h"
|
||||
#include "neighbor.h"
|
||||
#include "domain.h"
|
||||
#include "comm.h"
|
||||
#include "force.h"
|
||||
#include "math_const.h"
|
||||
#include "memory.h"
|
||||
#include "error.h"
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
using namespace MathConst;
|
||||
|
||||
#define SMALL 0.001
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
AngleClass2P6::AngleClass2P6(LAMMPS *lmp) : Angle(lmp) {}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
AngleClass2P6::~AngleClass2P6()
|
||||
{
|
||||
if (allocated) {
|
||||
memory->destroy(setflag);
|
||||
memory->destroy(setflag_a);
|
||||
memory->destroy(setflag_bb);
|
||||
memory->destroy(setflag_ba);
|
||||
|
||||
memory->destroy(theta0);
|
||||
memory->destroy(k2);
|
||||
memory->destroy(k3);
|
||||
memory->destroy(k4);
|
||||
memory->destroy(k5);
|
||||
memory->destroy(k6);
|
||||
|
||||
memory->destroy(bb_k);
|
||||
memory->destroy(bb_r1);
|
||||
memory->destroy(bb_r2);
|
||||
|
||||
memory->destroy(ba_k1);
|
||||
memory->destroy(ba_k2);
|
||||
memory->destroy(ba_r1);
|
||||
memory->destroy(ba_r2);
|
||||
}
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void AngleClass2P6::compute(int eflag, int vflag)
|
||||
{
|
||||
int i1,i2,i3,n,type;
|
||||
double delx1,dely1,delz1,delx2,dely2,delz2;
|
||||
double eangle,f1[3],f3[3];
|
||||
double dtheta,dtheta2,dtheta3,dtheta4,dtheta5,dtheta6,de_angle;
|
||||
double dr1,dr2,tk1,tk2,aa1,aa2,aa11,aa12,aa21,aa22;
|
||||
double rsq1,rsq2,r1,r2,c,s,a,a11,a12,a22,b1,b2;
|
||||
double vx11,vx12,vy11,vy12,vz11,vz12,vx21,vx22,vy21,vy22,vz21,vz22;
|
||||
|
||||
eangle = 0.0;
|
||||
if (eflag || vflag) ev_setup(eflag,vflag);
|
||||
else evflag = 0;
|
||||
|
||||
double **x = atom->x;
|
||||
double **f = atom->f;
|
||||
int **anglelist = neighbor->anglelist;
|
||||
int nanglelist = neighbor->nanglelist;
|
||||
int nlocal = atom->nlocal;
|
||||
int newton_bond = force->newton_bond;
|
||||
|
||||
for (n = 0; n < nanglelist; n++) {
|
||||
i1 = anglelist[n][0];
|
||||
i2 = anglelist[n][1];
|
||||
i3 = anglelist[n][2];
|
||||
type = anglelist[n][3];
|
||||
|
||||
// 1st bond
|
||||
|
||||
delx1 = x[i1][0] - x[i2][0];
|
||||
dely1 = x[i1][1] - x[i2][1];
|
||||
delz1 = x[i1][2] - x[i2][2];
|
||||
|
||||
rsq1 = delx1*delx1 + dely1*dely1 + delz1*delz1;
|
||||
r1 = sqrt(rsq1);
|
||||
|
||||
// 2nd bond
|
||||
|
||||
delx2 = x[i3][0] - x[i2][0];
|
||||
dely2 = x[i3][1] - x[i2][1];
|
||||
delz2 = x[i3][2] - x[i2][2];
|
||||
|
||||
rsq2 = delx2*delx2 + dely2*dely2 + delz2*delz2;
|
||||
r2 = sqrt(rsq2);
|
||||
|
||||
// angle (cos and sin)
|
||||
|
||||
c = delx1*delx2 + dely1*dely2 + delz1*delz2;
|
||||
c /= r1*r2;
|
||||
|
||||
if (c > 1.0) c = 1.0;
|
||||
if (c < -1.0) c = -1.0;
|
||||
|
||||
s = sqrt(1.0 - c*c);
|
||||
if (s < SMALL) s = SMALL;
|
||||
s = 1.0/s;
|
||||
|
||||
// force & energy for angle term
|
||||
|
||||
dtheta = acos(c) - theta0[type];
|
||||
dtheta2 = dtheta*dtheta;
|
||||
dtheta3 = dtheta2*dtheta;
|
||||
dtheta4 = dtheta3*dtheta;
|
||||
dtheta5 = dtheta4*dtheta;
|
||||
dtheta6 = dtheta5*dtheta;
|
||||
|
||||
de_angle = 2.0*k2[type]*dtheta + 3.0*k3[type]*dtheta2 +
|
||||
4.0*k4[type]*dtheta3 + 5.0*k5[type]*dtheta4 +
|
||||
6.0*k6[type]*dtheta5;
|
||||
|
||||
a = -de_angle*s;
|
||||
a11 = a*c / rsq1;
|
||||
a12 = -a / (r1*r2);
|
||||
a22 = a*c / rsq2;
|
||||
|
||||
f1[0] = a11*delx1 + a12*delx2;
|
||||
f1[1] = a11*dely1 + a12*dely2;
|
||||
f1[2] = a11*delz1 + a12*delz2;
|
||||
|
||||
f3[0] = a22*delx2 + a12*delx1;
|
||||
f3[1] = a22*dely2 + a12*dely1;
|
||||
f3[2] = a22*delz2 + a12*delz1;
|
||||
|
||||
if (eflag) eangle = k2[type]*dtheta2 + k3[type]*dtheta3 + k4[type]*dtheta4
|
||||
+ k5[type]*dtheta5 + k6[type]*dtheta6;
|
||||
|
||||
// force & energy for bond-bond term
|
||||
|
||||
dr1 = r1 - bb_r1[type];
|
||||
dr2 = r2 - bb_r2[type];
|
||||
tk1 = bb_k[type] * dr1;
|
||||
tk2 = bb_k[type] * dr2;
|
||||
|
||||
f1[0] -= delx1*tk2/r1;
|
||||
f1[1] -= dely1*tk2/r1;
|
||||
f1[2] -= delz1*tk2/r1;
|
||||
|
||||
f3[0] -= delx2*tk1/r2;
|
||||
f3[1] -= dely2*tk1/r2;
|
||||
f3[2] -= delz2*tk1/r2;
|
||||
|
||||
if (eflag) eangle += bb_k[type]*dr1*dr2;
|
||||
|
||||
// force & energy for bond-angle term
|
||||
|
||||
aa1 = s * dr1 * ba_k1[type];
|
||||
aa2 = s * dr2 * ba_k2[type];
|
||||
|
||||
aa11 = aa1 * c / rsq1;
|
||||
aa12 = -aa1 / (r1 * r2);
|
||||
aa21 = aa2 * c / rsq1;
|
||||
aa22 = -aa2 / (r1 * r2);
|
||||
|
||||
vx11 = (aa11 * delx1) + (aa12 * delx2);
|
||||
vx12 = (aa21 * delx1) + (aa22 * delx2);
|
||||
vy11 = (aa11 * dely1) + (aa12 * dely2);
|
||||
vy12 = (aa21 * dely1) + (aa22 * dely2);
|
||||
vz11 = (aa11 * delz1) + (aa12 * delz2);
|
||||
vz12 = (aa21 * delz1) + (aa22 * delz2);
|
||||
|
||||
aa11 = aa1 * c / rsq2;
|
||||
aa21 = aa2 * c / rsq2;
|
||||
|
||||
vx21 = (aa11 * delx2) + (aa12 * delx1);
|
||||
vx22 = (aa21 * delx2) + (aa22 * delx1);
|
||||
vy21 = (aa11 * dely2) + (aa12 * dely1);
|
||||
vy22 = (aa21 * dely2) + (aa22 * dely1);
|
||||
vz21 = (aa11 * delz2) + (aa12 * delz1);
|
||||
vz22 = (aa21 * delz2) + (aa22 * delz1);
|
||||
|
||||
b1 = ba_k1[type] * dtheta / r1;
|
||||
b2 = ba_k2[type] * dtheta / r2;
|
||||
|
||||
f1[0] -= vx11 + b1*delx1 + vx12;
|
||||
f1[1] -= vy11 + b1*dely1 + vy12;
|
||||
f1[2] -= vz11 + b1*delz1 + vz12;
|
||||
|
||||
f3[0] -= vx21 + b2*delx2 + vx22;
|
||||
f3[1] -= vy21 + b2*dely2 + vy22;
|
||||
f3[2] -= vz21 + b2*delz2 + vz22;
|
||||
|
||||
if (eflag) eangle += ba_k1[type]*dr1*dtheta + ba_k2[type]*dr2*dtheta;
|
||||
|
||||
// apply force to each of 3 atoms
|
||||
|
||||
if (newton_bond || i1 < nlocal) {
|
||||
f[i1][0] += f1[0];
|
||||
f[i1][1] += f1[1];
|
||||
f[i1][2] += f1[2];
|
||||
}
|
||||
|
||||
if (newton_bond || i2 < nlocal) {
|
||||
f[i2][0] -= f1[0] + f3[0];
|
||||
f[i2][1] -= f1[1] + f3[1];
|
||||
f[i2][2] -= f1[2] + f3[2];
|
||||
}
|
||||
|
||||
if (newton_bond || i3 < nlocal) {
|
||||
f[i3][0] += f3[0];
|
||||
f[i3][1] += f3[1];
|
||||
f[i3][2] += f3[2];
|
||||
}
|
||||
|
||||
if (evflag) ev_tally(i1,i2,i3,nlocal,newton_bond,eangle,f1,f3,
|
||||
delx1,dely1,delz1,delx2,dely2,delz2);
|
||||
}
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void AngleClass2P6::allocate()
|
||||
{
|
||||
allocated = 1;
|
||||
int n = atom->nangletypes;
|
||||
|
||||
memory->create(theta0,n+1,"angle:theta0");
|
||||
memory->create(k2,n+1,"angle:k2");
|
||||
memory->create(k3,n+1,"angle:k3");
|
||||
memory->create(k4,n+1,"angle:k4");
|
||||
memory->create(k5,n+1,"angle:k5");
|
||||
memory->create(k6,n+1,"angle:k6");
|
||||
|
||||
memory->create(bb_k,n+1,"angle:bb_k");
|
||||
memory->create(bb_r1,n+1,"angle:bb_r1");
|
||||
memory->create(bb_r2,n+1,"angle:bb_r2");
|
||||
|
||||
memory->create(ba_k1,n+1,"angle:ba_k1");
|
||||
memory->create(ba_k2,n+1,"angle:ba_k2");
|
||||
memory->create(ba_r1,n+1,"angle:ba_r1");
|
||||
memory->create(ba_r2,n+1,"angle:ba_r2");
|
||||
|
||||
memory->create(setflag,n+1,"angle:setflag");
|
||||
memory->create(setflag_a,n+1,"angle:setflag_a");
|
||||
memory->create(setflag_bb,n+1,"angle:setflag_bb");
|
||||
memory->create(setflag_ba,n+1,"angle:setflag_ba");
|
||||
for (int i = 1; i <= n; i++)
|
||||
setflag[i] = setflag_a[i] = setflag_bb[i] = setflag_ba[i] = 0;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
set coeffs for one or more types
|
||||
arg1 = "bb" -> BondBond coeffs
|
||||
arg1 = "ba" -> BondAngle coeffs
|
||||
else -> Angle coeffs
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void AngleClass2P6::coeff(int narg, char **arg)
|
||||
{
|
||||
if (narg < 2) error->all(FLERR,"Incorrect args for angle coefficients");
|
||||
if (!allocated) allocate();
|
||||
|
||||
int ilo,ihi;
|
||||
force->bounds(FLERR,arg[0],atom->nangletypes,ilo,ihi);
|
||||
|
||||
int count = 0;
|
||||
|
||||
if (strcmp(arg[1],"bb") == 0) {
|
||||
if (narg != 5) error->all(FLERR,"Incorrect args for angle coefficients");
|
||||
|
||||
double bb_k_one = force->numeric(FLERR,arg[2]);
|
||||
double bb_r1_one = force->numeric(FLERR,arg[3]);
|
||||
double bb_r2_one = force->numeric(FLERR,arg[4]);
|
||||
|
||||
for (int i = ilo; i <= ihi; i++) {
|
||||
bb_k[i] = bb_k_one;
|
||||
bb_r1[i] = bb_r1_one;
|
||||
bb_r2[i] = bb_r2_one;
|
||||
setflag_bb[i] = 1;
|
||||
count++;
|
||||
}
|
||||
|
||||
} else if (strcmp(arg[1],"ba") == 0) {
|
||||
if (narg != 6) error->all(FLERR,"Incorrect args for angle coefficients");
|
||||
|
||||
double ba_k1_one = force->numeric(FLERR,arg[2]);
|
||||
double ba_k2_one = force->numeric(FLERR,arg[3]);
|
||||
double ba_r1_one = force->numeric(FLERR,arg[4]);
|
||||
double ba_r2_one = force->numeric(FLERR,arg[5]);
|
||||
|
||||
for (int i = ilo; i <= ihi; i++) {
|
||||
ba_k1[i] = ba_k1_one;
|
||||
ba_k2[i] = ba_k2_one;
|
||||
ba_r1[i] = ba_r1_one;
|
||||
ba_r2[i] = ba_r2_one;
|
||||
setflag_ba[i] = 1;
|
||||
count++;
|
||||
}
|
||||
|
||||
} else {
|
||||
if (narg != 7) error->all(FLERR,"Incorrect args for angle coefficients");
|
||||
|
||||
double theta0_one = force->numeric(FLERR,arg[1]);
|
||||
double k2_one = force->numeric(FLERR,arg[2]);
|
||||
double k3_one = force->numeric(FLERR,arg[3]);
|
||||
double k4_one = force->numeric(FLERR,arg[4]);
|
||||
double k5_one = force->numeric(FLERR,arg[5]);
|
||||
double k6_one = force->numeric(FLERR,arg[6]);
|
||||
|
||||
// convert theta0 from degrees to radians
|
||||
|
||||
for (int i = ilo; i <= ihi; i++) {
|
||||
theta0[i] = theta0_one/180.0 * MY_PI;
|
||||
k2[i] = k2_one;
|
||||
k3[i] = k3_one;
|
||||
k4[i] = k4_one;
|
||||
k5[i] = k5_one;
|
||||
k6[i] = k6_one;
|
||||
setflag_a[i] = 1;
|
||||
count++;
|
||||
}
|
||||
}
|
||||
|
||||
if (count == 0) error->all(FLERR,"Incorrect args for angle coefficients");
|
||||
|
||||
for (int i = ilo; i <= ihi; i++)
|
||||
if (setflag_a[i] == 1 && setflag_bb[i] == 1 && setflag_ba[i] == 1)
|
||||
setflag[i] = 1;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
double AngleClass2P6::equilibrium_angle(int i)
|
||||
{
|
||||
return theta0[i];
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
proc 0 writes out coeffs to restart file
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void AngleClass2P6::write_restart(FILE *fp)
|
||||
{
|
||||
fwrite(&theta0[1],sizeof(double),atom->nangletypes,fp);
|
||||
fwrite(&k2[1],sizeof(double),atom->nangletypes,fp);
|
||||
fwrite(&k3[1],sizeof(double),atom->nangletypes,fp);
|
||||
fwrite(&k4[1],sizeof(double),atom->nangletypes,fp);
|
||||
fwrite(&k5[1],sizeof(double),atom->nangletypes,fp);
|
||||
fwrite(&k6[1],sizeof(double),atom->nangletypes,fp);
|
||||
|
||||
fwrite(&bb_k[1],sizeof(double),atom->nangletypes,fp);
|
||||
fwrite(&bb_r1[1],sizeof(double),atom->nangletypes,fp);
|
||||
fwrite(&bb_r2[1],sizeof(double),atom->nangletypes,fp);
|
||||
|
||||
fwrite(&ba_k1[1],sizeof(double),atom->nangletypes,fp);
|
||||
fwrite(&ba_k2[1],sizeof(double),atom->nangletypes,fp);
|
||||
fwrite(&ba_r1[1],sizeof(double),atom->nangletypes,fp);
|
||||
fwrite(&ba_r2[1],sizeof(double),atom->nangletypes,fp);
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
proc 0 reads coeffs from restart file, bcasts them
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void AngleClass2P6::read_restart(FILE *fp)
|
||||
{
|
||||
allocate();
|
||||
|
||||
if (comm->me == 0) {
|
||||
fread(&theta0[1],sizeof(double),atom->nangletypes,fp);
|
||||
fread(&k2[1],sizeof(double),atom->nangletypes,fp);
|
||||
fread(&k3[1],sizeof(double),atom->nangletypes,fp);
|
||||
fread(&k4[1],sizeof(double),atom->nangletypes,fp);
|
||||
fread(&k5[1],sizeof(double),atom->nangletypes,fp);
|
||||
fread(&k6[1],sizeof(double),atom->nangletypes,fp);
|
||||
|
||||
fread(&bb_k[1],sizeof(double),atom->nangletypes,fp);
|
||||
fread(&bb_r1[1],sizeof(double),atom->nangletypes,fp);
|
||||
fread(&bb_r2[1],sizeof(double),atom->nangletypes,fp);
|
||||
|
||||
fread(&ba_k1[1],sizeof(double),atom->nangletypes,fp);
|
||||
fread(&ba_k2[1],sizeof(double),atom->nangletypes,fp);
|
||||
fread(&ba_r1[1],sizeof(double),atom->nangletypes,fp);
|
||||
fread(&ba_r2[1],sizeof(double),atom->nangletypes,fp);
|
||||
}
|
||||
|
||||
MPI_Bcast(&theta0[1],atom->nangletypes,MPI_DOUBLE,0,world);
|
||||
MPI_Bcast(&k2[1],atom->nangletypes,MPI_DOUBLE,0,world);
|
||||
MPI_Bcast(&k3[1],atom->nangletypes,MPI_DOUBLE,0,world);
|
||||
MPI_Bcast(&k4[1],atom->nangletypes,MPI_DOUBLE,0,world);
|
||||
MPI_Bcast(&k5[1],atom->nangletypes,MPI_DOUBLE,0,world);
|
||||
MPI_Bcast(&k6[1],atom->nangletypes,MPI_DOUBLE,0,world);
|
||||
|
||||
MPI_Bcast(&bb_k[1],atom->nangletypes,MPI_DOUBLE,0,world);
|
||||
MPI_Bcast(&bb_r1[1],atom->nangletypes,MPI_DOUBLE,0,world);
|
||||
MPI_Bcast(&bb_r2[1],atom->nangletypes,MPI_DOUBLE,0,world);
|
||||
|
||||
MPI_Bcast(&ba_k1[1],atom->nangletypes,MPI_DOUBLE,0,world);
|
||||
MPI_Bcast(&ba_k2[1],atom->nangletypes,MPI_DOUBLE,0,world);
|
||||
MPI_Bcast(&ba_r1[1],atom->nangletypes,MPI_DOUBLE,0,world);
|
||||
MPI_Bcast(&ba_r2[1],atom->nangletypes,MPI_DOUBLE,0,world);
|
||||
|
||||
for (int i = 1; i <= atom->nangletypes; i++) setflag[i] = 1;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
proc 0 writes to data file
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void AngleClass2P6::write_data(FILE *fp)
|
||||
{
|
||||
for (int i = 1; i <= atom->nangletypes; i++)
|
||||
fprintf(fp,"%d %g %g %g %g\n",
|
||||
i,theta0[i]/MY_PI*180.0,k2[i],k3[i],k4[i],k5[i],k6[i]);
|
||||
|
||||
fprintf(fp,"\nBondBond Coeffs\n\n");
|
||||
for (int i = 1; i <= atom->nangletypes; i++)
|
||||
fprintf(fp,"%d %g %g %g\n",i,bb_k[i],bb_r1[i],bb_r2[i]);
|
||||
|
||||
fprintf(fp,"\nBondAngle Coeffs\n\n");
|
||||
for (int i = 1; i <= atom->nangletypes; i++)
|
||||
fprintf(fp,"%d %g %g %g %g\n",i,ba_k1[i],ba_k2[i],ba_r1[i],ba_r2[i]);
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
double AngleClass2P6::single(int type, int i1, int i2, int i3)
|
||||
{
|
||||
double **x = atom->x;
|
||||
|
||||
double delx1 = x[i1][0] - x[i2][0];
|
||||
double dely1 = x[i1][1] - x[i2][1];
|
||||
double delz1 = x[i1][2] - x[i2][2];
|
||||
domain->minimum_image(delx1,dely1,delz1);
|
||||
double r1 = sqrt(delx1*delx1 + dely1*dely1 + delz1*delz1);
|
||||
|
||||
double delx2 = x[i3][0] - x[i2][0];
|
||||
double dely2 = x[i3][1] - x[i2][1];
|
||||
double delz2 = x[i3][2] - x[i2][2];
|
||||
domain->minimum_image(delx2,dely2,delz2);
|
||||
double r2 = sqrt(delx2*delx2 + dely2*dely2 + delz2*delz2);
|
||||
|
||||
double c = delx1*delx2 + dely1*dely2 + delz1*delz2;
|
||||
c /= r1*r2;
|
||||
if (c > 1.0) c = 1.0;
|
||||
if (c < -1.0) c = -1.0;
|
||||
|
||||
double s = sqrt(1.0 - c*c);
|
||||
if (s < SMALL) s = SMALL;
|
||||
s = 1.0/s;
|
||||
|
||||
double dtheta = acos(c) - theta0[type];
|
||||
double dtheta2 = dtheta*dtheta;
|
||||
double dtheta3 = dtheta2*dtheta;
|
||||
double dtheta4 = dtheta3*dtheta;
|
||||
double dtheta5 = dtheta4*dtheta;
|
||||
double dtheta6 = dtheta5*dtheta;
|
||||
|
||||
double energy = k2[type]*dtheta2 + k3[type]*dtheta3 + k4[type]*dtheta4
|
||||
+ k5[type]*dtheta5 + k6[type]*dtheta6;
|
||||
|
||||
double dr1 = r1 - bb_r1[type];
|
||||
double dr2 = r2 - bb_r2[type];
|
||||
energy += bb_k[type]*dr1*dr2;
|
||||
|
||||
energy += ba_k1[type]*dr1*dtheta + ba_k2[type]*dr2*dtheta;
|
||||
return energy;
|
||||
}
|
||||
60
src/USER-MOFFF/angle_class2_p6.h
Normal file
60
src/USER-MOFFF/angle_class2_p6.h
Normal file
@ -0,0 +1,60 @@
|
||||
/* -*- c++ -*- ----------------------------------------------------------
|
||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
http://lammps.sandia.gov, Sandia National Laboratories
|
||||
Steve Plimpton, sjplimp@sandia.gov
|
||||
|
||||
Copyright (2003) Sandia Corporation. Under the terms of Contract
|
||||
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
|
||||
certain rights in this software. This software is distributed under
|
||||
the GNU General Public License.
|
||||
|
||||
See the README file in the top-level LAMMPS directory.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#ifdef ANGLE_CLASS
|
||||
|
||||
AngleStyle(class2/p6,AngleClass2P6)
|
||||
|
||||
#else
|
||||
|
||||
#ifndef LMP_ANGLE_CLASS2_P6_H
|
||||
#define LMP_ANGLE_CLASS2_P6_H
|
||||
|
||||
#include <stdio.h>
|
||||
#include "angle.h"
|
||||
|
||||
namespace LAMMPS_NS {
|
||||
|
||||
class AngleClass2P6 : public Angle {
|
||||
public:
|
||||
AngleClass2P6(class LAMMPS *);
|
||||
virtual ~AngleClass2P6();
|
||||
virtual void compute(int, int);
|
||||
void coeff(int, char **);
|
||||
double equilibrium_angle(int);
|
||||
void write_restart(FILE *);
|
||||
void read_restart(FILE *);
|
||||
void write_data(FILE *);
|
||||
double single(int, int, int, int);
|
||||
|
||||
protected:
|
||||
double *theta0,*k2,*k3,*k4,*k5,*k6;
|
||||
double *bb_k,*bb_r1,*bb_r2;
|
||||
double *ba_k1,*ba_k2,*ba_r1,*ba_r2;
|
||||
int *setflag_a,*setflag_bb,*setflag_ba;
|
||||
|
||||
void allocate();
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* ERROR/WARNING messages:
|
||||
|
||||
E: Incorrect args for angle coefficients
|
||||
|
||||
Self-explanatory. Check the input script or data file.
|
||||
|
||||
*/
|
||||
386
src/USER-MOFFF/angle_cosine_buck6d.cpp
Normal file
386
src/USER-MOFFF/angle_cosine_buck6d.cpp
Normal file
@ -0,0 +1,386 @@
|
||||
/* ----------------------------------------------------------------------
|
||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
http://lammps.sandia.gov, Sandia National Laboratories
|
||||
Steve Plimpton, sjplimp@sandia.gov
|
||||
|
||||
Copyright (2003) Sandia Corporation. Under the terms of Contract
|
||||
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
|
||||
certain rights in this software. This software is distributed under
|
||||
the GNU General Public License.
|
||||
|
||||
See the README file in the top-level LAMMPS directory.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
Contributing author: Hendrik Heenen (Technical University of Munich)
|
||||
and Rochus Schmid (Ruhr-Universitaet Bochum)
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
#include "angle_cosine_buck6d.h"
|
||||
#include "atom.h"
|
||||
#include "neighbor.h"
|
||||
#include "domain.h"
|
||||
#include "comm.h"
|
||||
#include "force.h"
|
||||
#include "pair.h"
|
||||
#include "math_const.h"
|
||||
#include "math_special.h"
|
||||
#include "memory.h"
|
||||
#include "error.h"
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
using namespace MathConst;
|
||||
using namespace MathSpecial;
|
||||
|
||||
#define SMALL 0.001
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
AngleCosineBuck6d::AngleCosineBuck6d(LAMMPS *lmp) : Angle(lmp) {}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
AngleCosineBuck6d::~AngleCosineBuck6d()
|
||||
{
|
||||
if (allocated) {
|
||||
memory->destroy(setflag);
|
||||
memory->destroy(k);
|
||||
memory->destroy(multiplicity);
|
||||
memory->destroy(th0);
|
||||
}
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void AngleCosineBuck6d::compute(int eflag, int vflag)
|
||||
{
|
||||
int i,i1,i2,i3,n,type,itype,jtype;
|
||||
double delx1,dely1,delz1,delx2,dely2,delz2;
|
||||
double eangle,f1[3],f3[3];
|
||||
double rsq1,rsq2,r1,r2,c,s,a,a11,a12,a22;
|
||||
double tk;
|
||||
|
||||
// extra lj variables
|
||||
double delx3,dely3,delz3,rsq3,r3;
|
||||
double rexp,r32inv,r36inv,r314inv,forcebuck6d,fpair;
|
||||
double term1,term2,term3,term4,term5,ebuck6d,evdwl;
|
||||
double rcu,rqu,sme,smf;
|
||||
|
||||
eangle = evdwl = 0.0;
|
||||
if (eflag || vflag) ev_setup(eflag,vflag);
|
||||
else evflag = 0;
|
||||
|
||||
// insure pair->ev_tally() will use 1-3 virial contribution
|
||||
|
||||
if (vflag_global == 2)
|
||||
force->pair->vflag_either = force->pair->vflag_global = 1;
|
||||
|
||||
double **x = atom->x;
|
||||
double **f = atom->f;
|
||||
int **anglelist = neighbor->anglelist;
|
||||
int nanglelist = neighbor->nanglelist;
|
||||
int nlocal = atom->nlocal;
|
||||
int newton_pair = force->newton_pair;
|
||||
int newton_bond = force->newton_bond;
|
||||
int *atomtype = atom->type;
|
||||
|
||||
for (n = 0; n < nanglelist; n++) {
|
||||
i1 = anglelist[n][0];
|
||||
i2 = anglelist[n][1];
|
||||
i3 = anglelist[n][2];
|
||||
type = anglelist[n][3];
|
||||
|
||||
// 1st bond
|
||||
|
||||
delx1 = x[i1][0] - x[i2][0];
|
||||
dely1 = x[i1][1] - x[i2][1];
|
||||
delz1 = x[i1][2] - x[i2][2];
|
||||
|
||||
rsq1 = delx1*delx1 + dely1*dely1 + delz1*delz1;
|
||||
r1 = sqrt(rsq1);
|
||||
|
||||
// 2nd bond
|
||||
|
||||
delx2 = x[i3][0] - x[i2][0];
|
||||
dely2 = x[i3][1] - x[i2][1];
|
||||
delz2 = x[i3][2] - x[i2][2];
|
||||
|
||||
rsq2 = delx2*delx2 + dely2*dely2 + delz2*delz2;
|
||||
r2 = sqrt(rsq2);
|
||||
|
||||
// c = cosine of angle
|
||||
|
||||
c = delx1*delx2 + dely1*dely2 + delz1*delz2;
|
||||
c /= r1*r2;
|
||||
if (c > 1.0) c = 1.0;
|
||||
if (c < -1.0) c = -1.0;
|
||||
|
||||
s = sqrt(1.0 - c*c);
|
||||
if (s < SMALL) s = SMALL;
|
||||
s = 1.0/s;
|
||||
|
||||
// force & energy
|
||||
|
||||
// explicit lj-contribution
|
||||
|
||||
itype = atomtype[i1];
|
||||
jtype = atomtype[i3];
|
||||
|
||||
delx3 = x[i1][0] - x[i3][0];
|
||||
dely3 = x[i1][1] - x[i3][1];
|
||||
delz3 = x[i1][2] - x[i3][2];
|
||||
rsq3 = delx3*delx3 + dely3*dely3 + delz3*delz3;
|
||||
|
||||
if (rsq3 < cut_ljsq[itype][jtype]) {
|
||||
r3 = sqrt(rsq3);
|
||||
r32inv = 1.0/rsq3;
|
||||
r36inv = r32inv*r32inv*r32inv;
|
||||
r314inv = r36inv*r36inv*r32inv;
|
||||
rexp = exp(-r3*buck6d2[itype][jtype]);
|
||||
term1 = buck6d3[itype][jtype]*r36inv;
|
||||
term2 = buck6d4[itype][jtype]*r314inv;
|
||||
term3 = term2*term2;
|
||||
term4 = 1.0/(1.0 + term2);
|
||||
term5 = 1.0/(1.0 + 2.0*term2 + term3);
|
||||
forcebuck6d = buck6d1[itype][jtype]*buck6d2[itype][jtype]*r3*rexp;
|
||||
forcebuck6d -= term1*(6.0*term4 - term5*14.0*term2);
|
||||
ebuck6d = buck6d1[itype][jtype]*rexp - term1*term4;
|
||||
|
||||
// smoothing term
|
||||
if (rsq3 > rsmooth_sq[itype][jtype]) {
|
||||
rcu = r3*rsq3;
|
||||
rqu = rsq3*rsq3;
|
||||
sme = c5[itype][jtype]*rqu*r3 + c4[itype][jtype]*rqu + c3[itype][jtype]*rcu +
|
||||
c2[itype][jtype]*rsq3 + c1[itype][jtype]*r3 + c0[itype][jtype];
|
||||
smf = 5.0*c5[itype][jtype]*rqu + 4.0*c4[itype][jtype]*rcu +
|
||||
3.0*c3[itype][jtype]*rsq3 + 2.0*c2[itype][jtype]*r3 + c1[itype][jtype];
|
||||
forcebuck6d = forcebuck6d*sme + ebuck6d*smf;
|
||||
ebuck6d *= sme;
|
||||
}
|
||||
} else forcebuck6d = 0.0;
|
||||
|
||||
// add forces of additional LJ interaction
|
||||
|
||||
fpair = forcebuck6d * r32inv;
|
||||
if (newton_pair || i1 < nlocal) {
|
||||
f[i1][0] += delx3*fpair;
|
||||
f[i1][1] += dely3*fpair;
|
||||
f[i1][2] += delz3*fpair;
|
||||
}
|
||||
if (newton_pair || i3 < nlocal) {
|
||||
f[i3][0] -= delx3*fpair;
|
||||
f[i3][1] -= dely3*fpair;
|
||||
f[i3][2] -= delz3*fpair;
|
||||
}
|
||||
|
||||
evdwl = 0.0;
|
||||
if (eflag) {
|
||||
if (rsq3 < cut_ljsq[itype][jtype]) {
|
||||
evdwl = ebuck6d - offset[itype][jtype];
|
||||
}
|
||||
}
|
||||
|
||||
//update pair energy and velocities
|
||||
|
||||
if (evflag) force->pair->ev_tally(i1,i3,nlocal,newton_pair,
|
||||
evdwl,0.0,fpair,delx3,dely3,delz3);
|
||||
|
||||
tk = multiplicity[type]*acos(c)-th0[type];
|
||||
|
||||
if (eflag) eangle = k[type]*(1.0+cos(tk));
|
||||
|
||||
a = k[type]*multiplicity[type]*sin(tk)*s;
|
||||
|
||||
a11 = a*c / rsq1;
|
||||
a12 = -a / (r1*r2);
|
||||
a22 = a*c / rsq2;
|
||||
|
||||
f1[0] = a11*delx1 + a12*delx2;
|
||||
f1[1] = a11*dely1 + a12*dely2;
|
||||
f1[2] = a11*delz1 + a12*delz2;
|
||||
f3[0] = a22*delx2 + a12*delx1;
|
||||
f3[1] = a22*dely2 + a12*dely1;
|
||||
f3[2] = a22*delz2 + a12*delz1;
|
||||
|
||||
// apply force to each of 3 atoms
|
||||
|
||||
if (newton_bond || i1 < nlocal) {
|
||||
f[i1][0] += f1[0];
|
||||
f[i1][1] += f1[1];
|
||||
f[i1][2] += f1[2];
|
||||
}
|
||||
|
||||
if (newton_bond || i2 < nlocal) {
|
||||
f[i2][0] -= f1[0] + f3[0];
|
||||
f[i2][1] -= f1[1] + f3[1];
|
||||
f[i2][2] -= f1[2] + f3[2];
|
||||
}
|
||||
|
||||
if (newton_bond || i3 < nlocal) {
|
||||
f[i3][0] += f3[0];
|
||||
f[i3][1] += f3[1];
|
||||
f[i3][2] += f3[2];
|
||||
}
|
||||
|
||||
if (evflag) ev_tally(i1,i2,i3,nlocal,newton_bond,eangle,f1,f3,
|
||||
delx1,dely1,delz1,delx2,dely2,delz2);
|
||||
}
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void AngleCosineBuck6d::allocate()
|
||||
{
|
||||
allocated = 1;
|
||||
int n = atom->nangletypes;
|
||||
|
||||
memory->create(k,n+1,"angle:k");
|
||||
memory->create(multiplicity,n+1,"angle:multiplicity");
|
||||
memory->create(th0,n+1,"angle:th0");
|
||||
memory->create(setflag,n+1,"angle:setflag");
|
||||
for (int i = 1; i <= n; i++) setflag[i] = 0;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
set coeffs for one or more types
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void AngleCosineBuck6d::coeff(int narg, char **arg)
|
||||
{
|
||||
if (narg != 4) error->all(FLERR,"Incorrect args for angle coefficients");
|
||||
if (!allocated) allocate();
|
||||
|
||||
int ilo,ihi;
|
||||
force->bounds(FLERR,arg[0],atom->nangletypes,ilo,ihi);
|
||||
|
||||
double c_one = force->numeric(FLERR,arg[1]);
|
||||
int n_one = force->inumeric(FLERR,arg[2]);
|
||||
int th0_one = force->numeric(FLERR,arg[3]);
|
||||
if (n_one <= 0) error->all(FLERR,"Incorrect args for angle coefficients");
|
||||
|
||||
|
||||
int count = 0;
|
||||
for (int i = ilo; i <= ihi; i++) {
|
||||
k[i] = c_one;
|
||||
multiplicity[i] = n_one;
|
||||
// transform offset angle to radians
|
||||
th0[i] = th0_one/180.0 * MY_PI;
|
||||
|
||||
setflag[i] = 1;
|
||||
count++;
|
||||
}
|
||||
|
||||
if (count == 0) error->all(FLERR,"Incorrect args for angle coefficients");
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
check special_bond settings are valid and initialize vdwl parameters
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void AngleCosineBuck6d::init_style()
|
||||
{
|
||||
// set local ptrs to buck6d 13 arrays setup by Pair
|
||||
int itmp;
|
||||
if (force->pair == NULL)
|
||||
error->all(FLERR,"Angle cosine/buck6d is incompatible with Pair style");
|
||||
cut_ljsq = (double **) force->pair->extract("cut_ljsq",itmp);
|
||||
buck6d1 = (double **) force->pair->extract("buck6d1",itmp);
|
||||
buck6d2 = (double **) force->pair->extract("buck6d2",itmp);
|
||||
buck6d3 = (double **) force->pair->extract("buck6d3",itmp);
|
||||
buck6d4 = (double **) force->pair->extract("buck6d4",itmp);
|
||||
rsmooth_sq = (double **) force->pair->extract("rsmooth_sq",itmp);
|
||||
c0 = (double **) force->pair->extract("c0",itmp);
|
||||
c1 = (double **) force->pair->extract("c1",itmp);
|
||||
c2 = (double **) force->pair->extract("c2",itmp);
|
||||
c3 = (double **) force->pair->extract("c3",itmp);
|
||||
c4 = (double **) force->pair->extract("c4",itmp);
|
||||
c5 = (double **) force->pair->extract("c5",itmp);
|
||||
offset = (double **) force->pair->extract("offset",itmp);
|
||||
if (!buck6d1 || !buck6d2 || !buck6d3 || !buck6d4 || !c0 || !c1 || !c2)
|
||||
error->all(FLERR,"Angle cosine/buck6d is incompatible with Pair style");
|
||||
|
||||
// special bonds must be x 0 x or double counting
|
||||
if (force->special_lj[2] != 0.0)
|
||||
error->all(FLERR,"Angle style requires special_bonds lj = x,0,x;"
|
||||
" otherwise buck6d 1-3 interaction are counted twice");
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
double AngleCosineBuck6d::equilibrium_angle(int i)
|
||||
{
|
||||
return MY_PI;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
proc 0 writes out coeffs to restart file
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void AngleCosineBuck6d::write_restart(FILE *fp)
|
||||
{
|
||||
fwrite(&k[1],sizeof(double),atom->nangletypes,fp);
|
||||
fwrite(&multiplicity[1],sizeof(int),atom->nangletypes,fp);
|
||||
fwrite(&th0[1],sizeof(double),atom->nangletypes,fp);
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
proc 0 reads coeffs from restart file, bcasts them
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void AngleCosineBuck6d::read_restart(FILE *fp)
|
||||
{
|
||||
allocate();
|
||||
|
||||
if (comm->me == 0) {
|
||||
fread(&k[1],sizeof(double),atom->nangletypes,fp);
|
||||
fread(&multiplicity[1],sizeof(int),atom->nangletypes,fp);
|
||||
fread(&th0[1],sizeof(double),atom->nangletypes,fp);
|
||||
}
|
||||
|
||||
MPI_Bcast(&k[1],atom->nangletypes,MPI_DOUBLE,0,world);
|
||||
MPI_Bcast(&multiplicity[1],atom->nangletypes,MPI_INT,0,world);
|
||||
MPI_Bcast(&th0[1],atom->nangletypes,MPI_INT,0,world);
|
||||
for (int i = 1; i <= atom->nangletypes; i++) setflag[i] = 1;
|
||||
}
|
||||
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
proc 0 writes to data file
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void AngleCosineBuck6d::write_data(FILE *fp)
|
||||
{
|
||||
for (int i = 1; i <= atom->nangletypes; i++) {
|
||||
fprintf(fp,"%d %g %d %d\n",i,k[i],multiplicity[i],th0[i]);
|
||||
}
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
double AngleCosineBuck6d::single(int type, int i1, int i2, int i3)
|
||||
{
|
||||
double **x = atom->x;
|
||||
|
||||
double delx1 = x[i1][0] - x[i2][0];
|
||||
double dely1 = x[i1][1] - x[i2][1];
|
||||
double delz1 = x[i1][2] - x[i2][2];
|
||||
domain->minimum_image(delx1,dely1,delz1);
|
||||
double r1 = sqrt(delx1*delx1 + dely1*dely1 + delz1*delz1);
|
||||
|
||||
double delx2 = x[i3][0] - x[i2][0];
|
||||
double dely2 = x[i3][1] - x[i2][1];
|
||||
double delz2 = x[i3][2] - x[i2][2];
|
||||
domain->minimum_image(delx2,dely2,delz2);
|
||||
double r2 = sqrt(delx2*delx2 + dely2*dely2 + delz2*delz2);
|
||||
|
||||
double c = delx1*delx2 + dely1*dely2 + delz1*delz2;
|
||||
c /= r1*r2;
|
||||
if (c > 1.0) c = 1.0;
|
||||
if (c < -1.0) c = -1.0;
|
||||
|
||||
double tk = multiplicity[type]*acos(c)-th0[type];
|
||||
|
||||
return k[type]*(1.0+cos(tk));
|
||||
}
|
||||
62
src/USER-MOFFF/angle_cosine_buck6d.h
Normal file
62
src/USER-MOFFF/angle_cosine_buck6d.h
Normal file
@ -0,0 +1,62 @@
|
||||
/* -*- c++ -*- ----------------------------------------------------------
|
||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
http://lammps.sandia.gov, Sandia National Laboratories
|
||||
Steve Plimpton, sjplimp@sandia.gov
|
||||
|
||||
Copyright (2003) Sandia Corporation. Under the terms of Contract
|
||||
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
|
||||
certain rights in this software. This software is distributed under
|
||||
the GNU General Public License.
|
||||
|
||||
See the README file in the top-level LAMMPS directory.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#ifdef ANGLE_CLASS
|
||||
|
||||
AngleStyle(cosine/buck6d, AngleCosineBuck6d)
|
||||
|
||||
#else
|
||||
|
||||
#ifndef LMP_ANGLE_COSINE_BUCK6D_H
|
||||
#define LMP_ANGLE_COSINE_BUCK6D_H
|
||||
|
||||
#include <stdio.h>
|
||||
#include "angle.h"
|
||||
|
||||
namespace LAMMPS_NS {
|
||||
|
||||
class AngleCosineBuck6d : public Angle {
|
||||
public:
|
||||
AngleCosineBuck6d(class LAMMPS *);
|
||||
virtual ~AngleCosineBuck6d();
|
||||
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);
|
||||
|
||||
protected:
|
||||
double *k,*th0;
|
||||
double *eps,*d0;
|
||||
double **buck6d1,**buck6d2,**buck6d3,**buck6d4,**cut_ljsq;
|
||||
double **c0,**c1,**c2,**c3,**c4,**c5,**rsmooth_sq,**offset;
|
||||
int *multiplicity;
|
||||
|
||||
void allocate();
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* ERROR/WARNING messages:
|
||||
|
||||
E: Incorrect args for angle coefficients
|
||||
|
||||
Self-explanatory. Check the input script or data file.
|
||||
|
||||
*/
|
||||
337
src/USER-MOFFF/improper_inversion_harmonic.cpp
Normal file
337
src/USER-MOFFF/improper_inversion_harmonic.cpp
Normal file
@ -0,0 +1,337 @@
|
||||
/* ----------------------------------------------------------------------
|
||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
http://lammps.sandia.gov, Sandia National Laboratories
|
||||
Steve Plimpton, sjplimp@sandia.gov
|
||||
|
||||
Copyright (2003) Sandia Corporation. Under the terms of Contract
|
||||
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
|
||||
certain rights in this software. This software is distributed under
|
||||
the GNU General Public License.
|
||||
|
||||
See the README file in the top-level LAMMPS directory.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
Contributing author: Hendrik Heenen (Technical University of Munich)
|
||||
and Rochus Schmid (Ruhr-Universitaet Bochum)
|
||||
[ based on improper_fourier.cpp Loukas D. Peristeras (Scienomics SARL) ]
|
||||
[ based on improper_umbrella.cpp Tod A Pascal (Caltech) ]
|
||||
[ abbreviated from and verified via DLPOLY2.0 ]
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include <mpi.h>
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
#include "string.h"
|
||||
#include "improper_inversion_harmonic.h"
|
||||
#include "atom.h"
|
||||
#include "comm.h"
|
||||
#include "neighbor.h"
|
||||
#include "domain.h"
|
||||
#include "force.h"
|
||||
#include "update.h"
|
||||
#include "math_const.h"
|
||||
#include "memory.h"
|
||||
#include "error.h"
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
using namespace MathConst;
|
||||
|
||||
#define TOLERANCE 0.05
|
||||
#define SMALL 0.001
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
ImproperInversionHarmonic::ImproperInversionHarmonic(LAMMPS *lmp) : Improper(lmp)
|
||||
{
|
||||
writedata = 1;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
ImproperInversionHarmonic::~ImproperInversionHarmonic()
|
||||
{
|
||||
if (allocated) {
|
||||
memory->destroy(setflag);
|
||||
memory->destroy(kw);
|
||||
memory->destroy(w0);
|
||||
}
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void ImproperInversionHarmonic::compute(int eflag, int vflag)
|
||||
{
|
||||
int i1,i2,i3,i4,n,type;
|
||||
double vb1x,vb1y,vb1z,vb2x,vb2y,vb2z,vb3x,vb3y,vb3z;
|
||||
double rrvb1,rrvb2,rrvb3,rr2vb1,rr2vb2,rr2vb3;
|
||||
|
||||
if (eflag || vflag) ev_setup(eflag,vflag);
|
||||
else evflag = 0;
|
||||
|
||||
double **x = atom->x;
|
||||
int **improperlist = neighbor->improperlist;
|
||||
int nimproperlist = neighbor->nimproperlist;
|
||||
|
||||
for (n = 0; n < nimproperlist; n++) {
|
||||
i1 = improperlist[n][0];
|
||||
i2 = improperlist[n][1];
|
||||
i3 = improperlist[n][2];
|
||||
i4 = improperlist[n][3];
|
||||
type = improperlist[n][4];
|
||||
|
||||
// 1st bond - IJ
|
||||
|
||||
vb1x = x[i2][0] - x[i1][0];
|
||||
vb1y = x[i2][1] - x[i1][1];
|
||||
vb1z = x[i2][2] - x[i1][2];
|
||||
rrvb1 = 1.0/sqrt(vb1x*vb1x+vb1y*vb1y+vb1z*vb1z);
|
||||
rr2vb1 = rrvb1*rrvb1;
|
||||
|
||||
// 2nd bond - IK
|
||||
|
||||
vb2x = x[i3][0] - x[i1][0];
|
||||
vb2y = x[i3][1] - x[i1][1];
|
||||
vb2z = x[i3][2] - x[i1][2];
|
||||
rrvb2 = 1.0/sqrt(vb2x*vb2x+vb2y*vb2y+vb2z*vb2z);
|
||||
rr2vb2 = rrvb2*rrvb2;
|
||||
|
||||
// 3rd bond - IL
|
||||
|
||||
vb3x = x[i4][0] - x[i1][0];
|
||||
vb3y = x[i4][1] - x[i1][1];
|
||||
vb3z = x[i4][2] - x[i1][2];
|
||||
rrvb3 = 1.0/sqrt(vb3x*vb3x+vb3y*vb3y+vb3z*vb3z);
|
||||
rr2vb3 = rrvb3*rrvb3;
|
||||
|
||||
// compute all three inversion angles
|
||||
invang(i1,i2,i3,i4, type,evflag,eflag,
|
||||
vb3x, vb3y, vb3z, rrvb3, rr2vb3,
|
||||
vb2x, vb2y, vb2z, rrvb2, rr2vb2,
|
||||
vb1x, vb1y, vb1z, rrvb1, rr2vb1);
|
||||
invang(i1,i3,i4,i2, type,evflag,eflag,
|
||||
vb1x, vb1y, vb1z, rrvb1, rr2vb1,
|
||||
vb3x, vb3y, vb3z, rrvb3, rr2vb3,
|
||||
vb2x, vb2y, vb2z, rrvb2, rr2vb2);
|
||||
invang(i1,i4,i2,i3, type,evflag,eflag,
|
||||
vb2x, vb2y, vb2z, rrvb2, rr2vb2,
|
||||
vb1x, vb1y, vb1z, rrvb1, rr2vb1,
|
||||
vb3x, vb3y, vb3z, rrvb3, rr2vb3);
|
||||
}
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
compute inversion angles + energy and forces
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void ImproperInversionHarmonic::invang(const int &i1,const int &i2,
|
||||
const int &i3,const int &i4,
|
||||
const int &type,const int &evflag,const int &eflag,
|
||||
const double &vb1x, const double &vb1y, const double &vb1z,
|
||||
const double &rrvb1, const double &rr2vb1,
|
||||
const double &vb2x, const double &vb2y, const double &vb2z,
|
||||
const double &rrvb2, const double &rr2vb2,
|
||||
const double &vb3x, const double &vb3y, const double &vb3z,
|
||||
const double &rrvb3, const double &rr2vb3)
|
||||
{
|
||||
double eimproper,f1[3],f2[3],f3[3],f4[3];
|
||||
double omega,cosomega,domega,gomega,rjk,rjl;
|
||||
double upx,upy,upz,upn,rup,umx,umy,umz,umn,rum,wwr;
|
||||
double rucb,rudb,rvcb,rvdb,rupupn,rumumn;
|
||||
|
||||
double **x = atom->x;
|
||||
double **f = atom->f;
|
||||
int nlocal = atom->nlocal;
|
||||
int newton_bond = force->newton_bond;
|
||||
|
||||
eimproper = 0.0;
|
||||
|
||||
// scalar products of IJ*IK and IJ*IL
|
||||
rjk=vb3x*vb2x+vb3y*vb2y+vb3z*vb2z;
|
||||
rjl=vb1x*vb3x+vb1y*vb3y+vb1z*vb3z;
|
||||
|
||||
// unit-vector: IK+IL
|
||||
upx=vb2x*rrvb2+vb1x*rrvb1;
|
||||
upy=vb2y*rrvb2+vb1y*rrvb1;
|
||||
upz=vb2z*rrvb2+vb1z*rrvb1;
|
||||
upn=1.0/sqrt(upx*upx+upy*upy+upz*upz);
|
||||
upx=upx*upn;
|
||||
upy=upy*upn;
|
||||
upz=upz*upn;
|
||||
rup=vb3x*upx+vb3y*upy+vb3z*upz;
|
||||
|
||||
// unit-vector: IK-IL
|
||||
umx=vb2x*rrvb2-vb1x*rrvb1;
|
||||
umy=vb2y*rrvb2-vb1y*rrvb1;
|
||||
umz=vb2z*rrvb2-vb1z*rrvb1;
|
||||
umn=1.0/sqrt(umx*umx+umy*umy+umz*umz);
|
||||
umx=umx*umn;
|
||||
umy=umy*umn;
|
||||
umz=umz*umn;
|
||||
rum=vb3x*umx+vb3y*umy+vb3z*umz;
|
||||
|
||||
// angle theta
|
||||
wwr=sqrt(rup*rup+rum*rum);
|
||||
|
||||
cosomega=wwr*rrvb3;
|
||||
|
||||
if (cosomega > 1.0) cosomega = 1.0;
|
||||
|
||||
omega=acos(cosomega);
|
||||
|
||||
domega = acos(cosomega)-w0[type];
|
||||
if (eflag) eimproper = kw[type]*(domega*domega);
|
||||
|
||||
// kw[type] is divided by 3 -> threefold contribution
|
||||
gomega=0.0;
|
||||
if (omega*omega > 1.0e-24) gomega=2.0*kw[type]*(domega)/(sin(omega));
|
||||
|
||||
// projection IK and IL on unit vectors and contribution on IK and IL
|
||||
rucb = rjk-rup*(vb2x*upx+vb2y*upy+vb2z*upz);
|
||||
rudb = rjl-rup*(vb1x*upx+vb1y*upy+vb1z*upz);
|
||||
rvcb = rjk-rum*(vb2x*umx+vb2y*umy+vb2z*umz);
|
||||
rvdb = rjl-rum*(vb1x*umx+vb1y*umy+vb1z*umz);
|
||||
|
||||
rupupn = rup*upn;
|
||||
rumumn = rum*umn;
|
||||
|
||||
// force contributions of angle
|
||||
f2[0]=gomega*(-cosomega*vb3x*rr2vb3+rrvb3*(rup*upx+rum*umx)/wwr);
|
||||
f2[1]=gomega*(-cosomega*vb3y*rr2vb3+rrvb3*(rup*upy+rum*umy)/wwr);
|
||||
f2[2]=gomega*(-cosomega*vb3z*rr2vb3+rrvb3*(rup*upz+rum*umz)/wwr);
|
||||
|
||||
f3[0]=gomega*rrvb3*(rupupn*rrvb2*(vb3x-rup*upx-rucb*vb2x*rr2vb2) +
|
||||
rumumn*rrvb2*(vb3x-rum*umx-rvcb*vb2x*rr2vb2))/wwr;
|
||||
f3[1]=gomega*rrvb3*(rupupn*rrvb2*(vb3y-rup*upy-rucb*vb2y*rr2vb2) +
|
||||
rumumn*rrvb2*(vb3y-rum*umy-rvcb*vb2y*rr2vb2))/wwr;
|
||||
f3[2]=gomega*rrvb3*(rupupn*rrvb2*(vb3z-rup*upz-rucb*vb2z*rr2vb2) +
|
||||
rumumn*rrvb2*(vb3z-rum*umz-rvcb*vb2z*rr2vb2))/wwr;
|
||||
|
||||
f4[0]=gomega*rrvb3*(rupupn*rrvb1*(vb3x-rup*upx-rudb*vb1x*rr2vb1) -
|
||||
rumumn*rrvb1*(vb3x-rum*umx-rvdb*vb1x*rr2vb1))/wwr;
|
||||
f4[1]=gomega*rrvb3*(rupupn*rrvb1*(vb3y-rup*upy-rudb*vb1y*rr2vb1) -
|
||||
rumumn*rrvb1*(vb3y-rum*umy-rvdb*vb1y*rr2vb1))/wwr;
|
||||
f4[2]=gomega*rrvb3*(rupupn*rrvb1*(vb3z-rup*upz-rudb*vb1z*rr2vb1) -
|
||||
rumumn*rrvb1*(vb3z-rum*umz-rvdb*vb1z*rr2vb1))/wwr;
|
||||
|
||||
f1[0] = -(f2[0] + f3[0] + f4[0]);
|
||||
f1[1] = -(f2[1] + f3[1] + f4[1]);
|
||||
f1[2] = -(f2[2] + f3[2] + f4[2]);
|
||||
|
||||
if (newton_bond || i1 < nlocal) {
|
||||
f[i1][0] += f1[0];
|
||||
f[i1][1] += f1[1];
|
||||
f[i1][2] += f1[2];
|
||||
}
|
||||
|
||||
if (newton_bond || i2 < nlocal) {
|
||||
f[i2][0] += f2[0];
|
||||
f[i2][1] += f2[1];
|
||||
f[i2][2] += f2[2];
|
||||
}
|
||||
|
||||
if (newton_bond || i3 < nlocal) {
|
||||
f[i3][0] += f3[0];
|
||||
f[i3][1] += f3[1];
|
||||
f[i3][2] += f3[2];
|
||||
}
|
||||
|
||||
if (newton_bond || i4 < nlocal) {
|
||||
f[i4][0] += f4[0];
|
||||
f[i4][1] += f4[1];
|
||||
f[i4][2] += f4[2];
|
||||
}
|
||||
|
||||
double rb1x, rb1y, rb1z, rb2x, rb2y, rb2z, rb3x, rb3y, rb3z;
|
||||
if (evflag)
|
||||
|
||||
rb3x = vb1x - vb2x;
|
||||
rb3y = vb1y - vb2y;
|
||||
rb3z = vb1z - vb2z;
|
||||
|
||||
ev_tally(i1,i2,i3,i4,nlocal,newton_bond,eimproper,f2,f3,f4,
|
||||
vb3x,vb3y,vb3z,
|
||||
vb2x,vb2y,vb2z,
|
||||
rb3x,rb3y,rb3z);
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void ImproperInversionHarmonic::allocate()
|
||||
{
|
||||
allocated = 1;
|
||||
int n = atom->nimpropertypes;
|
||||
|
||||
memory->create(kw,n+1,"improper:kw");
|
||||
memory->create(w0,n+1,"improper:w0");
|
||||
|
||||
memory->create(setflag,n+1,"improper:setflag");
|
||||
for (int i = 1; i <= n; i++) setflag[i] = 0;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
set coeffs for one type
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void ImproperInversionHarmonic::coeff(int narg, char **arg)
|
||||
{
|
||||
|
||||
if (narg != 3) error->all(FLERR,"Incorrect args for improper coefficients");
|
||||
if (!allocated) allocate();
|
||||
|
||||
int ilo,ihi;
|
||||
force->bounds(FLERR,arg[0],atom->nimpropertypes,ilo,ihi);
|
||||
|
||||
double k_one = force->numeric(FLERR,arg[1]);
|
||||
double w_one = force->numeric(FLERR,arg[2]);
|
||||
|
||||
// convert w0 from degrees to radians
|
||||
|
||||
int count = 0;
|
||||
for (int i = ilo; i <= ihi; i++) {
|
||||
kw[i] = k_one/3.0; // parameter division due to 3 vector averaging
|
||||
w0[i] = w_one/180.0 * MY_PI;
|
||||
setflag[i] = 1;
|
||||
count++;
|
||||
}
|
||||
|
||||
if (count == 0) error->all(FLERR,"Incorrect args for improper coefficients");
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
proc 0 writes out coeffs to restart file
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void ImproperInversionHarmonic::write_restart(FILE *fp)
|
||||
{
|
||||
fwrite(&kw[1],sizeof(double),atom->nimpropertypes,fp);
|
||||
fwrite(&w0[1],sizeof(double),atom->nimpropertypes,fp);
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
proc 0 reads coeffs from restart file, bcasts them
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void ImproperInversionHarmonic::read_restart(FILE *fp)
|
||||
{
|
||||
allocate();
|
||||
|
||||
if (comm->me == 0) {
|
||||
fread(&kw[1],sizeof(double),atom->nimpropertypes,fp);
|
||||
fread(&w0[1],sizeof(double),atom->nimpropertypes,fp);
|
||||
}
|
||||
MPI_Bcast(&kw[1],atom->nimpropertypes,MPI_DOUBLE,0,world);
|
||||
MPI_Bcast(&w0[1],atom->nimpropertypes,MPI_DOUBLE,0,world);
|
||||
|
||||
for (int i = 1; i <= atom->nimpropertypes; i++) setflag[i] = 1;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
proc 0 writes to data file
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void ImproperInversionHarmonic::write_data(FILE *fp)
|
||||
{
|
||||
for (int i = 1; i <= atom->nimpropertypes; i++)
|
||||
fprintf(fp,"%d %g %g\n",i,kw[i],w0[i]/MY_PI*180.0);
|
||||
}
|
||||
54
src/USER-MOFFF/improper_inversion_harmonic.h
Normal file
54
src/USER-MOFFF/improper_inversion_harmonic.h
Normal file
@ -0,0 +1,54 @@
|
||||
/* -*- c++ -*- ----------------------------------------------------------
|
||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
http://lammps.sandia.gov, Sandia National Laboratories
|
||||
Steve Plimpton, sjplimp@sandia.gov
|
||||
|
||||
Copyright (2003) Sandia Corporation. Under the terms of Contract
|
||||
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
|
||||
certain rights in this software. This software is distributed under
|
||||
the GNU General Public License.
|
||||
|
||||
See the README file in the top-level LAMMPS directory.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#ifdef IMPROPER_CLASS
|
||||
|
||||
ImproperStyle(inversion/harmonic,ImproperInversionHarmonic)
|
||||
|
||||
#else
|
||||
|
||||
#ifndef LMP_IMPROPER_INVERSION_HARMONIC_H
|
||||
#define LMP_IMPROPER_INVERSION_HARMONIC_H
|
||||
|
||||
#include <stdio.h>
|
||||
#include "improper.h"
|
||||
|
||||
namespace LAMMPS_NS {
|
||||
|
||||
class ImproperInversionHarmonic : public Improper {
|
||||
public:
|
||||
ImproperInversionHarmonic(class LAMMPS *);
|
||||
virtual ~ImproperInversionHarmonic();
|
||||
virtual void compute(int, int);
|
||||
void coeff(int, char **);
|
||||
void write_restart(FILE *);
|
||||
void read_restart(FILE *);
|
||||
void write_data(FILE *);
|
||||
|
||||
protected:
|
||||
double *kw, *w0;
|
||||
void invang(const int &i1,const int &i2,const int &i3,const int &i4,
|
||||
const int &type,const int &evflag,const int &eflag,
|
||||
const double &vb1x, const double &vb1y, const double &vb1z,
|
||||
const double &rrvb1, const double &rr2vb1,
|
||||
const double &vb2x, const double &vb2y, const double &vb2z,
|
||||
const double &rrvb2, const double &rr2vb2,
|
||||
const double &vb3x, const double &vb3y, const double &vb3z,
|
||||
const double &rrvb3, const double &rr2vb3);
|
||||
void allocate();
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
590
src/USER-MOFFF/pair_buck6d_coul_gauss_dsf.cpp
Normal file
590
src/USER-MOFFF/pair_buck6d_coul_gauss_dsf.cpp
Normal file
@ -0,0 +1,590 @@
|
||||
/* ----------------------------------------------------------------------
|
||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
http://lammps.sandia.gov, Sandia National Laboratories
|
||||
Steve Plimpton, sjplimp@sandia.gov
|
||||
|
||||
Copyright (2003) Sandia Corporation. Under the terms of Contract
|
||||
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
|
||||
certain rights in this software. This software is distributed under
|
||||
the GNU General Public License.
|
||||
|
||||
See the README file in the top-level LAMMPS directory.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
Contributing author: Hendrik Heenen (Technical University of Munich)
|
||||
and Rochus Schmid (Ruhr-Universitaet Bochum)
|
||||
References: Bureekaew and Schmid, Phys. Status Solidi B 250, 1128 (2013)
|
||||
Fennell and Gezelter, JCP 124, 234104 (2006)
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "pair_buck6d_coul_gauss_dsf.h"
|
||||
#include "atom.h"
|
||||
#include "comm.h"
|
||||
#include "force.h"
|
||||
#include "neighbor.h"
|
||||
#include "neigh_list.h"
|
||||
#include "memory.h"
|
||||
#include "math_const.h"
|
||||
#include "error.h"
|
||||
#include "math_special.h"
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
using namespace MathConst;
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
PairBuck6dCoulGaussDSF::PairBuck6dCoulGaussDSF(LAMMPS *lmp) : Pair(lmp)
|
||||
{
|
||||
single_enable = 1;
|
||||
writedata = 1;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
PairBuck6dCoulGaussDSF::~PairBuck6dCoulGaussDSF()
|
||||
{
|
||||
if (!copymode) {
|
||||
if (allocated) {
|
||||
memory->destroy(setflag);
|
||||
memory->destroy(cutsq);
|
||||
|
||||
memory->destroy(cut_lj);
|
||||
memory->destroy(cut_ljsq);
|
||||
memory->destroy(alpha_ij);
|
||||
memory->destroy(f_shift_ij);
|
||||
memory->destroy(e_shift_ij);
|
||||
memory->destroy(buck6d1);
|
||||
memory->destroy(buck6d2);
|
||||
memory->destroy(buck6d3);
|
||||
memory->destroy(buck6d4);
|
||||
memory->destroy(c0);
|
||||
memory->destroy(c1);
|
||||
memory->destroy(c2);
|
||||
memory->destroy(c3);
|
||||
memory->destroy(c4);
|
||||
memory->destroy(c5);
|
||||
memory->destroy(rsmooth_sq);
|
||||
memory->destroy(offset);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void PairBuck6dCoulGaussDSF::compute(int eflag, int vflag)
|
||||
{
|
||||
int i,j,ii,jj,inum,jnum,itype,jtype;
|
||||
double qtmp,xtmp,ytmp,ztmp,delx,dely,delz,evdwl,ecoul,fpair;
|
||||
double r,rsq,r2inv,r6inv,r14inv,rexp,forcecoul,forcebuck6d,factor_coul,factor_lj;
|
||||
double term1,term2,term3,term4,term5;
|
||||
double rcu,rqu,sme,smf,ebuck6d;
|
||||
double prefactor,erfcc,erfcd,t,arg;
|
||||
int *ilist,*jlist,*numneigh,**firstneigh;
|
||||
|
||||
evdwl = ecoul = 0.0;
|
||||
if (eflag || vflag) ev_setup(eflag,vflag);
|
||||
else evflag = vflag_fdotr = 0;
|
||||
|
||||
double **x = atom->x;
|
||||
double **f = atom->f;
|
||||
double *q = atom->q;
|
||||
int *type = atom->type;
|
||||
int nlocal = atom->nlocal;
|
||||
double *special_lj = force->special_lj;
|
||||
double *special_coul = force->special_coul;
|
||||
int newton_pair = force->newton_pair;
|
||||
double qqrd2e = force->qqrd2e;
|
||||
|
||||
inum = list->inum;
|
||||
ilist = list->ilist;
|
||||
numneigh = list->numneigh;
|
||||
firstneigh = list->firstneigh;
|
||||
|
||||
// loop over neighbors of my atoms
|
||||
|
||||
for (ii = 0; ii < inum; ii++) {
|
||||
i = ilist[ii];
|
||||
qtmp = q[i];
|
||||
xtmp = x[i][0];
|
||||
ytmp = x[i][1];
|
||||
ztmp = x[i][2];
|
||||
itype = type[i];
|
||||
jlist = firstneigh[i];
|
||||
jnum = numneigh[i];
|
||||
|
||||
for (jj = 0; jj < jnum; jj++) {
|
||||
j = jlist[jj];
|
||||
factor_lj = special_lj[sbmask(j)];
|
||||
factor_coul = special_coul[sbmask(j)];
|
||||
j &= NEIGHMASK;
|
||||
|
||||
delx = xtmp - x[j][0];
|
||||
dely = ytmp - x[j][1];
|
||||
delz = ztmp - x[j][2];
|
||||
rsq = delx*delx + dely*dely + delz*delz;
|
||||
jtype = type[j];
|
||||
|
||||
if (rsq < cutsq[itype][jtype]) {
|
||||
r2inv = 1.0/rsq;
|
||||
r = sqrt(rsq);
|
||||
|
||||
if (rsq < cut_ljsq[itype][jtype]) {
|
||||
r6inv = r2inv*r2inv*r2inv;
|
||||
r14inv = r6inv*r6inv*r2inv;
|
||||
rexp = exp(-r*buck6d2[itype][jtype]);
|
||||
term1 = buck6d3[itype][jtype]*r6inv;
|
||||
term2 = buck6d4[itype][jtype]*r14inv;
|
||||
term3 = term2*term2;
|
||||
term4 = 1.0/(1.0 + term2);
|
||||
term5 = 1.0/(1.0 + 2.0*term2 + term3);
|
||||
forcebuck6d = buck6d1[itype][jtype]*buck6d2[itype][jtype]*r*rexp;
|
||||
forcebuck6d -= term1*(6.0*term4 - term5*14.0*term2);
|
||||
ebuck6d = buck6d1[itype][jtype]*rexp - term1*term4;
|
||||
|
||||
// smoothing term
|
||||
if (rsq > rsmooth_sq[itype][jtype]) {
|
||||
rcu = r*rsq;
|
||||
rqu = rsq*rsq;
|
||||
sme = c5[itype][jtype]*rqu*r + c4[itype][jtype]*rqu + c3[itype][jtype]*rcu +
|
||||
c2[itype][jtype]*rsq + c1[itype][jtype]*r + c0[itype][jtype];
|
||||
smf = 5.0*c5[itype][jtype]*rqu + 4.0*c4[itype][jtype]*rcu +
|
||||
3.0*c3[itype][jtype]*rsq + 2.0*c2[itype][jtype]*r + c1[itype][jtype];
|
||||
// forcebuck6d is -dE/dr*r
|
||||
forcebuck6d = forcebuck6d*sme - ebuck6d*smf*r; //RS was here: changed this from +E*smf to -E*smf*r
|
||||
ebuck6d *= sme;
|
||||
}
|
||||
} else forcebuck6d = 0.0;
|
||||
|
||||
if (rsq < cut_coulsq) {
|
||||
prefactor = qqrd2e*qtmp*q[j]/r;
|
||||
|
||||
//below: parametrization for erfcc = erf(alpha_ij[itype][jtype]*r);
|
||||
arg = alpha_ij[itype][jtype]*r;
|
||||
erfcd = MathSpecial::expmsq(arg);
|
||||
erfcc = 1 - (MathSpecial::my_erfcx(arg) * erfcd);
|
||||
|
||||
forcecoul = prefactor * ((erfcc/r) - (2.0/MY_PIS*alpha_ij[itype][jtype]*erfcd) +
|
||||
r*f_shift_ij[itype][jtype]) * r;
|
||||
|
||||
if (factor_coul < 1.0) forcecoul -= (1.0-factor_coul)*prefactor;
|
||||
} else forcecoul = 0.0;
|
||||
|
||||
fpair = (forcecoul + factor_lj*forcebuck6d) * r2inv;
|
||||
f[i][0] += delx*fpair;
|
||||
f[i][1] += dely*fpair;
|
||||
f[i][2] += delz*fpair;
|
||||
if (newton_pair || j < nlocal) {
|
||||
f[j][0] -= delx*fpair;
|
||||
f[j][1] -= dely*fpair;
|
||||
f[j][2] -= delz*fpair;
|
||||
}
|
||||
|
||||
if (eflag) {
|
||||
if (rsq < cut_ljsq[itype][jtype]) {
|
||||
evdwl = ebuck6d - offset[itype][jtype];
|
||||
evdwl *= factor_lj;
|
||||
} else evdwl = 0.0;
|
||||
|
||||
if (rsq < cut_coulsq) {
|
||||
ecoul = prefactor * (erfcc - r*e_shift_ij[itype][jtype] -
|
||||
rsq*f_shift_ij[itype][jtype]);
|
||||
if (factor_coul < 1.0) ecoul -= (1.0-factor_coul)*prefactor;
|
||||
} else ecoul = 0.0;
|
||||
}
|
||||
|
||||
if (evflag) ev_tally(i,j,nlocal,newton_pair,
|
||||
evdwl,ecoul,fpair,delx,dely,delz);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (vflag_fdotr) virial_fdotr_compute();
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
allocate all arrays
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void PairBuck6dCoulGaussDSF::allocate()
|
||||
{
|
||||
allocated = 1;
|
||||
int n = atom->ntypes;
|
||||
|
||||
memory->create(setflag,n+1,n+1,"pair:setflag");
|
||||
for (int i = 1; i <= n; i++)
|
||||
for (int j = i; j <= n; j++)
|
||||
setflag[i][j] = 0;
|
||||
|
||||
memory->create(cutsq,n+1,n+1,"pair:cutsq");
|
||||
|
||||
memory->create(cut_lj,n+1,n+1,"pair:cut_lj");
|
||||
memory->create(cut_ljsq,n+1,n+1,"pair:cut_ljsq");
|
||||
memory->create(alpha_ij,n+1,n+1,"pair:alpha_ij");
|
||||
memory->create(f_shift_ij,n+1,n+1,"pair:f_shift_ij");
|
||||
memory->create(e_shift_ij,n+1,n+1,"pair:e_shift_ij");
|
||||
memory->create(buck6d1,n+1,n+1,"pair:buck6d1");
|
||||
memory->create(buck6d2,n+1,n+1,"pair:buck6d2");
|
||||
memory->create(buck6d3,n+1,n+1,"pair:buck6d3");
|
||||
memory->create(buck6d4,n+1,n+1,"pair:buck6d4");
|
||||
memory->create(c0,n+1,n+1,"pair:c0");
|
||||
memory->create(c1,n+1,n+1,"pair:c1");
|
||||
memory->create(c2,n+1,n+1,"pair:c2");
|
||||
memory->create(c3,n+1,n+1,"pair:c3");
|
||||
memory->create(c4,n+1,n+1,"pair:c4");
|
||||
memory->create(c5,n+1,n+1,"pair:c5");
|
||||
memory->create(rsmooth_sq,n+1,n+1,"pair:rsmooth_sq");
|
||||
memory->create(offset,n+1,n+1,"pair:offset");
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
global settings
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void PairBuck6dCoulGaussDSF::settings(int narg, char **arg)
|
||||
{
|
||||
if (narg < 2 || narg > 3) error->all(FLERR,"Illegal pair_style command");
|
||||
|
||||
vdwl_smooth = force->numeric(FLERR,arg[0]);
|
||||
|
||||
cut_lj_global = force->numeric(FLERR,arg[1]);
|
||||
if (narg == 2) cut_coul = cut_lj_global;
|
||||
else cut_coul = force->numeric(FLERR,arg[2]);
|
||||
|
||||
// reset cutoffs that have been explicitly set
|
||||
|
||||
if (allocated) {
|
||||
int i,j;
|
||||
for (i = 1; i <= atom->ntypes; i++)
|
||||
for (j = i+1; j <= atom->ntypes; j++)
|
||||
if (setflag[i][j])
|
||||
cut_lj[i][j] = cut_lj_global;
|
||||
}
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
set coeffs for one or more type pairs
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void PairBuck6dCoulGaussDSF::coeff(int narg, char **arg)
|
||||
{
|
||||
if (narg < 7 || narg > 8)
|
||||
error->all(FLERR,"Incorrect args for pair coefficients");
|
||||
if (!allocated) allocate();
|
||||
|
||||
int ilo,ihi,jlo,jhi;
|
||||
force->bounds(FLERR,arg[0],atom->ntypes,ilo,ihi);
|
||||
force->bounds(FLERR,arg[1],atom->ntypes,jlo,jhi);
|
||||
|
||||
double buck6d1_one = force->numeric(FLERR,arg[2]);
|
||||
double buck6d2_one = force->numeric(FLERR,arg[3]);
|
||||
double buck6d3_one = force->numeric(FLERR,arg[4]);
|
||||
double buck6d4_one = force->numeric(FLERR,arg[5]);
|
||||
double alpha_one = force->numeric(FLERR,arg[6]);
|
||||
|
||||
double cut_lj_one = cut_lj_global;
|
||||
if (narg == 8) cut_lj_one = force->numeric(FLERR,arg[7]);
|
||||
|
||||
int count = 0;
|
||||
for (int i = ilo; i <= ihi; i++) {
|
||||
for (int j = MAX(jlo,i); j <= jhi; j++) {
|
||||
buck6d1[i][j] = buck6d1_one;
|
||||
buck6d2[i][j] = buck6d2_one;
|
||||
buck6d3[i][j] = buck6d3_one;
|
||||
buck6d4[i][j] = buck6d4_one;
|
||||
alpha_ij[i][j] = alpha_one;
|
||||
cut_lj[i][j] = cut_lj_one;
|
||||
setflag[i][j] = 1;
|
||||
count++;
|
||||
}
|
||||
}
|
||||
|
||||
if (count == 0) error->all(FLERR,"Incorrect args for pair coefficients");
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
init specific to this pair style
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void PairBuck6dCoulGaussDSF::init_style()
|
||||
{
|
||||
if (!atom->q_flag)
|
||||
error->all(FLERR,"Pair style buck6d/coul/dsf requires atom attribute q");
|
||||
|
||||
neighbor->request(this,instance_me);
|
||||
|
||||
cut_coulsq = cut_coul * cut_coul;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
init for one type pair i,j and corresponding j,i
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
double PairBuck6dCoulGaussDSF::init_one(int i, int j)
|
||||
{
|
||||
if (setflag[i][j] == 0) error->all(FLERR,"All pair coeffs are not set");
|
||||
|
||||
double cut = MAX(cut_lj[i][j],cut_coul);
|
||||
cut_ljsq[i][j] = cut_lj[i][j] * cut_lj[i][j];
|
||||
|
||||
//calculation of smoothing coefficients c0-c5
|
||||
c0[i][j] = c1[i][j] = c2[i][j] = c3[i][j] = c4[i][j] = c5[i][j] = 0.0;
|
||||
rsmooth_sq[i][j] = cut_ljsq[i][j];
|
||||
if (vdwl_smooth < 1.0) {
|
||||
double rsm = vdwl_smooth * cut_lj[i][j];
|
||||
double rsm_sq = rsm * rsm;
|
||||
double denom = pow((cut_lj[i][j]-rsm),5.0);
|
||||
c0[i][j] = cut_lj[i][j]*cut_ljsq[i][j]*(cut_ljsq[i][j]-
|
||||
5.0*cut_lj[i][j]*rsm+10.0*rsm_sq)/denom;
|
||||
c1[i][j] = -30.0*(cut_ljsq[i][j]*rsm_sq)/denom;
|
||||
c2[i][j] = 30.0*(cut_ljsq[i][j]*rsm + cut_lj[i][j]*rsm_sq)/denom;
|
||||
c3[i][j] = -10.0*(cut_ljsq[i][j] + 4.0*cut_lj[i][j]*rsm + rsm_sq)/denom;
|
||||
c4[i][j] = 15.0*(cut_lj[i][j]+rsm)/denom;
|
||||
c5[i][j] = -6.0/denom;
|
||||
rsmooth_sq[i][j] = rsm_sq;
|
||||
}
|
||||
|
||||
// if offset_flag, shift is only invoked if there is not already smoothing
|
||||
if (offset_flag && vdwl_smooth >= 1.0) {
|
||||
double term1 = buck6d3[i][j]/pow(cut_lj[i][j],6.0);
|
||||
double term4 = 1.0/(1.0 + (buck6d4[i][j]/pow(cut_lj[i][j],14.0)));
|
||||
double rexp = exp(-cut_lj[i][j]*buck6d2[i][j]);
|
||||
offset[i][j] = buck6d1[i][j]*rexp - term1*term4;
|
||||
} else offset[i][j] = 0.0;
|
||||
|
||||
double erfcd_c = exp(-alpha_ij[i][j]*alpha_ij[i][j]*cut_coul*cut_coul);
|
||||
double erfcc_c = erf(alpha_ij[i][j]*cut_coul);
|
||||
f_shift_ij[i][j] = -erfcc_c/cut_coulsq + 2.0/MY_PIS*alpha_ij[i][j]*erfcd_c/cut_coul;
|
||||
e_shift_ij[i][j] = erfcc_c/cut_coul - f_shift_ij[i][j]*cut_coul;
|
||||
|
||||
cut_ljsq[j][i] = cut_ljsq[i][j];
|
||||
alpha_ij[j][i] = alpha_ij[i][j];
|
||||
f_shift_ij[j][i] = f_shift_ij[i][j];
|
||||
e_shift_ij[j][i] = e_shift_ij[i][j];
|
||||
buck6d1[j][i] = buck6d1[i][j];
|
||||
buck6d2[j][i] = buck6d2[i][j];
|
||||
buck6d3[j][i] = buck6d3[i][j];
|
||||
buck6d4[j][i] = buck6d4[i][j];
|
||||
c0[j][i] = c0[i][j];
|
||||
c1[j][i] = c1[i][j];
|
||||
c2[j][i] = c2[i][j];
|
||||
c3[j][i] = c3[i][j];
|
||||
c4[j][i] = c4[i][j];
|
||||
c5[j][i] = c5[i][j];
|
||||
rsmooth_sq[j][i] = rsmooth_sq[i][j];
|
||||
offset[j][i] = offset[i][j];
|
||||
|
||||
return cut;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
proc 0 writes to restart file
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void PairBuck6dCoulGaussDSF::write_restart(FILE *fp)
|
||||
{
|
||||
write_restart_settings(fp);
|
||||
|
||||
int i,j;
|
||||
for (i = 1; i <= atom->ntypes; i++)
|
||||
for (j = i; j <= atom->ntypes; j++) {
|
||||
fwrite(&setflag[i][j],sizeof(int),1,fp);
|
||||
if (setflag[i][j]) {
|
||||
fwrite(&buck6d1[i][j],sizeof(double),1,fp);
|
||||
fwrite(&buck6d2[i][j],sizeof(double),1,fp);
|
||||
fwrite(&buck6d3[i][j],sizeof(double),1,fp);
|
||||
fwrite(&buck6d4[i][j],sizeof(double),1,fp);
|
||||
fwrite(&alpha_ij[i][j],sizeof(double),1,fp);
|
||||
fwrite(&cut_lj[i][j],sizeof(double),1,fp);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
proc 0 reads from restart file, bcasts
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void PairBuck6dCoulGaussDSF::read_restart(FILE *fp)
|
||||
{
|
||||
read_restart_settings(fp);
|
||||
allocate();
|
||||
|
||||
int i,j;
|
||||
int me = comm->me;
|
||||
for (i = 1; i <= atom->ntypes; i++)
|
||||
for (j = i; j <= atom->ntypes; j++) {
|
||||
if (me == 0) fread(&setflag[i][j],sizeof(int),1,fp);
|
||||
MPI_Bcast(&setflag[i][j],1,MPI_INT,0,world);
|
||||
if (setflag[i][j]) {
|
||||
if (me == 0) {
|
||||
fread(&buck6d1[i][j],sizeof(double),1,fp);
|
||||
fread(&buck6d2[i][j],sizeof(double),1,fp);
|
||||
fread(&buck6d3[i][j],sizeof(double),1,fp);
|
||||
fread(&buck6d4[i][j],sizeof(double),1,fp);
|
||||
fread(&alpha_ij[i][j],sizeof(double),1,fp);
|
||||
fread(&cut_lj[i][j],sizeof(double),1,fp);
|
||||
}
|
||||
MPI_Bcast(&buck6d1[i][j],1,MPI_DOUBLE,0,world);
|
||||
MPI_Bcast(&buck6d2[i][j],1,MPI_DOUBLE,0,world);
|
||||
MPI_Bcast(&buck6d3[i][j],1,MPI_DOUBLE,0,world);
|
||||
MPI_Bcast(&buck6d4[i][j],1,MPI_DOUBLE,0,world);
|
||||
MPI_Bcast(&alpha_ij[i][j],1,MPI_DOUBLE,0,world);
|
||||
MPI_Bcast(&cut_lj[i][j],1,MPI_DOUBLE,0,world);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
proc 0 writes to restart file
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void PairBuck6dCoulGaussDSF::write_restart_settings(FILE *fp)
|
||||
{
|
||||
fwrite(&vdwl_smooth,sizeof(double),1,fp);
|
||||
fwrite(&cut_lj_global,sizeof(double),1,fp);
|
||||
fwrite(&cut_coul,sizeof(double),1,fp);
|
||||
fwrite(&offset_flag,sizeof(int),1,fp);
|
||||
fwrite(&mix_flag,sizeof(int),1,fp);
|
||||
fwrite(&tail_flag,sizeof(int),1,fp);
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
proc 0 reads from restart file, bcasts
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void PairBuck6dCoulGaussDSF::read_restart_settings(FILE *fp)
|
||||
{
|
||||
if (comm->me == 0) {
|
||||
fread(&vdwl_smooth,sizeof(double),1,fp);
|
||||
fread(&cut_lj_global,sizeof(double),1,fp);
|
||||
fread(&cut_coul,sizeof(double),1,fp);
|
||||
fread(&offset_flag,sizeof(int),1,fp);
|
||||
fread(&mix_flag,sizeof(int),1,fp);
|
||||
fread(&tail_flag,sizeof(int),1,fp);
|
||||
}
|
||||
MPI_Bcast(&vdwl_smooth,1,MPI_DOUBLE,0,world);
|
||||
MPI_Bcast(&cut_lj_global,1,MPI_DOUBLE,0,world);
|
||||
MPI_Bcast(&cut_coul,1,MPI_DOUBLE,0,world);
|
||||
MPI_Bcast(&offset_flag,1,MPI_INT,0,world);
|
||||
MPI_Bcast(&mix_flag,1,MPI_INT,0,world);
|
||||
MPI_Bcast(&tail_flag,1,MPI_INT,0,world);
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
proc 0 writes to data file
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void PairBuck6dCoulGaussDSF::write_data(FILE *fp)
|
||||
{
|
||||
for (int i = 1; i <= atom->ntypes; i++)
|
||||
fprintf(fp,"%d %g %g %g %g %g\n",i,
|
||||
buck6d1[i][i],buck6d2[i][i],buck6d3[i][i],
|
||||
buck6d4[i][i],alpha_ij[i][i]);
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
proc 0 writes all pairs to data file
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void PairBuck6dCoulGaussDSF::write_data_all(FILE *fp)
|
||||
{
|
||||
for (int i = 1; i <= atom->ntypes; i++)
|
||||
for (int j = i; j <= atom->ntypes; j++)
|
||||
fprintf(fp,"%d %d %g %g %g %g %g %g\n",i,j,
|
||||
buck6d1[i][j],buck6d2[i][j],buck6d3[i][j],
|
||||
buck6d4[i][j],alpha_ij[i][j],cut_lj[i][j]);
|
||||
}
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
double PairBuck6dCoulGaussDSF::single(int i, int j, int itype, int jtype, double rsq,
|
||||
double factor_coul, double factor_lj,
|
||||
double &fforce)
|
||||
{
|
||||
double r,r2inv,r6inv,r14inv,rexp,term1,term2,term3,term4,term5;
|
||||
double rcu,rqu,sme,smf;
|
||||
double erfcc,erfcd,prefactor,arg;
|
||||
double forcecoul,forcebuck6d,ebuck6d,phicoul,phibuck6d;
|
||||
|
||||
r2inv = 1.0/rsq;
|
||||
r = sqrt(rsq);
|
||||
if (rsq < cut_ljsq[itype][jtype]) {
|
||||
r6inv = r2inv*r2inv*r2inv;
|
||||
r14inv = r6inv*r6inv*r2inv;
|
||||
rexp = exp(-r*buck6d2[itype][jtype]);
|
||||
term1 = buck6d3[itype][jtype]*r6inv;
|
||||
term2 = buck6d4[itype][jtype]*r14inv;
|
||||
term3 = term2*term2;
|
||||
term4 = 1.0/(1.0 + term2);
|
||||
term5 = 1.0/(1.0 + 2.0*term2 + term3);
|
||||
forcebuck6d = buck6d1[itype][jtype]*buck6d2[itype][jtype]*r*rexp;
|
||||
forcebuck6d -= term1*(6.0*term4 - term5*14.0*term2);
|
||||
ebuck6d = buck6d1[itype][jtype]*rexp - term1*term4;
|
||||
// smoothing term
|
||||
if (rsq > rsmooth_sq[itype][jtype]) {
|
||||
rcu = r*rsq;
|
||||
rqu = rsq*rsq;
|
||||
sme = c5[itype][jtype]*rqu*r + c4[itype][jtype]*rqu + c3[itype][jtype]*rcu +
|
||||
c2[itype][jtype]*rsq + c1[itype][jtype]*r + c0[itype][jtype];
|
||||
smf = 5.0*c5[itype][jtype]*rqu + 4.0*c4[itype][jtype]*rcu +
|
||||
3.0*c3[itype][jtype]*rsq + 2.0*c2[itype][jtype]*r + c1[itype][jtype];
|
||||
// forcebuck6d is -dE/dr*r
|
||||
forcebuck6d = forcebuck6d*sme - ebuck6d*smf*r; //RS was here: changed this from +E*smf to -E*smf*r
|
||||
ebuck6d *= sme;
|
||||
}
|
||||
} else forcebuck6d = 0.0;
|
||||
|
||||
if (rsq < cut_coulsq) {
|
||||
prefactor = factor_coul * force->qqrd2e * atom->q[i] * atom->q[j] / r;
|
||||
arg = alpha_ij[itype][jtype]*r;
|
||||
erfcd = MathSpecial::expmsq(arg);
|
||||
erfcc = 1 - (MathSpecial::my_erfcx(arg) * erfcd);
|
||||
forcecoul = prefactor * ((erfcc/r) - (2.0/MY_PIS*alpha_ij[itype][jtype]*erfcd) +
|
||||
r*f_shift_ij[itype][jtype]) * r;
|
||||
} else forcecoul = 0.0;
|
||||
|
||||
fforce = (forcecoul + factor_lj*forcebuck6d) * r2inv;
|
||||
|
||||
double eng = 0.0;
|
||||
if (rsq < cut_ljsq[itype][jtype]) {
|
||||
phibuck6d = ebuck6d - offset[itype][jtype];
|
||||
eng += factor_lj*phibuck6d;
|
||||
}
|
||||
|
||||
if (rsq < cut_coulsq) {
|
||||
phicoul = prefactor * (erfcc - r*e_shift_ij[itype][jtype] -
|
||||
rsq*f_shift_ij[itype][jtype]);
|
||||
eng += phicoul;
|
||||
}
|
||||
|
||||
return eng;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void *PairBuck6dCoulGaussDSF::extract(const char *str, int &dim)
|
||||
{
|
||||
dim = 2;
|
||||
if (strcmp(str,"cut_ljsq") == 0) return (void *) cut_ljsq;
|
||||
if (strcmp(str,"buck6d1") == 0) return (void *) buck6d1;
|
||||
if (strcmp(str,"buck6d2") == 0) return (void *) buck6d2;
|
||||
if (strcmp(str,"buck6d3") == 0) return (void *) buck6d3;
|
||||
if (strcmp(str,"buck6d4") == 0) return (void *) buck6d4;
|
||||
if (strcmp(str,"rsmooth_sq") == 0) return (void *) rsmooth_sq;
|
||||
if (strcmp(str,"c0") == 0) return (void *) c0;
|
||||
if (strcmp(str,"c1") == 0) return (void *) c1;
|
||||
if (strcmp(str,"c2") == 0) return (void *) c2;
|
||||
if (strcmp(str,"c3") == 0) return (void *) c3;
|
||||
if (strcmp(str,"c4") == 0) return (void *) c4;
|
||||
if (strcmp(str,"c5") == 0) return (void *) c5;
|
||||
if (strcmp(str,"offset") == 0) return (void *) offset;
|
||||
|
||||
if (strcmp(str,"cut_coul") == 0) {
|
||||
dim = 0;
|
||||
return (void *) &cut_coul;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
79
src/USER-MOFFF/pair_buck6d_coul_gauss_dsf.h
Normal file
79
src/USER-MOFFF/pair_buck6d_coul_gauss_dsf.h
Normal file
@ -0,0 +1,79 @@
|
||||
/* -*- c++ -*- ----------------------------------------------------------
|
||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
http://lammps.sandia.gov, Sandia National Laboratories
|
||||
Steve Plimpton, sjplimp@sandia.gov
|
||||
|
||||
Copyright (2003) Sandia Corporation. Under the terms of Contract
|
||||
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
|
||||
certain rights in this software. This software is distributed under
|
||||
the GNU General Public License.
|
||||
|
||||
See the README file in the top-level LAMMPS directory.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#ifdef PAIR_CLASS
|
||||
|
||||
PairStyle(buck6d/coul/gauss/dsf,PairBuck6dCoulGaussDSF)
|
||||
|
||||
#else
|
||||
|
||||
#ifndef LMP_PAIR_BUCK6D_COUL_GAUSS_DSF_H
|
||||
#define LMP_PAIR_BUCK6D_COUL_GAUSS_DSF_H
|
||||
|
||||
#include "pair.h"
|
||||
|
||||
namespace LAMMPS_NS {
|
||||
|
||||
class PairBuck6dCoulGaussDSF : public Pair {
|
||||
public:
|
||||
PairBuck6dCoulGaussDSF(class LAMMPS *);
|
||||
virtual ~PairBuck6dCoulGaussDSF();
|
||||
virtual void compute(int, int);
|
||||
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 &);
|
||||
|
||||
protected:
|
||||
double cut_lj_global;
|
||||
double **cut_lj,**cut_ljsq;
|
||||
double **alpha_ij;
|
||||
double **buck6d1,**buck6d2,**buck6d3,**buck6d4,**offset;
|
||||
double **f_shift_ij,**e_shift_ij;
|
||||
double cut_coul,cut_coulsq;
|
||||
double vdwl_smooth;
|
||||
double **c0,**c1,**c2,**c3,**c4,**c5,**rsmooth_sq;
|
||||
|
||||
void allocate();
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* ERROR/WARNING messages:
|
||||
|
||||
E: Illegal ... command
|
||||
|
||||
Self-explanatory. Check the input script syntax and compare to the
|
||||
documentation for the command. You can use -echo screen as a
|
||||
command-line option when running LAMMPS to see the offending line.
|
||||
|
||||
E: Incorrect args for pair coefficients
|
||||
|
||||
Self-explanatory. Check the input script or data file.
|
||||
|
||||
E: Pair style lj/cut/coul/dsf requires atom attribute q
|
||||
|
||||
The atom style defined does not have these attributes.
|
||||
|
||||
*/
|
||||
646
src/USER-MOFFF/pair_buck6d_coul_gauss_long.cpp
Normal file
646
src/USER-MOFFF/pair_buck6d_coul_gauss_long.cpp
Normal file
@ -0,0 +1,646 @@
|
||||
/* ----------------------------------------------------------------------
|
||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
http://lammps.sandia.gov, Sandia National Laboratories
|
||||
Steve Plimpton, sjplimp@sandia.gov
|
||||
|
||||
Copyright (2003) Sandia Corporation. Under the terms of Contract
|
||||
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
|
||||
certain rights in this software. This software is distributed under
|
||||
the GNU General Public License.
|
||||
|
||||
See the README file in the top-level LAMMPS directory.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
Contributing author: Hendrik Heenen (Technical University of Munich)
|
||||
and Rochus Schmid (Ruhr-Universitaet Bochum)
|
||||
References: Bureekaew and Schmid, Phys. Status Solidi B 250, 1128 (2013)
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "pair_buck6d_coul_gauss_long.h"
|
||||
#include "atom.h"
|
||||
#include "comm.h"
|
||||
#include "force.h"
|
||||
#include "kspace.h"
|
||||
#include "neighbor.h"
|
||||
#include "neigh_list.h"
|
||||
#include "memory.h"
|
||||
#include "math_const.h"
|
||||
#include "error.h"
|
||||
#include "math_special.h"
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
using namespace MathConst;
|
||||
|
||||
#define EWALD_F 1.12837917
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
PairBuck6dCoulGaussLong::PairBuck6dCoulGaussLong(LAMMPS *lmp) : Pair(lmp)
|
||||
{
|
||||
ewaldflag = pppmflag = 1;
|
||||
single_enable = 1;
|
||||
writedata = 1;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
PairBuck6dCoulGaussLong::~PairBuck6dCoulGaussLong()
|
||||
{
|
||||
if (!copymode) {
|
||||
if (allocated) {
|
||||
memory->destroy(setflag);
|
||||
memory->destroy(cutsq);
|
||||
|
||||
memory->destroy(cut_lj);
|
||||
memory->destroy(cut_ljsq);
|
||||
memory->destroy(alpha_ij);
|
||||
memory->destroy(buck6d1);
|
||||
memory->destroy(buck6d2);
|
||||
memory->destroy(buck6d3);
|
||||
memory->destroy(buck6d4);
|
||||
memory->destroy(c0);
|
||||
memory->destroy(c1);
|
||||
memory->destroy(c2);
|
||||
memory->destroy(c3);
|
||||
memory->destroy(c4);
|
||||
memory->destroy(c5);
|
||||
memory->destroy(rsmooth_sq);
|
||||
memory->destroy(offset);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void PairBuck6dCoulGaussLong::compute(int eflag, int vflag)
|
||||
{
|
||||
int i,j,ii,jj,inum,jnum,itype,jtype;
|
||||
double qtmp,xtmp,ytmp,ztmp,delx,dely,delz,evdwl,ecoul,fpair;
|
||||
double r,rsq,r2inv,r6inv,r14inv,rexp,forcecoul,forcebuck6d,factor_coul,factor_lj;
|
||||
double grij,expm2,erf;
|
||||
double term1,term2,term3,term4,term5;
|
||||
double rcu,rqu,sme,smf,ebuck6d,ealpha;
|
||||
double prefactor,erfa,expa,t,arg,falpha;
|
||||
int *ilist,*jlist,*numneigh,**firstneigh;
|
||||
|
||||
evdwl = ecoul = 0.0;
|
||||
if (eflag || vflag) ev_setup(eflag,vflag);
|
||||
else evflag = vflag_fdotr = 0;
|
||||
|
||||
double **x = atom->x;
|
||||
double **f = atom->f;
|
||||
double *q = atom->q;
|
||||
int *type = atom->type;
|
||||
int nlocal = atom->nlocal;
|
||||
double *special_lj = force->special_lj;
|
||||
double *special_coul = force->special_coul;
|
||||
int newton_pair = force->newton_pair;
|
||||
double qqrd2e = force->qqrd2e;
|
||||
|
||||
inum = list->inum;
|
||||
ilist = list->ilist;
|
||||
numneigh = list->numneigh;
|
||||
firstneigh = list->firstneigh;
|
||||
|
||||
// loop over neighbors of my atoms
|
||||
|
||||
for (ii = 0; ii < inum; ii++) {
|
||||
i = ilist[ii];
|
||||
qtmp = q[i];
|
||||
xtmp = x[i][0];
|
||||
ytmp = x[i][1];
|
||||
ztmp = x[i][2];
|
||||
itype = type[i];
|
||||
jlist = firstneigh[i];
|
||||
jnum = numneigh[i];
|
||||
|
||||
for (jj = 0; jj < jnum; jj++) {
|
||||
j = jlist[jj];
|
||||
factor_lj = special_lj[sbmask(j)];
|
||||
factor_coul = special_coul[sbmask(j)];
|
||||
j &= NEIGHMASK;
|
||||
|
||||
delx = xtmp - x[j][0];
|
||||
dely = ytmp - x[j][1];
|
||||
delz = ztmp - x[j][2];
|
||||
rsq = delx*delx + dely*dely + delz*delz;
|
||||
jtype = type[j];
|
||||
|
||||
if (rsq < cutsq[itype][jtype]) {
|
||||
r2inv = 1.0/rsq;
|
||||
r = sqrt(rsq);
|
||||
|
||||
if (rsq < cut_ljsq[itype][jtype]) {
|
||||
r6inv = r2inv*r2inv*r2inv;
|
||||
r14inv = r6inv*r6inv*r2inv;
|
||||
rexp = exp(-r*buck6d2[itype][jtype]);
|
||||
term1 = buck6d3[itype][jtype]*r6inv;
|
||||
term2 = buck6d4[itype][jtype]*r14inv;
|
||||
term3 = term2*term2;
|
||||
term4 = 1.0/(1.0 + term2);
|
||||
term5 = 1.0/(1.0 + 2.0*term2 + term3);
|
||||
forcebuck6d = buck6d1[itype][jtype]*buck6d2[itype][jtype]*r*rexp;
|
||||
forcebuck6d -= term1*(6.0*term4 - term5*14.0*term2);
|
||||
ebuck6d = buck6d1[itype][jtype]*rexp - term1*term4;
|
||||
|
||||
// smoothing term
|
||||
if (rsq > rsmooth_sq[itype][jtype]) {
|
||||
rcu = r*rsq;
|
||||
rqu = rsq*rsq;
|
||||
sme = c5[itype][jtype]*rqu*r + c4[itype][jtype]*rqu + c3[itype][jtype]*rcu +
|
||||
c2[itype][jtype]*rsq + c1[itype][jtype]*r + c0[itype][jtype];
|
||||
smf = 5.0*c5[itype][jtype]*rqu + 4.0*c4[itype][jtype]*rcu +
|
||||
3.0*c3[itype][jtype]*rsq + 2.0*c2[itype][jtype]*r + c1[itype][jtype];
|
||||
// forcebuck6d is -dE/dr*r
|
||||
forcebuck6d = forcebuck6d*sme - ebuck6d*smf*r;
|
||||
ebuck6d *= sme;
|
||||
}
|
||||
} else forcebuck6d = 0.0;
|
||||
|
||||
if (rsq < cut_coulsq) {
|
||||
// long range - real space
|
||||
grij = g_ewald * r;
|
||||
expm2 = MathSpecial::expmsq(grij);
|
||||
erf = 1 - (MathSpecial::my_erfcx(grij) * expm2);
|
||||
|
||||
// gaussian for 1/r alpha_ij contribution
|
||||
arg = alpha_ij[itype][jtype]*r;
|
||||
expa = MathSpecial::expmsq(arg);
|
||||
erfa = 1 - (MathSpecial::my_erfcx(arg) * expa);
|
||||
|
||||
prefactor = qqrd2e*qtmp*q[j]/r;
|
||||
falpha = erfa - EWALD_F*arg*expa;
|
||||
forcecoul = prefactor * (falpha - erf + EWALD_F*grij*expm2);
|
||||
if (factor_coul < 1.0) forcecoul -= (1.0-factor_coul)*prefactor*falpha;
|
||||
|
||||
// (q*q/r) * (gauss(alpha_ij) - gauss(alpha_long)
|
||||
ealpha = prefactor * (erfa-erf);
|
||||
// smoothing term - NOTE: ingnored in special_bonds correction
|
||||
// since likely rsmooth_sq_c >> d(special)
|
||||
if (rsq > rsmooth_sq_c) {
|
||||
rcu = r*rsq;
|
||||
rqu = rsq*rsq;
|
||||
sme = c5_c*rqu*r + c4_c*rqu + c3_c*rcu + c2_c*rsq + c1_c*r + c0_c;
|
||||
smf = 5.0*c5_c*rqu + 4.0*c4_c*rcu + 3.0*c3_c*rsq + 2.0*c2_c*r + c1_c;
|
||||
forcecoul = forcecoul*sme - ealpha*smf*r;
|
||||
ealpha *= sme;
|
||||
}
|
||||
} else forcecoul = 0.0;
|
||||
|
||||
|
||||
fpair = (forcecoul + factor_lj*forcebuck6d) * r2inv;
|
||||
f[i][0] += delx*fpair;
|
||||
f[i][1] += dely*fpair;
|
||||
f[i][2] += delz*fpair;
|
||||
if (newton_pair || j < nlocal) {
|
||||
f[j][0] -= delx*fpair;
|
||||
f[j][1] -= dely*fpair;
|
||||
f[j][2] -= delz*fpair;
|
||||
}
|
||||
|
||||
if (eflag) {
|
||||
if (rsq < cut_ljsq[itype][jtype]) {
|
||||
evdwl = ebuck6d - offset[itype][jtype];
|
||||
evdwl *= factor_lj;
|
||||
} else evdwl = 0.0;
|
||||
|
||||
if (rsq < cut_coulsq) {
|
||||
ecoul = ealpha;
|
||||
if (factor_coul < 1.0) ecoul -= (1.0-factor_coul)*prefactor*erfa;
|
||||
} else ecoul = 0.0;
|
||||
}
|
||||
|
||||
if (evflag) ev_tally(i,j,nlocal,newton_pair,
|
||||
evdwl,ecoul,fpair,delx,dely,delz);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (vflag_fdotr) virial_fdotr_compute();
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
allocate all arrays
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void PairBuck6dCoulGaussLong::allocate()
|
||||
{
|
||||
allocated = 1;
|
||||
int n = atom->ntypes;
|
||||
|
||||
memory->create(setflag,n+1,n+1,"pair:setflag");
|
||||
for (int i = 1; i <= n; i++)
|
||||
for (int j = i; j <= n; j++)
|
||||
setflag[i][j] = 0;
|
||||
|
||||
memory->create(cutsq,n+1,n+1,"pair:cutsq");
|
||||
|
||||
memory->create(cut_lj,n+1,n+1,"pair:cut_lj");
|
||||
memory->create(cut_ljsq,n+1,n+1,"pair:cut_ljsq");
|
||||
memory->create(alpha_ij,n+1,n+1,"pair:alpha_ij");
|
||||
memory->create(buck6d1,n+1,n+1,"pair:buck6d1");
|
||||
memory->create(buck6d2,n+1,n+1,"pair:buck6d2");
|
||||
memory->create(buck6d3,n+1,n+1,"pair:buck6d3");
|
||||
memory->create(buck6d4,n+1,n+1,"pair:buck6d4");
|
||||
memory->create(c0,n+1,n+1,"pair:c0");
|
||||
memory->create(c1,n+1,n+1,"pair:c1");
|
||||
memory->create(c2,n+1,n+1,"pair:c2");
|
||||
memory->create(c3,n+1,n+1,"pair:c3");
|
||||
memory->create(c4,n+1,n+1,"pair:c4");
|
||||
memory->create(c5,n+1,n+1,"pair:c5");
|
||||
memory->create(rsmooth_sq,n+1,n+1,"pair:rsmooth_sq");
|
||||
memory->create(offset,n+1,n+1,"pair:offset");
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
global settings
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void PairBuck6dCoulGaussLong::settings(int narg, char **arg)
|
||||
{
|
||||
if (narg < 3 || narg > 4) error->all(FLERR,"Illegal pair_style command");
|
||||
|
||||
vdwl_smooth = force->numeric(FLERR,arg[0]);
|
||||
coul_smooth = force->numeric(FLERR,arg[1]);
|
||||
|
||||
cut_lj_global = force->numeric(FLERR,arg[2]);
|
||||
if (narg == 3) cut_coul = cut_lj_global;
|
||||
else cut_coul = force->numeric(FLERR,arg[3]);
|
||||
|
||||
// reset cutoffs that have been explicitly set
|
||||
|
||||
if (allocated) {
|
||||
int i,j;
|
||||
for (i = 1; i <= atom->ntypes; i++)
|
||||
for (j = i+1; j <= atom->ntypes; j++)
|
||||
if (setflag[i][j])
|
||||
cut_lj[i][j] = cut_lj_global;
|
||||
}
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
set coeffs for one or more type pairs
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void PairBuck6dCoulGaussLong::coeff(int narg, char **arg)
|
||||
{
|
||||
if (narg < 7 || narg > 8)
|
||||
error->all(FLERR,"Incorrect args for pair coefficients");
|
||||
if (!allocated) allocate();
|
||||
|
||||
int ilo,ihi,jlo,jhi;
|
||||
force->bounds(FLERR,arg[0],atom->ntypes,ilo,ihi);
|
||||
force->bounds(FLERR,arg[1],atom->ntypes,jlo,jhi);
|
||||
|
||||
double buck6d1_one = force->numeric(FLERR,arg[2]);
|
||||
double buck6d2_one = force->numeric(FLERR,arg[3]);
|
||||
double buck6d3_one = force->numeric(FLERR,arg[4]);
|
||||
double buck6d4_one = force->numeric(FLERR,arg[5]);
|
||||
double alpha_one = force->numeric(FLERR,arg[6]);
|
||||
|
||||
double cut_lj_one = cut_lj_global;
|
||||
if (narg == 8) cut_lj_one = force->numeric(FLERR,arg[7]);
|
||||
|
||||
int count = 0;
|
||||
for (int i = ilo; i <= ihi; i++) {
|
||||
for (int j = MAX(jlo,i); j <= jhi; j++) {
|
||||
buck6d1[i][j] = buck6d1_one;
|
||||
buck6d2[i][j] = buck6d2_one;
|
||||
buck6d3[i][j] = buck6d3_one;
|
||||
buck6d4[i][j] = buck6d4_one;
|
||||
alpha_ij[i][j] = alpha_one;
|
||||
cut_lj[i][j] = cut_lj_one;
|
||||
setflag[i][j] = 1;
|
||||
count++;
|
||||
}
|
||||
}
|
||||
|
||||
if (count == 0) error->all(FLERR,"Incorrect args for pair coefficients");
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
init specific to this pair style
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void PairBuck6dCoulGaussLong::init_style()
|
||||
{
|
||||
if (!atom->q_flag)
|
||||
error->all(FLERR,"Pair style buck6d/coul/dsf requires atom attribute q");
|
||||
|
||||
// insure use of KSpace long-range solver, set g_ewald
|
||||
|
||||
if (force->kspace == NULL)
|
||||
error->all(FLERR,"Pair style requires a KSpace style");
|
||||
g_ewald = force->kspace->g_ewald;
|
||||
|
||||
neighbor->request(this,instance_me);
|
||||
|
||||
cut_coulsq = cut_coul * cut_coul;
|
||||
|
||||
//calculation of smoothing coefficients c0_c-c5_c for coulomb smoothing
|
||||
c0_c = c1_c = c2_c = c3_c = c4_c = c5_c = 0.0;
|
||||
rsmooth_sq_c = cut_coulsq;
|
||||
if (coul_smooth < 1.0) {
|
||||
double rsm = coul_smooth * cut_coul;
|
||||
double rsm_sq = rsm * rsm;
|
||||
double denom = pow((cut_coul-rsm),5.0);
|
||||
c0_c = cut_coul*cut_coulsq*(cut_coulsq-
|
||||
5.0*cut_coul*rsm+10.0*rsm_sq)/denom;
|
||||
c1_c = -30.0*(cut_coulsq*rsm_sq)/denom;
|
||||
c2_c = 30.0*(cut_coulsq*rsm + cut_coul*rsm_sq)/denom;
|
||||
c3_c = -10.0*(cut_coulsq + 4.0*cut_coul*rsm + rsm_sq)/denom;
|
||||
c4_c = 15.0*(cut_coul+rsm)/denom;
|
||||
c5_c = -6.0/denom;
|
||||
rsmooth_sq_c = rsm_sq;
|
||||
}
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
init for one type pair i,j and corresponding j,i
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
double PairBuck6dCoulGaussLong::init_one(int i, int j)
|
||||
{
|
||||
if (setflag[i][j] == 0) error->all(FLERR,"All pair coeffs are not set");
|
||||
|
||||
double cut = MAX(cut_lj[i][j],cut_coul);
|
||||
cut_ljsq[i][j] = cut_lj[i][j] * cut_lj[i][j];
|
||||
|
||||
//calculation of smoothing coefficients c0-c5
|
||||
c0[i][j] = c1[i][j] = c2[i][j] = c3[i][j] = c4[i][j] = c5[i][j] = 0.0;
|
||||
rsmooth_sq[i][j] = cut_ljsq[i][j];
|
||||
if (vdwl_smooth < 1.0) {
|
||||
double rsm = vdwl_smooth * cut_lj[i][j];
|
||||
double rsm_sq = rsm * rsm;
|
||||
double denom = pow((cut_lj[i][j]-rsm),5.0);
|
||||
c0[i][j] = cut_lj[i][j]*cut_ljsq[i][j]*(cut_ljsq[i][j]-
|
||||
5.0*cut_lj[i][j]*rsm+10.0*rsm_sq)/denom;
|
||||
c1[i][j] = -30.0*(cut_ljsq[i][j]*rsm_sq)/denom;
|
||||
c2[i][j] = 30.0*(cut_ljsq[i][j]*rsm + cut_lj[i][j]*rsm_sq)/denom;
|
||||
c3[i][j] = -10.0*(cut_ljsq[i][j] + 4.0*cut_lj[i][j]*rsm + rsm_sq)/denom;
|
||||
c4[i][j] = 15.0*(cut_lj[i][j]+rsm)/denom;
|
||||
c5[i][j] = -6.0/denom;
|
||||
rsmooth_sq[i][j] = rsm_sq;
|
||||
}
|
||||
|
||||
// if offset_flag, shift is only invoked if there is not already smoothing
|
||||
if (offset_flag && vdwl_smooth >= 1.0) {
|
||||
double term1 = buck6d3[i][j]/pow(cut_lj[i][j],6.0);
|
||||
double term4 = 1.0/(1.0 + (buck6d4[i][j]/pow(cut_lj[i][j],14.0)));
|
||||
double rexp = exp(-cut_lj[i][j]*buck6d2[i][j]);
|
||||
offset[i][j] = buck6d1[i][j]*rexp - term1*term4;
|
||||
} else offset[i][j] = 0.0;
|
||||
|
||||
cut_ljsq[j][i] = cut_ljsq[i][j];
|
||||
alpha_ij[j][i] = alpha_ij[i][j];
|
||||
buck6d1[j][i] = buck6d1[i][j];
|
||||
buck6d2[j][i] = buck6d2[i][j];
|
||||
buck6d3[j][i] = buck6d3[i][j];
|
||||
buck6d4[j][i] = buck6d4[i][j];
|
||||
c0[j][i] = c0[i][j];
|
||||
c1[j][i] = c1[i][j];
|
||||
c2[j][i] = c2[i][j];
|
||||
c3[j][i] = c3[i][j];
|
||||
c4[j][i] = c4[i][j];
|
||||
c5[j][i] = c5[i][j];
|
||||
rsmooth_sq[j][i] = rsmooth_sq[i][j];
|
||||
offset[j][i] = offset[i][j];
|
||||
|
||||
return cut;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
proc 0 writes to restart file
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void PairBuck6dCoulGaussLong::write_restart(FILE *fp)
|
||||
{
|
||||
write_restart_settings(fp);
|
||||
|
||||
int i,j;
|
||||
for (i = 1; i <= atom->ntypes; i++)
|
||||
for (j = i; j <= atom->ntypes; j++) {
|
||||
fwrite(&setflag[i][j],sizeof(int),1,fp);
|
||||
if (setflag[i][j]) {
|
||||
fwrite(&buck6d1[i][j],sizeof(double),1,fp);
|
||||
fwrite(&buck6d2[i][j],sizeof(double),1,fp);
|
||||
fwrite(&buck6d3[i][j],sizeof(double),1,fp);
|
||||
fwrite(&buck6d4[i][j],sizeof(double),1,fp);
|
||||
fwrite(&alpha_ij[i][j],sizeof(double),1,fp);
|
||||
fwrite(&cut_lj[i][j],sizeof(double),1,fp);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
proc 0 reads from restart file, bcasts
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void PairBuck6dCoulGaussLong::read_restart(FILE *fp)
|
||||
{
|
||||
read_restart_settings(fp);
|
||||
allocate();
|
||||
|
||||
int i,j;
|
||||
int me = comm->me;
|
||||
for (i = 1; i <= atom->ntypes; i++)
|
||||
for (j = i; j <= atom->ntypes; j++) {
|
||||
if (me == 0) fread(&setflag[i][j],sizeof(int),1,fp);
|
||||
MPI_Bcast(&setflag[i][j],1,MPI_INT,0,world);
|
||||
if (setflag[i][j]) {
|
||||
if (me == 0) {
|
||||
fread(&buck6d1[i][j],sizeof(double),1,fp);
|
||||
fread(&buck6d2[i][j],sizeof(double),1,fp);
|
||||
fread(&buck6d3[i][j],sizeof(double),1,fp);
|
||||
fread(&buck6d4[i][j],sizeof(double),1,fp);
|
||||
fread(&alpha_ij[i][j],sizeof(double),1,fp);
|
||||
fread(&cut_lj[i][j],sizeof(double),1,fp);
|
||||
}
|
||||
MPI_Bcast(&buck6d1[i][j],1,MPI_DOUBLE,0,world);
|
||||
MPI_Bcast(&buck6d2[i][j],1,MPI_DOUBLE,0,world);
|
||||
MPI_Bcast(&buck6d3[i][j],1,MPI_DOUBLE,0,world);
|
||||
MPI_Bcast(&buck6d4[i][j],1,MPI_DOUBLE,0,world);
|
||||
MPI_Bcast(&alpha_ij[i][j],1,MPI_DOUBLE,0,world);
|
||||
MPI_Bcast(&cut_lj[i][j],1,MPI_DOUBLE,0,world);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
proc 0 writes to restart file
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void PairBuck6dCoulGaussLong::write_restart_settings(FILE *fp)
|
||||
{
|
||||
fwrite(&vdwl_smooth,sizeof(double),1,fp);
|
||||
fwrite(&coul_smooth,sizeof(double),1,fp);
|
||||
fwrite(&cut_lj_global,sizeof(double),1,fp);
|
||||
fwrite(&cut_coul,sizeof(double),1,fp);
|
||||
fwrite(&offset_flag,sizeof(int),1,fp);
|
||||
fwrite(&mix_flag,sizeof(int),1,fp);
|
||||
fwrite(&tail_flag,sizeof(int),1,fp);
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
proc 0 reads from restart file, bcasts
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void PairBuck6dCoulGaussLong::read_restart_settings(FILE *fp)
|
||||
{
|
||||
if (comm->me == 0) {
|
||||
fread(&vdwl_smooth,sizeof(double),1,fp);
|
||||
fread(&coul_smooth,sizeof(double),1,fp);
|
||||
fread(&cut_lj_global,sizeof(double),1,fp);
|
||||
fread(&cut_coul,sizeof(double),1,fp);
|
||||
fread(&offset_flag,sizeof(int),1,fp);
|
||||
fread(&mix_flag,sizeof(int),1,fp);
|
||||
fread(&tail_flag,sizeof(int),1,fp);
|
||||
}
|
||||
MPI_Bcast(&vdwl_smooth,1,MPI_DOUBLE,0,world);
|
||||
MPI_Bcast(&coul_smooth,1,MPI_DOUBLE,0,world);
|
||||
MPI_Bcast(&cut_lj_global,1,MPI_DOUBLE,0,world);
|
||||
MPI_Bcast(&cut_coul,1,MPI_DOUBLE,0,world);
|
||||
MPI_Bcast(&offset_flag,1,MPI_INT,0,world);
|
||||
MPI_Bcast(&mix_flag,1,MPI_INT,0,world);
|
||||
MPI_Bcast(&tail_flag,1,MPI_INT,0,world);
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
proc 0 writes to data file
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void PairBuck6dCoulGaussLong::write_data(FILE *fp)
|
||||
{
|
||||
for (int i = 1; i <= atom->ntypes; i++)
|
||||
fprintf(fp,"%d %g %g %g %g %g\n",i,
|
||||
buck6d1[i][i],buck6d2[i][i],buck6d3[i][i],
|
||||
buck6d4[i][i],alpha_ij[i][i]);
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
proc 0 writes all pairs to data file
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void PairBuck6dCoulGaussLong::write_data_all(FILE *fp)
|
||||
{
|
||||
for (int i = 1; i <= atom->ntypes; i++)
|
||||
for (int j = i; j <= atom->ntypes; j++)
|
||||
fprintf(fp,"%d %d %g %g %g %g %g %g\n",i,j,
|
||||
buck6d1[i][j],buck6d2[i][j],buck6d3[i][j],
|
||||
buck6d4[i][j],alpha_ij[i][j],cut_lj[i][j]);
|
||||
}
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
double PairBuck6dCoulGaussLong::single(int i, int j, int itype, int jtype, double rsq,
|
||||
double factor_coul, double factor_lj,
|
||||
double &fforce)
|
||||
{
|
||||
double r,r2inv,r6inv,r14inv,rexp,term1,term2,term3,term4,term5;
|
||||
double rcu,rqu,sme,smf;
|
||||
double erfa,expa,prefactor,arg,falpha,ealpha;
|
||||
double grij,expm2,erf;
|
||||
double forcecoul,forcebuck6d,ebuck6d,phicoul,phibuck6d;
|
||||
|
||||
r2inv = 1.0/rsq;
|
||||
r = sqrt(rsq);
|
||||
if (rsq < cut_ljsq[itype][jtype]) {
|
||||
r6inv = r2inv*r2inv*r2inv;
|
||||
r14inv = r6inv*r6inv*r2inv;
|
||||
rexp = exp(-r*buck6d2[itype][jtype]);
|
||||
term1 = buck6d3[itype][jtype]*r6inv;
|
||||
term2 = buck6d4[itype][jtype]*r14inv;
|
||||
term3 = term2*term2;
|
||||
term4 = 1.0/(1.0 + term2);
|
||||
term5 = 1.0/(1.0 + 2.0*term2 + term3);
|
||||
forcebuck6d = buck6d1[itype][jtype]*buck6d2[itype][jtype]*r*rexp;
|
||||
forcebuck6d -= term1*(6.0*term4 - term5*14.0*term2);
|
||||
ebuck6d = buck6d1[itype][jtype]*rexp - term1*term4;
|
||||
// smoothing term
|
||||
if (rsq > rsmooth_sq[itype][jtype]) {
|
||||
rcu = r*rsq;
|
||||
rqu = rsq*rsq;
|
||||
sme = c5[itype][jtype]*rqu*r + c4[itype][jtype]*rqu + c3[itype][jtype]*rcu +
|
||||
c2[itype][jtype]*rsq + c1[itype][jtype]*r + c0[itype][jtype];
|
||||
smf = 5.0*c5[itype][jtype]*rqu + 4.0*c4[itype][jtype]*rcu +
|
||||
3.0*c3[itype][jtype]*rsq + 2.0*c2[itype][jtype]*r + c1[itype][jtype];
|
||||
// forcebuck6d is -dE/dr*r
|
||||
forcebuck6d = forcebuck6d*sme - ebuck6d*smf*r; //RS was here: changed this from +E*smf to -E*smf*r
|
||||
ebuck6d *= sme;
|
||||
}
|
||||
} else forcebuck6d = 0.0;
|
||||
|
||||
if (rsq < cut_coulsq) {
|
||||
// long range - real space
|
||||
grij = g_ewald * r;
|
||||
expm2 = MathSpecial::expmsq(grij);
|
||||
erf = 1 - (MathSpecial::my_erfcx(grij) * expm2);
|
||||
|
||||
// gaussian for 1/r alpha_ij contribution
|
||||
arg = alpha_ij[itype][jtype]*r;
|
||||
expa = MathSpecial::expmsq(arg);
|
||||
erfa = 1 - (MathSpecial::my_erfcx(arg) * expa);
|
||||
|
||||
prefactor = force->qqrd2e * atom->q[i] * atom->q[j] / r;
|
||||
falpha = erfa - EWALD_F*arg*expa;
|
||||
forcecoul = prefactor * (falpha - erf + EWALD_F*grij*expm2);
|
||||
if (factor_coul < 1.0) forcecoul -= (1.0-factor_coul)*prefactor*falpha;
|
||||
|
||||
ealpha = prefactor * (erfa-erf);
|
||||
// smoothing term
|
||||
if (rsq > rsmooth_sq_c) {
|
||||
rcu = r*rsq;
|
||||
rqu = rsq*rsq;
|
||||
sme = c5_c*rqu*r + c4_c*rqu + c3_c*rcu + c2_c*rsq + c1_c*r + c0_c;
|
||||
smf = 5.0*c5_c*rqu + 4.0*c4_c*rcu + 3.0*c3_c*rsq + 2.0*c2_c*r + c1_c;
|
||||
forcecoul = forcecoul*sme - ealpha*smf*r;
|
||||
ealpha *= sme;
|
||||
}
|
||||
} else forcecoul = 0.0;
|
||||
|
||||
fforce = (forcecoul + factor_lj*forcebuck6d) * r2inv;
|
||||
|
||||
double eng = 0.0;
|
||||
if (rsq < cut_ljsq[itype][jtype]) {
|
||||
phibuck6d = ebuck6d - offset[itype][jtype];
|
||||
eng += factor_lj*phibuck6d;
|
||||
}
|
||||
|
||||
if (rsq < cut_coulsq) {
|
||||
phicoul = ealpha;
|
||||
if (factor_coul < 1.0) phicoul -= (1.0-factor_coul)*prefactor*erfa;
|
||||
eng += phicoul;
|
||||
}
|
||||
|
||||
return eng;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void *PairBuck6dCoulGaussLong::extract(const char *str, int &dim)
|
||||
{
|
||||
dim = 2;
|
||||
if (strcmp(str,"cut_ljsq") == 0) return (void *) cut_ljsq;
|
||||
if (strcmp(str,"buck6d1") == 0) return (void *) buck6d1;
|
||||
if (strcmp(str,"buck6d2") == 0) return (void *) buck6d2;
|
||||
if (strcmp(str,"buck6d3") == 0) return (void *) buck6d3;
|
||||
if (strcmp(str,"buck6d4") == 0) return (void *) buck6d4;
|
||||
if (strcmp(str,"rsmooth_sq") == 0) return (void *) rsmooth_sq;
|
||||
if (strcmp(str,"c0") == 0) return (void *) c0;
|
||||
if (strcmp(str,"c1") == 0) return (void *) c1;
|
||||
if (strcmp(str,"c2") == 0) return (void *) c2;
|
||||
if (strcmp(str,"c3") == 0) return (void *) c3;
|
||||
if (strcmp(str,"c4") == 0) return (void *) c4;
|
||||
if (strcmp(str,"c5") == 0) return (void *) c5;
|
||||
if (strcmp(str,"offset") == 0) return (void *) offset;
|
||||
|
||||
if (strcmp(str,"cut_coul") == 0) {
|
||||
dim = 0;
|
||||
return (void *) &cut_coul;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
80
src/USER-MOFFF/pair_buck6d_coul_gauss_long.h
Normal file
80
src/USER-MOFFF/pair_buck6d_coul_gauss_long.h
Normal file
@ -0,0 +1,80 @@
|
||||
/* -*- c++ -*- ----------------------------------------------------------
|
||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
http://lammps.sandia.gov, Sandia National Laboratories
|
||||
Steve Plimpton, sjplimp@sandia.gov
|
||||
|
||||
Copyright (2003) Sandia Corporation. Under the terms of Contract
|
||||
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
|
||||
certain rights in this software. This software is distributed under
|
||||
the GNU General Public License.
|
||||
|
||||
See the README file in the top-level LAMMPS directory.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#ifdef PAIR_CLASS
|
||||
|
||||
PairStyle(buck6d/coul/gauss/long,PairBuck6dCoulGaussLong)
|
||||
|
||||
#else
|
||||
|
||||
#ifndef LMP_PAIR_BUCK6D_COUL_GAUSS_LONG_H
|
||||
#define LMP_PAIR_BUCK6D_COUL_GAUSS_LONG_H
|
||||
|
||||
#include "pair.h"
|
||||
|
||||
namespace LAMMPS_NS {
|
||||
|
||||
class PairBuck6dCoulGaussLong : public Pair {
|
||||
public:
|
||||
PairBuck6dCoulGaussLong(class LAMMPS *);
|
||||
virtual ~PairBuck6dCoulGaussLong();
|
||||
virtual void compute(int, int);
|
||||
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 &);
|
||||
|
||||
protected:
|
||||
double cut_lj_global;
|
||||
double **cut_lj,**cut_ljsq;
|
||||
double **alpha_ij;
|
||||
double **buck6d1,**buck6d2,**buck6d3,**buck6d4,**offset;
|
||||
double cut_coul, cut_coulsq;
|
||||
double vdwl_smooth, coul_smooth;
|
||||
double c0_c,c1_c,c2_c,c3_c,c4_c,c5_c,rsmooth_sq_c;
|
||||
double **c0,**c1,**c2,**c3,**c4,**c5,**rsmooth_sq;
|
||||
double g_ewald;
|
||||
|
||||
void allocate();
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* ERROR/WARNING messages:
|
||||
|
||||
E: Illegal ... command
|
||||
|
||||
Self-explanatory. Check the input script syntax and compare to the
|
||||
documentation for the command. You can use -echo screen as a
|
||||
command-line option when running LAMMPS to see the offending line.
|
||||
|
||||
E: Incorrect args for pair coefficients
|
||||
|
||||
Self-explanatory. Check the input script or data file.
|
||||
|
||||
E: Pair style lj/cut/coul/dsf requires atom attribute q
|
||||
|
||||
The atom style defined does not have these attributes.
|
||||
|
||||
*/
|
||||
@ -343,7 +343,7 @@ void DumpNetCDF::openfile()
|
||||
if (framei <= 0) framei = nframes+framei+1;
|
||||
if (framei < 1) framei = 1;
|
||||
} else {
|
||||
if (framei != 0)
|
||||
if (framei != 0 && !multifile)
|
||||
error->all(FLERR,"at keyword requires use of 'append yes'");
|
||||
|
||||
int dims[NC_MAX_VAR_DIMS];
|
||||
|
||||
@ -342,7 +342,7 @@ void DumpNetCDFMPIIO::openfile()
|
||||
if (framei <= 0) framei = nframes+framei+1;
|
||||
if (framei < 1) framei = 1;
|
||||
} else {
|
||||
if (framei != 0)
|
||||
if (framei != 0 && !multifile)
|
||||
error->all(FLERR,"at keyword requires use of 'append yes'");
|
||||
|
||||
int dims[NC_MAX_VAR_DIMS];
|
||||
|
||||
@ -205,18 +205,24 @@ void PairTersoffZBLOMP::read_file(char *file)
|
||||
params[nparams].powermint = int(params[nparams].powerm);
|
||||
|
||||
if (
|
||||
params[nparams].lam3 < 0.0 || params[nparams].c < 0.0 ||
|
||||
params[nparams].d < 0.0 || params[nparams].powern < 0.0 ||
|
||||
params[nparams].beta < 0.0 || params[nparams].lam2 < 0.0 ||
|
||||
params[nparams].bigb < 0.0 || params[nparams].bigr < 0.0 ||
|
||||
params[nparams].c < 0.0 ||
|
||||
params[nparams].d < 0.0 ||
|
||||
params[nparams].powern < 0.0 ||
|
||||
params[nparams].beta < 0.0 ||
|
||||
params[nparams].lam2 < 0.0 ||
|
||||
params[nparams].bigb < 0.0 ||
|
||||
params[nparams].bigr < 0.0 ||
|
||||
params[nparams].bigd < 0.0 ||
|
||||
params[nparams].bigd > params[nparams].bigr ||
|
||||
params[nparams].lam3 < 0.0 || params[nparams].biga < 0.0 ||
|
||||
params[nparams].biga < 0.0 ||
|
||||
params[nparams].powerm - params[nparams].powermint != 0.0 ||
|
||||
(params[nparams].powermint != 3 && params[nparams].powermint != 1) ||
|
||||
(params[nparams].powermint != 3 &&
|
||||
params[nparams].powermint != 1) ||
|
||||
params[nparams].gamma < 0.0 ||
|
||||
params[nparams].Z_i < 1.0 || params[nparams].Z_j < 1.0 ||
|
||||
params[nparams].ZBLcut < 0.0 || params[nparams].ZBLexpscale < 0.0)
|
||||
params[nparams].Z_i < 1.0 ||
|
||||
params[nparams].Z_j < 1.0 ||
|
||||
params[nparams].ZBLcut < 0.0 ||
|
||||
params[nparams].ZBLexpscale < 0.0)
|
||||
error->all(FLERR,"Illegal Tersoff parameter");
|
||||
|
||||
nparams++;
|
||||
|
||||
159
src/USER-OMP/pair_ufm_omp.cpp
Normal file
159
src/USER-OMP/pair_ufm_omp.cpp
Normal file
@ -0,0 +1,159 @@
|
||||
/* ----------------------------------------------------------------------
|
||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
http://lammps.sandia.gov, Sandia National Laboratories
|
||||
Steve Plimpton, sjplimp@sandia.gov
|
||||
|
||||
This software is distributed under the GNU General Public License.
|
||||
|
||||
See the README file in the top-level LAMMPS directory.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
Contributing author:
|
||||
Rodolfo Paula Leite (Unicamp/Brazil) - pl.rodolfo@gmail.com
|
||||
Maurice de Koning (Unicamp/Brazil) - dekoning@ifi.unicamp.br
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include <math.h>
|
||||
#include "pair_ufm_omp.h"
|
||||
#include "atom.h"
|
||||
#include "comm.h"
|
||||
#include "force.h"
|
||||
#include "neighbor.h"
|
||||
#include "neigh_list.h"
|
||||
|
||||
#include "suffix.h"
|
||||
using namespace LAMMPS_NS;
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
PairUFMOMP::PairUFMOMP(LAMMPS *lmp) :
|
||||
PairUFM(lmp), ThrOMP(lmp, THR_PAIR)
|
||||
{
|
||||
suffix_flag |= Suffix::OMP;
|
||||
respa_enable = 0;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void PairUFMOMP::compute(int eflag, int vflag)
|
||||
{
|
||||
if (eflag || vflag) {
|
||||
ev_setup(eflag,vflag);
|
||||
} else evflag = vflag_fdotr = 0;
|
||||
|
||||
const int nall = atom->nlocal + atom->nghost;
|
||||
const int nthreads = comm->nthreads;
|
||||
const int inum = list->inum;
|
||||
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none) shared(eflag,vflag)
|
||||
#endif
|
||||
{
|
||||
int ifrom, ito, tid;
|
||||
|
||||
loop_setup_thr(ifrom, ito, tid, inum, nthreads);
|
||||
ThrData *thr = fix->get_thr(tid);
|
||||
thr->timer(Timer::START);
|
||||
ev_setup_thr(eflag, vflag, nall, eatom, vatom, thr);
|
||||
|
||||
if (evflag) {
|
||||
if (eflag) {
|
||||
if (force->newton_pair) eval<1,1,1>(ifrom, ito, thr);
|
||||
else eval<1,1,0>(ifrom, ito, thr);
|
||||
} else {
|
||||
if (force->newton_pair) eval<1,0,1>(ifrom, ito, thr);
|
||||
else eval<1,0,0>(ifrom, ito, thr);
|
||||
}
|
||||
} else {
|
||||
if (force->newton_pair) eval<0,0,1>(ifrom, ito, thr);
|
||||
else eval<0,0,0>(ifrom, ito, thr);
|
||||
}
|
||||
|
||||
thr->timer(Timer::PAIR);
|
||||
reduce_thr(this, eflag, vflag, thr);
|
||||
} // end of omp parallel region
|
||||
}
|
||||
|
||||
template <int EVFLAG, int EFLAG, int NEWTON_PAIR>
|
||||
void PairUFMOMP::eval(int iifrom, int iito, ThrData * const thr)
|
||||
{
|
||||
int i,j,ii,jj,jnum,itype,jtype;
|
||||
double xtmp,ytmp,ztmp,delx,dely,delz,evdwl,fpair;
|
||||
double rsq,expuf,factor;
|
||||
int *ilist,*jlist,*numneigh,**firstneigh;
|
||||
|
||||
evdwl = 0.0;
|
||||
|
||||
const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0];
|
||||
dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0];
|
||||
const int * _noalias const type = atom->type;
|
||||
const int nlocal = atom->nlocal;
|
||||
const double * _noalias const special_lj = force->special_lj;
|
||||
double fxtmp,fytmp,fztmp;
|
||||
|
||||
ilist = list->ilist;
|
||||
numneigh = list->numneigh;
|
||||
firstneigh = list->firstneigh;
|
||||
|
||||
// loop over neighbors of my atoms
|
||||
|
||||
for (ii = iifrom; ii < iito; ++ii) {
|
||||
|
||||
i = ilist[ii];
|
||||
xtmp = x[i].x;
|
||||
ytmp = x[i].y;
|
||||
ztmp = x[i].z;
|
||||
itype = type[i];
|
||||
jlist = firstneigh[i];
|
||||
jnum = numneigh[i];
|
||||
fxtmp=fytmp=fztmp=0.0;
|
||||
|
||||
for (jj = 0; jj < jnum; jj++) {
|
||||
j = jlist[jj];
|
||||
factor = special_lj[sbmask(j)];
|
||||
j &= NEIGHMASK;
|
||||
|
||||
delx = xtmp - x[j].x;
|
||||
dely = ytmp - x[j].y;
|
||||
delz = ztmp - x[j].z;
|
||||
rsq = delx*delx + dely*dely + delz*delz;
|
||||
jtype = type[j];
|
||||
|
||||
if (rsq < cutsq[itype][jtype]) {
|
||||
expuf = exp(- rsq * uf2[itype][jtype]);
|
||||
fpair = factor * scale[itype][jtype] * uf1[itype][jtype] * expuf /(1.0 - expuf);
|
||||
|
||||
fxtmp += delx*fpair;
|
||||
fytmp += dely*fpair;
|
||||
fztmp += delz*fpair;
|
||||
if (NEWTON_PAIR || j < nlocal) {
|
||||
f[j].x -= delx*fpair;
|
||||
f[j].y -= dely*fpair;
|
||||
f[j].z -= delz*fpair;
|
||||
}
|
||||
|
||||
if (EFLAG) {
|
||||
evdwl = -uf3[itype][jtype] * log(1.0 - expuf) - offset[itype][jtype];
|
||||
evdwl *= factor;
|
||||
}
|
||||
|
||||
if (EVFLAG) ev_tally_thr(this,i,j,nlocal,NEWTON_PAIR,
|
||||
evdwl,0.0,fpair,delx,dely,delz,thr);
|
||||
}
|
||||
}
|
||||
f[i].x += fxtmp;
|
||||
f[i].y += fytmp;
|
||||
f[i].z += fztmp;
|
||||
}
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
double PairUFMOMP::memory_usage()
|
||||
{
|
||||
double bytes = memory_usage_thr();
|
||||
bytes += PairUFM::memory_usage();
|
||||
|
||||
return bytes;
|
||||
}
|
||||
50
src/USER-OMP/pair_ufm_omp.h
Normal file
50
src/USER-OMP/pair_ufm_omp.h
Normal file
@ -0,0 +1,50 @@
|
||||
/* -*- c++ -*- ----------------------------------------------------------
|
||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
http://lammps.sandia.gov, Sandia National Laboratories
|
||||
Steve Plimpton, sjplimp@sandia.gov
|
||||
|
||||
Copyright (2003) Sandia Corporation. Under the terms of Contract
|
||||
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
|
||||
certain rights in this software. This software is distributed under
|
||||
the GNU General Public License.
|
||||
|
||||
See the README file in the top-level LAMMPS directory.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
Contributing author:
|
||||
Rodolfo Paula Leite (Unicamp/Brazil) - pl.rodolfo@gmail.com
|
||||
Maurice de Koning (Unicamp/Brazil) - dekoning@ifi.unicamp.br
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#ifdef PAIR_CLASS
|
||||
|
||||
PairStyle(ufm/omp,PairUFMOMP)
|
||||
|
||||
#else
|
||||
|
||||
#ifndef LMP_PAIR_UFM_OMP_H
|
||||
#define LMP_PAIR_UFM_OMP_H
|
||||
|
||||
#include "pair_ufm.h"
|
||||
#include "thr_omp.h"
|
||||
|
||||
namespace LAMMPS_NS {
|
||||
|
||||
class PairUFMOMP : public PairUFM, public ThrOMP {
|
||||
|
||||
public:
|
||||
PairUFMOMP(class LAMMPS *);
|
||||
|
||||
virtual void compute(int, int);
|
||||
virtual double memory_usage();
|
||||
|
||||
private:
|
||||
template <int EVFLAG, int EFLAG, int NEWTON_PAIR>
|
||||
void eval(int ifrom, int ito, ThrData * const thr);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
31
src/atom.cpp
31
src/atom.cpp
@ -1031,8 +1031,8 @@ void Atom::data_bonds(int n, char *buf, int *count, tagint id_offset,
|
||||
}
|
||||
itype += type_offset;
|
||||
|
||||
if (atom1 <= 0 || atom1 > map_tag_max ||
|
||||
atom2 <= 0 || atom2 > map_tag_max)
|
||||
if ((atom1 <= 0) || (atom1 > map_tag_max) ||
|
||||
(atom2 <= 0) || (atom2 > map_tag_max) || (atom1 == atom2))
|
||||
error->one(FLERR,"Invalid atom ID in Bonds section of data file");
|
||||
if (itype <= 0 || itype > nbondtypes)
|
||||
error->one(FLERR,"Invalid bond type in Bonds section of data file");
|
||||
@ -1085,9 +1085,10 @@ void Atom::data_angles(int n, char *buf, int *count, tagint id_offset,
|
||||
}
|
||||
itype += type_offset;
|
||||
|
||||
if (atom1 <= 0 || atom1 > map_tag_max ||
|
||||
atom2 <= 0 || atom2 > map_tag_max ||
|
||||
atom3 <= 0 || atom3 > map_tag_max)
|
||||
if ((atom1 <= 0) || (atom1 > map_tag_max) ||
|
||||
(atom2 <= 0) || (atom2 > map_tag_max) ||
|
||||
(atom3 <= 0) || (atom3 > map_tag_max) ||
|
||||
(atom1 == atom2) || (atom1 == atom3) || (atom2 == atom3))
|
||||
error->one(FLERR,"Invalid atom ID in Angles section of data file");
|
||||
if (itype <= 0 || itype > nangletypes)
|
||||
error->one(FLERR,"Invalid angle type in Angles section of data file");
|
||||
@ -1156,10 +1157,12 @@ void Atom::data_dihedrals(int n, char *buf, int *count, tagint id_offset,
|
||||
}
|
||||
itype += type_offset;
|
||||
|
||||
if (atom1 <= 0 || atom1 > map_tag_max ||
|
||||
atom2 <= 0 || atom2 > map_tag_max ||
|
||||
atom3 <= 0 || atom3 > map_tag_max ||
|
||||
atom4 <= 0 || atom4 > map_tag_max)
|
||||
if ((atom1 <= 0) || (atom1 > map_tag_max) ||
|
||||
(atom2 <= 0) || (atom2 > map_tag_max) ||
|
||||
(atom3 <= 0) || (atom3 > map_tag_max) ||
|
||||
(atom4 <= 0) || (atom4 > map_tag_max) ||
|
||||
(atom1 == atom2) || (atom1 == atom3) || (atom1 == atom4) ||
|
||||
(atom2 == atom3) || (atom2 == atom4) || (atom3 == atom4))
|
||||
error->one(FLERR,"Invalid atom ID in Dihedrals section of data file");
|
||||
if (itype <= 0 || itype > ndihedraltypes)
|
||||
error->one(FLERR,
|
||||
@ -1243,10 +1246,12 @@ void Atom::data_impropers(int n, char *buf, int *count, tagint id_offset,
|
||||
}
|
||||
itype += type_offset;
|
||||
|
||||
if (atom1 <= 0 || atom1 > map_tag_max ||
|
||||
atom2 <= 0 || atom2 > map_tag_max ||
|
||||
atom3 <= 0 || atom3 > map_tag_max ||
|
||||
atom4 <= 0 || atom4 > map_tag_max)
|
||||
if ((atom1 <= 0) || (atom1 > map_tag_max) ||
|
||||
(atom2 <= 0) || (atom2 > map_tag_max) ||
|
||||
(atom3 <= 0) || (atom3 > map_tag_max) ||
|
||||
(atom4 <= 0) || (atom4 > map_tag_max) ||
|
||||
(atom1 == atom2) || (atom1 == atom3) || (atom1 == atom4) ||
|
||||
(atom2 == atom3) || (atom2 == atom4) || (atom3 == atom4))
|
||||
error->one(FLERR,"Invalid atom ID in Impropers section of data file");
|
||||
if (itype <= 0 || itype > nimpropertypes)
|
||||
error->one(FLERR,
|
||||
|
||||
@ -274,7 +274,7 @@ void AtomVec::write_angle(FILE *fp, int n, tagint **buf, int index)
|
||||
pack dihedral info for data file
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void AtomVec::pack_dihedral(tagint **buf)
|
||||
int AtomVec::pack_dihedral(tagint **buf)
|
||||
{
|
||||
tagint *tag = atom->tag;
|
||||
int *num_dihedral = atom->num_dihedral;
|
||||
@ -291,25 +291,31 @@ void AtomVec::pack_dihedral(tagint **buf)
|
||||
if (newton_bond) {
|
||||
for (i = 0; i < nlocal; i++)
|
||||
for (j = 0; j < num_dihedral[i]; j++) {
|
||||
buf[m][0] = MAX(dihedral_type[i][j],-dihedral_type[i][j]);
|
||||
buf[m][1] = dihedral_atom1[i][j];
|
||||
buf[m][2] = dihedral_atom2[i][j];
|
||||
buf[m][3] = dihedral_atom3[i][j];
|
||||
buf[m][4] = dihedral_atom4[i][j];
|
||||
if (buf) {
|
||||
buf[m][0] = MAX(dihedral_type[i][j],-dihedral_type[i][j]);
|
||||
buf[m][1] = dihedral_atom1[i][j];
|
||||
buf[m][2] = dihedral_atom2[i][j];
|
||||
buf[m][3] = dihedral_atom3[i][j];
|
||||
buf[m][4] = dihedral_atom4[i][j];
|
||||
}
|
||||
m++;
|
||||
}
|
||||
} else {
|
||||
for (i = 0; i < nlocal; i++)
|
||||
for (j = 0; j < num_dihedral[i]; j++)
|
||||
if (tag[i] == dihedral_atom2[i][j]) {
|
||||
buf[m][0] = MAX(dihedral_type[i][j],-dihedral_type[i][j]);
|
||||
buf[m][1] = dihedral_atom1[i][j];
|
||||
buf[m][2] = dihedral_atom2[i][j];
|
||||
buf[m][3] = dihedral_atom3[i][j];
|
||||
buf[m][4] = dihedral_atom4[i][j];
|
||||
if (buf) {
|
||||
buf[m][0] = MAX(dihedral_type[i][j],-dihedral_type[i][j]);
|
||||
buf[m][1] = dihedral_atom1[i][j];
|
||||
buf[m][2] = dihedral_atom2[i][j];
|
||||
buf[m][3] = dihedral_atom3[i][j];
|
||||
buf[m][4] = dihedral_atom4[i][j];
|
||||
}
|
||||
m++;
|
||||
}
|
||||
}
|
||||
|
||||
return m;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
@ -330,7 +336,7 @@ void AtomVec::write_dihedral(FILE *fp, int n, tagint **buf, int index)
|
||||
pack improper info for data file
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void AtomVec::pack_improper(tagint **buf)
|
||||
int AtomVec::pack_improper(tagint **buf)
|
||||
{
|
||||
tagint *tag = atom->tag;
|
||||
int *num_improper = atom->num_improper;
|
||||
@ -347,25 +353,31 @@ void AtomVec::pack_improper(tagint **buf)
|
||||
if (newton_bond) {
|
||||
for (i = 0; i < nlocal; i++)
|
||||
for (j = 0; j < num_improper[i]; j++) {
|
||||
buf[m][0] = MAX(improper_type[i][j],-improper_type[i][j]);
|
||||
buf[m][1] = improper_atom1[i][j];
|
||||
buf[m][2] = improper_atom2[i][j];
|
||||
buf[m][3] = improper_atom3[i][j];
|
||||
buf[m][4] = improper_atom4[i][j];
|
||||
if (buf) {
|
||||
buf[m][0] = MAX(improper_type[i][j],-improper_type[i][j]);
|
||||
buf[m][1] = improper_atom1[i][j];
|
||||
buf[m][2] = improper_atom2[i][j];
|
||||
buf[m][3] = improper_atom3[i][j];
|
||||
buf[m][4] = improper_atom4[i][j];
|
||||
}
|
||||
m++;
|
||||
}
|
||||
} else {
|
||||
for (i = 0; i < nlocal; i++)
|
||||
for (j = 0; j < num_improper[i]; j++)
|
||||
if (tag[i] == improper_atom2[i][j]) {
|
||||
buf[m][0] = MAX(improper_type[i][j],-improper_type[i][j]);
|
||||
buf[m][1] = improper_atom1[i][j];
|
||||
buf[m][2] = improper_atom2[i][j];
|
||||
buf[m][3] = improper_atom3[i][j];
|
||||
buf[m][4] = improper_atom4[i][j];
|
||||
if (buf) {
|
||||
buf[m][0] = MAX(improper_type[i][j],-improper_type[i][j]);
|
||||
buf[m][1] = improper_atom1[i][j];
|
||||
buf[m][2] = improper_atom2[i][j];
|
||||
buf[m][3] = improper_atom3[i][j];
|
||||
buf[m][4] = improper_atom4[i][j];
|
||||
}
|
||||
m++;
|
||||
}
|
||||
}
|
||||
|
||||
return m;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
|
||||
@ -107,9 +107,9 @@ class AtomVec : protected Pointers {
|
||||
void write_bond(FILE *, int, tagint **, int);
|
||||
int pack_angle(tagint **);
|
||||
void write_angle(FILE *, int, tagint **, int);
|
||||
void pack_dihedral(tagint **);
|
||||
int pack_dihedral(tagint **);
|
||||
void write_dihedral(FILE *, int, tagint **, int);
|
||||
void pack_improper(tagint **);
|
||||
int pack_improper(tagint **);
|
||||
void write_improper(FILE *, int, tagint **, int);
|
||||
|
||||
virtual int property_atom(char *) {return -1;}
|
||||
|
||||
@ -75,6 +75,8 @@ void CreateBonds::command(int narg, char **arg)
|
||||
btype = force->inumeric(FLERR,arg[1]);
|
||||
batom1 = force->tnumeric(FLERR,arg[2]);
|
||||
batom2 = force->tnumeric(FLERR,arg[3]);
|
||||
if (batom1 == batom2)
|
||||
error->all(FLERR,"Illegal create_bonds command");
|
||||
iarg = 4;
|
||||
} else if (strcmp(arg[0],"single/angle") == 0) {
|
||||
style = SANGLE;
|
||||
@ -83,6 +85,8 @@ void CreateBonds::command(int narg, char **arg)
|
||||
aatom1 = force->tnumeric(FLERR,arg[2]);
|
||||
aatom2 = force->tnumeric(FLERR,arg[3]);
|
||||
aatom3 = force->tnumeric(FLERR,arg[4]);
|
||||
if ((aatom1 == aatom2) || (aatom1 == aatom3) || (aatom2 == aatom3))
|
||||
error->all(FLERR,"Illegal create_bonds command");
|
||||
iarg = 5;
|
||||
} else if (strcmp(arg[0],"single/dihedral") == 0) {
|
||||
style = SDIHEDRAL;
|
||||
@ -92,6 +96,9 @@ void CreateBonds::command(int narg, char **arg)
|
||||
datom2 = force->tnumeric(FLERR,arg[3]);
|
||||
datom3 = force->tnumeric(FLERR,arg[4]);
|
||||
datom4 = force->tnumeric(FLERR,arg[5]);
|
||||
if ((datom1 == datom2) || (datom1 == datom3) || (datom1 == datom4) ||
|
||||
(datom2 == datom3) || (datom2 == datom4) || (datom3 == datom4))
|
||||
error->all(FLERR,"Illegal create_bonds command");
|
||||
iarg = 6;
|
||||
} else error->all(FLERR,"Illegal create_bonds command");
|
||||
|
||||
|
||||
@ -134,6 +134,8 @@ FixPropertyAtom::FixPropertyAtom(LAMMPS *lmp, int narg, char **arg) :
|
||||
// register with Atom class
|
||||
|
||||
nmax_old = 0;
|
||||
if (!lmp->kokkos)
|
||||
grow_arrays(atom->nmax);
|
||||
atom->add_callback(0);
|
||||
atom->add_callback(1);
|
||||
if (border) atom->add_callback(2);
|
||||
@ -189,8 +191,6 @@ int FixPropertyAtom::setmask()
|
||||
|
||||
void FixPropertyAtom::init()
|
||||
{
|
||||
grow_arrays(atom->nmax);
|
||||
|
||||
// error if atom style has changed since fix was defined
|
||||
// don't allow this b/c user could change to style that defines molecule,q
|
||||
|
||||
|
||||
376
src/pair_ufm.cpp
Normal file
376
src/pair_ufm.cpp
Normal file
@ -0,0 +1,376 @@
|
||||
/* -*- c++ -*- ----------------------------------------------------------
|
||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
http://lammps.sandia.gov, Sandia National Laboratories
|
||||
Steve Plimpton, sjplimp@sandia.gov
|
||||
|
||||
Copyright (2003) Sandia Corporation. Under the terms of Contract
|
||||
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
|
||||
certain rights in this software. This software is distributed under
|
||||
the GNU General Public License.
|
||||
|
||||
See the README file in the top-level LAMMPS directory.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
/* -----------------------------------------------------------------------
|
||||
Contributing author:
|
||||
Rodolfo Paula Leite (Unicamp/Brazil) - pl.rodolfo@gmail.com
|
||||
Maurice de Koning (Unicamp/Brazil) - dekoning@ifi.unicamp.br
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "pair_ufm.h"
|
||||
#include "atom.h"
|
||||
#include "comm.h"
|
||||
#include "force.h"
|
||||
#include "neighbor.h"
|
||||
#include "neigh_list.h"
|
||||
#include "neigh_request.h"
|
||||
#include "update.h"
|
||||
#include "integrate.h"
|
||||
#include "respa.h"
|
||||
#include "math_const.h"
|
||||
#include "memory.h"
|
||||
#include "error.h"
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
using namespace MathConst;
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
PairUFM::PairUFM(LAMMPS *lmp) : Pair(lmp)
|
||||
{
|
||||
writedata = 1;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
PairUFM::~PairUFM()
|
||||
{
|
||||
if (allocated) {
|
||||
memory->destroy(setflag);
|
||||
memory->destroy(cutsq);
|
||||
memory->destroy(cut);
|
||||
memory->destroy(epsilon);
|
||||
memory->destroy(sigma);
|
||||
memory->destroy(scale);
|
||||
memory->destroy(uf1);
|
||||
memory->destroy(uf2);
|
||||
memory->destroy(uf3);
|
||||
memory->destroy(uf4);
|
||||
memory->destroy(offset);
|
||||
}
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void PairUFM::compute(int eflag, int vflag)
|
||||
{
|
||||
int i,j,ii,jj,inum,jnum,itype,jtype;
|
||||
double xtmp,ytmp,ztmp,delx,dely,delz,evdwl,fpair;
|
||||
double rsq, expuf, factor;
|
||||
int *ilist,*jlist,*numneigh,**firstneigh;
|
||||
|
||||
evdwl = 0.0;
|
||||
if (eflag || vflag) ev_setup(eflag,vflag);
|
||||
else evflag = vflag_fdotr = 0;
|
||||
|
||||
double **x = atom->x;
|
||||
double **f = atom->f;
|
||||
int *type = atom->type;
|
||||
int nlocal = atom->nlocal;
|
||||
double *special_lj = force->special_lj;
|
||||
int newton_pair = force->newton_pair;
|
||||
|
||||
inum = list->inum;
|
||||
ilist = list->ilist;
|
||||
numneigh = list->numneigh;
|
||||
firstneigh = list->firstneigh;
|
||||
|
||||
// loop over neighbors of my atoms
|
||||
|
||||
for (ii = 0; ii < inum; ii++) {
|
||||
i = ilist[ii];
|
||||
xtmp = x[i][0];
|
||||
ytmp = x[i][1];
|
||||
ztmp = x[i][2];
|
||||
itype = type[i];
|
||||
jlist = firstneigh[i];
|
||||
jnum = numneigh[i];
|
||||
|
||||
for (jj = 0; jj < jnum; jj++) {
|
||||
j = jlist[jj];
|
||||
factor = special_lj[sbmask(j)];
|
||||
j &= NEIGHMASK;
|
||||
|
||||
delx = xtmp - x[j][0];
|
||||
dely = ytmp - x[j][1];
|
||||
delz = ztmp - x[j][2];
|
||||
rsq = delx*delx + dely*dely + delz*delz;
|
||||
jtype = type[j];
|
||||
|
||||
if (rsq < cutsq[itype][jtype]) {
|
||||
expuf = exp(- rsq * uf2[itype][jtype]);
|
||||
fpair = factor * scale[itype][jtype] * uf1[itype][jtype] * expuf /(1.0 - expuf);
|
||||
|
||||
f[i][0] += delx*fpair;
|
||||
f[i][1] += dely*fpair;
|
||||
f[i][2] += delz*fpair;
|
||||
if (newton_pair || j < nlocal) {
|
||||
f[j][0] -= delx*fpair;
|
||||
f[j][1] -= dely*fpair;
|
||||
f[j][2] -= delz*fpair;
|
||||
}
|
||||
|
||||
if (eflag) {
|
||||
evdwl = -uf3[itype][jtype] * log(1.0 - expuf) - offset[itype][jtype];
|
||||
evdwl *= factor;
|
||||
}
|
||||
|
||||
if (evflag) ev_tally(i,j,nlocal,newton_pair,
|
||||
evdwl,0.0,fpair,delx,dely,delz);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (vflag_fdotr) virial_fdotr_compute();
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
allocate all arrays
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void PairUFM::allocate()
|
||||
{
|
||||
allocated = 1;
|
||||
int n = atom->ntypes;
|
||||
|
||||
memory->create(setflag,n+1,n+1,"pair:setflag");
|
||||
for (int i = 1; i <= n; i++)
|
||||
for (int j = i; j <= n; j++)
|
||||
setflag[i][j] = 0;
|
||||
|
||||
memory->create(cutsq,n+1,n+1,"pair:cutsq");
|
||||
|
||||
memory->create(cut,n+1,n+1,"pair:cut");
|
||||
memory->create(epsilon,n+1,n+1,"pair:epsilon");
|
||||
memory->create(sigma,n+1,n+1,"pair:sigma");
|
||||
memory->create(scale,n+1,n+1,"pair:scale");
|
||||
memory->create(uf1,n+1,n+1,"pair:uf1");
|
||||
memory->create(uf2,n+1,n+1,"pair:uf2");
|
||||
memory->create(uf3,n+1,n+1,"pair:uf3");
|
||||
memory->create(uf4,n+1,n+1,"pair:uf4");
|
||||
memory->create(offset,n+1,n+1,"pair:offset");
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
global settings
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void PairUFM::settings(int narg, char **arg)
|
||||
{
|
||||
if (narg != 1) error->all(FLERR,"Illegal pair_style command");
|
||||
|
||||
cut_global = force->numeric(FLERR,arg[0]);
|
||||
|
||||
// reset cutoffs that have been explicitly set
|
||||
|
||||
if (allocated) {
|
||||
int i,j;
|
||||
for (i = 1; i <= atom->ntypes; i++)
|
||||
for (j = i+1; j <= atom->ntypes; j++)
|
||||
if (setflag[i][j]) cut[i][j] = cut_global;
|
||||
}
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
set coeffs for one or more type pairs
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void PairUFM::coeff(int narg, char **arg)
|
||||
{
|
||||
if (narg < 4 || narg > 5)
|
||||
error->all(FLERR,"Incorrect args for pair coefficients");
|
||||
if (!allocated) allocate();
|
||||
|
||||
int ilo,ihi,jlo,jhi;
|
||||
force->bounds(FLERR,arg[0],atom->ntypes,ilo,ihi);
|
||||
force->bounds(FLERR,arg[1],atom->ntypes,jlo,jhi);
|
||||
|
||||
double epsilon_one = force->numeric(FLERR,arg[2]);
|
||||
double sigma_one = force->numeric(FLERR,arg[3]);
|
||||
|
||||
double cut_one = cut_global;
|
||||
|
||||
if (narg == 5) cut_one = force->numeric(FLERR,arg[4]);
|
||||
|
||||
int count = 0;
|
||||
for (int i = ilo; i <= ihi; i++) {
|
||||
for (int j = MAX(jlo,i); j <= jhi; j++) {
|
||||
epsilon[i][j] = epsilon_one;
|
||||
sigma[i][j] = sigma_one;
|
||||
scale[i][j] = 1.0;
|
||||
cut[i][j] = cut_one;
|
||||
setflag[i][j] = 1;
|
||||
count++;
|
||||
}
|
||||
}
|
||||
|
||||
if (count == 0) error->all(FLERR,"Incorrect args for pair coefficients");
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
init for one type pair i,j and corresponding j,i
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
double PairUFM::init_one(int i, int j)
|
||||
{
|
||||
if (setflag[i][j] == 0) {
|
||||
epsilon[i][j] = mix_energy(epsilon[i][i],epsilon[j][j],
|
||||
sigma[i][i],sigma[j][j]);
|
||||
sigma[i][j] = mix_distance(sigma[i][i],sigma[j][j]);
|
||||
cut[i][j] = mix_distance(cut[i][i],cut[j][j]);
|
||||
}
|
||||
|
||||
uf1[i][j] = 2.0 * epsilon[i][j] / pow(sigma[i][j],2.0);
|
||||
uf2[i][j] = 1.0 / pow(sigma[i][j],2.0);
|
||||
uf3[i][j] = epsilon[i][j];
|
||||
uf4[i][j] = sigma[i][j];
|
||||
|
||||
if (offset_flag) {
|
||||
double ratio = pow(cut[i][j] / sigma[i][j],2.0);
|
||||
offset[i][j] = - epsilon[i][j] * log ( 1.0 - exp( -ratio )) ;
|
||||
} else offset[i][j] = 0.0;
|
||||
|
||||
uf1[j][i] = uf1[i][j];
|
||||
uf2[j][i] = uf2[i][j];
|
||||
uf3[j][i] = uf3[i][j];
|
||||
uf4[j][i] = uf4[i][j];
|
||||
scale[j][i] = scale[i][j];
|
||||
offset[j][i] = offset[i][j];
|
||||
|
||||
return cut[i][j];
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
proc 0 writes to restart file
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void PairUFM::write_restart(FILE *fp)
|
||||
{
|
||||
write_restart_settings(fp);
|
||||
|
||||
int i,j;
|
||||
for (i = 1; i <= atom->ntypes; i++)
|
||||
for (j = i; j <= atom->ntypes; j++) {
|
||||
fwrite(&setflag[i][j],sizeof(int),1,fp);
|
||||
if (setflag[i][j]) {
|
||||
fwrite(&epsilon[i][j],sizeof(double),1,fp);
|
||||
fwrite(&sigma[i][j],sizeof(double),1,fp);
|
||||
fwrite(&cut[i][j],sizeof(double),1,fp);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
proc 0 reads from restart file, bcasts
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void PairUFM::read_restart(FILE *fp)
|
||||
{
|
||||
read_restart_settings(fp);
|
||||
allocate();
|
||||
|
||||
int i,j;
|
||||
int me = comm->me;
|
||||
for (i = 1; i <= atom->ntypes; i++)
|
||||
for (j = i; j <= atom->ntypes; j++) {
|
||||
if (me == 0) fread(&setflag[i][j],sizeof(int),1,fp);
|
||||
MPI_Bcast(&setflag[i][j],1,MPI_INT,0,world);
|
||||
if (setflag[i][j]) {
|
||||
if (me == 0) {
|
||||
fread(&epsilon[i][j],sizeof(double),1,fp);
|
||||
fread(&sigma[i][j],sizeof(double),1,fp);
|
||||
fread(&cut[i][j],sizeof(double),1,fp);
|
||||
}
|
||||
MPI_Bcast(&epsilon[i][j],1,MPI_DOUBLE,0,world);
|
||||
MPI_Bcast(&sigma[i][j],1,MPI_DOUBLE,0,world);
|
||||
MPI_Bcast(&cut[i][j],1,MPI_DOUBLE,0,world);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
proc 0 writes to restart file
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void PairUFM::write_restart_settings(FILE *fp)
|
||||
{
|
||||
fwrite(&cut_global,sizeof(double),1,fp);
|
||||
fwrite(&offset_flag,sizeof(int),1,fp);
|
||||
fwrite(&mix_flag,sizeof(int),1,fp);
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
proc 0 reads from restart file, bcasts
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void PairUFM::read_restart_settings(FILE *fp)
|
||||
{
|
||||
int me = comm->me;
|
||||
if (me == 0) {
|
||||
fread(&cut_global,sizeof(double),1,fp);
|
||||
fread(&offset_flag,sizeof(int),1,fp);
|
||||
fread(&mix_flag,sizeof(int),1,fp);
|
||||
}
|
||||
MPI_Bcast(&cut_global,1,MPI_DOUBLE,0,world);
|
||||
MPI_Bcast(&offset_flag,1,MPI_INT,0,world);
|
||||
MPI_Bcast(&mix_flag,1,MPI_INT,0,world);
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
proc 0 writes to data file
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void PairUFM::write_data(FILE *fp)
|
||||
{
|
||||
for (int i = 1; i <= atom->ntypes; i++)
|
||||
fprintf(fp,"%d %g %g\n",i,epsilon[i][i],sigma[i][i]);
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
proc 0 writes all pairs to data file
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void PairUFM::write_data_all(FILE *fp)
|
||||
{
|
||||
for (int i = 1; i <= atom->ntypes; i++)
|
||||
for (int j = i; j <= atom->ntypes; j++)
|
||||
fprintf(fp,"%d %d %g %g %g\n",i,j,epsilon[i][j],sigma[i][j],cut[i][j]);
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
double PairUFM::single(int i, int j, int itype, int jtype, double rsq,
|
||||
double factor_coul, double factor_lj,
|
||||
double &fforce)
|
||||
{
|
||||
double expuf,phiuf;
|
||||
expuf = exp(- rsq * uf2[itype][jtype]);
|
||||
fforce = factor_lj * uf1[itype][jtype] * expuf /(1.0 - expuf);
|
||||
phiuf = - uf3[itype][jtype] * log(1.0 - expuf) - offset[itype][jtype];
|
||||
return factor_lj * phiuf;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void *PairUFM::extract(const char *str, int &dim)
|
||||
{
|
||||
dim = 2;
|
||||
if (strcmp(str,"epsilon") == 0) return (void *) epsilon;
|
||||
if (strcmp(str,"sigma") == 0) return (void *) sigma;
|
||||
if (strcmp(str,"scale") == 0) return (void *) scale;
|
||||
return NULL;
|
||||
}
|
||||
76
src/pair_ufm.h
Normal file
76
src/pair_ufm.h
Normal file
@ -0,0 +1,76 @@
|
||||
/* -*- c++ -*- ----------------------------------------------------------
|
||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
http://lammps.sandia.gov, Sandia National Laboratories
|
||||
Steve Plimpton, sjplimp@sandia.gov
|
||||
|
||||
Copyright (2003) Sandia Corporation. Under the terms of Contract
|
||||
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
|
||||
certain rights in this software. This software is distributed under
|
||||
the GNU General Public License.
|
||||
|
||||
See the README file in the top-level LAMMPS directory.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
Contributing author:
|
||||
Rodolfo Paula Leite (Unicamp/Brazil) - pl.rodolfo@gmail.com
|
||||
Maurice de Koning (Unicamp/Brazil) - dekoning@ifi.unicamp.br
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#ifdef PAIR_CLASS
|
||||
|
||||
PairStyle(ufm,PairUFM)
|
||||
|
||||
#else
|
||||
|
||||
#ifndef LMP_PAIR_UFM_H
|
||||
#define LMP_PAIR_UFM_H
|
||||
|
||||
#include "pair.h"
|
||||
|
||||
namespace LAMMPS_NS {
|
||||
|
||||
class PairUFM : public Pair {
|
||||
public:
|
||||
PairUFM(class LAMMPS *);
|
||||
virtual ~PairUFM();
|
||||
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 &);
|
||||
void *extract(const char *, int &);
|
||||
|
||||
protected:
|
||||
double cut_global;
|
||||
double **cut,**scale;
|
||||
double **epsilon,**sigma;
|
||||
double **uf1,**uf2,**uf3,**uf4,**offset;
|
||||
|
||||
virtual void allocate();
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* ERROR/WARNING messages:
|
||||
|
||||
E: Illegal ... command
|
||||
|
||||
Self-explanatory. Check the input script syntax and compare to the
|
||||
documentation for the command. You can use -echo screen as a
|
||||
command-line option when running LAMMPS to see the offending line.
|
||||
|
||||
E: Incorrect args for pair coefficients
|
||||
|
||||
Self-explanatory. Check the input script or data file.
|
||||
|
||||
*/
|
||||
@ -152,8 +152,8 @@ void WriteData::write(char *file)
|
||||
if (natoms != atom->natoms && output->thermo->lostflag == ERROR)
|
||||
error->all(FLERR,"Atom count is inconsistent, cannot write data file");
|
||||
|
||||
// sum up bond,angle counts
|
||||
// may be different than atom->nbonds,nangles if broken/turned-off
|
||||
// sum up bond,angle,dihedral,improper counts
|
||||
// may be different than atom->nbonds,nangles, etc. if broken/turned-off
|
||||
|
||||
if (atom->molecular == 1 && (atom->nbonds || atom->nbondtypes)) {
|
||||
nbonds_local = atom->avec->pack_bond(NULL);
|
||||
@ -164,6 +164,16 @@ void WriteData::write(char *file)
|
||||
MPI_Allreduce(&nangles_local,&nangles,1,MPI_LMP_BIGINT,MPI_SUM,world);
|
||||
}
|
||||
|
||||
if (atom->molecular == 1 && (atom->ndihedrals || atom->ndihedraltypes)) {
|
||||
ndihedrals_local = atom->avec->pack_dihedral(NULL);
|
||||
MPI_Allreduce(&ndihedrals_local,&ndihedrals,1,MPI_LMP_BIGINT,MPI_SUM,world);
|
||||
}
|
||||
|
||||
if (atom->molecular == 1 && (atom->nimpropers || atom->nimpropertypes)) {
|
||||
nimpropers_local = atom->avec->pack_improper(NULL);
|
||||
MPI_Allreduce(&nimpropers_local,&nimpropers,1,MPI_LMP_BIGINT,MPI_SUM,world);
|
||||
}
|
||||
|
||||
// open data file
|
||||
|
||||
if (me == 0) {
|
||||
|
||||
@ -38,6 +38,8 @@ class WriteData : protected Pointers {
|
||||
FILE *fp;
|
||||
bigint nbonds_local,nbonds;
|
||||
bigint nangles_local,nangles;
|
||||
bigint ndihedrals_local,ndihedrals;
|
||||
bigint nimpropers_local,nimpropers;
|
||||
|
||||
void header();
|
||||
void type_arrays();
|
||||
|
||||
@ -95,6 +95,7 @@ void WriteRestart::command(int narg, char **arg)
|
||||
if ((ptr = strchr(arg[0],'*'))) {
|
||||
*ptr = '\0';
|
||||
sprintf(file,"%s" BIGINT_FORMAT "%s",arg[0],update->ntimestep,ptr+1);
|
||||
*ptr = '*'; // must restore arg[0] so it can be correctly parsed below
|
||||
} else strcpy(file,arg[0]);
|
||||
|
||||
// check for multiproc output and an MPI-IO filename
|
||||
|
||||
5
tools/ch2lmp/.gitignore
vendored
Normal file
5
tools/ch2lmp/.gitignore
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
*.dump
|
||||
*.restart
|
||||
*.restart1
|
||||
*.restart2
|
||||
*.cmap
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,5 @@
|
||||
# Created by charmm2lammps v1.9.1 on Wed Oct 5 18:08:55 EDT 2016
|
||||
# Command: charmm2lammps.pl -water -ions -border=2.0 all36_prot 1gb1
|
||||
# Created by charmm2lammps v1.9.1 on Sun Jan 28 05:50:21 EST 2018
|
||||
# Command: charmm2lammps.pl -border=2.0 -cmap=36 -ions -water all36_prot 1gb1
|
||||
|
||||
units real
|
||||
neigh_modify delay 2 every 1
|
||||
@ -14,7 +14,10 @@ pair_style lj/charmm/coul/long 8 12
|
||||
pair_modify mix arithmetic
|
||||
kspace_style pppm 1e-6
|
||||
|
||||
read_data 1gb1.data
|
||||
# Modify following line to point to the desired CMAP file
|
||||
fix cmap all cmap charmm36.cmap
|
||||
fix_modify cmap energy yes
|
||||
read_data 1gb1.data fix cmap crossterm CMAP
|
||||
|
||||
special_bonds charmm
|
||||
thermo 10
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
LAMMPS (5 Oct 2016)
|
||||
package omp 0
|
||||
WARNING: OpenMP support not enabled during compilation; using 1 thread only. (../fix_omp.cpp:123)
|
||||
# Created by charmm2lammps v1.9.1 on Wed Oct 5 18:08:55 EDT 2016
|
||||
# Command: charmm2lammps.pl -water -ions -border=2.0 all36_prot 1gb1
|
||||
LAMMPS (17 Jan 2018)
|
||||
OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (../comm.cpp:90)
|
||||
using 1 OpenMP thread(s) per MPI task
|
||||
# Created by charmm2lammps v1.9.1 on Sun Jan 28 05:50:21 EST 2018
|
||||
# Command: charmm2lammps.pl -border=2.0 -cmap=36 -ions -water all36_prot 1gb1
|
||||
|
||||
units real
|
||||
neigh_modify delay 2 every 1
|
||||
@ -17,9 +17,13 @@ pair_style lj/charmm/coul/long 8 12
|
||||
pair_modify mix arithmetic
|
||||
kspace_style pppm 1e-6
|
||||
|
||||
read_data 1gb1.data
|
||||
# Modify following line to point to the desired CMAP file
|
||||
fix cmap all cmap charmm36.cmap
|
||||
Reading potential file charmm36.cmap with DATE: 2016-09-26
|
||||
fix_modify cmap energy yes
|
||||
read_data 1gb1.data fix cmap crossterm CMAP
|
||||
orthogonal box = (-20.8413 -14.5892 -13.805) to (23.4963 14.9692 10.827)
|
||||
2 by 2 by 2 MPI processor grid
|
||||
2 by 2 by 1 MPI processor grid
|
||||
reading atoms ...
|
||||
2833 atoms
|
||||
scanning bonds ...
|
||||
@ -49,91 +53,95 @@ thermo_style multi
|
||||
timestep 1.0
|
||||
|
||||
minimize 0.0 0.0 50 200
|
||||
WARNING: Resetting reneighboring criteria during minimization (../min.cpp:168)
|
||||
WARNING: Using 'neigh_modify every 1 delay 0 check yes' setting during minimization (../min.cpp:168)
|
||||
PPPM initialization ...
|
||||
WARNING: Using 12-bit tables for long-range coulomb (../kspace.cpp:316)
|
||||
WARNING: Using 12-bit tables for long-range coulomb (../kspace.cpp:321)
|
||||
G vector (1/distance) = 0.278254
|
||||
grid = 45 32 30
|
||||
stencil order = 5
|
||||
estimated absolute RMS force accuracy = 0.000317429
|
||||
estimated relative force accuracy = 9.55928e-07
|
||||
using double precision FFTs
|
||||
3d grid and FFT values/proc = 15180 5760
|
||||
Last active /omp style is kspace_style pppm/omp
|
||||
3d grid and FFT values/proc = 25530 11520
|
||||
Neighbor list info ...
|
||||
1 neighbor list requests
|
||||
update every 1 steps, delay 0 steps, check yes
|
||||
max neighbors/atom: 2000, page size: 100000
|
||||
master list distance cutoff = 14
|
||||
ghost atom cutoff = 14
|
||||
binsize = 7 -> bins = 7 5 4
|
||||
Memory usage per processor = 19.7492 Mbytes
|
||||
binsize = 7, bins = 7 5 4
|
||||
1 neighbor lists, perpetual/occasional/extra = 1 0 0
|
||||
(1) pair lj/charmm/coul/long, perpetual
|
||||
attributes: half, newton on
|
||||
pair build: half/bin/newton
|
||||
stencil: half/bin/3d/newton
|
||||
bin: standard
|
||||
Per MPI rank memory allocation (min/avg/max) = 24.54 | 24.61 | 24.65 Mbytes
|
||||
---------------- Step 0 ----- CPU = 0.0000 (sec) ----------------
|
||||
TotEng = -3599.1065 KinEng = 0.0000 Temp = 0.0000
|
||||
PotEng = -3599.1065 E_bond = 169.6834 E_angle = 103.6483
|
||||
E_dihed = 583.9669 E_impro = 0.0335 E_vdwl = -776.0899
|
||||
E_coul = 35419.6941 E_long = -39100.0428 Press = 3623.5803
|
||||
---------------- Step 10 ----- CPU = 0.2563 (sec) ----------------
|
||||
TotEng = -5168.1778 KinEng = 0.0000 Temp = 0.0000
|
||||
PotEng = -5168.1778 E_bond = 120.7538 E_angle = 171.5023
|
||||
E_dihed = 583.0143 E_impro = 6.5958 E_vdwl = -1034.8022
|
||||
E_coul = 34737.4006 E_long = -39752.6424 Press = -10232.1944
|
||||
---------------- Step 20 ----- CPU = 0.4597 (sec) ----------------
|
||||
TotEng = -5784.4945 KinEng = 0.0000 Temp = 0.0000
|
||||
PotEng = -5784.4945 E_bond = 110.1359 E_angle = 262.6659
|
||||
E_dihed = 573.8164 E_impro = 8.5071 E_vdwl = -1050.9646
|
||||
E_coul = 34464.2659 E_long = -40152.9212 Press = -10843.0328
|
||||
---------------- Step 30 ----- CPU = 0.6813 (sec) ----------------
|
||||
TotEng = -6342.0862 KinEng = 0.0000 Temp = 0.0000
|
||||
PotEng = -6342.0862 E_bond = 146.0247 E_angle = 272.7224
|
||||
E_dihed = 557.6616 E_impro = 7.1074 E_vdwl = -984.4028
|
||||
E_coul = 34031.1722 E_long = -40372.3718 Press = -13674.9873
|
||||
---------------- Step 40 ----- CPU = 0.8599 (sec) ----------------
|
||||
TotEng = -6821.3956 KinEng = 0.0000 Temp = 0.0000
|
||||
PotEng = -6821.3956 E_bond = 147.4491 E_angle = 271.5247
|
||||
E_dihed = 548.2429 E_impro = 7.1832 E_vdwl = -873.4714
|
||||
E_coul = 33514.8072 E_long = -40437.1312 Press = -12024.8390
|
||||
---------------- Step 50 ----- CPU = 1.0662 (sec) ----------------
|
||||
TotEng = -7278.3435 KinEng = 0.0000 Temp = 0.0000
|
||||
PotEng = -7278.3435 E_bond = 181.9934 E_angle = 288.9107
|
||||
E_dihed = 541.0050 E_impro = 7.1673 E_vdwl = -501.3825
|
||||
E_coul = 32665.6923 E_long = -40461.7297 Press = -10391.9829
|
||||
Loop time of 1.06631 on 8 procs for 50 steps with 2833 atoms
|
||||
TotEng = -3304.5599 KinEng = 0.0000 Temp = 0.0000
|
||||
PotEng = -3304.5599 E_bond = 169.6834 E_angle = 103.6483
|
||||
E_dihed = 583.9669 E_impro = 0.0335 E_vdwl = -776.3982
|
||||
E_coul = 35482.9694 E_long = -38851.5191 Press = 3844.7433
|
||||
---------------- Step 10 ----- CPU = 0.3473 (sec) ----------------
|
||||
TotEng = -4930.6259 KinEng = 0.0000 Temp = 0.0000
|
||||
PotEng = -4930.6259 E_bond = 104.7992 E_angle = 181.4386
|
||||
E_dihed = 584.0895 E_impro = 7.5537 E_vdwl = -1028.4574
|
||||
E_coul = 34837.9592 E_long = -39590.5863 Press = -8420.5689
|
||||
---------------- Step 20 ----- CPU = 0.7554 (sec) ----------------
|
||||
TotEng = -5457.1158 KinEng = 0.0000 Temp = 0.0000
|
||||
PotEng = -5457.1158 E_bond = 121.1716 E_angle = 243.0784
|
||||
E_dihed = 580.3183 E_impro = 8.9483 E_vdwl = -1040.3321
|
||||
E_coul = 34593.3894 E_long = -39923.3583 Press = -9942.5587
|
||||
---------------- Step 30 ----- CPU = 1.1694 (sec) ----------------
|
||||
TotEng = -6057.2086 KinEng = 0.0000 Temp = 0.0000
|
||||
PotEng = -6057.2086 E_bond = 120.1005 E_angle = 267.0579
|
||||
E_dihed = 570.6124 E_impro = 9.3921 E_vdwl = -1025.6144
|
||||
E_coul = 34318.6209 E_long = -40277.2340 Press = -11617.6026
|
||||
---------------- Step 40 ----- CPU = 1.6505 (sec) ----------------
|
||||
TotEng = -6520.0628 KinEng = 0.0000 Temp = 0.0000
|
||||
PotEng = -6520.0628 E_bond = 135.8622 E_angle = 293.3665
|
||||
E_dihed = 558.0537 E_impro = 8.6211 E_vdwl = -968.6884
|
||||
E_coul = 33877.9402 E_long = -40381.7851 Press = -12652.4710
|
||||
---------------- Step 50 ----- CPU = 2.1052 (sec) ----------------
|
||||
TotEng = -6931.3243 KinEng = 0.0000 Temp = 0.0000
|
||||
PotEng = -6931.3243 E_bond = 147.5166 E_angle = 290.5234
|
||||
E_dihed = 550.9597 E_impro = 9.4741 E_vdwl = -794.7620
|
||||
E_coul = 33347.2827 E_long = -40437.2965 Press = -11322.9412
|
||||
Loop time of 2.10544 on 4 procs for 50 steps with 2833 atoms
|
||||
|
||||
99.3% CPU use with 8 MPI tasks x 1 OpenMP threads
|
||||
98.5% CPU use with 4 MPI tasks x 1 OpenMP threads
|
||||
|
||||
Minimization stats:
|
||||
Stopping criterion = max iterations
|
||||
Energy initial, next-to-last, final =
|
||||
-3599.10649881 -7238.80368107 -7278.34352699
|
||||
Force two-norm initial, final = 1109.81 247.325
|
||||
Force max component initial, final = 107.492 37.5055
|
||||
Final line search alpha, max atom move = 0.00133024 0.0498915
|
||||
Iterations, force evaluations = 50 87
|
||||
-3304.55988409 -6893.73171135 -6931.32434601
|
||||
Force two-norm initial, final = 1135.31 300.792
|
||||
Force max component initial, final = 107.634 93.2558
|
||||
Final line search alpha, max atom move = 0.00152738 0.142437
|
||||
Iterations, force evaluations = 50 82
|
||||
|
||||
MPI task timing breakdown:
|
||||
Section | min time | avg time | max time |%varavg| %total
|
||||
---------------------------------------------------------------
|
||||
Pair | 0.46313 | 0.53526 | 0.61611 | 6.9 | 50.20
|
||||
Bond | 0.0070326 | 0.01008 | 0.013407 | 1.8 | 0.95
|
||||
Kspace | 0.3364 | 0.41785 | 0.49165 | 8.0 | 39.19
|
||||
Neigh | 0.035014 | 0.035175 | 0.035337 | 0.1 | 3.30
|
||||
Comm | 0.058533 | 0.05973 | 0.060792 | 0.3 | 5.60
|
||||
Output | 0.00039005 | 0.00040504 | 0.00049496 | 0.2 | 0.04
|
||||
Modify | 0.0015707 | 0.0022006 | 0.0025775 | 0.6 | 0.21
|
||||
Other | | 0.005615 | | | 0.53
|
||||
Pair | 1.5485 | 1.5674 | 1.5856 | 1.4 | 74.44
|
||||
Bond | 0.017887 | 0.020853 | 0.024278 | 1.6 | 0.99
|
||||
Kspace | 0.41442 | 0.43099 | 0.45053 | 2.5 | 20.47
|
||||
Neigh | 0.052102 | 0.052125 | 0.052147 | 0.0 | 2.48
|
||||
Comm | 0.023884 | 0.024002 | 0.024059 | 0.0 | 1.14
|
||||
Output | 0.00030303 | 0.00051945 | 0.0011663 | 0.0 | 0.02
|
||||
Modify | 0.0015671 | 0.0018674 | 0.0021205 | 0.5 | 0.09
|
||||
Other | | 0.007689 | | | 0.37
|
||||
|
||||
Nlocal: 354.125 ave 376 max 344 min
|
||||
Histogram: 3 1 0 1 2 0 0 0 0 1
|
||||
Nghost: 7405 ave 7531 max 7307 min
|
||||
Histogram: 1 2 1 0 0 1 1 1 0 1
|
||||
Neighs: 178281 ave 194848 max 158123 min
|
||||
Histogram: 2 0 1 0 0 1 0 1 2 1
|
||||
Nlocal: 708.25 ave 728 max 693 min
|
||||
Histogram: 1 0 0 2 0 0 0 0 0 1
|
||||
Nghost: 9301.25 ave 9410 max 9200 min
|
||||
Histogram: 2 0 0 0 0 0 0 0 1 1
|
||||
Neighs: 356382 ave 367163 max 347323 min
|
||||
Histogram: 1 1 0 0 0 0 1 0 0 1
|
||||
|
||||
Total # of neighbors = 1426250
|
||||
Ave neighs/atom = 503.442
|
||||
Total # of neighbors = 1425526
|
||||
Ave neighs/atom = 503.186
|
||||
Ave special neighs/atom = 4.67702
|
||||
Neighbor list builds = 4
|
||||
Neighbor list builds = 3
|
||||
Dangerous builds = 0
|
||||
|
||||
reset_timestep 0
|
||||
@ -152,105 +160,97 @@ dump_modify 1 image yes scale yes
|
||||
thermo 100
|
||||
run 1000
|
||||
PPPM initialization ...
|
||||
WARNING: Using 12-bit tables for long-range coulomb (../kspace.cpp:316)
|
||||
WARNING: Using 12-bit tables for long-range coulomb (../kspace.cpp:321)
|
||||
G vector (1/distance) = 0.278254
|
||||
grid = 45 32 30
|
||||
stencil order = 5
|
||||
estimated absolute RMS force accuracy = 0.000317429
|
||||
estimated relative force accuracy = 9.55928e-07
|
||||
using double precision FFTs
|
||||
3d grid and FFT values/proc = 15180 5760
|
||||
Last active /omp style is kspace_style pppm/omp
|
||||
Neighbor list info ...
|
||||
1 neighbor list requests
|
||||
update every 1 steps, delay 2 steps, check yes
|
||||
max neighbors/atom: 2000, page size: 100000
|
||||
master list distance cutoff = 14
|
||||
ghost atom cutoff = 14
|
||||
binsize = 7 -> bins = 7 5 4
|
||||
Memory usage per processor = 20.5221 Mbytes
|
||||
3d grid and FFT values/proc = 25530 11520
|
||||
Per MPI rank memory allocation (min/avg/max) = 25.34 | 25.4 | 25.44 Mbytes
|
||||
---------------- Step 0 ----- CPU = 0.0000 (sec) ----------------
|
||||
TotEng = -7547.0017 KinEng = 0.0000 Temp = 0.0000
|
||||
PotEng = -7547.0017 E_bond = 52.4535 E_angle = 149.7924
|
||||
E_dihed = 541.0050 E_impro = 7.1673 E_vdwl = -501.3825
|
||||
E_coul = 32665.6923 E_long = -40461.7297 Press = -9600.9476
|
||||
---------------- Step 100 ----- CPU = 0.8242 (sec) ----------------
|
||||
TotEng = -7049.9503 KinEng = 688.1123 Temp = 113.4757
|
||||
PotEng = -7738.0625 E_bond = 53.8035 E_angle = 139.7846
|
||||
E_dihed = 529.5460 E_impro = 6.1806 E_vdwl = 52.8666
|
||||
E_coul = 31951.7370 E_long = -40471.9810 Press = -5991.4443
|
||||
---------------- Step 200 ----- CPU = 1.6765 (sec) ----------------
|
||||
TotEng = -7050.0350 KinEng = 956.0848 Temp = 157.6667
|
||||
PotEng = -8006.1198 E_bond = 47.1331 E_angle = 140.9769
|
||||
E_dihed = 517.5474 E_impro = 5.7244 E_vdwl = 635.2166
|
||||
E_coul = 31127.8100 E_long = -40480.5282 Press = -920.9624
|
||||
---------------- Step 300 ----- CPU = 2.5246 (sec) ----------------
|
||||
TotEng = -7050.0984 KinEng = 1049.7346 Temp = 173.1104
|
||||
PotEng = -8099.8330 E_bond = 47.4551 E_angle = 156.5090
|
||||
E_dihed = 520.6006 E_impro = 9.4008 E_vdwl = 451.0904
|
||||
E_coul = 31202.3817 E_long = -40487.2707 Press = -2352.9550
|
||||
---------------- Step 400 ----- CPU = 3.3982 (sec) ----------------
|
||||
TotEng = -7050.1671 KinEng = 1099.2465 Temp = 181.2753
|
||||
PotEng = -8149.4136 E_bond = 56.6375 E_angle = 164.5897
|
||||
E_dihed = 528.8356 E_impro = 8.8390 E_vdwl = 525.0114
|
||||
E_coul = 31060.0380 E_long = -40493.3650 Press = -2146.9087
|
||||
---------------- Step 500 ----- CPU = 4.2800 (sec) ----------------
|
||||
TotEng = -7050.2027 KinEng = 1134.4924 Temp = 187.0877
|
||||
PotEng = -8184.6951 E_bond = 53.5903 E_angle = 169.1090
|
||||
E_dihed = 522.9488 E_impro = 7.9830 E_vdwl = 496.8404
|
||||
E_coul = 31058.9967 E_long = -40494.1633 Press = -2537.1829
|
||||
---------------- Step 600 ----- CPU = 5.1548 (sec) ----------------
|
||||
TotEng = -7050.1894 KinEng = 1122.6756 Temp = 185.1390
|
||||
PotEng = -8172.8649 E_bond = 47.9283 E_angle = 168.7967
|
||||
E_dihed = 518.7200 E_impro = 9.2011 E_vdwl = 499.6778
|
||||
E_coul = 31076.1916 E_long = -40493.3805 Press = -1939.2216
|
||||
---------------- Step 700 ----- CPU = 6.0377 (sec) ----------------
|
||||
TotEng = -7050.2850 KinEng = 1154.4452 Temp = 190.3781
|
||||
PotEng = -8204.7301 E_bond = 54.3594 E_angle = 183.8772
|
||||
E_dihed = 513.0797 E_impro = 9.6842 E_vdwl = 522.0052
|
||||
E_coul = 31008.3632 E_long = -40496.0990 Press = -2059.4885
|
||||
---------------- Step 800 ----- CPU = 6.9161 (sec) ----------------
|
||||
TotEng = -7050.2852 KinEng = 1146.2741 Temp = 189.0306
|
||||
PotEng = -8196.5593 E_bond = 48.8126 E_angle = 171.3411
|
||||
E_dihed = 525.8682 E_impro = 10.5588 E_vdwl = 538.6905
|
||||
E_coul = 31003.8447 E_long = -40495.6752 Press = -1458.5181
|
||||
---------------- Step 900 ----- CPU = 7.8101 (sec) ----------------
|
||||
TotEng = -7050.3025 KinEng = 1154.2134 Temp = 190.3398
|
||||
PotEng = -8204.5159 E_bond = 51.1010 E_angle = 177.9642
|
||||
E_dihed = 520.6908 E_impro = 8.9539 E_vdwl = 521.5994
|
||||
E_coul = 31012.6307 E_long = -40497.4560 Press = -1683.9131
|
||||
---------------- Step 1000 ----- CPU = 8.7313 (sec) ----------------
|
||||
TotEng = -7050.3166 KinEng = 1179.9351 Temp = 194.5816
|
||||
PotEng = -8230.2517 E_bond = 57.8905 E_angle = 190.1556
|
||||
E_dihed = 518.1288 E_impro = 10.0403 E_vdwl = 557.6413
|
||||
E_coul = 30933.6472 E_long = -40497.7554 Press = -1643.1247
|
||||
Loop time of 8.73139 on 8 procs for 1000 steps with 2833 atoms
|
||||
TotEng = -7157.1195 KinEng = 0.0000 Temp = 0.0000
|
||||
PotEng = -7157.1195 E_bond = 59.0052 E_angle = 144.8137
|
||||
E_dihed = 550.9597 E_impro = 9.4741 E_vdwl = -794.7620
|
||||
E_coul = 33347.2827 E_long = -40437.2965 Press = -11653.0907
|
||||
---------------- Step 100 ----- CPU = 2.0713 (sec) ----------------
|
||||
TotEng = -6731.9859 KinEng = 736.6132 Temp = 121.4739
|
||||
PotEng = -7468.5991 E_bond = 51.6809 E_angle = 141.9715
|
||||
E_dihed = 539.0053 E_impro = 6.5800 E_vdwl = -138.7778
|
||||
E_coul = 32438.3099 E_long = -40470.2744 Press = -6545.1453
|
||||
---------------- Step 200 ----- CPU = 4.1194 (sec) ----------------
|
||||
TotEng = -6732.1577 KinEng = 1137.9916 Temp = 187.6647
|
||||
PotEng = -7870.1494 E_bond = 54.1322 E_angle = 155.0534
|
||||
E_dihed = 530.3471 E_impro = 6.0821 E_vdwl = 581.9109
|
||||
E_coul = 31309.7031 E_long = -40477.5339 Press = -1108.1567
|
||||
---------------- Step 300 ----- CPU = 6.2051 (sec) ----------------
|
||||
TotEng = -6732.2356 KinEng = 1205.1394 Temp = 198.7380
|
||||
PotEng = -7937.3749 E_bond = 50.7295 E_angle = 154.0262
|
||||
E_dihed = 541.0277 E_impro = 9.6153 E_vdwl = 553.9794
|
||||
E_coul = 31264.5100 E_long = -40483.0651 Press = -1179.2736
|
||||
---------------- Step 400 ----- CPU = 8.3309 (sec) ----------------
|
||||
TotEng = -6732.3498 KinEng = 1263.7920 Temp = 208.4103
|
||||
PotEng = -7996.1418 E_bond = 59.5441 E_angle = 159.8690
|
||||
E_dihed = 531.3170 E_impro = 9.8105 E_vdwl = 572.2021
|
||||
E_coul = 31187.5411 E_long = -40486.5450 Press = -1312.0304
|
||||
---------------- Step 500 ----- CPU = 10.5236 (sec) ----------------
|
||||
TotEng = -6732.2697 KinEng = 1225.7309 Temp = 202.1337
|
||||
PotEng = -7958.0006 E_bond = 52.7184 E_angle = 169.2353
|
||||
E_dihed = 529.7384 E_impro = 10.4859 E_vdwl = 489.7017
|
||||
E_coul = 31300.5731 E_long = -40480.8862 Press = -1431.7699
|
||||
---------------- Step 600 ----- CPU = 12.7351 (sec) ----------------
|
||||
TotEng = -6732.2989 KinEng = 1238.7683 Temp = 204.2837
|
||||
PotEng = -7971.0672 E_bond = 56.2994 E_angle = 173.1005
|
||||
E_dihed = 530.0426 E_impro = 10.5372 E_vdwl = 535.7865
|
||||
E_coul = 31234.7342 E_long = -40486.0690 Press = -1402.7109
|
||||
---------------- Step 700 ----- CPU = 14.9715 (sec) ----------------
|
||||
TotEng = -6732.3516 KinEng = 1309.3540 Temp = 215.9239
|
||||
PotEng = -8041.7056 E_bond = 59.3741 E_angle = 177.8374
|
||||
E_dihed = 526.2153 E_impro = 12.2105 E_vdwl = 536.7845
|
||||
E_coul = 31152.4306 E_long = -40484.9510 Press = -1448.7774
|
||||
---------------- Step 800 ----- CPU = 17.2110 (sec) ----------------
|
||||
TotEng = -6732.3114 KinEng = 1299.2723 Temp = 214.2613
|
||||
PotEng = -8031.5837 E_bond = 55.8605 E_angle = 178.5243
|
||||
E_dihed = 534.2468 E_impro = 11.5427 E_vdwl = 560.2428
|
||||
E_coul = 31143.0967 E_long = -40486.6330 Press = -737.0231
|
||||
---------------- Step 900 ----- CPU = 19.4334 (sec) ----------------
|
||||
TotEng = -6732.4712 KinEng = 1299.4505 Temp = 214.2907
|
||||
PotEng = -8031.9217 E_bond = 61.2314 E_angle = 181.8029
|
||||
E_dihed = 536.4906 E_impro = 12.4741 E_vdwl = 475.8515
|
||||
E_coul = 31223.2733 E_long = -40494.0221 Press = -1853.8183
|
||||
---------------- Step 1000 ----- CPU = 21.6519 (sec) ----------------
|
||||
TotEng = -6732.4953 KinEng = 1325.4723 Temp = 218.5819
|
||||
PotEng = -8057.9676 E_bond = 55.0903 E_angle = 187.1899
|
||||
E_dihed = 524.1709 E_impro = 13.3778 E_vdwl = 510.4710
|
||||
E_coul = 31176.6501 E_long = -40497.1637 Press = -1649.1418
|
||||
Loop time of 21.6521 on 4 procs for 1000 steps with 2833 atoms
|
||||
|
||||
Performance: 9.895 ns/day, 2.425 hours/ns, 114.529 timesteps/s
|
||||
99.6% CPU use with 8 MPI tasks x 1 OpenMP threads
|
||||
Performance: 3.990 ns/day, 6.014 hours/ns, 46.185 timesteps/s
|
||||
98.8% CPU use with 4 MPI tasks x 1 OpenMP threads
|
||||
|
||||
MPI task timing breakdown:
|
||||
Section | min time | avg time | max time |%varavg| %total
|
||||
---------------------------------------------------------------
|
||||
Pair | 3.2841 | 3.856 | 4.393 | 17.3 | 44.16
|
||||
Bond | 0.041216 | 0.074389 | 0.11041 | 7.2 | 0.85
|
||||
Kspace | 2.8668 | 3.4354 | 4.0036 | 18.9 | 39.35
|
||||
Neigh | 0.3024 | 0.30315 | 0.30402 | 0.1 | 3.47
|
||||
Comm | 0.58794 | 0.60511 | 0.61362 | 1.0 | 6.93
|
||||
Output | 0.010607 | 0.010696 | 0.010783 | 0.0 | 0.12
|
||||
Modify | 0.40802 | 0.41482 | 0.42598 | 0.8 | 4.75
|
||||
Other | | 0.03184 | | | 0.36
|
||||
Pair | 13.758 | 14.312 | 14.767 | 11.1 | 66.10
|
||||
Bond | 0.14719 | 0.17763 | 0.21239 | 5.5 | 0.82
|
||||
Kspace | 5.0774 | 5.5813 | 6.2275 | 18.7 | 25.78
|
||||
Neigh | 0.81074 | 0.8116 | 0.81234 | 0.1 | 3.75
|
||||
Comm | 0.28366 | 0.34314 | 0.41466 | 10.2 | 1.58
|
||||
Output | 0.018707 | 0.019262 | 0.020673 | 0.6 | 0.09
|
||||
Modify | 0.33949 | 0.35308 | 0.36488 | 1.7 | 1.63
|
||||
Other | | 0.05392 | | | 0.25
|
||||
|
||||
Nlocal: 354.125 ave 390 max 323 min
|
||||
Histogram: 2 0 2 0 1 0 0 0 1 2
|
||||
Nghost: 7219.12 ave 7453 max 6941 min
|
||||
Histogram: 1 1 1 1 0 0 0 0 2 2
|
||||
Neighs: 179095 ave 217661 max 144647 min
|
||||
Histogram: 1 0 1 1 1 2 1 0 0 1
|
||||
Nlocal: 708.25 ave 747 max 669 min
|
||||
Histogram: 1 0 1 0 0 0 0 0 1 1
|
||||
Nghost: 9164.5 ave 9383 max 8916 min
|
||||
Histogram: 1 0 1 0 0 0 0 0 1 1
|
||||
Neighs: 357504 ave 379770 max 327897 min
|
||||
Histogram: 1 0 0 1 0 0 0 0 0 2
|
||||
|
||||
Total # of neighbors = 1432758
|
||||
Ave neighs/atom = 505.739
|
||||
Total # of neighbors = 1430018
|
||||
Ave neighs/atom = 504.772
|
||||
Ave special neighs/atom = 4.67702
|
||||
Neighbor list builds = 39
|
||||
Neighbor list builds = 40
|
||||
Dangerous builds = 0
|
||||
Total wall time: 0:00:09
|
||||
Total wall time: 0:00:23
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
4
tools/ch2lmp/example-cmap/convert.sh
Executable file
4
tools/ch2lmp/example-cmap/convert.sh
Executable file
@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
rm -f *.dump *.restart? *.restart
|
||||
../charmm2lammps.pl -border=2.0 -cmap=36 -ions -water all36_prot 1gb1
|
||||
cp ../../../potentials/charmm36.cmap .
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,4 @@
|
||||
# Created by charmm2lammps v1.9.1 on Wed Oct 5 18:18:20 EDT 2016
|
||||
# Created by charmm2lammps v1.9.1 on Sun Jan 28 05:46:18 EST 2018
|
||||
# Command: charmm2lammps.pl -water -ions -border=2.0 all27_na 1ac7
|
||||
|
||||
units real
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
LAMMPS (5 Oct 2016)
|
||||
package omp 0
|
||||
WARNING: OpenMP support not enabled during compilation; using 1 thread only. (../fix_omp.cpp:123)
|
||||
# Created by charmm2lammps v1.9.1 on Wed Oct 5 18:18:20 EDT 2016
|
||||
LAMMPS (17 Jan 2018)
|
||||
OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (../comm.cpp:90)
|
||||
using 1 OpenMP thread(s) per MPI task
|
||||
# Created by charmm2lammps v1.9.1 on Sun Jan 28 05:46:18 EST 2018
|
||||
# Command: charmm2lammps.pl -water -ions -border=2.0 all27_na 1ac7
|
||||
|
||||
units real
|
||||
@ -19,7 +19,7 @@ kspace_style pppm 1e-6
|
||||
|
||||
read_data 1ac7.data
|
||||
orthogonal box = (-14.087 -1.88253 -5.44214) to (10.545 22.7495 33.9691)
|
||||
2 by 2 by 2 MPI processor grid
|
||||
2 by 1 by 2 MPI processor grid
|
||||
reading atoms ...
|
||||
1968 atoms
|
||||
scanning bonds ...
|
||||
@ -49,89 +49,93 @@ thermo_style multi
|
||||
timestep 1.0
|
||||
|
||||
minimize 0.0 0.0 50 200
|
||||
WARNING: Resetting reneighboring criteria during minimization (../min.cpp:168)
|
||||
WARNING: Using 'neigh_modify every 1 delay 0 check yes' setting during minimization (../min.cpp:168)
|
||||
PPPM initialization ...
|
||||
WARNING: Using 12-bit tables for long-range coulomb (../kspace.cpp:316)
|
||||
WARNING: Using 12-bit tables for long-range coulomb (../kspace.cpp:321)
|
||||
G vector (1/distance) = 0.280406
|
||||
grid = 30 30 40
|
||||
stencil order = 5
|
||||
estimated absolute RMS force accuracy = 0.000302577
|
||||
estimated relative force accuracy = 9.11202e-07
|
||||
using double precision FFTs
|
||||
3d grid and FFT values/proc = 13068 4500
|
||||
Last active /omp style is kspace_style pppm/omp
|
||||
3d grid and FFT values/proc = 21978 9000
|
||||
Neighbor list info ...
|
||||
1 neighbor list requests
|
||||
update every 1 steps, delay 0 steps, check yes
|
||||
max neighbors/atom: 2000, page size: 100000
|
||||
master list distance cutoff = 14
|
||||
ghost atom cutoff = 14
|
||||
binsize = 7 -> bins = 4 4 6
|
||||
Memory usage per processor = 15.8614 Mbytes
|
||||
binsize = 7, bins = 4 4 6
|
||||
1 neighbor lists, perpetual/occasional/extra = 1 0 0
|
||||
(1) pair lj/charmm/coul/long, perpetual
|
||||
attributes: half, newton on
|
||||
pair build: half/bin/newton
|
||||
stencil: half/bin/3d/newton
|
||||
bin: standard
|
||||
Per MPI rank memory allocation (min/avg/max) = 17.89 | 17.89 | 17.9 Mbytes
|
||||
---------------- Step 0 ----- CPU = 0.0000 (sec) ----------------
|
||||
TotEng = 16313.1962 KinEng = 0.0000 Temp = 0.0000
|
||||
PotEng = 16313.1962 E_bond = 12014.3479 E_angle = 5414.5475
|
||||
E_dihed = 557.2338 E_impro = 0.0516 E_vdwl = 1176.0283
|
||||
E_coul = 28218.0485 E_long = -31067.0615 Press = -18022.1296
|
||||
---------------- Step 10 ----- CPU = 0.1081 (sec) ----------------
|
||||
TotEng = -1447.9072 KinEng = 0.0000 Temp = 0.0000
|
||||
PotEng = -1447.9072 E_bond = 247.8926 E_angle = 2176.8245
|
||||
E_dihed = 555.8870 E_impro = 1.7628 E_vdwl = -407.3892
|
||||
E_coul = 27746.6549 E_long = -31769.5399 Press = -1411.7232
|
||||
---------------- Step 20 ----- CPU = 0.2182 (sec) ----------------
|
||||
TotEng = -4807.5054 KinEng = 0.0000 Temp = 0.0000
|
||||
PotEng = -4807.5054 E_bond = 177.3593 E_angle = 555.9353
|
||||
E_dihed = 551.4306 E_impro = 2.6640 E_vdwl = -581.3001
|
||||
E_coul = 27120.3184 E_long = -32633.9130 Press = -13576.9371
|
||||
---------------- Step 30 ----- CPU = 0.3443 (sec) ----------------
|
||||
TotEng = -5555.1803 KinEng = 0.0000 Temp = 0.0000
|
||||
PotEng = -5555.1803 E_bond = 147.6057 E_angle = 459.3239
|
||||
E_dihed = 539.1126 E_impro = 2.8843 E_vdwl = -576.4747
|
||||
E_coul = 26797.8386 E_long = -32925.4706 Press = -12870.0319
|
||||
---------------- Step 40 ----- CPU = 0.4657 (sec) ----------------
|
||||
TotEng = -5973.0779 KinEng = 0.0000 Temp = 0.0000
|
||||
PotEng = -5973.0779 E_bond = 150.6611 E_angle = 441.4999
|
||||
E_dihed = 528.1431 E_impro = 3.1819 E_vdwl = -519.1875
|
||||
E_coul = 26477.1520 E_long = -33054.5284 Press = -13277.6629
|
||||
---------------- Step 50 ----- CPU = 0.5988 (sec) ----------------
|
||||
TotEng = -6363.9506 KinEng = 0.0000 Temp = 0.0000
|
||||
PotEng = -6363.9506 E_bond = 165.0850 E_angle = 401.3082
|
||||
E_dihed = 518.3931 E_impro = 3.2379 E_vdwl = -463.1261
|
||||
E_coul = 26138.9684 E_long = -33127.8170 Press = -13085.4188
|
||||
Loop time of 0.598905 on 8 procs for 50 steps with 1968 atoms
|
||||
TotEng = 16382.0106 KinEng = 0.0000 Temp = 0.0000
|
||||
PotEng = 16382.0106 E_bond = 12014.3479 E_angle = 5414.5475
|
||||
E_dihed = 557.2338 E_impro = 0.0516 E_vdwl = 1174.9839
|
||||
E_coul = 28273.7003 E_long = -31052.8544 Press = -17947.7297
|
||||
---------------- Step 10 ----- CPU = 0.2030 (sec) ----------------
|
||||
TotEng = -1386.3677 KinEng = 0.0000 Temp = 0.0000
|
||||
PotEng = -1386.3677 E_bond = 238.0964 E_angle = 2167.9109
|
||||
E_dihed = 556.7458 E_impro = 2.3622 E_vdwl = -407.1366
|
||||
E_coul = 27803.2765 E_long = -31747.6229 Press = -902.5957
|
||||
---------------- Step 20 ----- CPU = 0.4523 (sec) ----------------
|
||||
TotEng = -4643.9749 KinEng = 0.0000 Temp = 0.0000
|
||||
PotEng = -4643.9749 E_bond = 186.6424 E_angle = 546.1482
|
||||
E_dihed = 557.6115 E_impro = 3.7530 E_vdwl = -572.4168
|
||||
E_coul = 27184.6593 E_long = -32550.3724 Press = -13499.9676
|
||||
---------------- Step 30 ----- CPU = 0.7954 (sec) ----------------
|
||||
TotEng = -5356.2261 KinEng = 0.0000 Temp = 0.0000
|
||||
PotEng = -5356.2261 E_bond = 150.5494 E_angle = 451.1209
|
||||
E_dihed = 548.4804 E_impro = 3.8629 E_vdwl = -587.7229
|
||||
E_coul = 26908.1173 E_long = -32830.6340 Press = -12635.5249
|
||||
---------------- Step 40 ----- CPU = 1.1432 (sec) ----------------
|
||||
TotEng = -5814.9675 KinEng = 0.0000 Temp = 0.0000
|
||||
PotEng = -5814.9675 E_bond = 145.1741 E_angle = 424.9449
|
||||
E_dihed = 539.7599 E_impro = 3.8304 E_vdwl = -559.2034
|
||||
E_coul = 26618.2861 E_long = -32987.7596 Press = -13254.1066
|
||||
---------------- Step 50 ----- CPU = 1.4855 (sec) ----------------
|
||||
TotEng = -6207.1556 KinEng = 0.0000 Temp = 0.0000
|
||||
PotEng = -6207.1556 E_bond = 172.5209 E_angle = 400.9621
|
||||
E_dihed = 532.0702 E_impro = 3.4517 E_vdwl = -491.3979
|
||||
E_coul = 26261.2546 E_long = -33086.0173 Press = -13942.2342
|
||||
Loop time of 1.48576 on 4 procs for 50 steps with 1968 atoms
|
||||
|
||||
99.2% CPU use with 8 MPI tasks x 1 OpenMP threads
|
||||
98.7% CPU use with 4 MPI tasks x 1 OpenMP threads
|
||||
|
||||
Minimization stats:
|
||||
Stopping criterion = max iterations
|
||||
Energy initial, next-to-last, final =
|
||||
16313.1961904 -6328.33883947 -6363.95060584
|
||||
Force two-norm initial, final = 9108.55 292.099
|
||||
Force max component initial, final = 2254.31 67.3492
|
||||
Final line search alpha, max atom move = 0.00149026 0.100368
|
||||
16382.0106166 -6167.68761847 -6207.15563509
|
||||
Force two-norm initial, final = 9111.03 289.249
|
||||
Force max component initial, final = 2253.01 63.7887
|
||||
Final line search alpha, max atom move = 0.000835537 0.0532979
|
||||
Iterations, force evaluations = 50 75
|
||||
|
||||
MPI task timing breakdown:
|
||||
Section | min time | avg time | max time |%varavg| %total
|
||||
---------------------------------------------------------------
|
||||
Pair | 0.24051 | 0.28255 | 0.35023 | 7.1 | 47.18
|
||||
Bond | 0.0022576 | 0.0057876 | 0.0081606 | 2.6 | 0.97
|
||||
Kspace | 0.18978 | 0.25595 | 0.29717 | 7.2 | 42.74
|
||||
Neigh | 0.015369 | 0.01561 | 0.015768 | 0.1 | 2.61
|
||||
Comm | 0.031344 | 0.032818 | 0.034241 | 0.5 | 5.48
|
||||
Output | 0.00034261 | 0.00035512 | 0.00043511 | 0.2 | 0.06
|
||||
Modify | 0.0011175 | 0.001414 | 0.0016975 | 0.5 | 0.24
|
||||
Other | | 0.00442 | | | 0.74
|
||||
Pair | 0.86139 | 0.95604 | 1.1156 | 10.8 | 64.35
|
||||
Bond | 0.0054429 | 0.012373 | 0.015879 | 3.7 | 0.83
|
||||
Kspace | 0.29818 | 0.45076 | 0.54304 | 15.1 | 30.34
|
||||
Neigh | 0.037995 | 0.038014 | 0.038038 | 0.0 | 2.56
|
||||
Comm | 0.021986 | 0.022179 | 0.022257 | 0.1 | 1.49
|
||||
Output | 0.00028157 | 0.00048172 | 0.0010796 | 0.0 | 0.03
|
||||
Modify | 0 | 0 | 0 | 0.0 | 0.00
|
||||
Other | | 0.005911 | | | 0.40
|
||||
|
||||
Nlocal: 246 ave 274 max 226 min
|
||||
Histogram: 2 1 0 1 1 0 1 1 0 1
|
||||
Nghost: 6331 ave 6591 max 6075 min
|
||||
Histogram: 1 1 0 0 2 2 0 0 1 1
|
||||
Neighs: 116074 ave 137552 max 99519 min
|
||||
Histogram: 1 2 1 1 0 0 0 1 0 2
|
||||
Nlocal: 492 ave 538 max 472 min
|
||||
Histogram: 2 0 1 0 0 0 0 0 0 1
|
||||
Nghost: 8001.25 ave 8242 max 7756 min
|
||||
Histogram: 1 0 0 1 0 0 0 1 0 1
|
||||
Neighs: 232207 ave 275971 max 203927 min
|
||||
Histogram: 2 0 0 0 1 0 0 0 0 1
|
||||
|
||||
Total # of neighbors = 928592
|
||||
Ave neighs/atom = 471.846
|
||||
Total # of neighbors = 928828
|
||||
Ave neighs/atom = 471.965
|
||||
Ave special neighs/atom = 4.4065
|
||||
Neighbor list builds = 3
|
||||
Dangerous builds = 0
|
||||
@ -152,105 +156,97 @@ dump_modify 1 image yes scale yes
|
||||
thermo 100
|
||||
run 1000
|
||||
PPPM initialization ...
|
||||
WARNING: Using 12-bit tables for long-range coulomb (../kspace.cpp:316)
|
||||
WARNING: Using 12-bit tables for long-range coulomb (../kspace.cpp:321)
|
||||
G vector (1/distance) = 0.280406
|
||||
grid = 30 30 40
|
||||
stencil order = 5
|
||||
estimated absolute RMS force accuracy = 0.000302577
|
||||
estimated relative force accuracy = 9.11202e-07
|
||||
using double precision FFTs
|
||||
3d grid and FFT values/proc = 13068 4500
|
||||
Last active /omp style is kspace_style pppm/omp
|
||||
Neighbor list info ...
|
||||
1 neighbor list requests
|
||||
update every 1 steps, delay 2 steps, check yes
|
||||
max neighbors/atom: 2000, page size: 100000
|
||||
master list distance cutoff = 14
|
||||
ghost atom cutoff = 14
|
||||
binsize = 7 -> bins = 4 4 6
|
||||
Memory usage per processor = 16.6281 Mbytes
|
||||
3d grid and FFT values/proc = 21978 9000
|
||||
Per MPI rank memory allocation (min/avg/max) = 18.67 | 18.68 | 18.68 Mbytes
|
||||
---------------- Step 0 ----- CPU = 0.0000 (sec) ----------------
|
||||
TotEng = -6507.5910 KinEng = 0.0000 Temp = 0.0000
|
||||
PotEng = -6507.5910 E_bond = 107.6907 E_angle = 315.0621
|
||||
E_dihed = 518.3931 E_impro = 3.2379 E_vdwl = -463.1261
|
||||
E_coul = 26138.9684 E_long = -33127.8170 Press = -12385.0996
|
||||
---------------- Step 100 ----- CPU = 0.6002 (sec) ----------------
|
||||
TotEng = -6239.1679 KinEng = 693.7285 Temp = 162.5977
|
||||
PotEng = -6932.8964 E_bond = 97.8328 E_angle = 278.8843
|
||||
E_dihed = 517.0395 E_impro = 2.5171 E_vdwl = 25.4169
|
||||
E_coul = 25297.7912 E_long = -33152.3783 Press = -7082.4023
|
||||
---------------- Step 200 ----- CPU = 1.2143 (sec) ----------------
|
||||
TotEng = -6239.2467 KinEng = 973.1878 Temp = 228.0980
|
||||
PotEng = -7212.4345 E_bond = 100.5993 E_angle = 320.4657
|
||||
E_dihed = 524.2274 E_impro = 2.4292 E_vdwl = 599.6228
|
||||
E_coul = 24399.1819 E_long = -33158.9608 Press = -876.3929
|
||||
---------------- Step 300 ----- CPU = 1.8629 (sec) ----------------
|
||||
TotEng = -6239.3074 KinEng = 1080.8940 Temp = 253.3425
|
||||
PotEng = -7320.2014 E_bond = 109.8163 E_angle = 341.6580
|
||||
E_dihed = 522.9161 E_impro = 3.3533 E_vdwl = 548.9557
|
||||
E_coul = 24315.8677 E_long = -33162.7685 Press = -2189.9473
|
||||
---------------- Step 400 ----- CPU = 2.5209 (sec) ----------------
|
||||
TotEng = -6239.4210 KinEng = 1085.2885 Temp = 254.3725
|
||||
PotEng = -7324.7096 E_bond = 95.4880 E_angle = 333.0840
|
||||
E_dihed = 531.5762 E_impro = 4.2236 E_vdwl = 547.4841
|
||||
E_coul = 24332.2081 E_long = -33168.7736 Press = -1741.7706
|
||||
---------------- Step 500 ----- CPU = 3.1762 (sec) ----------------
|
||||
TotEng = -6239.4511 KinEng = 1151.8207 Temp = 269.9665
|
||||
PotEng = -7391.2719 E_bond = 108.9390 E_angle = 328.6496
|
||||
E_dihed = 528.8096 E_impro = 3.4706 E_vdwl = 499.9982
|
||||
E_coul = 24309.7254 E_long = -33170.8642 Press = -2725.2316
|
||||
---------------- Step 600 ----- CPU = 3.8115 (sec) ----------------
|
||||
TotEng = -6239.4095 KinEng = 1129.5086 Temp = 264.7369
|
||||
PotEng = -7368.9182 E_bond = 102.3632 E_angle = 346.1347
|
||||
E_dihed = 534.3048 E_impro = 3.7134 E_vdwl = 473.9210
|
||||
E_coul = 24346.7523 E_long = -33176.1075 Press = -2684.1848
|
||||
---------------- Step 700 ----- CPU = 4.4501 (sec) ----------------
|
||||
TotEng = -6239.4955 KinEng = 1132.8803 Temp = 265.5272
|
||||
PotEng = -7372.3758 E_bond = 103.5625 E_angle = 340.8027
|
||||
E_dihed = 535.9840 E_impro = 4.0448 E_vdwl = 488.9549
|
||||
E_coul = 24323.6826 E_long = -33169.4072 Press = -2041.9019
|
||||
---------------- Step 800 ----- CPU = 5.0783 (sec) ----------------
|
||||
TotEng = -6239.5236 KinEng = 1192.2677 Temp = 279.4465
|
||||
PotEng = -7431.7912 E_bond = 110.5122 E_angle = 329.8173
|
||||
E_dihed = 534.5353 E_impro = 5.5900 E_vdwl = 541.3805
|
||||
E_coul = 24227.6695 E_long = -33181.2961 Press = -1628.5627
|
||||
---------------- Step 900 ----- CPU = 5.7072 (sec) ----------------
|
||||
TotEng = -6239.5270 KinEng = 1162.7914 Temp = 272.5378
|
||||
PotEng = -7402.3184 E_bond = 104.9538 E_angle = 347.6531
|
||||
E_dihed = 536.4713 E_impro = 4.6832 E_vdwl = 483.3306
|
||||
E_coul = 24295.7423 E_long = -33175.1528 Press = -1959.1567
|
||||
---------------- Step 1000 ----- CPU = 6.3345 (sec) ----------------
|
||||
TotEng = -6239.5020 KinEng = 1128.3312 Temp = 264.4609
|
||||
PotEng = -7367.8332 E_bond = 102.9814 E_angle = 352.0690
|
||||
E_dihed = 540.5086 E_impro = 3.6712 E_vdwl = 495.7763
|
||||
E_coul = 24316.4138 E_long = -33179.2534 Press = -1881.5655
|
||||
Loop time of 6.33458 on 8 procs for 1000 steps with 1968 atoms
|
||||
TotEng = -6345.9602 KinEng = 0.0000 Temp = 0.0000
|
||||
PotEng = -6345.9602 E_bond = 118.9251 E_angle = 315.7533
|
||||
E_dihed = 532.0702 E_impro = 3.4517 E_vdwl = -491.3979
|
||||
E_coul = 26261.2546 E_long = -33086.0173 Press = -13274.6498
|
||||
---------------- Step 100 ----- CPU = 1.5587 (sec) ----------------
|
||||
TotEng = -6089.2059 KinEng = 737.9545 Temp = 172.9635
|
||||
PotEng = -6827.1604 E_bond = 99.2610 E_angle = 293.4796
|
||||
E_dihed = 518.3926 E_impro = 3.4260 E_vdwl = -53.1737
|
||||
E_coul = 25455.9659 E_long = -33144.5118 Press = -7582.0585
|
||||
---------------- Step 200 ----- CPU = 3.1808 (sec) ----------------
|
||||
TotEng = -6089.3334 KinEng = 1048.0815 Temp = 245.6518
|
||||
PotEng = -7137.4150 E_bond = 105.4181 E_angle = 314.1091
|
||||
E_dihed = 525.7575 E_impro = 2.0633 E_vdwl = 549.1716
|
||||
E_coul = 24511.2323 E_long = -33145.1669 Press = -1214.5095
|
||||
---------------- Step 300 ----- CPU = 4.8699 (sec) ----------------
|
||||
TotEng = -6089.3928 KinEng = 1163.3028 Temp = 272.6576
|
||||
PotEng = -7252.6956 E_bond = 101.6270 E_angle = 351.8828
|
||||
E_dihed = 525.2212 E_impro = 3.1286 E_vdwl = 516.2458
|
||||
E_coul = 24404.4712 E_long = -33155.2722 Press = -2323.5317
|
||||
---------------- Step 400 ----- CPU = 6.5652 (sec) ----------------
|
||||
TotEng = -6089.4987 KinEng = 1182.3885 Temp = 277.1310
|
||||
PotEng = -7271.8872 E_bond = 114.0720 E_angle = 325.6458
|
||||
E_dihed = 516.7310 E_impro = 3.1876 E_vdwl = 522.6196
|
||||
E_coul = 24402.0712 E_long = -33156.2144 Press = -2169.9377
|
||||
---------------- Step 500 ----- CPU = 8.2547 (sec) ----------------
|
||||
TotEng = -6089.4538 KinEng = 1158.7955 Temp = 271.6012
|
||||
PotEng = -7248.2493 E_bond = 103.0865 E_angle = 339.1037
|
||||
E_dihed = 522.7155 E_impro = 2.6322 E_vdwl = 439.8428
|
||||
E_coul = 24513.5109 E_long = -33169.1409 Press = -1803.4201
|
||||
---------------- Step 600 ----- CPU = 9.9107 (sec) ----------------
|
||||
TotEng = -6089.5529 KinEng = 1205.1352 Temp = 282.4624
|
||||
PotEng = -7294.6881 E_bond = 108.2588 E_angle = 346.6746
|
||||
E_dihed = 531.5390 E_impro = 3.2909 E_vdwl = 459.2427
|
||||
E_coul = 24426.5336 E_long = -33170.2276 Press = -2567.6797
|
||||
---------------- Step 700 ----- CPU = 11.5432 (sec) ----------------
|
||||
TotEng = -6089.5542 KinEng = 1192.6231 Temp = 279.5298
|
||||
PotEng = -7282.1773 E_bond = 111.1701 E_angle = 368.3148
|
||||
E_dihed = 531.3469 E_impro = 3.6338 E_vdwl = 526.5919
|
||||
E_coul = 24341.9242 E_long = -33165.1590 Press = -1918.0534
|
||||
---------------- Step 800 ----- CPU = 13.1827 (sec) ----------------
|
||||
TotEng = -6089.6409 KinEng = 1211.1193 Temp = 283.8650
|
||||
PotEng = -7300.7601 E_bond = 104.1488 E_angle = 343.9467
|
||||
E_dihed = 536.0043 E_impro = 5.1288 E_vdwl = 507.6841
|
||||
E_coul = 24380.9222 E_long = -33178.5951 Press = -1535.2124
|
||||
---------------- Step 900 ----- CPU = 14.8342 (sec) ----------------
|
||||
TotEng = -6089.6435 KinEng = 1219.9414 Temp = 285.9327
|
||||
PotEng = -7309.5848 E_bond = 106.3702 E_angle = 362.6403
|
||||
E_dihed = 531.9023 E_impro = 4.1736 E_vdwl = 532.4576
|
||||
E_coul = 24326.4696 E_long = -33173.5985 Press = -694.2393
|
||||
---------------- Step 1000 ----- CPU = 16.5041 (sec) ----------------
|
||||
TotEng = -6089.6045 KinEng = 1204.4192 Temp = 282.2946
|
||||
PotEng = -7294.0238 E_bond = 108.7432 E_angle = 365.2088
|
||||
E_dihed = 541.1125 E_impro = 5.8781 E_vdwl = 533.2755
|
||||
E_coul = 24329.0904 E_long = -33177.3322 Press = -1373.0623
|
||||
Loop time of 16.5043 on 4 procs for 1000 steps with 1968 atoms
|
||||
|
||||
Performance: 13.639 ns/day, 1.760 hours/ns, 157.864 timesteps/s
|
||||
99.6% CPU use with 8 MPI tasks x 1 OpenMP threads
|
||||
Performance: 5.235 ns/day, 4.585 hours/ns, 60.590 timesteps/s
|
||||
98.8% CPU use with 4 MPI tasks x 1 OpenMP threads
|
||||
|
||||
MPI task timing breakdown:
|
||||
Section | min time | avg time | max time |%varavg| %total
|
||||
---------------------------------------------------------------
|
||||
Pair | 2.2335 | 2.5532 | 3.1707 | 18.5 | 40.31
|
||||
Bond | 0.01158 | 0.051889 | 0.080867 | 9.9 | 0.82
|
||||
Kspace | 2.1965 | 2.7773 | 3.0728 | 16.7 | 43.84
|
||||
Neigh | 0.24407 | 0.24588 | 0.24863 | 0.3 | 3.88
|
||||
Comm | 0.36894 | 0.37849 | 0.39142 | 1.3 | 5.97
|
||||
Output | 0.0083764 | 0.0085732 | 0.0087767 | 0.1 | 0.14
|
||||
Modify | 0.25864 | 0.28389 | 0.2976 | 2.5 | 4.48
|
||||
Other | | 0.03539 | | | 0.56
|
||||
Pair | 8.2128 | 9.5121 | 11.127 | 36.9 | 57.63
|
||||
Bond | 0.035131 | 0.11618 | 0.15792 | 14.0 | 0.70
|
||||
Kspace | 4.0276 | 5.4843 | 6.6741 | 44.1 | 33.23
|
||||
Neigh | 0.66517 | 0.66553 | 0.66594 | 0.0 | 4.03
|
||||
Comm | 0.28238 | 0.35525 | 0.41804 | 9.9 | 2.15
|
||||
Output | 0.01374 | 0.014323 | 0.015721 | 0.7 | 0.09
|
||||
Modify | 0.28166 | 0.28593 | 0.29397 | 0.9 | 1.73
|
||||
Other | | 0.07076 | | | 0.43
|
||||
|
||||
Nlocal: 246 ave 290 max 210 min
|
||||
Histogram: 1 1 0 1 2 0 2 0 0 1
|
||||
Nghost: 6160.5 ave 6438 max 5877 min
|
||||
Histogram: 2 0 0 1 0 2 0 1 1 1
|
||||
Neighs: 116321 ave 144703 max 98946 min
|
||||
Histogram: 1 2 1 1 0 2 0 0 0 1
|
||||
Nlocal: 492 ave 517 max 456 min
|
||||
Histogram: 1 0 0 0 0 1 0 0 1 1
|
||||
Nghost: 7866 ave 8035 max 7664 min
|
||||
Histogram: 1 0 0 1 0 0 0 0 1 1
|
||||
Neighs: 232474 ave 255787 max 198462 min
|
||||
Histogram: 1 0 0 1 0 0 0 0 0 2
|
||||
|
||||
Total # of neighbors = 930570
|
||||
Ave neighs/atom = 472.851
|
||||
Total # of neighbors = 929895
|
||||
Ave neighs/atom = 472.508
|
||||
Ave special neighs/atom = 4.4065
|
||||
Neighbor list builds = 46
|
||||
Neighbor list builds = 47
|
||||
Dangerous builds = 0
|
||||
Total wall time: 0:00:07
|
||||
Total wall time: 0:00:18
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
3
tools/ch2lmp/example/convert.sh
Executable file
3
tools/ch2lmp/example/convert.sh
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
rm -f 1ac7.restart* 1ac7.dump
|
||||
../charmm2lammps.pl -water -ions -border=2.0 all27_na 1ac7
|
||||
@ -1,12 +0,0 @@
|
||||
The charmm2lmp sub-directory contains tools for converting files back-and-forth between
|
||||
the CHARMM MD code and LAMMPS.
|
||||
|
||||
The charmm2lammps.pl perl script converts CHARMM input files into LAMMPS input.
|
||||
The lammps2pdb.pl perl script converts LAMMPS dump files into a pdb series file.
|
||||
The mkpdb.f fortran 90 code also converts LAMMPS dump files into PDB files, and the
|
||||
mkdcd.f tool converts LAMMPS dump files into CHARMM *.dcd trajectory files that can
|
||||
be read-in to CHARMM for analysis. See the README file in the charmm2lmp sub-directory
|
||||
for more information.
|
||||
|
||||
These tools were written by Pieter J. in 't Veld (pjintve@sandia.gov) and Paul Crozier
|
||||
(pscrozi@sandia.gov) at Sandia.
|
||||
Reference in New Issue
Block a user