forked from lijiext/lammps
Merge pull request #2685 from akohlmey/collected-small-changes
Collected small changes and fixes
This commit is contained in:
commit
9da49d9c6f
|
@ -1,7 +1,7 @@
|
|||
Basic build options
|
||||
===================
|
||||
|
||||
The following topics are covered on this page, for building both with
|
||||
The following topics are covered on this page, for building with both
|
||||
CMake and make:
|
||||
|
||||
* :ref:`Serial vs parallel build <serial>`
|
||||
|
|
|
@ -18,12 +18,13 @@ This compute
|
|||
|
||||
calculates rotational kinetic energy which can be :doc:`output with thermodynamic info <Howto_output>`.
|
||||
|
||||
Use one of these 3 pair potentials, which compute forces and torques
|
||||
Use one of these 4 pair potentials, which compute forces and torques
|
||||
between interacting pairs of particles:
|
||||
|
||||
* :doc:`pair_style <pair_style>` gran/history
|
||||
* :doc:`pair_style <pair_style>` gran/no_history
|
||||
* :doc:`pair_style <pair_style>` gran/hertzian
|
||||
* :doc:`pair_style gran/history <pair_gran>`
|
||||
* :doc:`pair_style gran/no_history <pair_gran>`
|
||||
* :doc:`pair_style gran/hertzian <pair_gran>`
|
||||
* :doc:`pair_style granular <pair_granular>`
|
||||
|
||||
These commands implement fix options specific to granular systems:
|
||||
|
||||
|
@ -31,6 +32,7 @@ These commands implement fix options specific to granular systems:
|
|||
* :doc:`fix pour <fix_pour>`
|
||||
* :doc:`fix viscous <fix_viscous>`
|
||||
* :doc:`fix wall/gran <fix_wall_gran>`
|
||||
* :doc:`fix wall/gran/region <fix_wall_gran_region>`
|
||||
|
||||
The fix style *freeze* zeroes both the force and torque of frozen
|
||||
atoms, and should be used for granular system instead of the fix style
|
||||
|
|
|
@ -86,33 +86,59 @@ check out any other desired branch) first.
|
|||
|
||||
Once you have updated your local files with a ``git pull`` (or ``git
|
||||
checkout``), you still need to re-build LAMMPS if any source files have
|
||||
changed. To do this, you should cd to the src directory and type:
|
||||
changed. How to do this depends on the build system you are using.
|
||||
|
||||
.. code-block:: bash
|
||||
.. tabs::
|
||||
|
||||
$ make purge # remove any deprecated src files
|
||||
$ make package-update # sync package files with src files
|
||||
$ make foo # re-build for your machine (mpi, serial, etc)
|
||||
.. tab:: CMake build
|
||||
|
||||
just as described on the :doc:`Apply patch <Install_patch>` page,
|
||||
after a patch has been installed.
|
||||
Change to your build folder and type:
|
||||
|
||||
.. warning::
|
||||
.. code-block:: bash
|
||||
|
||||
If you wish to edit/change a src file that is from a
|
||||
package, you should edit the version of the file inside the package
|
||||
sub-directory with src, then re-install the package. The version in
|
||||
the source directory is merely a copy and will be wiped out if you type "make
|
||||
package-update".
|
||||
cmake . --build
|
||||
|
||||
.. warning::
|
||||
CMake should auto-detect whether it needs to re-run the CMake
|
||||
configuration step and otherwise redo the build for all files
|
||||
that have been changed or files that depend on changed files.
|
||||
In case some build options have been changed or renamed, you
|
||||
may have to update those by running:
|
||||
|
||||
The GitHub servers support both the "git://" and
|
||||
"https://" access protocols for anonymous read-only access. If you
|
||||
have a correspondingly configured GitHub account, you may also use
|
||||
SSH access with the URL "git@github.com:lammps/lammps.git".
|
||||
.. code-block:: bash
|
||||
|
||||
The LAMMPS GitHub project is managed by Christoph Junghans (LANL,
|
||||
junghans at lanl.gov), Axel Kohlmeyer (Temple U, akohlmey at
|
||||
gmail.com) and Richard Berger (Temple U, richard.berger at
|
||||
temple.edu).
|
||||
cmake .
|
||||
|
||||
and then rebuild.
|
||||
|
||||
.. tab:: Traditional make
|
||||
|
||||
Switch to the src directory and type:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ make purge # remove any deprecated src files
|
||||
$ make package-update # sync package files with src files
|
||||
$ make foo # re-build for your machine (mpi, serial, etc)
|
||||
|
||||
Just as described on the :doc:`Apply patch <Install_patch>` page,
|
||||
after a patch has been installed.
|
||||
|
||||
.. warning::
|
||||
|
||||
If you wish to edit/change a src file that is from a package,
|
||||
you should edit the version of the file inside the package
|
||||
sub-directory with src, then re-install the package. The
|
||||
version in the source directory is merely a copy and will be
|
||||
wiped out if you type "make package-update".
|
||||
|
||||
.. admonition:: Git protocols
|
||||
:class: note
|
||||
|
||||
The servers at github.com support the "git://" and "https://" access
|
||||
protocols for anonymous, read-only access. If you have a suitably
|
||||
configured GitHub account, you may also use SSH protocol with the
|
||||
URL "git@github.com:lammps/lammps.git".
|
||||
|
||||
The LAMMPS GitHub project is currently managed by Axel Kohlmeyer
|
||||
(Temple U, akohlmey at gmail.com) and Richard Berger (Temple U,
|
||||
richard.berger at temple.edu).
|
||||
|
|
|
@ -43,24 +43,54 @@ up to date.
|
|||
* A list of updated files print out to the screen. The -b switch
|
||||
creates backup files of your originals (e.g. src/force.cpp.orig), so
|
||||
you can manually undo the patch if something goes wrong.
|
||||
* Type the following from the src directory, to enforce consistency
|
||||
between the src and package directories. This is OK to do even if you
|
||||
don't use one or more packages. If you are applying several patches
|
||||
successively, you only need to type this once at the end. The purge
|
||||
command removes deprecated src files if any were removed by the patch
|
||||
from package sub-directories.
|
||||
|
||||
.. code-block:: bash
|
||||
* Once you have updated your local files you need to re-build LAMMPS.
|
||||
If you are applying several patches successively, you only need to
|
||||
do the rebuild once at the end. How to do it depends on the build
|
||||
system you are using.
|
||||
|
||||
$ make purge
|
||||
$ make package-update
|
||||
.. tabs::
|
||||
|
||||
* Re-build LAMMPS via the "make" command.
|
||||
.. tab:: CMake build
|
||||
|
||||
.. warning::
|
||||
Change to your build folder and type:
|
||||
|
||||
If you wish to edit/change a source file that is part of a package,
|
||||
you should edit the version of the file inside the package folder in
|
||||
src, and then re-install or update the package. The version in the
|
||||
src directory is merely a copy and will be wiped out when you type
|
||||
"make package-update".
|
||||
.. code-block:: bash
|
||||
|
||||
cmake . --build
|
||||
|
||||
CMake should auto-detect whether it needs to re-run the CMake
|
||||
configuration step and otherwise redo the build for all files
|
||||
that have been changed or files that depend on changed files.
|
||||
In case some build options have been changed or renamed, you
|
||||
may have to update those by running:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
cmake .
|
||||
|
||||
and then rebuild.
|
||||
|
||||
.. tab:: Traditional make
|
||||
|
||||
Switch to the src directory and type:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ make purge # remove any deprecated src files
|
||||
$ make package-update # sync package files with src files
|
||||
$ make foo # re-build for your machine (mpi, serial, etc)
|
||||
|
||||
to enforce consistency of the source between the src folder
|
||||
and package directories. This is OK to do even if you don't
|
||||
use any packages. The "make purge" command removes any deprecated
|
||||
src files if they were removed by the patch from a package
|
||||
sub-directory.
|
||||
|
||||
.. warning::
|
||||
|
||||
If you wish to edit/change a src file that is from a package,
|
||||
you should edit the version of the file inside the package
|
||||
sub-directory with src, then re-install the package. The
|
||||
version in the source directory is merely a copy and will be
|
||||
wiped out if you type "make package-update".
|
||||
|
|
|
@ -71,9 +71,3 @@ Default
|
|||
|
||||
none
|
||||
|
||||
----------
|
||||
|
||||
.. _cosine-Mayo:
|
||||
|
||||
**(Mayo)** Mayo, Olfason, Goddard III, J Phys Chem, 94, 8897-8909
|
||||
(1990).
|
||||
|
|
|
@ -15,10 +15,10 @@ Syntax
|
|||
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
dihedral_style style interp Ntable
|
||||
dihedral_style style interpolation Ntable
|
||||
|
||||
* style = *table* or *table/cut*
|
||||
* interp = *linear* or *spline* = method of interpolation
|
||||
* interpolation = *linear* or *spline* = method of interpolation
|
||||
* Ntable = size of the internal lookup table
|
||||
|
||||
Examples
|
||||
|
|
|
@ -349,7 +349,7 @@ the box size stored with the snapshot.
|
|||
|
||||
The *xtc* style writes XTC files, a compressed trajectory format used
|
||||
by the GROMACS molecular dynamics package, and described
|
||||
`here <http://manual.gromacs.org/current/online/xtc.html>`_.
|
||||
`here <https://manual.gromacs.org/current/reference-manual/file-formats.html#xtc>`_.
|
||||
The precision used in XTC files can be adjusted via the
|
||||
:doc:`dump_modify <dump_modify>` command. The default value of 1000
|
||||
means that coordinates are stored to 1/1000 nanometer accuracy. XTC
|
||||
|
|
|
@ -307,7 +307,9 @@ atoms in the chunk. The averaged output value for the chunk on the
|
|||
average over atoms across the entire *Nfreq* timescale. For the
|
||||
*density/number* and *density/mass* values, the volume (bin volume or
|
||||
system volume) used in the final normalization will be the volume at
|
||||
the final *Nfreq* timestep.
|
||||
the final *Nfreq* timestep. For the *temp* values, degrees of freedom and
|
||||
kinetic energy are summed separately across the entire *Nfreq* timescale, and
|
||||
the output value is calculated by dividing those two sums.
|
||||
|
||||
If the *norm* setting is *sample*\ , the chunk value is summed over
|
||||
atoms for each sample, as is the count, and an "average sample value"
|
||||
|
|
|
@ -127,6 +127,11 @@ the :doc:`run <run>` command.
|
|||
The forces due to this fix are imposed during an energy minimization,
|
||||
invoked by the :doc:`minimize <minimize>` command.
|
||||
|
||||
The :doc:`fix_modify <fix_modify>` *respa* option is supported by this
|
||||
fix. This allows to set at which level of the :doc:`r-RESPA
|
||||
<run_style>` integrator the fix is adding its forces. Default is the
|
||||
outermost level.
|
||||
|
||||
.. note::
|
||||
|
||||
If you want the potential energy associated with the CMAP terms
|
||||
|
|
|
@ -150,7 +150,7 @@ shifted to be 0.0 at the cutoff distance Rc.
|
|||
The :doc:`pair_modify <pair_modify>` table option is not relevant
|
||||
for these pair styles.
|
||||
|
||||
These pair style do not support the :doc:`pair_modify <pair_modify>`
|
||||
These pair styles do not support the :doc:`pair_modify <pair_modify>`
|
||||
tail option for adding long-range tail corrections to energy and
|
||||
pressure.
|
||||
|
||||
|
|
|
@ -363,7 +363,7 @@ Mixing, shift, table, tail correction, restart, rRESPA info
|
|||
|
||||
The different versions of the *lj/cut/soft* pair styles support mixing. For
|
||||
atom type pairs I,J and I != J, the :math:`\epsilon` and :math:`\sigma`
|
||||
coefficients and cutoff distance for these pair style can be mixed. The default
|
||||
coefficients and cutoff distance for these pair styles can be mixed. The default
|
||||
mix value is *geometric* for 12-6 styles.
|
||||
|
||||
The mixing rule for epsilon and sigma for *lj/class2/soft* 9-6 potentials is to
|
||||
|
|
|
@ -188,7 +188,7 @@ Restrictions
|
|||
The *gayberne* style is part of the ASPHERE package. It is only
|
||||
enabled if LAMMPS was built with that package. See the :doc:`Build package <Build_package>` doc page for more info.
|
||||
|
||||
These pair style require that atoms store torque and a quaternion to
|
||||
These pair styles require that atoms store torque and a quaternion to
|
||||
represent their orientation, as defined by the
|
||||
:doc:`atom_style <atom_style>`. It also require they store a per-type
|
||||
:doc:`shape <set>`. The particles cannot store a per-particle
|
||||
|
|
|
@ -217,7 +217,7 @@ This pair style can only be used via the *pair* keyword of the
|
|||
Restrictions
|
||||
""""""""""""
|
||||
|
||||
These pair style are part of the MANYBODY package. They is only
|
||||
These pair styles are part of the MANYBODY package. They are only
|
||||
enabled if LAMMPS was built with that package. See the :doc:`Build package <Build_package>` doc page for more info.
|
||||
|
||||
These pair styles requires the :doc:`newton <newton>` setting to be "on"
|
||||
|
|
|
@ -0,0 +1,56 @@
|
|||
# sample surface deposition script for molecules
|
||||
|
||||
units lj
|
||||
atom_style bond
|
||||
boundary p p f
|
||||
|
||||
lattice fcc 1.0
|
||||
region box block 0 5 0 5 0 10
|
||||
create_box 3 box bond/types 1 extra/bond/per/atom 1
|
||||
|
||||
region substrate block INF INF INF INF INF 3
|
||||
create_atoms 1 region substrate
|
||||
|
||||
pair_style lj/cut 2.5
|
||||
pair_coeff * * 1.0 1.0
|
||||
pair_coeff 1 2 1.0 1.0 5.0
|
||||
mass * 1.0
|
||||
|
||||
bond_style harmonic
|
||||
bond_coeff 1 5.0 1.0
|
||||
|
||||
neigh_modify delay 0
|
||||
|
||||
molecule dimer molecule.dimer
|
||||
region slab block 0 5 0 5 8 9
|
||||
|
||||
group addatoms empty
|
||||
region mobile block 0 5 0 5 2 INF
|
||||
group mobile region mobile
|
||||
|
||||
compute add addatoms temp
|
||||
compute_modify add dynamic/dof yes extra/dof 0
|
||||
|
||||
fix 1 addatoms rigid/small molecule mol dimer
|
||||
fix 2 mobile langevin 0.1 0.1 0.1 587283
|
||||
fix 3 mobile nve
|
||||
|
||||
fix 4 addatoms deposit 100 0 100 12345 region slab near 1.0 &
|
||||
mol dimer vz -1.0 -1.0 rigid 1
|
||||
fix 5 addatoms wall/reflect zhi EDGE
|
||||
|
||||
thermo_style custom step atoms temp epair etotal press
|
||||
thermo 100
|
||||
thermo_modify temp add lost/bond ignore lost warn
|
||||
|
||||
#dump 1 all atom 50 dump.deposit.atom
|
||||
|
||||
#dump 2 all image 50 image.*.jpg type type &
|
||||
# axes yes 0.8 0.02 view 80 -30
|
||||
#dump_modify 2 pad 5
|
||||
|
||||
#dump 3 all movie 50 tmp.mpg type type &
|
||||
# axes yes 0.8 0.02 view 80 -30
|
||||
#dump_modify 3 pad 5
|
||||
|
||||
run 10000
|
|
@ -21,11 +21,11 @@ bond_coeff 1 5.0 1.0
|
|||
|
||||
neigh_modify delay 0
|
||||
|
||||
group addatoms type 2
|
||||
group addatoms empty
|
||||
region mobile block 0 5 0 5 2 INF
|
||||
group mobile region mobile
|
||||
|
||||
compute add addatoms temp
|
||||
compute add addatoms temp
|
||||
compute_modify add dynamic/dof yes extra/dof 0
|
||||
|
||||
fix 1 addatoms nve
|
||||
|
|
|
@ -0,0 +1,218 @@
|
|||
LAMMPS (10 Mar 2021)
|
||||
using 1 OpenMP thread(s) per MPI task
|
||||
# sample surface deposition script for molecules
|
||||
|
||||
units lj
|
||||
atom_style bond
|
||||
boundary p p f
|
||||
|
||||
lattice fcc 1.0
|
||||
Lattice spacing in x,y,z = 1.5874011 1.5874011 1.5874011
|
||||
region box block 0 5 0 5 0 10
|
||||
create_box 3 box bond/types 1 extra/bond/per/atom 1
|
||||
Created orthogonal box = (0.0000000 0.0000000 0.0000000) to (7.9370053 7.9370053 15.874011)
|
||||
1 by 1 by 1 MPI processor grid
|
||||
|
||||
region substrate block INF INF INF INF INF 3
|
||||
create_atoms 1 region substrate
|
||||
Created 350 atoms
|
||||
create_atoms CPU = 0.001 seconds
|
||||
|
||||
pair_style lj/cut 2.5
|
||||
pair_coeff * * 1.0 1.0
|
||||
pair_coeff 1 2 1.0 1.0 5.0
|
||||
mass * 1.0
|
||||
|
||||
bond_style harmonic
|
||||
bond_coeff 1 5.0 1.0
|
||||
|
||||
neigh_modify delay 0
|
||||
|
||||
molecule dimer molecule.dimer
|
||||
Read molecule template dimer:
|
||||
1 molecules
|
||||
2 atoms with max type 3
|
||||
1 bonds with max type 1
|
||||
0 angles with max type 0
|
||||
0 dihedrals with max type 0
|
||||
0 impropers with max type 0
|
||||
region slab block 0 5 0 5 8 9
|
||||
|
||||
group addatoms empty
|
||||
0 atoms in group addatoms
|
||||
region mobile block 0 5 0 5 2 INF
|
||||
group mobile region mobile
|
||||
150 atoms in group mobile
|
||||
|
||||
compute add addatoms temp
|
||||
compute_modify add dynamic/dof yes extra/dof 0
|
||||
|
||||
fix 1 addatoms rigid/small molecule mol dimer
|
||||
create bodies CPU = 0.000 seconds
|
||||
0 rigid bodies with 0 atoms
|
||||
1.0000000 = max distance from body owner to body atom
|
||||
fix 2 mobile langevin 0.1 0.1 0.1 587283
|
||||
fix 3 mobile nve
|
||||
|
||||
fix 4 addatoms deposit 100 0 100 12345 region slab near 1.0 mol dimer vz -1.0 -1.0 rigid 1
|
||||
fix 5 addatoms wall/reflect zhi EDGE
|
||||
|
||||
thermo_style custom step atoms temp epair etotal press
|
||||
thermo 100
|
||||
thermo_modify temp add lost/bond ignore lost warn
|
||||
WARNING: Temperature for thermo pressure is not for group all (src/thermo.cpp:468)
|
||||
|
||||
#dump 1 all atom 50 dump.deposit.atom
|
||||
|
||||
#dump 2 all image 50 image.*.jpg type type # axes yes 0.8 0.02 view 80 -30
|
||||
#dump_modify 2 pad 5
|
||||
|
||||
#dump 3 all movie 50 tmp.mpg type type # axes yes 0.8 0.02 view 80 -30
|
||||
#dump_modify 3 pad 5
|
||||
|
||||
run 10000
|
||||
WARNING: Should not allow rigid bodies to bounce off relecting walls (src/fix_wall_reflect.cpp:182)
|
||||
Neighbor list info ...
|
||||
update every 1 steps, delay 0 steps, check yes
|
||||
max neighbors/atom: 2000, page size: 100000
|
||||
master list distance cutoff = 5.3
|
||||
ghost atom cutoff = 5.3
|
||||
binsize = 2.65, bins = 3 3 6
|
||||
1 neighbor lists, perpetual/occasional/extra = 1 0 0
|
||||
(1) pair lj/cut, 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) = 5.929 | 5.929 | 5.929 Mbytes
|
||||
Step Atoms Temp E_pair TotEng Press
|
||||
0 350 0 -6.9215833 -6.9215833 -1.0052629
|
||||
100 352 1.0079368 -6.8875167 -6.8803581 -0.73353914
|
||||
200 354 1.0081552 -6.8594643 -6.8452248 -0.70421276
|
||||
300 356 1.0085803 -6.8171524 -6.7959042 -0.6917826
|
||||
400 358 1.0099188 -6.7852701 -6.7570601 -0.70371699
|
||||
500 360 1.0140221 -6.7493429 -6.7141338 -0.68415307
|
||||
600 362 1.026148 -6.7105231 -6.6680032 -0.68314418
|
||||
700 364 1.0683344 -6.6725162 -6.621154 -0.65747369
|
||||
800 366 1.0958952 -6.6412275 -6.5813425 -0.68789614
|
||||
900 368 1.1250033 -6.6101882 -6.541404 -0.66674346
|
||||
1000 370 1.2326373 -6.5993719 -6.5160856 -0.6968868
|
||||
1100 372 1.1397426 -6.5912861 -6.5070309 -0.63330356
|
||||
1200 374 1.0514292 -6.5905747 -6.5062354 -0.71020362
|
||||
1300 376 1.003296 -6.5747765 -6.4880555 -0.65459732
|
||||
1400 378 0.82999289 -6.5681797 -6.4913285 -0.60438126
|
||||
1500 380 0.90239175 -6.575298 -6.4862461 -0.66528725
|
||||
1600 382 0.86399799 -6.5692206 -6.4787496 -0.65027781
|
||||
1700 384 0.64747231 -6.5644237 -6.4927634 -0.6304614
|
||||
1800 386 0.74288971 -6.5515735 -6.4649672 -0.67772325
|
||||
1900 388 0.7257202 -6.5565091 -6.4676644 -0.66173549
|
||||
2000 390 0.73381036 -6.5631515 -6.4690733 -0.64685916
|
||||
2100 392 0.76476562 -6.5574124 -6.4549885 -0.68866192
|
||||
2200 394 0.65932468 -6.5511557 -6.459118 -0.71728829
|
||||
2300 396 0.70269509 -6.5728146 -6.4707819 -0.64362081
|
||||
2400 398 0.60528919 -6.5845991 -6.4933494 -0.63956327
|
||||
2500 400 0.51025744 -6.5812452 -6.5015175 -0.68706961
|
||||
2600 402 0.5245131 -6.6003894 -6.5155801 -0.68972215
|
||||
2700 404 0.46330251 -6.5659175 -6.4885092 -0.72870942
|
||||
2800 406 0.48039778 -6.5715192 -6.488692 -0.753758
|
||||
2900 408 0.53698616 -6.5813154 -6.4858951 -0.67117541
|
||||
3000 410 0.50231419 -6.5886963 -6.4968096 -0.71905351
|
||||
3100 412 0.49420225 -6.596733 -6.5037702 -0.65947518
|
||||
3200 414 0.42703699 -6.5879338 -6.5054146 -0.80033546
|
||||
3300 416 0.44306009 -6.580249 -6.4923825 -0.76503083
|
||||
3400 418 0.55620672 -6.5923388 -6.4792346 -0.69367877
|
||||
3500 420 0.39815033 -6.5911154 -6.5081674 -0.65569211
|
||||
3600 422 0.44197847 -6.6026382 -6.5083774 -0.73299102
|
||||
3700 424 0.45049389 -6.6060616 -6.5077817 -0.7552914
|
||||
3800 426 0.43047295 -6.6079275 -6.51193 -0.71501328
|
||||
3900 428 0.43779129 -6.6099306 -6.5102001 -0.71539515
|
||||
4000 430 0.41113503 -6.6123009 -6.5166881 -0.74177096
|
||||
4100 432 0.32800011 -6.5983566 -6.5205325 -0.71688103
|
||||
4200 434 0.39168203 -6.6110342 -6.5162724 -0.78927697
|
||||
4300 436 0.48151013 -6.6183315 -6.4996106 -0.70523035
|
||||
4400 438 0.45391027 -6.6331732 -6.5191775 -0.7270855
|
||||
4500 440 0.349126 -6.6091657 -6.5199006 -0.76974115
|
||||
4600 442 0.43375023 -6.6219188 -6.5090653 -0.74576212
|
||||
4700 444 0.40071749 -6.6184164 -6.5123707 -0.71919052
|
||||
4800 446 0.414292 -6.6298132 -6.5183445 -0.76237313
|
||||
4900 448 0.44210681 -6.6364174 -6.5155288 -0.78753121
|
||||
5000 450 0.36101771 -6.6232703 -6.5229876 -0.73927083
|
||||
5100 452 0.41481171 -6.6442404 -6.5272305 -0.76316209
|
||||
5200 454 0.40283527 -6.6512252 -6.5358759 -0.79645689
|
||||
5300 456 0.3642061 -6.6530346 -6.5472072 -0.77458364
|
||||
5400 458 0.38449826 -6.6514864 -6.5381518 -0.73083784
|
||||
5500 460 0.42559408 -6.6769326 -6.5497169 -0.78932279
|
||||
5600 462 0.38905756 -6.6698705 -6.5519743 -0.77118812
|
||||
5700 464 0.38354955 -6.6706904 -6.5528977 -0.75067129
|
||||
5800 466 0.36760943 -6.6942519 -6.5798669 -0.685487
|
||||
5900 468 0.30783118 -6.6838159 -6.5867965 -0.79233808
|
||||
6000 470 0.33145368 -6.6733504 -6.5675673 -0.84390449
|
||||
6100 472 0.39252324 -6.6912189 -6.5643973 -0.83342022
|
||||
6200 474 0.32342144 -6.6906083 -6.5848481 -0.71262158
|
||||
6300 476 0.34445238 -6.7008453 -6.5868721 -0.76650756
|
||||
6400 478 0.38152782 -6.7017838 -6.5740758 -0.77113022
|
||||
6500 480 0.37540166 -6.7119996 -6.5849105 -0.79907635
|
||||
6600 482 0.3579419 -6.7034721 -6.5809401 -0.8141269
|
||||
6700 484 0.33538235 -6.6916682 -6.575601 -0.83265486
|
||||
6800 486 0.34081871 -6.6931924 -6.573976 -0.80582583
|
||||
6900 488 0.3555283 -6.6939997 -6.5683263 -0.74771423
|
||||
7000 490 0.3543769 -6.7093364 -6.5827732 -0.77643516
|
||||
7100 492 0.31263107 -6.698361 -6.5855723 -0.73108333
|
||||
7200 494 0.32107 -6.6959056 -6.5789166 -0.7575478
|
||||
7300 496 0.32908165 -6.7137605 -6.592677 -0.86538023
|
||||
7400 498 0.32539571 -6.7030353 -6.5821554 -0.79337428
|
||||
7500 500 0.33902577 -6.7078178 -6.5806832 -0.85408988
|
||||
7600 502 0.35530921 -6.707507 -6.5730274 -0.79914613
|
||||
7700 504 0.32391812 -6.6978823 -6.5741635 -0.78603595
|
||||
7800 506 0.36390015 -6.7151325 -6.5748943 -0.83164222
|
||||
7900 508 0.3372561 -6.7086718 -6.5775535 -0.7949992
|
||||
8000 510 0.36612946 -6.7225238 -6.5789437 -0.80322866
|
||||
8100 512 0.34622305 -6.7229825 -6.5860486 -0.70478659
|
||||
8200 514 0.3212233 -6.7202524 -6.5921381 -0.91836713
|
||||
8300 516 0.3402461 -6.721488 -6.5846642 -0.88273592
|
||||
8400 518 0.34070258 -6.7268378 -6.5887152 -0.76057264
|
||||
8500 520 0.36267747 -6.744602 -6.5963924 -0.81051317
|
||||
8600 522 0.3439948 -6.7376267 -6.595943 -0.84600203
|
||||
8700 524 0.30960289 -6.7276471 -6.5991382 -0.90965986
|
||||
8800 526 0.28868972 -6.7159628 -6.595218 -0.876093
|
||||
8900 528 0.31020216 -6.7162903 -6.5855707 -0.83193125
|
||||
9000 530 0.31836275 -6.7171479 -6.5819939 -0.82093897
|
||||
9100 532 0.32543293 -6.724167 -6.5850016 -0.7690143
|
||||
9200 534 0.32644265 -6.7139575 -6.5733549 -0.86903096
|
||||
9300 536 0.33050759 -6.7254715 -6.5821077 -0.94504522
|
||||
9400 538 0.30372582 -6.7139931 -6.5813247 -0.91128612
|
||||
9500 540 0.32943659 -6.7206223 -6.5757312 -0.87818439
|
||||
9600 542 0.30911968 -6.708091 -6.5712114 -0.79092372
|
||||
9700 544 0.33909826 -6.7222948 -6.5711342 -0.80266151
|
||||
9800 546 0.29015141 -6.7086869 -6.5784908 -0.87763769
|
||||
9900 548 0.33838474 -6.7384955 -6.5856667 -0.85630604
|
||||
10000 550 0.30213198 -6.7338924 -6.5965597 -0.75738882
|
||||
Loop time of 17.2852 on 1 procs for 10000 steps with 550 atoms
|
||||
|
||||
Performance: 249924.414 tau/day, 578.529 timesteps/s
|
||||
99.7% CPU use with 1 MPI tasks x 1 OpenMP threads
|
||||
|
||||
MPI task timing breakdown:
|
||||
Section | min time | avg time | max time |%varavg| %total
|
||||
---------------------------------------------------------------
|
||||
Pair | 9.637 | 9.637 | 9.637 | 0.0 | 55.75
|
||||
Bond | 0.025444 | 0.025444 | 0.025444 | 0.0 | 0.15
|
||||
Neigh | 4.6852 | 4.6852 | 4.6852 | 0.0 | 27.11
|
||||
Comm | 0.65556 | 0.65556 | 0.65556 | 0.0 | 3.79
|
||||
Output | 0.0099883 | 0.0099883 | 0.0099883 | 0.0 | 0.06
|
||||
Modify | 2.1895 | 2.1895 | 2.1895 | 0.0 | 12.67
|
||||
Other | | 0.08248 | | | 0.48
|
||||
|
||||
Nlocal: 550.000 ave 550 max 550 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
Nghost: 2367.00 ave 2367 max 2367 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
Neighs: 36781.0 ave 36781 max 36781 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
|
||||
Total # of neighbors = 36781
|
||||
Ave neighs/atom = 66.874545
|
||||
Ave special neighs/atom = 0.36363636
|
||||
Neighbor list builds = 840
|
||||
Dangerous builds = 0
|
||||
Total wall time: 0:00:17
|
|
@ -0,0 +1,218 @@
|
|||
LAMMPS (10 Mar 2021)
|
||||
using 1 OpenMP thread(s) per MPI task
|
||||
# sample surface deposition script for molecules
|
||||
|
||||
units lj
|
||||
atom_style bond
|
||||
boundary p p f
|
||||
|
||||
lattice fcc 1.0
|
||||
Lattice spacing in x,y,z = 1.5874011 1.5874011 1.5874011
|
||||
region box block 0 5 0 5 0 10
|
||||
create_box 3 box bond/types 1 extra/bond/per/atom 1
|
||||
Created orthogonal box = (0.0000000 0.0000000 0.0000000) to (7.9370053 7.9370053 15.874011)
|
||||
1 by 1 by 4 MPI processor grid
|
||||
|
||||
region substrate block INF INF INF INF INF 3
|
||||
create_atoms 1 region substrate
|
||||
Created 350 atoms
|
||||
create_atoms CPU = 0.139 seconds
|
||||
|
||||
pair_style lj/cut 2.5
|
||||
pair_coeff * * 1.0 1.0
|
||||
pair_coeff 1 2 1.0 1.0 5.0
|
||||
mass * 1.0
|
||||
|
||||
bond_style harmonic
|
||||
bond_coeff 1 5.0 1.0
|
||||
|
||||
neigh_modify delay 0
|
||||
|
||||
molecule dimer molecule.dimer
|
||||
Read molecule template dimer:
|
||||
1 molecules
|
||||
2 atoms with max type 3
|
||||
1 bonds with max type 1
|
||||
0 angles with max type 0
|
||||
0 dihedrals with max type 0
|
||||
0 impropers with max type 0
|
||||
region slab block 0 5 0 5 8 9
|
||||
|
||||
group addatoms empty
|
||||
0 atoms in group addatoms
|
||||
region mobile block 0 5 0 5 2 INF
|
||||
group mobile region mobile
|
||||
150 atoms in group mobile
|
||||
|
||||
compute add addatoms temp
|
||||
compute_modify add dynamic/dof yes extra/dof 0
|
||||
|
||||
fix 1 addatoms rigid/small molecule mol dimer
|
||||
create bodies CPU = 0.006 seconds
|
||||
0 rigid bodies with 0 atoms
|
||||
1.0000000 = max distance from body owner to body atom
|
||||
fix 2 mobile langevin 0.1 0.1 0.1 587283
|
||||
fix 3 mobile nve
|
||||
|
||||
fix 4 addatoms deposit 100 0 100 12345 region slab near 1.0 mol dimer vz -1.0 -1.0 rigid 1
|
||||
fix 5 addatoms wall/reflect zhi EDGE
|
||||
|
||||
thermo_style custom step atoms temp epair etotal press
|
||||
thermo 100
|
||||
thermo_modify temp add lost/bond ignore lost warn
|
||||
WARNING: Temperature for thermo pressure is not for group all (src/thermo.cpp:468)
|
||||
|
||||
#dump 1 all atom 50 dump.deposit.atom
|
||||
|
||||
#dump 2 all image 50 image.*.jpg type type # axes yes 0.8 0.02 view 80 -30
|
||||
#dump_modify 2 pad 5
|
||||
|
||||
#dump 3 all movie 50 tmp.mpg type type # axes yes 0.8 0.02 view 80 -30
|
||||
#dump_modify 3 pad 5
|
||||
|
||||
run 10000
|
||||
WARNING: Should not allow rigid bodies to bounce off relecting walls (src/fix_wall_reflect.cpp:182)
|
||||
Neighbor list info ...
|
||||
update every 1 steps, delay 0 steps, check yes
|
||||
max neighbors/atom: 2000, page size: 100000
|
||||
master list distance cutoff = 5.3
|
||||
ghost atom cutoff = 5.3
|
||||
binsize = 2.65, bins = 3 3 6
|
||||
1 neighbor lists, perpetual/occasional/extra = 1 0 0
|
||||
(1) pair lj/cut, 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) = 5.255 | 5.852 | 6.302 Mbytes
|
||||
Step Atoms Temp E_pair TotEng Press
|
||||
0 350 0 -6.9215833 -6.9215833 -1.0052629
|
||||
100 352 1.0079368 -6.8946578 -6.8874992 -0.73775337
|
||||
200 354 1.0081552 -6.8645575 -6.850318 -0.69629729
|
||||
300 356 1.0085803 -6.821677 -6.8004288 -0.69532657
|
||||
400 358 1.0099188 -6.7837923 -6.7555822 -0.68879568
|
||||
500 360 1.0140221 -6.7446709 -6.7094618 -0.72991641
|
||||
600 362 1.026146 -6.7129201 -6.6704003 -0.67063836
|
||||
700 364 1.0683193 -6.6776523 -6.6262908 -0.65572472
|
||||
800 366 1.0958893 -6.6402029 -6.5803182 -0.66307281
|
||||
900 368 1.1231768 -6.6050912 -6.5364187 -0.64076928
|
||||
1000 370 1.1976283 -6.5942507 -6.5133299 -0.69249019
|
||||
1100 372 1.0506263 -6.5772313 -6.499564 -0.63072939
|
||||
1200 374 0.93724351 -6.5732957 -6.4981157 -0.64963897
|
||||
1300 376 0.93899686 -6.5578406 -6.4766773 -0.65096289
|
||||
1400 378 0.8704974 -6.5468498 -6.4662482 -0.67613931
|
||||
1500 380 0.84490693 -6.5401094 -6.4567304 -0.64385968
|
||||
1600 382 0.9243154 -6.5611604 -6.4643734 -0.62096869
|
||||
1700 384 0.67202953 -6.5590557 -6.4846775 -0.67807465
|
||||
1800 386 0.8712464 -6.5654953 -6.4639251 -0.65860236
|
||||
1900 388 0.70011668 -6.5808612 -6.495151 -0.65146463
|
||||
2000 390 0.64019295 -6.5652168 -6.4831408 -0.70291888
|
||||
2100 392 0.67578277 -6.5596196 -6.469113 -0.63315981
|
||||
2200 394 0.60785287 -6.558941 -6.4740885 -0.7133822
|
||||
2300 396 0.8155086 -6.5756022 -6.4571887 -0.69176417
|
||||
2400 398 0.69028748 -6.5875474 -6.483484 -0.63743938
|
||||
2500 400 0.5013913 -6.5871851 -6.5088427 -0.65872179
|
||||
2600 402 0.51268385 -6.5782356 -6.495339 -0.74289067
|
||||
2700 404 0.57745388 -6.5815718 -6.4850912 -0.67922914
|
||||
2800 406 0.47317895 -6.5974978 -6.5159152 -0.64657562
|
||||
2900 408 0.50593124 -6.6019054 -6.5120034 -0.64211427
|
||||
3000 410 0.44423233 -6.5956684 -6.5144064 -0.66526127
|
||||
3100 412 0.40808865 -6.5949863 -6.5182221 -0.62722445
|
||||
3200 414 0.40692632 -6.5866689 -6.5080358 -0.76440608
|
||||
3300 416 0.43908529 -6.5851721 -6.4980939 -0.69345883
|
||||
3400 418 0.53825907 -6.5880076 -6.478553 -0.69726204
|
||||
3500 420 0.46363057 -6.6135193 -6.5169296 -0.58015901
|
||||
3600 422 0.39262699 -6.621857 -6.5381213 -0.74921264
|
||||
3700 424 0.42679205 -6.6146579 -6.5215488 -0.69040431
|
||||
3800 426 0.38997492 -6.6139725 -6.5270063 -0.78237667
|
||||
3900 428 0.5222531 -6.6403886 -6.5214174 -0.78298122
|
||||
4000 430 0.47841128 -6.6502681 -6.5390097 -0.68125967
|
||||
4100 432 0.44609186 -6.6610827 -6.5552392 -0.81157037
|
||||
4200 434 0.4591431 -6.6858064 -6.5747234 -0.79000753
|
||||
4300 436 0.40690573 -6.6800195 -6.579693 -0.6781696
|
||||
4400 438 0.43023944 -6.6849804 -6.5769294 -0.7620548
|
||||
4500 440 0.40889421 -6.6783124 -6.5737656 -0.8577593
|
||||
4600 442 0.41452051 -6.6968565 -6.5890061 -0.70427746
|
||||
4700 444 0.36740394 -6.6920933 -6.5948636 -0.69303162
|
||||
4800 446 0.40112316 -6.6869413 -6.5790158 -0.84792822
|
||||
4900 448 0.42437165 -6.6789835 -6.5629444 -0.82278531
|
||||
5000 450 0.41822898 -6.6770254 -6.5608507 -0.72224472
|
||||
5100 452 0.38445688 -6.6738997 -6.5654522 -0.7022418
|
||||
5200 454 0.39998238 -6.6670536 -6.5525212 -0.73639959
|
||||
5300 456 0.39471029 -6.6728592 -6.5581681 -0.70419927
|
||||
5400 458 0.35817807 -6.6702423 -6.5646658 -0.81657219
|
||||
5500 460 0.37151428 -6.6690855 -6.558035 -0.78076653
|
||||
5600 462 0.32642513 -6.6622352 -6.5633185 -0.69118644
|
||||
5700 464 0.43665879 -6.6811227 -6.5470195 -0.77500043
|
||||
5800 466 0.40704721 -6.6858874 -6.5592311 -0.72683597
|
||||
5900 468 0.3861903 -6.6896953 -6.5679794 -0.78001958
|
||||
6000 470 0.34073346 -6.6833717 -6.574627 -0.78170837
|
||||
6100 472 0.39953874 -6.7083668 -6.5792785 -0.81791744
|
||||
6200 474 0.36685189 -6.7114648 -6.5915027 -0.80545451
|
||||
6300 476 0.35851799 -6.7261023 -6.607475 -0.77350495
|
||||
6400 478 0.41771823 -6.7427425 -6.6029205 -0.85319003
|
||||
6500 480 0.36519478 -6.732662 -6.6090284 -0.78712805
|
||||
6600 482 0.30669571 -6.7269784 -6.6219892 -0.76698134
|
||||
6700 484 0.3384344 -6.7261448 -6.6090213 -0.79935239
|
||||
6800 486 0.36420902 -6.7320259 -6.6046277 -0.84650552
|
||||
6900 488 0.40181215 -6.7490619 -6.6070279 -0.75753238
|
||||
7000 490 0.30536068 -6.7398924 -6.6308351 -0.73210162
|
||||
7100 492 0.28813004 -6.7257287 -6.6217794 -0.92178435
|
||||
7200 494 0.30956277 -6.7342688 -6.6214727 -0.77532949
|
||||
7300 496 0.36625115 -6.7528159 -6.6180561 -0.76247835
|
||||
7400 498 0.30935271 -6.7401433 -6.6252231 -0.82809158
|
||||
7500 500 0.33222282 -6.7410421 -6.6164585 -0.81948236
|
||||
7600 502 0.33318693 -6.7488106 -6.622704 -0.82395904
|
||||
7700 504 0.34570598 -6.7547394 -6.6226989 -0.85644369
|
||||
7800 506 0.34587242 -6.7446006 -6.6113099 -0.82476511
|
||||
7900 508 0.2969166 -6.7305429 -6.6151078 -0.8210214
|
||||
8000 510 0.32355758 -6.7437629 -6.6168776 -0.81719054
|
||||
8100 512 0.33784479 -6.7545537 -6.6209335 -0.78082067
|
||||
8200 514 0.32351289 -6.7525032 -6.6234757 -0.87093587
|
||||
8300 516 0.31900134 -6.7550972 -6.6268166 -0.79928704
|
||||
8400 518 0.3338521 -6.7588757 -6.6235302 -0.81699503
|
||||
8500 520 0.33115184 -6.7614854 -6.6261589 -0.79958489
|
||||
8600 522 0.29478929 -6.7490188 -6.6276018 -0.81954456
|
||||
8700 524 0.267993 -6.7467764 -6.6355389 -0.76642994
|
||||
8800 526 0.28792085 -6.7527118 -6.6322887 -0.86911619
|
||||
8900 528 0.32430992 -6.75901 -6.6223453 -0.87087898
|
||||
9000 530 0.33151321 -6.7534845 -6.6127478 -0.79309499
|
||||
9100 532 0.32760982 -6.7599992 -6.6199028 -0.7506309
|
||||
9200 534 0.32579101 -6.7671489 -6.6268269 -0.94238755
|
||||
9300 536 0.35144354 -6.7782581 -6.625813 -0.77952234
|
||||
9400 538 0.33689976 -6.7804455 -6.6332867 -0.75768501
|
||||
9500 540 0.3052486 -6.7745436 -6.6402908 -0.89621525
|
||||
9600 542 0.30617581 -6.7648172 -6.6292412 -0.90623541
|
||||
9700 544 0.30097715 -6.7714379 -6.6372707 -0.85534149
|
||||
9800 546 0.31297479 -6.7814978 -6.6410604 -0.88651064
|
||||
9900 548 0.31832347 -6.790661 -6.6468926 -1.006
|
||||
10000 550 0.29239559 -6.7823137 -6.6494066 -1.0337518
|
||||
Loop time of 34.7661 on 4 procs for 10000 steps with 550 atoms
|
||||
|
||||
Performance: 124259.065 tau/day, 287.637 timesteps/s
|
||||
73.4% CPU use with 4 MPI tasks x 1 OpenMP threads
|
||||
|
||||
MPI task timing breakdown:
|
||||
Section | min time | avg time | max time |%varavg| %total
|
||||
---------------------------------------------------------------
|
||||
Pair | 0.0076709 | 3.1286 | 9.1834 | 211.7 | 9.00
|
||||
Bond | 0.0040276 | 0.010416 | 0.022169 | 7.0 | 0.03
|
||||
Neigh | 0.052413 | 1.5948 | 4.885 | 155.3 | 4.59
|
||||
Comm | 4.9736 | 12.242 | 20.073 | 166.2 | 35.21
|
||||
Output | 0.053549 | 0.10104 | 0.21642 | 21.0 | 0.29
|
||||
Modify | 13.435 | 16.191 | 23.851 | 110.0 | 46.57
|
||||
Other | | 1.499 | | | 4.31
|
||||
|
||||
Nlocal: 137.500 ave 299 max 2 min
|
||||
Histogram: 2 0 0 0 0 0 0 1 0 1
|
||||
Nghost: 1898.75 ave 2679 max 524 min
|
||||
Histogram: 1 0 0 0 0 0 1 0 0 2
|
||||
Neighs: 9204.00 ave 23014 max 0 min
|
||||
Histogram: 2 0 0 0 0 1 0 0 0 1
|
||||
|
||||
Total # of neighbors = 36816
|
||||
Ave neighs/atom = 66.938182
|
||||
Ave special neighs/atom = 0.36363636
|
||||
Neighbor list builds = 832
|
||||
Dangerous builds = 0
|
||||
Total wall time: 0:00:34
|
|
@ -1,4 +1,4 @@
|
|||
# GCMC for CO2 molecular fluid, rigid/small/nvt dynamics
|
||||
# GCMC for CO2 molecular fluid, rigid/small dynamics
|
||||
# Rigid CO2 TraPPE model
|
||||
# [Potoff and J.I. Siepmann, Vapor-liquid equilibria of
|
||||
# mixtures containing alkanes, carbon dioxide and
|
||||
|
@ -7,7 +7,7 @@
|
|||
# variables available on command line
|
||||
|
||||
variable mu index -8.1
|
||||
variable disp index 0.5
|
||||
variable disp index 0.5
|
||||
variable temp index 338.0
|
||||
variable lbox index 10.0
|
||||
variable spacing index 5.0
|
||||
|
@ -17,7 +17,7 @@ variable spacing index 5.0
|
|||
units real
|
||||
atom_style full
|
||||
boundary p p p
|
||||
pair_style lj/cut/coul/long 14
|
||||
pair_style lj/cut/coul/long 14
|
||||
pair_modify mix arithmetic tail yes
|
||||
kspace_style ewald 0.0001
|
||||
bond_style harmonic
|
||||
|
@ -25,7 +25,7 @@ angle_style harmonic
|
|||
|
||||
# box, start molecules on simple cubic lattice
|
||||
|
||||
lattice sc ${spacing}
|
||||
lattice sc ${spacing}
|
||||
region box block 0 ${lbox} 0 ${lbox} 0 ${lbox} units box
|
||||
create_box 2 box &
|
||||
bond/types 1 &
|
||||
|
@ -34,56 +34,56 @@ create_box 2 box &
|
|||
extra/angle/per/atom 1 &
|
||||
extra/special/per/atom 2
|
||||
molecule co2mol CO2.txt
|
||||
create_atoms 0 box mol co2mol 464563 units box
|
||||
|
||||
# rigid CO2 TraPPE model
|
||||
create_atoms 0 box mol co2mol 464563 units box
|
||||
|
||||
# rigid CO2 TraPPE model
|
||||
|
||||
pair_coeff 1 1 0.053649 2.8
|
||||
pair_coeff 2 2 0.156973 3.05
|
||||
bond_coeff 1 0 1.16
|
||||
angle_coeff 1 0 180
|
||||
pair_coeff 2 2 0.156973 3.05
|
||||
bond_coeff 1 0 1.16
|
||||
angle_coeff 1 0 180
|
||||
|
||||
# masses
|
||||
|
||||
mass 1 12.0107
|
||||
mass 2 15.9994
|
||||
mass 1 12.0107
|
||||
mass 2 15.9994
|
||||
|
||||
# MD settings
|
||||
|
||||
group co2 type 1 2
|
||||
neighbor 2.0 bin
|
||||
neigh_modify every 1 delay 10 check yes
|
||||
velocity all create ${temp} 54654
|
||||
velocity all create ${temp} 54654
|
||||
timestep 1.0
|
||||
|
||||
# rigid constraints with thermostat
|
||||
# rigid constraints with thermostat
|
||||
|
||||
fix myrigidnvt co2 rigid/nvt/small molecule temp ${temp} ${temp} 100 mol co2mol
|
||||
fix myrigid co2 rigid/small molecule mol co2mol
|
||||
|
||||
# dynamically update fix rigid/nvt/small temperature ndof
|
||||
fix_modify myrigidnvt dynamic/dof yes
|
||||
fix_modify myrigid dynamic/dof yes
|
||||
|
||||
# gcmc
|
||||
|
||||
variable tfac equal 5.0/3.0 # (3 trans + 2 rot)/(3 trans)
|
||||
fix mygcmc co2 gcmc 100 100 0 0 54341 ${temp} ${mu} ${disp} mol &
|
||||
co2mol tfac_insert ${tfac} group co2 rigid myrigidnvt
|
||||
co2mol tfac_insert ${tfac} group co2 rigid myrigid
|
||||
|
||||
# atom counts
|
||||
|
||||
variable carbon atom "type==1"
|
||||
variable carbon atom "type==1"
|
||||
variable oxygen atom "type==2"
|
||||
group carbon dynamic co2 var carbon
|
||||
group oxygen dynamic co2 var oxygen
|
||||
group carbon dynamic co2 var carbon
|
||||
group oxygen dynamic co2 var oxygen
|
||||
variable nC equal count(carbon)
|
||||
variable nO equal count(oxygen)
|
||||
|
||||
# output
|
||||
|
||||
variable tacc equal f_mygcmc[2]/(f_mygcmc[1]+0.1)
|
||||
variable iacc equal f_mygcmc[4]/(f_mygcmc[3]+0.1)
|
||||
variable dacc equal f_mygcmc[6]/(f_mygcmc[5]+0.1)
|
||||
variable racc equal f_mygcmc[8]/(f_mygcmc[7]+0.1)
|
||||
variable tacc equal f_mygcmc[2]/(f_mygcmc[1]+0.1)
|
||||
variable iacc equal f_mygcmc[4]/(f_mygcmc[3]+0.1)
|
||||
variable dacc equal f_mygcmc[6]/(f_mygcmc[5]+0.1)
|
||||
variable racc equal f_mygcmc[8]/(f_mygcmc[7]+0.1)
|
||||
|
||||
# dynamically update default temperature ndof
|
||||
compute_modify thermo_temp dynamic/dof yes
|
||||
|
|
|
@ -1,196 +0,0 @@
|
|||
LAMMPS (27 Nov 2018)
|
||||
using 1 OpenMP thread(s) per MPI task
|
||||
# GCMC for CO2 molecular fluid, rigid/small/nvt dynamics
|
||||
# Rigid CO2 TraPPE model
|
||||
# [Potoff and J.I. Siepmann, Vapor-liquid equilibria of
|
||||
# mixtures containing alkanes, carbon dioxide and
|
||||
# nitrogen AIChE J., 47,1676-1682 (2001)].
|
||||
|
||||
# variables available on command line
|
||||
|
||||
variable mu index -8.1
|
||||
variable disp index 0.5
|
||||
variable temp index 338.0
|
||||
variable lbox index 10.0
|
||||
variable spacing index 5.0
|
||||
|
||||
# global model settings
|
||||
|
||||
units real
|
||||
atom_style full
|
||||
boundary p p p
|
||||
pair_style lj/cut/coul/long 14
|
||||
pair_modify mix arithmetic tail yes
|
||||
kspace_style ewald 0.0001
|
||||
bond_style harmonic
|
||||
angle_style harmonic
|
||||
|
||||
# box, start molecules on simple cubic lattice
|
||||
|
||||
lattice sc ${spacing}
|
||||
lattice sc 5.0
|
||||
Lattice spacing in x,y,z = 5 5 5
|
||||
region box block 0 ${lbox} 0 ${lbox} 0 ${lbox} units box
|
||||
region box block 0 10.0 0 ${lbox} 0 ${lbox} units box
|
||||
region box block 0 10.0 0 10.0 0 ${lbox} units box
|
||||
region box block 0 10.0 0 10.0 0 10.0 units box
|
||||
create_box 2 box bond/types 1 angle/types 1 extra/bond/per/atom 2 extra/angle/per/atom 1 extra/special/per/atom 2
|
||||
Created orthogonal box = (0 0 0) to (10 10 10)
|
||||
1 by 1 by 1 MPI processor grid
|
||||
molecule co2mol CO2.txt
|
||||
Read molecule co2mol:
|
||||
3 atoms with max type 2
|
||||
2 bonds with max type 1
|
||||
1 angles with max type 1
|
||||
0 dihedrals with max type 0
|
||||
0 impropers with max type 0
|
||||
create_atoms 0 box mol co2mol 464563 units box
|
||||
Created 24 atoms
|
||||
Time spent = 0.00134993 secs
|
||||
|
||||
# rigid CO2 TraPPE model
|
||||
|
||||
pair_coeff 1 1 0.053649 2.8
|
||||
pair_coeff 2 2 0.156973 3.05
|
||||
bond_coeff 1 0 1.16
|
||||
angle_coeff 1 0 180
|
||||
|
||||
# masses
|
||||
|
||||
mass 1 12.0107
|
||||
mass 2 15.9994
|
||||
|
||||
# MD settings
|
||||
|
||||
group co2 type 1 2
|
||||
24 atoms in group co2
|
||||
neighbor 2.0 bin
|
||||
neigh_modify every 1 delay 10 check yes
|
||||
velocity all create ${temp} 54654
|
||||
velocity all create 338.0 54654
|
||||
timestep 1.0
|
||||
|
||||
# rigid constraints with thermostat
|
||||
|
||||
fix myrigidnvt co2 rigid/nvt/small molecule temp ${temp} ${temp} 100 mol co2mol
|
||||
fix myrigidnvt co2 rigid/nvt/small molecule temp 338.0 ${temp} 100 mol co2mol
|
||||
fix myrigidnvt co2 rigid/nvt/small molecule temp 338.0 338.0 100 mol co2mol
|
||||
8 rigid bodies with 24 atoms
|
||||
1.16 = max distance from body owner to body atom
|
||||
|
||||
# dynamically update fix rigid/nvt/small temperature ndof
|
||||
fix_modify myrigidnvt dynamic/dof yes
|
||||
|
||||
# gcmc
|
||||
|
||||
variable tfac equal 5.0/3.0 # (3 trans + 2 rot)/(3 trans)
|
||||
fix mygcmc co2 gcmc 100 100 0 0 54341 ${temp} ${mu} ${disp} mol co2mol tfac_insert ${tfac} group co2 rigid myrigidnvt
|
||||
fix mygcmc co2 gcmc 100 100 0 0 54341 338.0 ${mu} ${disp} mol co2mol tfac_insert ${tfac} group co2 rigid myrigidnvt
|
||||
fix mygcmc co2 gcmc 100 100 0 0 54341 338.0 -8.1 ${disp} mol co2mol tfac_insert ${tfac} group co2 rigid myrigidnvt
|
||||
fix mygcmc co2 gcmc 100 100 0 0 54341 338.0 -8.1 0.5 mol co2mol tfac_insert ${tfac} group co2 rigid myrigidnvt
|
||||
fix mygcmc co2 gcmc 100 100 0 0 54341 338.0 -8.1 0.5 mol co2mol tfac_insert 1.66666666666667 group co2 rigid myrigidnvt
|
||||
|
||||
# atom counts
|
||||
|
||||
variable carbon atom "type==1"
|
||||
variable oxygen atom "type==2"
|
||||
group carbon dynamic co2 var carbon
|
||||
dynamic group carbon defined
|
||||
group oxygen dynamic co2 var oxygen
|
||||
dynamic group oxygen defined
|
||||
variable nC equal count(carbon)
|
||||
variable nO equal count(oxygen)
|
||||
|
||||
# output
|
||||
|
||||
variable tacc equal f_mygcmc[2]/(f_mygcmc[1]+0.1)
|
||||
variable iacc equal f_mygcmc[4]/(f_mygcmc[3]+0.1)
|
||||
variable dacc equal f_mygcmc[6]/(f_mygcmc[5]+0.1)
|
||||
variable racc equal f_mygcmc[8]/(f_mygcmc[7]+0.1)
|
||||
|
||||
# dynamically update default temperature ndof
|
||||
compute_modify thermo_temp dynamic/dof yes
|
||||
|
||||
thermo_style custom step temp press pe ke density atoms v_iacc v_dacc v_tacc v_racc v_nC v_nO
|
||||
thermo 1000
|
||||
|
||||
# run
|
||||
|
||||
run 20000
|
||||
Ewald initialization ...
|
||||
using 12-bit tables for long-range coulomb (src/kspace.cpp:321)
|
||||
G vector (1/distance) = 0.164636
|
||||
estimated absolute RMS force accuracy = 0.0332064
|
||||
estimated relative force accuracy = 0.0001
|
||||
KSpace vectors: actual max1d max3d = 16 2 62
|
||||
kxmax kymax kzmax = 2 2 2
|
||||
WARNING: Fix gcmc using full_energy option (src/MC/fix_gcmc.cpp:487)
|
||||
0 atoms in group FixGCMC:gcmc_exclusion_group:mygcmc
|
||||
0 atoms in group FixGCMC:rotation_gas_atoms:mygcmc
|
||||
WARNING: Neighbor exclusions used with KSpace solver may give inconsistent Coulombic energies (src/neighbor.cpp:471)
|
||||
Neighbor list info ...
|
||||
update every 1 steps, delay 10 steps, check yes
|
||||
max neighbors/atom: 2000, page size: 100000
|
||||
master list distance cutoff = 16
|
||||
ghost atom cutoff = 16
|
||||
binsize = 8, bins = 2 2 2
|
||||
1 neighbor lists, perpetual/occasional/extra = 1 0 0
|
||||
(1) pair lj/cut/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) = 15.62 | 15.62 | 15.62 Mbytes
|
||||
Step Temp Press PotEng KinEng Density Atoms v_iacc v_dacc v_tacc v_racc v_nC v_nO
|
||||
0 364.27579 4238.8631 -9.6809388 13.391989 0.5846359 24 0 0 0 0 8 16
|
||||
1000 267.9799 -73.919548 -3.6735999 5.8578459 0.36539744 15 0.23663972 0.2494423 0 0 5 10
|
||||
2000 409.06596 -98.033864 -6.7570039 10.974131 0.43847693 18 0.29379544 0.29816284 0 0 6 12
|
||||
3000 279.3225 -836.47758 -26.434976 15.819539 0.87695385 36 0.23798567 0.24203908 0 0 12 24
|
||||
4000 333.6181 606.63478 -30.35312 18.894592 0.87695385 36 0.19121778 0.19481508 0 0 12 24
|
||||
5000 405.98741 -103.97582 -14.180277 16.942399 0.65771539 27 0.15272841 0.15982952 0 0 9 18
|
||||
6000 283.5835 -240.01076 -6.7198093 7.607777 0.43847693 18 0.1606796 0.16536735 0 0 6 12
|
||||
7000 142.00717 154.95914 -0.74192319 0.98769159 0.14615898 6 0.19501993 0.20103405 0 0 2 4
|
||||
8000 376.67702 -118.12474 -10.774631 13.847899 0.5846359 24 0.20133396 0.20468352 0 0 8 16
|
||||
9000 305.43166 -1095.8633 -10.388279 9.7112935 0.51155641 21 0.19445239 0.19869334 0 0 7 14
|
||||
10000 244.08225 -179.31274 -12.974988 8.9732748 0.5846359 24 0.19098971 0.19586397 0 0 8 16
|
||||
11000 305.03389 -568.94714 -21.745425 14.244887 0.73079488 30 0.18517522 0.18978828 0 0 10 20
|
||||
12000 318.29735 767.76579 -37.184231 21.189508 1.0231128 42 0.17256426 0.17580267 0 0 14 28
|
||||
13000 411.21707 433.01125 -4.5149215 8.9889065 0.36539744 15 0.16329385 0.16767604 0 0 5 10
|
||||
14000 304.29535 148.28607 -2.3505844 6.6516754 0.36539744 15 0.17435868 0.17897674 0 0 5 10
|
||||
15000 338.00555 2384.1424 -21.438264 17.463859 0.80387436 33 0.17237066 0.17634112 0 0 11 22
|
||||
16000 613.56062 610.93867 -0.057364228 1.2192718 0.073079488 3 0.17128158 0.1758886 0 0 1 2
|
||||
17000 432.63323 -980.52384 -15.79844 18.054365 0.65771539 27 0.17145651 0.17504846 0 0 9 18
|
||||
18000 181.74572 -352.81765 -1.8617959 2.1669979 0.21923846 9 0.17292463 0.17654774 0 0 3 6
|
||||
19000 208.55292 -248.38735 -4.2287767 4.5588154 0.36539744 15 0.18168324 0.18454331 0 0 5 10
|
||||
20000 304.73317 -649.9896 -16.532405 12.716924 0.65771539 27 0.18085983 0.18345574 0 0 9 18
|
||||
Loop time of 21.0434 on 1 procs for 20000 steps with 27 atoms
|
||||
|
||||
Performance: 82.116 ns/day, 0.292 hours/ns, 950.415 timesteps/s
|
||||
98.5% CPU use with 1 MPI tasks x 1 OpenMP threads
|
||||
|
||||
MPI task timing breakdown:
|
||||
Section | min time | avg time | max time |%varavg| %total
|
||||
---------------------------------------------------------------
|
||||
Pair | 2.2373 | 2.2373 | 2.2373 | 0.0 | 10.63
|
||||
Bond | 0.022895 | 0.022895 | 0.022895 | 0.0 | 0.11
|
||||
Kspace | 0.16756 | 0.16756 | 0.16756 | 0.0 | 0.80
|
||||
Neigh | 0.11436 | 0.11436 | 0.11436 | 0.0 | 0.54
|
||||
Comm | 0.26988 | 0.26988 | 0.26988 | 0.0 | 1.28
|
||||
Output | 0.0014684 | 0.0014684 | 0.0014684 | 0.0 | 0.01
|
||||
Modify | 18.193 | 18.193 | 18.193 | 0.0 | 86.45
|
||||
Other | | 0.03692 | | | 0.18
|
||||
|
||||
Nlocal: 27 ave 27 max 27 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
Nghost: 2081 ave 2081 max 2081 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
Neighs: 6264 ave 6264 max 6264 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
|
||||
Total # of neighbors = 6264
|
||||
Ave neighs/atom = 232
|
||||
Ave special neighs/atom = 2
|
||||
Neighbor list builds = 20177
|
||||
Dangerous builds = 0
|
||||
|
||||
Total wall time: 0:00:21
|
|
@ -0,0 +1,196 @@
|
|||
LAMMPS (10 Mar 2021)
|
||||
using 1 OpenMP thread(s) per MPI task
|
||||
# GCMC for CO2 molecular fluid, rigid/small dynamics
|
||||
# Rigid CO2 TraPPE model
|
||||
# [Potoff and J.I. Siepmann, Vapor-liquid equilibria of
|
||||
# mixtures containing alkanes, carbon dioxide and
|
||||
# nitrogen AIChE J., 47,1676-1682 (2001)].
|
||||
|
||||
# variables available on command line
|
||||
|
||||
variable mu index -8.1
|
||||
variable disp index 0.5
|
||||
variable temp index 338.0
|
||||
variable lbox index 10.0
|
||||
variable spacing index 5.0
|
||||
|
||||
# global model settings
|
||||
|
||||
units real
|
||||
atom_style full
|
||||
boundary p p p
|
||||
pair_style lj/cut/coul/long 14
|
||||
pair_modify mix arithmetic tail yes
|
||||
kspace_style ewald 0.0001
|
||||
bond_style harmonic
|
||||
angle_style harmonic
|
||||
|
||||
# box, start molecules on simple cubic lattice
|
||||
|
||||
lattice sc ${spacing}
|
||||
lattice sc 5.0
|
||||
Lattice spacing in x,y,z = 5.0000000 5.0000000 5.0000000
|
||||
region box block 0 ${lbox} 0 ${lbox} 0 ${lbox} units box
|
||||
region box block 0 10.0 0 ${lbox} 0 ${lbox} units box
|
||||
region box block 0 10.0 0 10.0 0 ${lbox} units box
|
||||
region box block 0 10.0 0 10.0 0 10.0 units box
|
||||
create_box 2 box bond/types 1 angle/types 1 extra/bond/per/atom 2 extra/angle/per/atom 1 extra/special/per/atom 2
|
||||
Created orthogonal box = (0.0000000 0.0000000 0.0000000) to (10.000000 10.000000 10.000000)
|
||||
1 by 1 by 1 MPI processor grid
|
||||
molecule co2mol CO2.txt
|
||||
Read molecule template co2mol:
|
||||
1 molecules
|
||||
3 atoms with max type 2
|
||||
2 bonds with max type 1
|
||||
1 angles with max type 1
|
||||
0 dihedrals with max type 0
|
||||
0 impropers with max type 0
|
||||
create_atoms 0 box mol co2mol 464563 units box
|
||||
Created 24 atoms
|
||||
create_atoms CPU = 0.002 seconds
|
||||
|
||||
# rigid CO2 TraPPE model
|
||||
|
||||
pair_coeff 1 1 0.053649 2.8
|
||||
pair_coeff 2 2 0.156973 3.05
|
||||
bond_coeff 1 0 1.16
|
||||
angle_coeff 1 0 180
|
||||
|
||||
# masses
|
||||
|
||||
mass 1 12.0107
|
||||
mass 2 15.9994
|
||||
|
||||
# MD settings
|
||||
|
||||
group co2 type 1 2
|
||||
24 atoms in group co2
|
||||
neighbor 2.0 bin
|
||||
neigh_modify every 1 delay 10 check yes
|
||||
velocity all create ${temp} 54654
|
||||
velocity all create 338.0 54654
|
||||
timestep 1.0
|
||||
|
||||
# rigid constraints with thermostat
|
||||
|
||||
fix myrigid co2 rigid/small molecule mol co2mol
|
||||
create bodies CPU = 0.000 seconds
|
||||
8 rigid bodies with 24 atoms
|
||||
1.1600000 = max distance from body owner to body atom
|
||||
|
||||
# dynamically update fix rigid/nvt/small temperature ndof
|
||||
fix_modify myrigid dynamic/dof yes
|
||||
|
||||
# gcmc
|
||||
|
||||
variable tfac equal 5.0/3.0 # (3 trans + 2 rot)/(3 trans)
|
||||
fix mygcmc co2 gcmc 100 100 0 0 54341 ${temp} ${mu} ${disp} mol co2mol tfac_insert ${tfac} group co2 rigid myrigid
|
||||
fix mygcmc co2 gcmc 100 100 0 0 54341 338.0 ${mu} ${disp} mol co2mol tfac_insert ${tfac} group co2 rigid myrigid
|
||||
fix mygcmc co2 gcmc 100 100 0 0 54341 338.0 -8.1 ${disp} mol co2mol tfac_insert ${tfac} group co2 rigid myrigid
|
||||
fix mygcmc co2 gcmc 100 100 0 0 54341 338.0 -8.1 0.5 mol co2mol tfac_insert ${tfac} group co2 rigid myrigid
|
||||
fix mygcmc co2 gcmc 100 100 0 0 54341 338.0 -8.1 0.5 mol co2mol tfac_insert 1.66666666666667 group co2 rigid myrigid
|
||||
|
||||
# atom counts
|
||||
|
||||
variable carbon atom "type==1"
|
||||
variable oxygen atom "type==2"
|
||||
group carbon dynamic co2 var carbon
|
||||
dynamic group carbon defined
|
||||
group oxygen dynamic co2 var oxygen
|
||||
dynamic group oxygen defined
|
||||
variable nC equal count(carbon)
|
||||
variable nO equal count(oxygen)
|
||||
|
||||
# output
|
||||
|
||||
variable tacc equal f_mygcmc[2]/(f_mygcmc[1]+0.1)
|
||||
variable iacc equal f_mygcmc[4]/(f_mygcmc[3]+0.1)
|
||||
variable dacc equal f_mygcmc[6]/(f_mygcmc[5]+0.1)
|
||||
variable racc equal f_mygcmc[8]/(f_mygcmc[7]+0.1)
|
||||
|
||||
# dynamically update default temperature ndof
|
||||
compute_modify thermo_temp dynamic/dof yes
|
||||
|
||||
thermo_style custom step temp press pe ke density atoms v_iacc v_dacc v_tacc v_racc v_nC v_nO
|
||||
thermo 1000
|
||||
|
||||
# run
|
||||
|
||||
run 20000
|
||||
Ewald initialization ...
|
||||
using 12-bit tables for long-range coulomb (src/kspace.cpp:339)
|
||||
G vector (1/distance) = 0.16463644
|
||||
estimated absolute RMS force accuracy = 0.033206372
|
||||
estimated relative force accuracy = 0.0001
|
||||
KSpace vectors: actual max1d max3d = 16 2 62
|
||||
kxmax kymax kzmax = 2 2 2
|
||||
WARNING: Fix gcmc using full_energy option (src/MC/fix_gcmc.cpp:482)
|
||||
0 atoms in group FixGCMC:gcmc_exclusion_group:mygcmc
|
||||
0 atoms in group FixGCMC:rotation_gas_atoms:mygcmc
|
||||
WARNING: Neighbor exclusions used with KSpace solver may give inconsistent Coulombic energies (src/neighbor.cpp:486)
|
||||
Neighbor list info ...
|
||||
update every 1 steps, delay 10 steps, check yes
|
||||
max neighbors/atom: 2000, page size: 100000
|
||||
master list distance cutoff = 16
|
||||
ghost atom cutoff = 16
|
||||
binsize = 8, bins = 2 2 2
|
||||
1 neighbor lists, perpetual/occasional/extra = 1 0 0
|
||||
(1) pair lj/cut/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) = 15.62 | 15.62 | 15.62 Mbytes
|
||||
Step Temp Press PotEng KinEng Density Atoms v_iacc v_dacc v_tacc v_racc v_nC v_nO
|
||||
0 364.27579 4238.8631 -9.6809388 13.391989 0.5846359 24 0 0 0 0 8 16
|
||||
1000 261.50949 -204.60974 -9.6459249 8.3147747 0.51155641 21 0.096366192 0.097590121 0 0 7 14
|
||||
2000 479.39697 231.28436 -7.0089345 10.47927 0.36539744 15 0.085531005 0.085453295 0 0 5 10
|
||||
3000 318.31766 -433.17133 -7.3680951 8.5396005 0.43847693 18 0.078556687 0.080101462 0 0 6 12
|
||||
4000 357.40776 -186.78 -16.453111 14.915105 0.65771539 27 0.082003877 0.08249082 0 0 9 18
|
||||
5000 399.94731 1524.2909 -16.624678 18.677282 0.73079488 30 0.071285101 0.072731705 0 0 10 20
|
||||
6000 354.71736 60.134827 -18.988979 16.565073 0.73079488 30 0.071615663 0.071713414 0 0 10 20
|
||||
7000 483.32057 966.32174 -5.7393251 10.565037 0.36539744 15 0.087027775 0.089855826 0 0 5 10
|
||||
8000 547.68562 494.96891 -4.125626 11.97201 0.36539744 15 0.11738082 0.11937373 0 0 5 10
|
||||
9000 433.76488 390.91467 -0.85312985 5.1718828 0.21923846 9 0.13265238 0.13513212 0 0 3 6
|
||||
10000 330.01685 -862.07457 -26.494645 18.690633 0.87695385 36 0.13775034 0.13905403 0 0 12 24
|
||||
11000 334.26318 -578.48274 -13.236965 12.288625 0.5846359 24 0.13713936 0.13960485 0 0 8 16
|
||||
12000 243.68657 -1244.7156 -25.757644 12.590645 0.80387436 33 0.1339588 0.13588739 0 0 11 22
|
||||
13000 307.66758 -429.66928 -17.864639 14.367878 0.73079488 30 0.12604721 0.1278094 0 0 10 20
|
||||
14000 330.91434 495.97112 -15.374248 13.809499 0.65771539 27 0.12011756 0.12145865 0 0 9 18
|
||||
15000 564.87966 982.72332 -14.810525 26.379517 0.73079488 30 0.12164324 0.12343521 0 0 10 20
|
||||
16000 342.63867 -54.776299 -2.2580523 5.7875978 0.29231795 12 0.13535812 0.13790758 0 0 4 8
|
||||
17000 461.07005 -2.4317694 -1.145154 3.2068452 0.14615898 6 0.1444739 0.14730804 0 0 2 4
|
||||
18000 197.21207 -40.124433 -7.0857418 5.2906654 0.43847693 18 0.14403997 0.14574329 0 0 6 12
|
||||
19000 393.36395 -420.49802 -11.172739 14.461366 0.5846359 24 0.15005606 0.15142063 0 0 8 16
|
||||
20000 356.48539 56.071962 -1.7861789 4.2504609 0.21923846 9 0.15422732 0.15627984 0 0 3 6
|
||||
Loop time of 19.5982 on 1 procs for 20000 steps with 9 atoms
|
||||
|
||||
Performance: 88.171 ns/day, 0.272 hours/ns, 1020.502 timesteps/s
|
||||
99.5% CPU use with 1 MPI tasks x 1 OpenMP threads
|
||||
|
||||
MPI task timing breakdown:
|
||||
Section | min time | avg time | max time |%varavg| %total
|
||||
---------------------------------------------------------------
|
||||
Pair | 2.3404 | 2.3404 | 2.3404 | 0.0 | 11.94
|
||||
Bond | 0.033919 | 0.033919 | 0.033919 | 0.0 | 0.17
|
||||
Kspace | 0.19974 | 0.19974 | 0.19974 | 0.0 | 1.02
|
||||
Neigh | 0.11478 | 0.11478 | 0.11478 | 0.0 | 0.59
|
||||
Comm | 0.22538 | 0.22538 | 0.22538 | 0.0 | 1.15
|
||||
Output | 0.00096536 | 0.00096536 | 0.00096536 | 0.0 | 0.00
|
||||
Modify | 16.627 | 16.627 | 16.627 | 0.0 | 84.84
|
||||
Other | | 0.05594 | | | 0.29
|
||||
|
||||
Nlocal: 9.00000 ave 9 max 9 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
Nghost: 703.000 ave 703 max 703 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
Neighs: 719.000 ave 719 max 719 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
|
||||
Total # of neighbors = 719
|
||||
Ave neighs/atom = 79.888889
|
||||
Ave special neighs/atom = 2.0000000
|
||||
Neighbor list builds = 20196
|
||||
Dangerous builds = 0
|
||||
|
||||
Total wall time: 0:00:19
|
|
@ -195,7 +195,7 @@ void FixWallBodyPolygon::init()
|
|||
|
||||
void FixWallBodyPolygon::setup(int vflag)
|
||||
{
|
||||
if (strstr(update->integrate_style,"verlet"))
|
||||
if (utils::strmatch(update->integrate_style,"^verlet"))
|
||||
post_force(vflag);
|
||||
}
|
||||
|
||||
|
|
|
@ -202,7 +202,7 @@ void FixWallBodyPolyhedron::init()
|
|||
|
||||
void FixWallBodyPolyhedron::setup(int vflag)
|
||||
{
|
||||
if (strstr(update->integrate_style,"verlet"))
|
||||
if (utils::strmatch(update->integrate_style,"^verlet"))
|
||||
post_force(vflag);
|
||||
}
|
||||
|
||||
|
|
|
@ -491,7 +491,7 @@ void PairLJClass2::init_style()
|
|||
int irequest;
|
||||
int respa = 0;
|
||||
|
||||
if (update->whichflag == 1 && strstr(update->integrate_style,"respa")) {
|
||||
if (update->whichflag == 1 && utils::strmatch(update->integrate_style,"^respa")) {
|
||||
if (((Respa *) update->integrate)->level_inner >= 0) respa = 1;
|
||||
if (((Respa *) update->integrate)->level_middle >= 0) respa = 2;
|
||||
}
|
||||
|
@ -506,7 +506,7 @@ void PairLJClass2::init_style()
|
|||
|
||||
// set rRESPA cutoffs
|
||||
|
||||
if (strstr(update->integrate_style,"respa") &&
|
||||
if (utils::strmatch(update->integrate_style,"^respa") &&
|
||||
((Respa *) update->integrate)->level_inner >= 0)
|
||||
cut_respa = ((Respa *) update->integrate)->cutoff;
|
||||
else cut_respa = nullptr;
|
||||
|
|
|
@ -671,7 +671,7 @@ void PairLJClass2CoulLong::init_style()
|
|||
int irequest;
|
||||
int respa = 0;
|
||||
|
||||
if (update->whichflag == 1 && strstr(update->integrate_style,"respa")) {
|
||||
if (update->whichflag == 1 && utils::strmatch(update->integrate_style,"^respa")) {
|
||||
if (((Respa *) update->integrate)->level_inner >= 0) respa = 1;
|
||||
if (((Respa *) update->integrate)->level_middle >= 0) respa = 2;
|
||||
}
|
||||
|
@ -688,7 +688,7 @@ void PairLJClass2CoulLong::init_style()
|
|||
|
||||
// set rRESPA cutoffs
|
||||
|
||||
if (strstr(update->integrate_style,"respa") &&
|
||||
if (utils::strmatch(update->integrate_style,"^respa") &&
|
||||
((Respa *) update->integrate)->level_inner >= 0)
|
||||
cut_respa = ((Respa *) update->integrate)->cutoff;
|
||||
else cut_respa = nullptr;
|
||||
|
|
|
@ -297,7 +297,7 @@ void FixGPU::setup(int vflag)
|
|||
error->all(FLERR,
|
||||
"Cannot use neigh_modify exclude with GPU neighbor builds");
|
||||
|
||||
if (strstr(update->integrate_style,"verlet")) post_force(vflag);
|
||||
if (utils::strmatch(update->integrate_style,"^verlet")) post_force(vflag);
|
||||
else {
|
||||
// In setup only, all forces calculated on GPU are put in the outer level
|
||||
((Respa *) update->integrate)->copy_flevel_f(_nlevels_respa-1);
|
||||
|
|
|
@ -63,7 +63,7 @@ FixNHGPU::~FixNHGPU()
|
|||
void FixNHGPU::setup(int vflag)
|
||||
{
|
||||
FixNH::setup(vflag);
|
||||
if (strstr(update->integrate_style,"respa"))
|
||||
if (utils::strmatch(update->integrate_style,"^respa"))
|
||||
_respa_on = 1;
|
||||
else
|
||||
_respa_on = 0;
|
||||
|
|
|
@ -52,7 +52,7 @@ FixNVEGPU::~FixNVEGPU()
|
|||
void FixNVEGPU::setup(int vflag)
|
||||
{
|
||||
FixNVE::setup(vflag);
|
||||
if (strstr(update->integrate_style,"respa"))
|
||||
if (utils::strmatch(update->integrate_style,"^respa"))
|
||||
_respa_on = 1;
|
||||
else
|
||||
_respa_on = 0;
|
||||
|
|
|
@ -149,7 +149,7 @@ void PPPMGPU::init()
|
|||
// GPU precision specific init
|
||||
|
||||
bool respa_value=false;
|
||||
if (strstr(update->integrate_style,"respa"))
|
||||
if (utils::strmatch(update->integrate_style,"^respa"))
|
||||
respa_value=true;
|
||||
|
||||
if (order>8)
|
||||
|
|
|
@ -69,7 +69,7 @@ void FixFreeze::init()
|
|||
|
||||
void FixFreeze::setup(int vflag)
|
||||
{
|
||||
if (strstr(update->integrate_style,"verlet"))
|
||||
if (utils::strmatch(update->integrate_style,"^verlet"))
|
||||
post_force(vflag);
|
||||
else {
|
||||
int nlevels_respa = ((Respa *) update->integrate)->nlevels;
|
||||
|
|
|
@ -17,29 +17,25 @@
|
|||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "fix_wall_gran.h"
|
||||
#include <cmath>
|
||||
#include <cstring>
|
||||
|
||||
#include "atom.h"
|
||||
#include "domain.h"
|
||||
#include "update.h"
|
||||
#include "error.h"
|
||||
#include "force.h"
|
||||
#include "modify.h"
|
||||
#include "respa.h"
|
||||
#include "math_const.h"
|
||||
#include "memory.h"
|
||||
#include "error.h"
|
||||
#include "modify.h"
|
||||
#include "neighbor.h"
|
||||
#include "respa.h"
|
||||
#include "update.h"
|
||||
|
||||
#include <cmath>
|
||||
#include <cstring>
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
using namespace FixConst;
|
||||
using namespace MathConst;
|
||||
|
||||
// XYZ PLANE need to be 0,1,2
|
||||
|
||||
enum{XPLANE=0,YPLANE=1,ZPLANE=2,ZCYLINDER,REGION};
|
||||
enum{HOOKE,HOOKE_HISTORY,HERTZ_HISTORY,GRANULAR};
|
||||
enum{NONE,CONSTANT,EQUAL};
|
||||
|
||||
#define PI27SQ 266.47931882941264802866 // 27*PI**2
|
||||
#define THREEROOT3 5.19615242270663202362 // 3*sqrt(3)
|
||||
#define SIXROOT6 14.69693845669906728801 // 6*sqrt(6)
|
||||
|
@ -48,18 +44,20 @@ enum{NONE,CONSTANT,EQUAL};
|
|||
#define THREEQUARTERS 0.75 // 3/4
|
||||
#define TWOPI 6.28318530717959 // 2*PI
|
||||
|
||||
#define EPSILON 1e-10
|
||||
|
||||
enum {NORMAL_HOOKE, NORMAL_HERTZ, HERTZ_MATERIAL, DMT, JKR};
|
||||
enum {VELOCITY, MASS_VELOCITY, VISCOELASTIC, TSUJI};
|
||||
enum {TANGENTIAL_NOHISTORY, TANGENTIAL_HISTORY,
|
||||
TANGENTIAL_MINDLIN, TANGENTIAL_MINDLIN_RESCALE};
|
||||
enum {TWIST_NONE, TWIST_SDS, TWIST_MARSHALL};
|
||||
enum {ROLL_NONE, ROLL_SDS};
|
||||
|
||||
#define BIG 1.0e20
|
||||
#define EPSILON 1e-10
|
||||
|
||||
// XYZ PLANE need to be 0,1,2
|
||||
|
||||
enum {XPLANE=0,YPLANE=1,ZPLANE=2,ZCYLINDER,REGION};
|
||||
|
||||
enum {NONE,CONSTANT,EQUAL};
|
||||
enum {DAMPING_NONE, VELOCITY, MASS_VELOCITY, VISCOELASTIC, TSUJI};
|
||||
enum {TANGENTIAL_NONE, TANGENTIAL_NOHISTORY, TANGENTIAL_HISTORY,
|
||||
TANGENTIAL_MINDLIN, TANGENTIAL_MINDLIN_RESCALE};
|
||||
enum {TWIST_NONE, TWIST_SDS, TWIST_MARSHALL};
|
||||
enum {ROLL_NONE, ROLL_SDS};
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
FixWallGran::FixWallGran(LAMMPS *lmp, int narg, char **arg) :
|
||||
|
@ -84,6 +82,10 @@ FixWallGran::FixWallGran(LAMMPS *lmp, int narg, char **arg) :
|
|||
|
||||
use_history = restart_peratom = 1;
|
||||
if (pairstyle == HOOKE) use_history = restart_peratom = 0;
|
||||
tangential_history = roll_history = twist_history = 0;
|
||||
normal_model = NORMAL_NONE;
|
||||
tangential_model = TANGENTIAL_NONE;
|
||||
damping_model = DAMPING_NONE;
|
||||
|
||||
// wall/particle coefficients
|
||||
|
||||
|
@ -120,7 +122,6 @@ FixWallGran::FixWallGran(LAMMPS *lmp, int narg, char **arg) :
|
|||
iarg = 4;
|
||||
damping_model = VISCOELASTIC;
|
||||
roll_model = twist_model = NONE;
|
||||
tangential_history = roll_history = twist_history = 0;
|
||||
while (iarg < narg) {
|
||||
if (strcmp(arg[iarg], "hooke") == 0) {
|
||||
if (iarg + 2 >= narg)
|
||||
|
@ -464,7 +465,7 @@ void FixWallGran::init()
|
|||
|
||||
dt = update->dt;
|
||||
|
||||
if (strstr(update->integrate_style,"respa"))
|
||||
if (utils::strmatch(update->integrate_style,"^respa"))
|
||||
nlevels_respa = ((Respa *) update->integrate)->nlevels;
|
||||
|
||||
// check for FixRigid so can extract rigid body masses
|
||||
|
@ -511,7 +512,7 @@ void FixWallGran::init()
|
|||
|
||||
void FixWallGran::setup(int vflag)
|
||||
{
|
||||
if (strstr(update->integrate_style,"verlet"))
|
||||
if (utils::strmatch(update->integrate_style,"^verlet"))
|
||||
post_force(vflag);
|
||||
else {
|
||||
((Respa *) update->integrate)->copy_flevel_f(nlevels_respa-1);
|
||||
|
|
|
@ -26,6 +26,10 @@ namespace LAMMPS_NS {
|
|||
|
||||
class FixWallGran : public Fix {
|
||||
public:
|
||||
|
||||
enum {HOOKE,HOOKE_HISTORY,HERTZ_HISTORY,GRANULAR};
|
||||
enum {NORMAL_NONE, NORMAL_HOOKE, NORMAL_HERTZ, HERTZ_MATERIAL, DMT, JKR};
|
||||
|
||||
FixWallGran(class LAMMPS *, int, char **);
|
||||
virtual ~FixWallGran();
|
||||
int setmask();
|
||||
|
|
|
@ -16,26 +16,21 @@
|
|||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "fix_wall_gran_region.h"
|
||||
#include <cstring>
|
||||
#include "region.h"
|
||||
|
||||
#include "atom.h"
|
||||
#include "domain.h"
|
||||
#include "update.h"
|
||||
#include "memory.h"
|
||||
#include "error.h"
|
||||
#include "comm.h"
|
||||
#include "domain.h"
|
||||
#include "error.h"
|
||||
#include "memory.h"
|
||||
#include "neighbor.h"
|
||||
#include "region.h"
|
||||
#include "update.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
using namespace FixConst;
|
||||
|
||||
// same as FixWallGran
|
||||
|
||||
enum{HOOKE,HOOKE_HISTORY,HERTZ_HISTORY,GRANULAR};
|
||||
enum {NORMAL_HOOKE, NORMAL_HERTZ, HERTZ_MATERIAL, DMT, JKR};
|
||||
|
||||
#define BIG 1.0e20
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
FixWallGranRegion::FixWallGranRegion(LAMMPS *lmp, int narg, char **arg) :
|
||||
|
@ -186,7 +181,7 @@ void FixWallGranRegion::post_force(int /*vflag*/)
|
|||
if (mask[i] & groupbit) {
|
||||
if (!region->match(x[i][0],x[i][1],x[i][2])) continue;
|
||||
|
||||
if (pairstyle == GRANULAR && normal_model == JKR) {
|
||||
if (pairstyle == FixWallGran::GRANULAR && normal_model == FixWallGran::JKR) {
|
||||
nc = region->surface(x[i][0],x[i][1],x[i][2],
|
||||
radius[i]+pulloff_distance(radius[i]));
|
||||
}
|
||||
|
@ -228,7 +223,7 @@ void FixWallGranRegion::post_force(int /*vflag*/)
|
|||
|
||||
rsq = region->contact[ic].r*region->contact[ic].r;
|
||||
|
||||
if (pairstyle == GRANULAR && normal_model == JKR) {
|
||||
if (pairstyle == FixWallGran::GRANULAR && normal_model == FixWallGran::JKR) {
|
||||
if (history_many[i][c2r[ic]][0] == 0.0 && rsq > radius[i]*radius[i]) {
|
||||
for (m = 0; m < size_history; m++)
|
||||
history_many[i][0][m] = 0.0;
|
||||
|
@ -264,18 +259,18 @@ void FixWallGranRegion::post_force(int /*vflag*/)
|
|||
else
|
||||
contact = nullptr;
|
||||
|
||||
if (pairstyle == HOOKE)
|
||||
if (pairstyle == FixWallGran::HOOKE)
|
||||
hooke(rsq,dx,dy,dz,vwall,v[i],f[i],
|
||||
omega[i],torque[i],radius[i],meff, contact);
|
||||
else if (pairstyle == HOOKE_HISTORY)
|
||||
else if (pairstyle == FixWallGran::HOOKE_HISTORY)
|
||||
hooke_history(rsq,dx,dy,dz,vwall,v[i],f[i],
|
||||
omega[i],torque[i],radius[i],meff,
|
||||
history_many[i][c2r[ic]], contact);
|
||||
else if (pairstyle == HERTZ_HISTORY)
|
||||
else if (pairstyle == FixWallGran::HERTZ_HISTORY)
|
||||
hertz_history(rsq,dx,dy,dz,vwall,region->contact[ic].radius,
|
||||
v[i],f[i],omega[i],torque[i],
|
||||
radius[i],meff,history_many[i][c2r[ic]], contact);
|
||||
else if (pairstyle == GRANULAR)
|
||||
else if (pairstyle == FixWallGran::GRANULAR)
|
||||
granular(rsq,dx,dy,dz,vwall,region->contact[ic].radius,
|
||||
v[i],f[i],omega[i],torque[i],
|
||||
radius[i],meff,history_many[i][c2r[ic]],contact);
|
||||
|
|
|
@ -446,9 +446,9 @@ void PairGranular::compute(int eflag, int vflag)
|
|||
if (tangential_model[itype][jtype] == TANGENTIAL_MINDLIN_FORCE ||
|
||||
tangential_model[itype][jtype] ==
|
||||
TANGENTIAL_MINDLIN_RESCALE_FORCE)
|
||||
frameupdate = fabs(rsht) < EPSILON*Fscrit;
|
||||
frameupdate = fabs(rsht) > EPSILON*Fscrit;
|
||||
else
|
||||
frameupdate = fabs(rsht)*k_tangential < EPSILON*Fscrit;
|
||||
frameupdate = fabs(rsht)*k_tangential > EPSILON*Fscrit;
|
||||
if (frameupdate) {
|
||||
shrmag = sqrt(history[0]*history[0] + history[1]*history[1] +
|
||||
history[2]*history[2]);
|
||||
|
@ -568,7 +568,7 @@ void PairGranular::compute(int eflag, int vflag)
|
|||
|
||||
if (historyupdate) {
|
||||
rolldotn = history[rhist0]*nx + history[rhist1]*ny + history[rhist2]*nz;
|
||||
frameupdate = fabs(rolldotn)*k_roll < EPSILON*Frcrit;
|
||||
frameupdate = fabs(rolldotn)*k_roll > EPSILON*Frcrit;
|
||||
if (frameupdate) { // rotate into tangential plane
|
||||
rollmag = sqrt(history[rhist0]*history[rhist0] +
|
||||
history[rhist1]*history[rhist1] +
|
||||
|
|
|
@ -1171,7 +1171,6 @@ void AtomVecHybridKokkos::build_styles()
|
|||
|
||||
allstyles = new char*[nallstyles];
|
||||
|
||||
int n;
|
||||
nallstyles = 0;
|
||||
#define ATOM_CLASS
|
||||
#define AtomStyle(key,Class) \
|
||||
|
|
|
@ -67,7 +67,7 @@ void FixSetForceKokkos<DeviceType>::init()
|
|||
{
|
||||
FixSetForce::init();
|
||||
|
||||
if (strstr(update->integrate_style,"respa"))
|
||||
if (utils::strmatch(update->integrate_style,"^respa"))
|
||||
error->all(FLERR,"Cannot (yet) use respa with Kokkos");
|
||||
}
|
||||
|
||||
|
|
|
@ -156,7 +156,7 @@ void FixShakeKokkos<DeviceType>::init()
|
|||
{
|
||||
FixShake::init();
|
||||
|
||||
if (strstr(update->integrate_style,"respa"))
|
||||
if (utils::strmatch(update->integrate_style,"^respa"))
|
||||
error->all(FLERR,"Cannot yet use respa with Kokkos");
|
||||
|
||||
if (rattle)
|
||||
|
|
|
@ -285,7 +285,7 @@ void PairBuckCoulCutKokkos<DeviceType>::init_style()
|
|||
|
||||
// error if rRESPA with inner levels
|
||||
|
||||
if (update->whichflag == 1 && strstr(update->integrate_style,"respa")) {
|
||||
if (update->whichflag == 1 && utils::strmatch(update->integrate_style,"^respa")) {
|
||||
int respa = 0;
|
||||
if (((Respa *) update->integrate)->level_inner >= 0) respa = 1;
|
||||
if (((Respa *) update->integrate)->level_middle >= 0) respa = 2;
|
||||
|
|
|
@ -447,7 +447,7 @@ void PairBuckCoulLongKokkos<DeviceType>::init_style()
|
|||
|
||||
// error if rRESPA with inner levels
|
||||
|
||||
if (update->whichflag == 1 && strstr(update->integrate_style,"respa")) {
|
||||
if (update->whichflag == 1 && utils::strmatch(update->integrate_style,"^respa")) {
|
||||
int respa = 0;
|
||||
if (((Respa *) update->integrate)->level_inner >= 0) respa = 1;
|
||||
if (((Respa *) update->integrate)->level_middle >= 0) respa = 2;
|
||||
|
|
|
@ -205,7 +205,7 @@ void PairBuckKokkos<DeviceType>::init_style()
|
|||
|
||||
// error if rRESPA with inner levels
|
||||
|
||||
if (update->whichflag == 1 && strstr(update->integrate_style,"respa")) {
|
||||
if (update->whichflag == 1 && utils::strmatch(update->integrate_style,"^respa")) {
|
||||
int respa = 0;
|
||||
if (((Respa *) update->integrate)->level_inner >= 0) respa = 1;
|
||||
if (((Respa *) update->integrate)->level_middle >= 0) respa = 2;
|
||||
|
|
|
@ -405,7 +405,7 @@ void PairCoulLongKokkos<DeviceType>::init_style()
|
|||
|
||||
// error if rRESPA with inner levels
|
||||
|
||||
if (update->whichflag == 1 && strstr(update->integrate_style,"respa")) {
|
||||
if (update->whichflag == 1 && utils::strmatch(update->integrate_style,"^respa")) {
|
||||
int respa = 0;
|
||||
if (((Respa *) update->integrate)->level_inner >= 0) respa = 1;
|
||||
if (((Respa *) update->integrate)->level_middle >= 0) respa = 2;
|
||||
|
|
|
@ -90,7 +90,7 @@ void PairHybridKokkos::compute(int eflag, int vflag)
|
|||
|
||||
Respa *respa = nullptr;
|
||||
respaflag = 0;
|
||||
if (strstr(update->integrate_style,"respa")) {
|
||||
if (utils::strmatch(update->integrate_style,"^respa")) {
|
||||
respa = (Respa *) update->integrate;
|
||||
if (respa->nhybrid_styles > 0) respaflag = 1;
|
||||
}
|
||||
|
|
|
@ -450,7 +450,7 @@ void PairLJCharmmCoulCharmmImplicitKokkos<DeviceType>::init_style()
|
|||
|
||||
// error if rRESPA with inner levels
|
||||
|
||||
if (update->whichflag == 1 && strstr(update->integrate_style,"respa")) {
|
||||
if (update->whichflag == 1 && utils::strmatch(update->integrate_style,"^respa")) {
|
||||
int respa = 0;
|
||||
if (((Respa *) update->integrate)->level_inner >= 0) respa = 1;
|
||||
if (((Respa *) update->integrate)->level_middle >= 0) respa = 2;
|
||||
|
|
|
@ -451,7 +451,7 @@ void PairLJCharmmCoulCharmmKokkos<DeviceType>::init_style()
|
|||
|
||||
// error if rRESPA with inner levels
|
||||
|
||||
if (update->whichflag == 1 && strstr(update->integrate_style,"respa")) {
|
||||
if (update->whichflag == 1 && utils::strmatch(update->integrate_style,"^respa")) {
|
||||
int respa = 0;
|
||||
if (((Respa *) update->integrate)->level_inner >= 0) respa = 1;
|
||||
if (((Respa *) update->integrate)->level_middle >= 0) respa = 2;
|
||||
|
|
|
@ -459,7 +459,7 @@ void PairLJCharmmCoulLongKokkos<DeviceType>::init_style()
|
|||
|
||||
// error if rRESPA with inner levels
|
||||
|
||||
if (update->whichflag == 1 && strstr(update->integrate_style,"respa")) {
|
||||
if (update->whichflag == 1 && utils::strmatch(update->integrate_style,"^respa")) {
|
||||
int respa = 0;
|
||||
if (((Respa *) update->integrate)->level_inner >= 0) respa = 1;
|
||||
if (((Respa *) update->integrate)->level_middle >= 0) respa = 2;
|
||||
|
|
|
@ -287,7 +287,7 @@ void PairLJClass2CoulCutKokkos<DeviceType>::init_style()
|
|||
|
||||
// error if rRESPA with inner levels
|
||||
|
||||
if (update->whichflag == 1 && strstr(update->integrate_style,"respa")) {
|
||||
if (update->whichflag == 1 && utils::strmatch(update->integrate_style,"^respa")) {
|
||||
int respa = 0;
|
||||
if (((Respa *) update->integrate)->level_inner >= 0) respa = 1;
|
||||
if (((Respa *) update->integrate)->level_middle >= 0) respa = 2;
|
||||
|
|
|
@ -442,7 +442,7 @@ void PairLJClass2CoulLongKokkos<DeviceType>::init_style()
|
|||
|
||||
// error if rRESPA with inner levels
|
||||
|
||||
if (update->whichflag == 1 && strstr(update->integrate_style,"respa")) {
|
||||
if (update->whichflag == 1 && utils::strmatch(update->integrate_style,"^respa")) {
|
||||
int respa = 0;
|
||||
if (((Respa *) update->integrate)->level_inner >= 0) respa = 1;
|
||||
if (((Respa *) update->integrate)->level_middle >= 0) respa = 2;
|
||||
|
|
|
@ -223,7 +223,7 @@ void PairLJClass2Kokkos<DeviceType>::init_style()
|
|||
|
||||
// error if rRESPA with inner levels
|
||||
|
||||
if (update->whichflag == 1 && strstr(update->integrate_style,"respa")) {
|
||||
if (update->whichflag == 1 && utils::strmatch(update->integrate_style,"^respa")) {
|
||||
int respa = 0;
|
||||
if (((Respa *) update->integrate)->level_inner >= 0) respa = 1;
|
||||
if (((Respa *) update->integrate)->level_middle >= 0) respa = 2;
|
||||
|
|
|
@ -278,7 +278,7 @@ void PairLJCutCoulCutKokkos<DeviceType>::init_style()
|
|||
|
||||
// error if rRESPA with inner levels
|
||||
|
||||
if (update->whichflag == 1 && strstr(update->integrate_style,"respa")) {
|
||||
if (update->whichflag == 1 && utils::strmatch(update->integrate_style,"^respa")) {
|
||||
int respa = 0;
|
||||
if (((Respa *) update->integrate)->level_inner >= 0) respa = 1;
|
||||
if (((Respa *) update->integrate)->level_middle >= 0) respa = 2;
|
||||
|
|
|
@ -307,7 +307,7 @@ void PairLJCutCoulDebyeKokkos<DeviceType>::init_style()
|
|||
|
||||
// error if rRESPA with inner levels
|
||||
|
||||
if (update->whichflag == 1 && strstr(update->integrate_style,"respa")) {
|
||||
if (update->whichflag == 1 && utils::strmatch(update->integrate_style,"^respa")) {
|
||||
int respa = 0;
|
||||
if (((Respa *) update->integrate)->level_inner >= 0) respa = 1;
|
||||
if (((Respa *) update->integrate)->level_middle >= 0) respa = 2;
|
||||
|
|
|
@ -300,7 +300,7 @@ void PairLJCutCoulDSFKokkos<DeviceType>::init_style()
|
|||
|
||||
// error if rRESPA with inner levels
|
||||
|
||||
if (update->whichflag == 1 && strstr(update->integrate_style,"respa")) {
|
||||
if (update->whichflag == 1 && utils::strmatch(update->integrate_style,"^respa")) {
|
||||
int respa = 0;
|
||||
if (((Respa *) update->integrate)->level_inner >= 0) respa = 1;
|
||||
if (((Respa *) update->integrate)->level_middle >= 0) respa = 2;
|
||||
|
|
|
@ -440,7 +440,7 @@ void PairLJCutCoulLongKokkos<DeviceType>::init_style()
|
|||
|
||||
// error if rRESPA with inner levels
|
||||
|
||||
if (update->whichflag == 1 && strstr(update->integrate_style,"respa")) {
|
||||
if (update->whichflag == 1 && utils::strmatch(update->integrate_style,"^respa")) {
|
||||
int respa = 0;
|
||||
if (((Respa *) update->integrate)->level_inner >= 0) respa = 1;
|
||||
if (((Respa *) update->integrate)->level_middle >= 0) respa = 2;
|
||||
|
|
|
@ -217,7 +217,7 @@ void PairLJCutKokkos<DeviceType>::init_style()
|
|||
|
||||
// error if rRESPA with inner levels
|
||||
|
||||
if (update->whichflag == 1 && strstr(update->integrate_style,"respa")) {
|
||||
if (update->whichflag == 1 && utils::strmatch(update->integrate_style,"^respa")) {
|
||||
int respa = 0;
|
||||
if (((Respa *) update->integrate)->level_inner >= 0) respa = 1;
|
||||
if (((Respa *) update->integrate)->level_middle >= 0) respa = 2;
|
||||
|
|
|
@ -227,7 +227,7 @@ void PairLJExpandKokkos<DeviceType>::init_style()
|
|||
|
||||
// error if rRESPA with inner levels
|
||||
|
||||
if (update->whichflag == 1 && strstr(update->integrate_style,"respa")) {
|
||||
if (update->whichflag == 1 && utils::strmatch(update->integrate_style,"^respa")) {
|
||||
int respa = 0;
|
||||
if (((Respa *) update->integrate)->level_inner >= 0) respa = 1;
|
||||
if (((Respa *) update->integrate)->level_middle >= 0) respa = 2;
|
||||
|
|
|
@ -436,7 +436,7 @@ void PairLJGromacsCoulGromacsKokkos<DeviceType>::init_style()
|
|||
|
||||
// error if rRESPA with inner levels
|
||||
|
||||
if (update->whichflag == 1 && strstr(update->integrate_style,"respa")) {
|
||||
if (update->whichflag == 1 && utils::strmatch(update->integrate_style,"^respa")) {
|
||||
int respa = 0;
|
||||
if (((Respa *) update->integrate)->level_inner >= 0) respa = 1;
|
||||
if (((Respa *) update->integrate)->level_middle >= 0) respa = 2;
|
||||
|
|
|
@ -272,7 +272,7 @@ void PairLJGromacsKokkos<DeviceType>::init_style()
|
|||
|
||||
// error if rRESPA with inner levels
|
||||
|
||||
if (update->whichflag == 1 && strstr(update->integrate_style,"respa")) {
|
||||
if (update->whichflag == 1 && utils::strmatch(update->integrate_style,"^respa")) {
|
||||
int respa = 0;
|
||||
if (((Respa *) update->integrate)->level_inner >= 0) respa = 1;
|
||||
if (((Respa *) update->integrate)->level_middle >= 0) respa = 2;
|
||||
|
|
|
@ -255,7 +255,7 @@ void PairLJSDKKokkos<DeviceType>::init_style()
|
|||
|
||||
// error if rRESPA with inner levels
|
||||
|
||||
if (update->whichflag == 1 && strstr(update->integrate_style,"respa")) {
|
||||
if (update->whichflag == 1 && utils::strmatch(update->integrate_style,"^respa")) {
|
||||
int respa = 0;
|
||||
if (((Respa *) update->integrate)->level_inner >= 0) respa = 1;
|
||||
if (((Respa *) update->integrate)->level_middle >= 0) respa = 2;
|
||||
|
|
|
@ -234,7 +234,7 @@ void PairMorseKokkos<DeviceType>::init_style()
|
|||
|
||||
// error if rRESPA with inner levels
|
||||
|
||||
if (update->whichflag == 1 && strstr(update->integrate_style,"respa")) {
|
||||
if (update->whichflag == 1 && utils::strmatch(update->integrate_style,"^respa")) {
|
||||
int respa = 0;
|
||||
if (((Respa *) update->integrate)->level_inner >= 0) respa = 1;
|
||||
if (((Respa *) update->integrate)->level_middle >= 0) respa = 2;
|
||||
|
|
|
@ -107,7 +107,7 @@ void PairYukawaKokkos<DeviceType>::init_style()
|
|||
|
||||
// error if rRESPA with inner levels
|
||||
|
||||
if (update->whichflag == 1 && strstr(update->integrate_style,"respa")) {
|
||||
if (update->whichflag == 1 && utils::strmatch(update->integrate_style,"^respa")) {
|
||||
int respa = 0;
|
||||
if (((Respa *) update->integrate)->level_inner >= 0) respa = 1;
|
||||
if (((Respa *) update->integrate)->level_middle >= 0) respa = 2;
|
||||
|
|
|
@ -81,7 +81,7 @@ void PairZBLKokkos<DeviceType>::init_style()
|
|||
|
||||
// error if rRESPA with inner levels
|
||||
|
||||
if (update->whichflag == 1 && strstr(update->integrate_style,"respa")) {
|
||||
if (update->whichflag == 1 && utils::strmatch(update->integrate_style,"^respa")) {
|
||||
int respa = 0;
|
||||
if (((Respa *) update->integrate)->level_inner >= 0) respa = 1;
|
||||
if (((Respa *) update->integrate)->level_middle >= 0) respa = 2;
|
||||
|
|
|
@ -248,7 +248,7 @@ void PairBuckLongCoulLong::init_style()
|
|||
|
||||
// set rRESPA cutoffs
|
||||
|
||||
if (strstr(update->integrate_style,"respa") &&
|
||||
if (utils::strmatch(update->integrate_style,"^respa") &&
|
||||
((Respa *) update->integrate)->level_inner >= 0)
|
||||
cut_respa = ((Respa *) update->integrate)->cutoff;
|
||||
else cut_respa = nullptr;
|
||||
|
@ -264,7 +264,7 @@ void PairBuckLongCoulLong::init_style()
|
|||
int irequest;
|
||||
int respa = 0;
|
||||
|
||||
if (update->whichflag == 1 && strstr(update->integrate_style,"respa")) {
|
||||
if (update->whichflag == 1 && utils::strmatch(update->integrate_style,"^respa")) {
|
||||
if (((Respa *) update->integrate)->level_inner >= 0) respa = 1;
|
||||
if (((Respa *) update->integrate)->level_middle >= 0) respa = 2;
|
||||
}
|
||||
|
|
|
@ -740,7 +740,7 @@ void PairLJCharmmfswCoulLong::init_style()
|
|||
int irequest;
|
||||
|
||||
int respa = 0;
|
||||
if (update->whichflag == 1 && strstr(update->integrate_style,"respa")) {
|
||||
if (update->whichflag == 1 && utils::strmatch(update->integrate_style,"^respa")) {
|
||||
if (((Respa *) update->integrate)->level_inner >= 0) respa = 1;
|
||||
if (((Respa *) update->integrate)->level_middle >= 0) respa = 2;
|
||||
}
|
||||
|
@ -779,7 +779,7 @@ void PairLJCharmmfswCoulLong::init_style()
|
|||
|
||||
// set & error check interior rRESPA cutoffs
|
||||
|
||||
if (strstr(update->integrate_style,"respa") &&
|
||||
if (utils::strmatch(update->integrate_style,"^respa") &&
|
||||
((Respa *) update->integrate)->level_inner >= 0) {
|
||||
cut_respa = ((Respa *) update->integrate)->cutoff;
|
||||
if (MIN(cut_lj,cut_coul) < cut_respa[3])
|
||||
|
|
|
@ -242,7 +242,7 @@ void PairLJLongCoulLong::init_style()
|
|||
|
||||
// set rRESPA cutoffs
|
||||
|
||||
if (strstr(update->integrate_style,"respa") &&
|
||||
if (utils::strmatch(update->integrate_style,"^respa") &&
|
||||
((Respa *) update->integrate)->level_inner >= 0)
|
||||
cut_respa = ((Respa *) update->integrate)->cutoff;
|
||||
else cut_respa = nullptr;
|
||||
|
@ -258,7 +258,7 @@ void PairLJLongCoulLong::init_style()
|
|||
int irequest;
|
||||
int respa = 0;
|
||||
|
||||
if (update->whichflag == 1 && strstr(update->integrate_style,"respa")) {
|
||||
if (update->whichflag == 1 && utils::strmatch(update->integrate_style,"^respa")) {
|
||||
if (((Respa *) update->integrate)->level_inner >= 0) respa = 1;
|
||||
if (((Respa *) update->integrate)->level_middle >= 0) respa = 2;
|
||||
}
|
||||
|
|
|
@ -138,7 +138,7 @@ void FixQEQComb::init()
|
|||
void FixQEQComb::setup(int vflag)
|
||||
{
|
||||
firstflag = 1;
|
||||
if (strstr(update->integrate_style,"verlet"))
|
||||
if (utils::strmatch(update->integrate_style,"^verlet"))
|
||||
post_force(vflag);
|
||||
else {
|
||||
((Respa *) update->integrate)->copy_flevel_f(ilevel_respa);
|
||||
|
|
|
@ -143,7 +143,7 @@ int FixBondBreak::setmask()
|
|||
|
||||
void FixBondBreak::init()
|
||||
{
|
||||
if (strstr(update->integrate_style,"respa"))
|
||||
if (utils::strmatch(update->integrate_style,"^respa"))
|
||||
nlevels_respa = ((Respa *) update->integrate)->nlevels;
|
||||
|
||||
// enable angle/dihedral/improper breaking if any defined
|
||||
|
|
|
@ -232,7 +232,7 @@ int FixBondCreate::setmask()
|
|||
|
||||
void FixBondCreate::init()
|
||||
{
|
||||
if (strstr(update->integrate_style,"respa"))
|
||||
if (utils::strmatch(update->integrate_style,"^respa"))
|
||||
nlevels_respa = ((Respa *) update->integrate)->nlevels;
|
||||
|
||||
// check cutoff for iatomtype,jatomtype
|
||||
|
|
|
@ -209,7 +209,7 @@ void FixEfield::init()
|
|||
update->whichflag == 2 && estyle == NONE)
|
||||
error->all(FLERR,"Must use variable energy with fix efield");
|
||||
|
||||
if (strstr(update->integrate_style,"respa")) {
|
||||
if (utils::strmatch(update->integrate_style,"^respa")) {
|
||||
ilevel_respa = ((Respa *) update->integrate)->nlevels-1;
|
||||
if (respa_level >= 0) ilevel_respa = MIN(respa_level,ilevel_respa);
|
||||
}
|
||||
|
@ -219,7 +219,7 @@ void FixEfield::init()
|
|||
|
||||
void FixEfield::setup(int vflag)
|
||||
{
|
||||
if (strstr(update->integrate_style,"verlet"))
|
||||
if (utils::strmatch(update->integrate_style,"^verlet"))
|
||||
post_force(vflag);
|
||||
else {
|
||||
((Respa *) update->integrate)->copy_flevel_f(ilevel_respa);
|
||||
|
|
|
@ -206,7 +206,7 @@ void FixGLD::init()
|
|||
dtv = update->dt;
|
||||
dtf = 0.5 * update->dt * force->ftm2v;
|
||||
|
||||
if (strstr(update->integrate_style,"respa"))
|
||||
if (utils::strmatch(update->integrate_style,"^respa"))
|
||||
step_respa = ((Respa *) update->integrate)->step;
|
||||
}
|
||||
|
||||
|
|
|
@ -202,7 +202,7 @@ int FixOrientBCC::setmask()
|
|||
|
||||
void FixOrientBCC::init()
|
||||
{
|
||||
if (strstr(update->integrate_style,"respa")) {
|
||||
if (utils::strmatch(update->integrate_style,"^respa")) {
|
||||
ilevel_respa = ((Respa *) update->integrate)->nlevels-1;
|
||||
if (respa_level >= 0) ilevel_respa = MIN(respa_level,ilevel_respa);
|
||||
}
|
||||
|
@ -228,7 +228,7 @@ void FixOrientBCC::init_list(int /*id*/, NeighList *ptr)
|
|||
|
||||
void FixOrientBCC::setup(int vflag)
|
||||
{
|
||||
if (strstr(update->integrate_style,"verlet"))
|
||||
if (utils::strmatch(update->integrate_style,"^verlet"))
|
||||
post_force(vflag);
|
||||
else {
|
||||
((Respa *) update->integrate)->copy_flevel_f(ilevel_respa);
|
||||
|
|
|
@ -200,7 +200,7 @@ int FixOrientFCC::setmask()
|
|||
|
||||
void FixOrientFCC::init()
|
||||
{
|
||||
if (strstr(update->integrate_style,"respa")) {
|
||||
if (utils::strmatch(update->integrate_style,"^respa")) {
|
||||
ilevel_respa = ((Respa *) update->integrate)->nlevels-1;
|
||||
if (respa_level >= 0) ilevel_respa = MIN(respa_level,ilevel_respa);
|
||||
}
|
||||
|
@ -226,7 +226,7 @@ void FixOrientFCC::init_list(int /*id*/, NeighList *ptr)
|
|||
|
||||
void FixOrientFCC::setup(int vflag)
|
||||
{
|
||||
if (strstr(update->integrate_style,"verlet"))
|
||||
if (utils::strmatch(update->integrate_style,"^verlet"))
|
||||
post_force(vflag);
|
||||
else {
|
||||
((Respa *) update->integrate)->copy_flevel_f(ilevel_respa);
|
||||
|
|
|
@ -207,7 +207,7 @@ void FixTTM::init()
|
|||
for (int iznode = 0; iznode < nznodes; iznode++)
|
||||
net_energy_transfer_all[ixnode][iynode][iznode] = 0;
|
||||
|
||||
if (strstr(update->integrate_style,"respa"))
|
||||
if (utils::strmatch(update->integrate_style,"^respa"))
|
||||
nlevels_respa = ((Respa *) update->integrate)->nlevels;
|
||||
}
|
||||
|
||||
|
|
|
@ -368,7 +368,7 @@ void DihedralCharmm::coeff(int narg, char **arg)
|
|||
|
||||
void DihedralCharmm::init_style()
|
||||
{
|
||||
if (strstr(update->integrate_style,"respa")) {
|
||||
if (utils::strmatch(update->integrate_style,"^respa")) {
|
||||
Respa *r = (Respa *) update->integrate;
|
||||
if (r->level_pair >= 0 && (r->level_pair != r->level_dihedral))
|
||||
error->all(FLERR,"Dihedral style charmm must be set to same"
|
||||
|
|
|
@ -386,7 +386,7 @@ void DihedralCharmmfsw::coeff(int narg, char **arg)
|
|||
|
||||
void DihedralCharmmfsw::init_style()
|
||||
{
|
||||
if (strstr(update->integrate_style,"respa")) {
|
||||
if (utils::strmatch(update->integrate_style,"^respa")) {
|
||||
Respa *r = (Respa *) update->integrate;
|
||||
if (r->level_pair >= 0 && (r->level_pair != r->level_dihedral))
|
||||
error->all(FLERR,"Dihedral style charmmfsw must be set to same"
|
||||
|
|
|
@ -81,6 +81,8 @@ FixCMAP::FixCMAP(LAMMPS *lmp, int narg, char **arg) :
|
|||
extvector = 1;
|
||||
wd_header = 1;
|
||||
wd_section = 1;
|
||||
respa_level_support = 1;
|
||||
ilevel_respa = 0;
|
||||
|
||||
MPI_Comm_rank(world,&me);
|
||||
MPI_Comm_size(world,&nprocs);
|
||||
|
@ -182,6 +184,11 @@ void FixCMAP::init()
|
|||
// define newton_bond here in case restart file was read (not data file)
|
||||
|
||||
newton_bond = force->newton_bond;
|
||||
|
||||
if (utils::strmatch(update->integrate_style,"^respa")) {
|
||||
ilevel_respa = ((Respa *) update->integrate)->nlevels-1;
|
||||
if (respa_level >= 0) ilevel_respa = MIN(respa_level,ilevel_respa);
|
||||
}
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------- */
|
||||
|
@ -190,12 +197,12 @@ void FixCMAP::setup(int vflag)
|
|||
{
|
||||
pre_neighbor();
|
||||
|
||||
if (strstr(update->integrate_style,"verlet"))
|
||||
if (utils::strmatch(update->integrate_style,"^verlet"))
|
||||
post_force(vflag);
|
||||
else {
|
||||
((Respa *) update->integrate)->copy_flevel_f(nlevels_respa-1);
|
||||
post_force_respa(vflag,nlevels_respa-1,0);
|
||||
((Respa *) update->integrate)->copy_f_flevel(nlevels_respa-1);
|
||||
((Respa *) update->integrate)->copy_flevel_f(ilevel_respa);
|
||||
post_force_respa(vflag,ilevel_respa,0);
|
||||
((Respa *) update->integrate)->copy_f_flevel(ilevel_respa);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -596,7 +603,7 @@ void FixCMAP::post_force(int vflag)
|
|||
|
||||
void FixCMAP::post_force_respa(int vflag, int ilevel, int /*iloop*/)
|
||||
{
|
||||
if (ilevel == nlevels_respa-1) post_force(vflag);
|
||||
if (ilevel == ilevel_respa) post_force(vflag);
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
|
|
@ -67,7 +67,7 @@ class FixCMAP : public Fix {
|
|||
private:
|
||||
int nprocs,me;
|
||||
int newton_bond,eflag_caller;
|
||||
int ctype,nlevels_respa;
|
||||
int ctype,ilevel_respa;
|
||||
int ncrosstermtypes,crossterm_per_atom,maxcrossterm;
|
||||
int ncrosstermlist;
|
||||
bigint ncmap;
|
||||
|
|
|
@ -389,7 +389,7 @@ void FixPOEMS::init()
|
|||
|
||||
// rRESPA info
|
||||
|
||||
if (strstr(update->integrate_style,"respa")) {
|
||||
if (utils::strmatch(update->integrate_style,"^respa")) {
|
||||
step_respa = ((Respa *) update->integrate)->step;
|
||||
nlevels_respa = ((Respa *) update->integrate)->nlevels;
|
||||
}
|
||||
|
|
|
@ -56,6 +56,8 @@ PythonImpl::PythonImpl(LAMMPS *lmp) : Pointers(lmp)
|
|||
nfunc = 0;
|
||||
pfuncs = nullptr;
|
||||
|
||||
#if PY_MAJOR_VERSION >= 3
|
||||
#ifndef Py_LIMITED_API
|
||||
// check for PYTHONUNBUFFERED environment variable
|
||||
const char * PYTHONUNBUFFERED = getenv("PYTHONUNBUFFERED");
|
||||
|
||||
|
@ -64,6 +66,8 @@ PythonImpl::PythonImpl(LAMMPS *lmp) : Pointers(lmp)
|
|||
// Force the stdout and stderr streams to be unbuffered.
|
||||
Py_UnbufferedStdioFlag = 1;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// one-time initialization of Python interpreter
|
||||
// pyMain stores pointer to main module
|
||||
|
|
|
@ -78,7 +78,7 @@ void FixQEqDynamic::init()
|
|||
error->warning(FLERR,"Fix qeq/dynamic tolerance may be too small"
|
||||
" for damped dynamics");
|
||||
|
||||
if (strstr(update->integrate_style,"respa"))
|
||||
if (utils::strmatch(update->integrate_style,"^respa"))
|
||||
nlevels_respa = ((Respa *) update->integrate)->nlevels;
|
||||
|
||||
}
|
||||
|
|
|
@ -91,7 +91,7 @@ void FixQEqFire::init()
|
|||
error->warning(FLERR,"Fix qeq/fire tolerance may be too small"
|
||||
" for damped fires");
|
||||
|
||||
if (strstr(update->integrate_style,"respa"))
|
||||
if (utils::strmatch(update->integrate_style,"^respa"))
|
||||
nlevels_respa = ((Respa *) update->integrate)->nlevels;
|
||||
|
||||
comb = (PairComb *) force->pair_match("comb",1);
|
||||
|
|
|
@ -57,7 +57,7 @@ void FixQEqPoint::init()
|
|||
int ntypes = atom->ntypes;
|
||||
memory->create(shld,ntypes+1,ntypes+1,"qeq:shielding");
|
||||
|
||||
if (strstr(update->integrate_style,"respa"))
|
||||
if (utils::strmatch(update->integrate_style,"^respa"))
|
||||
nlevels_respa = ((Respa *) update->integrate)->nlevels;
|
||||
|
||||
}
|
||||
|
|
|
@ -68,7 +68,7 @@ void FixQEqShielded::init()
|
|||
error->all(FLERR,"Invalid param file for fix qeq/shielded");
|
||||
}
|
||||
|
||||
if (strstr(update->integrate_style,"respa"))
|
||||
if (utils::strmatch(update->integrate_style,"^respa"))
|
||||
nlevels_respa = ((Respa *) update->integrate)->nlevels;
|
||||
|
||||
}
|
||||
|
|
|
@ -79,7 +79,7 @@ void FixQEqSlater::init()
|
|||
error->all(FLERR,"Invalid param file for fix qeq/slater");
|
||||
}
|
||||
|
||||
if (strstr(update->integrate_style,"respa"))
|
||||
if (utils::strmatch(update->integrate_style,"^respa"))
|
||||
nlevels_respa = ((Respa *) update->integrate)->nlevels;
|
||||
}
|
||||
|
||||
|
|
|
@ -720,17 +720,14 @@ void FixRigid::init()
|
|||
}
|
||||
}
|
||||
|
||||
// error if npt,nph fix comes before rigid fix
|
||||
|
||||
for (i = 0; i < modify->nfix; i++) {
|
||||
if (strcmp(modify->fix[i]->style,"npt") == 0) break;
|
||||
if (strcmp(modify->fix[i]->style,"nph") == 0) break;
|
||||
}
|
||||
// error if a fix changing the box comes before rigid fix
|
||||
|
||||
for (i = 0; i < modify->nfix; i++)
|
||||
if (modify->fix[i]->box_change) break;
|
||||
if (i < modify->nfix) {
|
||||
for (int j = i; j < modify->nfix; j++)
|
||||
if (strcmp(modify->fix[j]->style,"rigid") == 0)
|
||||
error->all(FLERR,"Rigid fix must come before NPT/NPH fix");
|
||||
for (int j = i+1; j < modify->nfix; j++)
|
||||
if (utils::strmatch(modify->fix[j]->style,"^rigid"))
|
||||
error->all(FLERR,"Rigid fixes must come before any box changing fix");
|
||||
}
|
||||
|
||||
// add gravity forces based on gravity vector from fix
|
||||
|
@ -738,8 +735,8 @@ void FixRigid::init()
|
|||
if (id_gravity) {
|
||||
int ifix = modify->find_fix(id_gravity);
|
||||
if (ifix < 0) error->all(FLERR,"Fix rigid cannot find fix gravity ID");
|
||||
if (strcmp(modify->fix[ifix]->style,"gravity") != 0)
|
||||
error->all(FLERR,"Fix rigid gravity fix is invalid");
|
||||
if (!utils::strmatch(modify->fix[ifix]->style,"^gravity"))
|
||||
error->all(FLERR,"Fix rigid gravity fix ID is not a gravity fix style");
|
||||
int tmp;
|
||||
gvec = (double *) modify->fix[ifix]->extract("gvec",tmp);
|
||||
}
|
||||
|
@ -750,7 +747,7 @@ void FixRigid::init()
|
|||
dtf = 0.5 * update->dt * force->ftm2v;
|
||||
dtq = 0.5 * update->dt;
|
||||
|
||||
if (strstr(update->integrate_style,"respa"))
|
||||
if (utils::strmatch(update->integrate_style,"^respa"))
|
||||
step_respa = ((Respa *) update->integrate)->step;
|
||||
|
||||
// setup rigid bodies, using current atom info. if reinitflag is not set,
|
||||
|
|
|
@ -19,22 +19,24 @@
|
|||
|
||||
#include "fix_rigid_nh_small.h"
|
||||
|
||||
#include <cmath>
|
||||
#include <cstring>
|
||||
#include "math_extra.h"
|
||||
#include "atom.h"
|
||||
#include "comm.h"
|
||||
#include "compute.h"
|
||||
#include "domain.h"
|
||||
#include "update.h"
|
||||
#include "modify.h"
|
||||
#include "fix_deform.h"
|
||||
#include "group.h"
|
||||
#include "comm.h"
|
||||
#include "force.h"
|
||||
#include "kspace.h"
|
||||
#include "memory.h"
|
||||
#include "error.h"
|
||||
#include "fix_deform.h"
|
||||
#include "force.h"
|
||||
#include "group.h"
|
||||
#include "kspace.h"
|
||||
#include "math_extra.h"
|
||||
#include "memory.h"
|
||||
#include "modify.h"
|
||||
#include "molecule.h"
|
||||
#include "rigid_const.h"
|
||||
#include "update.h"
|
||||
|
||||
#include <cmath>
|
||||
#include <cstring>
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
using namespace FixConst;
|
||||
|
@ -1365,6 +1367,19 @@ int FixRigidNHSmall::modify_param(int narg, char **arg)
|
|||
return FixRigidSmall::modify_param(narg,arg);
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
disallow using fix rigid/n??/small fixes with fix deposit
|
||||
we would need custom functionality to update data structures
|
||||
used by all fixes derived from this class but not fix rigid/small
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void FixRigidNHSmall::set_molecule(int, tagint, int,
|
||||
double *, double *, double *)
|
||||
{
|
||||
error->all(FLERR,fmt::format("Molecule update not (yet) implemented for "
|
||||
"fix {}", style));
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void FixRigidNHSmall::allocate_chain()
|
||||
|
|
|
@ -80,6 +80,7 @@ class FixRigidNHSmall : public FixRigidSmall {
|
|||
void nh_epsilon_dot();
|
||||
void compute_dof();
|
||||
|
||||
void set_molecule(int, tagint, int, double *, double *, double *);
|
||||
void allocate_chain();
|
||||
void allocate_order();
|
||||
void deallocate_chain();
|
||||
|
|
|
@ -571,16 +571,14 @@ void FixRigidSmall::init()
|
|||
}
|
||||
}
|
||||
|
||||
// error if npt,nph fix comes before rigid fix
|
||||
// error if a fix changing the box comes before rigid fix
|
||||
|
||||
for (i = 0; i < modify->nfix; i++) {
|
||||
if (strcmp(modify->fix[i]->style,"npt") == 0) break;
|
||||
if (strcmp(modify->fix[i]->style,"nph") == 0) break;
|
||||
}
|
||||
for (i = 0; i < modify->nfix; i++)
|
||||
if (modify->fix[i]->box_change) break;
|
||||
if (i < modify->nfix) {
|
||||
for (int j = i; j < modify->nfix; j++)
|
||||
if (strcmp(modify->fix[j]->style,"rigid") == 0)
|
||||
error->all(FLERR,"Rigid fix must come before NPT/NPH fix");
|
||||
for (int j = i+1; j < modify->nfix; j++)
|
||||
if (utils::strmatch(modify->fix[j]->style,"^rigid"))
|
||||
error->all(FLERR,"Rigid fixes must come before any box changing fix");
|
||||
}
|
||||
|
||||
// add gravity forces based on gravity vector from fix
|
||||
|
@ -588,8 +586,8 @@ void FixRigidSmall::init()
|
|||
if (id_gravity) {
|
||||
int ifix = modify->find_fix(id_gravity);
|
||||
if (ifix < 0) error->all(FLERR,"Fix rigid/small cannot find fix gravity ID");
|
||||
if (strcmp(modify->fix[ifix]->style,"gravity") != 0)
|
||||
error->all(FLERR,"Fix rigid/small gravity fix is invalid");
|
||||
if (!utils::strmatch(modify->fix[ifix]->style,"^gravity"))
|
||||
error->all(FLERR,"Fix rigid gravity fix ID is not a gravity fix style");
|
||||
int tmp;
|
||||
gvec = (double *) modify->fix[ifix]->extract("gvec",tmp);
|
||||
}
|
||||
|
@ -600,7 +598,7 @@ void FixRigidSmall::init()
|
|||
dtf = 0.5 * update->dt * force->ftm2v;
|
||||
dtq = 0.5 * update->dt;
|
||||
|
||||
if (strstr(update->integrate_style,"respa"))
|
||||
if (utils::strmatch(update->integrate_style,"^respa"))
|
||||
step_respa = ((Respa *) update->integrate)->step;
|
||||
}
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ class FixRigidSmall : public Fix {
|
|||
void grow_arrays(int);
|
||||
void copy_arrays(int, int, int);
|
||||
void set_arrays(int);
|
||||
void set_molecule(int, tagint, int, double *, double *, double *);
|
||||
virtual void set_molecule(int, tagint, int, double *, double *, double *);
|
||||
|
||||
int pack_exchange(int, double *);
|
||||
int unpack_exchange(int, double *);
|
||||
|
|
|
@ -456,7 +456,7 @@ void FixShake::setup(int vflag)
|
|||
|
||||
// set respa to 0 if verlet is used and to 1 otherwise
|
||||
|
||||
if (strstr(update->integrate_style,"verlet"))
|
||||
if (utils::strmatch(update->integrate_style,"^verlet"))
|
||||
respa = 0;
|
||||
else
|
||||
respa = 1;
|
||||
|
@ -2956,7 +2956,7 @@ void FixShake::unpack_forward_comm(int n, int first, double *buf)
|
|||
|
||||
void FixShake::reset_dt()
|
||||
{
|
||||
if (strstr(update->integrate_style,"verlet")) {
|
||||
if (utils::strmatch(update->integrate_style,"^verlet")) {
|
||||
dtv = update->dt;
|
||||
if (rattle) dtfsq = 0.5 * update->dt * update->dt * force->ftm2v;
|
||||
else dtfsq = update->dt * update->dt * force->ftm2v;
|
||||
|
|
|
@ -186,7 +186,7 @@ void FixPrecessionSpin::init()
|
|||
k1ch = k1c/hbar;
|
||||
k2ch = k2c/hbar;
|
||||
|
||||
if (strstr(update->integrate_style,"respa")) {
|
||||
if (utils::strmatch(update->integrate_style,"^respa")) {
|
||||
ilevel_respa = ((Respa *) update->integrate)->nlevels-1;
|
||||
if (respa_level >= 0) ilevel_respa = MIN(respa_level,ilevel_respa);
|
||||
}
|
||||
|
@ -225,7 +225,7 @@ void FixPrecessionSpin::init()
|
|||
|
||||
void FixPrecessionSpin::setup(int vflag)
|
||||
{
|
||||
if (strstr(update->integrate_style,"verlet"))
|
||||
if (utils::strmatch(update->integrate_style,"^verlet"))
|
||||
post_force(vflag);
|
||||
else {
|
||||
((Respa *) update->integrate)->copy_flevel_f(ilevel_respa);
|
||||
|
|
|
@ -590,7 +590,7 @@ void FixBocs::init()
|
|||
if (force->kspace) kspace_flag = 1;
|
||||
else kspace_flag = 0;
|
||||
|
||||
if (strstr(update->integrate_style,"respa")) {
|
||||
if (utils::strmatch(update->integrate_style,"^respa")) {
|
||||
nlevels_respa = ((Respa *) update->integrate)->nlevels;
|
||||
step_respa = ((Respa *) update->integrate)->step;
|
||||
dto = 0.5*step_respa[0];
|
||||
|
@ -1850,7 +1850,7 @@ void FixBocs::reset_dt()
|
|||
|
||||
// If using respa, then remap is performed in innermost level
|
||||
|
||||
if (strstr(update->integrate_style,"respa"))
|
||||
if (utils::strmatch(update->integrate_style,"^respa"))
|
||||
dto = 0.5*step_respa[0];
|
||||
|
||||
if (pstat_flag)
|
||||
|
|
|
@ -412,7 +412,7 @@ void FixColvars::init()
|
|||
if ((me == 0) && (update->whichflag == 2))
|
||||
error->warning(FLERR,"Using fix colvars with minimization");
|
||||
|
||||
if (strstr(update->integrate_style,"respa"))
|
||||
if (utils::strmatch(update->integrate_style,"^respa"))
|
||||
nlevels_respa = ((Respa *) update->integrate)->nlevels;
|
||||
}
|
||||
|
||||
|
@ -680,7 +680,7 @@ void FixColvars::setup(int vflag)
|
|||
proxy->setup();
|
||||
|
||||
// initialize forces
|
||||
if (strstr(update->integrate_style,"verlet") || (update->whichflag == 2))
|
||||
if (utils::strmatch(update->integrate_style,"^verlet") || (update->whichflag == 2))
|
||||
post_force(vflag);
|
||||
else {
|
||||
((Respa *) update->integrate)->copy_flevel_f(nlevels_respa-1);
|
||||
|
|
|
@ -78,7 +78,6 @@ void Ndx2Group::command(int narg, char **arg)
|
|||
int len;
|
||||
bigint num;
|
||||
FILE *fp;
|
||||
tagint *tagbuf;
|
||||
std::string name = "", next;
|
||||
|
||||
if (narg < 1) error->all(FLERR,"Illegal ndx2group command");
|
||||
|
@ -191,11 +190,10 @@ void Ndx2Group::create(const std::string &name, const std::vector<tagint> &tags)
|
|||
// map from global to local
|
||||
const int nlocal = atom->nlocal;
|
||||
int *flags = (int *)calloc(nlocal,sizeof(int));
|
||||
for (bigint i=0; i < tags.size(); ++i) {
|
||||
for (bigint i=0; i < (int)tags.size(); ++i) {
|
||||
const int id = atom->map(tags[i]);
|
||||
if (id < nlocal && id >= 0) flags[id] = 1;
|
||||
}
|
||||
group->create(name,flags);
|
||||
free(flags);
|
||||
}
|
||||
|
||||
|
|
|
@ -587,7 +587,6 @@ void PairExp6rx::coeff(int narg, char **arg)
|
|||
if (!allocated) allocate();
|
||||
|
||||
int ilo,ihi,jlo,jhi;
|
||||
int n;
|
||||
utils::bounds(FLERR,arg[0],1,atom->ntypes,ilo,ihi,error);
|
||||
utils::bounds(FLERR,arg[1],1,atom->ntypes,jlo,jhi,error);
|
||||
|
||||
|
|
|
@ -156,7 +156,7 @@ void FixLangevinDrude::init()
|
|||
|
||||
void FixLangevinDrude::setup(int /*vflag*/)
|
||||
{
|
||||
if (!strstr(update->integrate_style,"verlet"))
|
||||
if (!utils::strmatch(update->integrate_style,"^verlet"))
|
||||
error->all(FLERR,"RESPA style not compatible with fix langevin/drude");
|
||||
if (!comm->ghost_velocity)
|
||||
error->all(FLERR,"fix langevin/drude requires ghost velocities. Use comm_modify vel yes");
|
||||
|
|
|
@ -671,7 +671,7 @@ void FixTGNHDrude::init()
|
|||
if (force->kspace) kspace_flag = 1;
|
||||
else kspace_flag = 0;
|
||||
|
||||
if (strstr(update->integrate_style,"respa")) {
|
||||
if (utils::strmatch(update->integrate_style,"^respa")) {
|
||||
nlevels_respa = ((Respa *) update->integrate)->nlevels;
|
||||
step_respa = ((Respa *) update->integrate)->step;
|
||||
dto = 0.5*step_respa[0];
|
||||
|
@ -1593,7 +1593,7 @@ void FixTGNHDrude::reset_dt()
|
|||
|
||||
// If using respa, then remap is performed in innermost level
|
||||
|
||||
if (strstr(update->integrate_style,"respa"))
|
||||
if (utils::strmatch(update->integrate_style,"^respa"))
|
||||
dto = 0.5*step_respa[0];
|
||||
}
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@ void FixNVEEff::init()
|
|||
dtv = update->dt;
|
||||
dtf = 0.5 * update->dt * force->ftm2v;
|
||||
|
||||
if (strstr(update->integrate_style,"respa"))
|
||||
if (utils::strmatch(update->integrate_style,"^respa"))
|
||||
step_respa = ((Respa *) update->integrate)->step;
|
||||
}
|
||||
|
||||
|
|
|
@ -356,7 +356,7 @@ void FixAdaptFEP::init()
|
|||
fix_chg = (FixStore *) modify->fix[ifix];
|
||||
}
|
||||
|
||||
if (strstr(update->integrate_style,"respa"))
|
||||
if (utils::strmatch(update->integrate_style,"^respa"))
|
||||
nlevels_respa = ((Respa *) update->integrate)->nlevels;
|
||||
}
|
||||
|
||||
|
|
|
@ -317,7 +317,7 @@ void FixNHIntel::reset_dt()
|
|||
|
||||
// If using respa, then remap is performed in innermost level
|
||||
|
||||
if (strstr(update->integrate_style,"respa"))
|
||||
if (utils::strmatch(update->integrate_style,"^respa"))
|
||||
dto = 0.5*step_respa[0];
|
||||
|
||||
if (pstat_flag)
|
||||
|
|
|
@ -79,7 +79,7 @@ int FixLbViscous::setmask()
|
|||
void FixLbViscous::init()
|
||||
{
|
||||
|
||||
if (strcmp(update->integrate_style,"respa") == 0)
|
||||
if (utils::strmatch(update->integrate_style,"^respa"))
|
||||
nlevels_respa = ((Respa *) update->integrate)->nlevels;
|
||||
|
||||
}
|
||||
|
@ -88,7 +88,7 @@ void FixLbViscous::init()
|
|||
|
||||
void FixLbViscous::setup(int vflag)
|
||||
{
|
||||
if (strstr(update->integrate_style,"verlet") != nullptr)
|
||||
if (utils::strmatch(update->integrate_style,"^verlet"))
|
||||
post_force(vflag);
|
||||
else {
|
||||
((Respa *) update->integrate)->copy_flevel_f(nlevels_respa-1);
|
||||
|
|
|
@ -120,7 +120,7 @@ void FixManifoldForce::init()
|
|||
|
||||
void FixManifoldForce::setup(int vflag)
|
||||
{
|
||||
if (strstr(update->integrate_style,"verlet"))
|
||||
if (utils::strmatch(update->integrate_style,"^verlet"))
|
||||
post_force(vflag);
|
||||
else {
|
||||
int nlevels_respa = ((Respa *) update->integrate)->nlevels;
|
||||
|
|
|
@ -134,11 +134,6 @@ static double cyc_splintD(double const *xa,
|
|||
|
||||
} // cyc_splintD()
|
||||
|
||||
// --------------------------------------------
|
||||
// ------- Calculate the dihedral angle -------
|
||||
// --------------------------------------------
|
||||
static const int g_dim=3;
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
DihedralTableCut::DihedralTableCut(LAMMPS *lmp) : DihedralTable(lmp)
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue