diff --git a/doc/src/dump_image.rst b/doc/src/dump_image.rst index 1d0ff5b6b11..9e22a005f15 100644 --- a/doc/src/dump_image.rst +++ b/doc/src/dump_image.rst @@ -212,13 +212,13 @@ Examples Description """"""""""" -Dump a high-quality rendered image of the atom configuration every :math:`N` -timesteps and save the images either as a sequence of JPEG or PNG or -PPM files, or as a single movie file. The options for this command as -well as the :doc:`dump_modify ` command control what is -included in the image or movie and how it appears. A series of such -images can easily be manually converted into an animated movie of your -simulation or the process can be automated without writing the +Dump a high-quality rendered image of the atom configuration every +:math:`N` timesteps and save the images either as a sequence of JPEG, +PNG, TGA, or PPM files, or as a single movie file. The options for this +command as well as the :doc:`dump_modify ` command control +what is included in the image or movie and how it appears. A series of +such images can easily be manually converted into an animated movie of +your simulation or the process can be automated without writing the intermediate files using the dump movie style; see further details below. Other dump styles store snapshots of numerical data associated with atoms in various formats, as discussed on the :doc:`dump ` @@ -251,23 +251,30 @@ Here are five sample images, rendered as JPEG or PNG files. A detailed discussion of advanced graphics settings and workflows with examples is provided in the :doc:`Howto_viz` howto. +.. versionadded:: TBD + + support for writing compressed TGA files + Only atoms in the specified group are rendered in the image. The :doc:`dump_modify region and thresh ` commands can also alter what atoms are included in the image. The filename suffix -determines whether a JPEG, PNG, or PPM file is created with the *image* -dump style. If the suffix is ".jpg" or ".jpeg", then a `JPEG format -`_ file is created, if the suffix is ".png", then a `PNG -format `_ is created, else a `PPM (aka NETPBM) format -`_ file is created. The JPEG and PNG files are binary; PPM -has a text mode header followed by binary data. JPEG images have lossy -compression, PNG has lossless compression, and PPM files are -uncompressed but can be compressed with a supported compression program, -if LAMMPS has been compiled with :ref:`compression support ` and a -supported suffix is used. +determines whether a JPEG, PNG, TGA, or PPM file is created with the +*image* dump style. If the suffix is ".jpg" or ".jpeg", then a `JPEG +format `_ file is created, if the suffix is ".png", then a +`PNG format `_ file is created, if the suffix is ".tga", +then a compressed 24-bit RGB `TGA or TARGA format `_ +file is created, else a `PPM (aka NETPBM) format `_ file is +created. The JPEG, PNG, and TGA files are binary; PPM has a text mode +header followed by binary data. JPEG images have lossy compression, PNG +and TGA have lossless compression, and PPM files are uncompressed but can +be compressed with a supported compression program, if LAMMPS has been +compiled with :ref:`compression support ` and a supported suffix +is used. .. _jpeg_format: https://jpeg.org/jpeg/ .. _png_format: https://en.wikipedia.org/wiki/Portable_Network_Graphics .. _ppm_format: https://en.wikipedia.org/wiki/Netpbm +.. _tga_format: https://en.wikipedia.org/wiki/Truevision_TGA Similarly, the format of the resulting movie is chosen with the *movie* dump style. This is handled by the underlying FFmpeg converter and thus diff --git a/doc/src/fix_bond_react.rst b/doc/src/fix_bond_react.rst index 3705ded8176..5103722f0d2 100644 --- a/doc/src/fix_bond_react.rst +++ b/doc/src/fix_bond_react.rst @@ -363,19 +363,19 @@ contain any atom within three bonds of reacting atoms. Some atoms in the pre-reacted template that are not reacting may have missing topology with respect to the simulation. For example, the pre-reacted template may contain an atom that, in the simulation, is -currently connected to the rest of a long polymer chain. These are -referred to as edge atoms, and are also specified in the map file. All -pre-reaction template atoms should be linked to an initiator atom, via -at least one path that does not involve edge atoms. When the -pre-reaction template contains edge atoms, not all atoms, bonds, etc. -specified in the reaction templates will be updated. Specifically, topology -that involves only atoms that are "too near" to template edges will not be -updated. The definition of "too near the edge" depends on which -interactions are defined in the simulation. If the simulation has defined -dihedrals, atoms within two bonds of edge atoms are considered "too near -the edge." If the simulation defines angles, but not dihedrals, atoms -within one bond of edge atoms are considered "too near the edge." If just -bonds are defined, only edge atoms are considered "too near the edge." +currently connected to the rest of a long polymer chain. These are referred +to as edge atoms, and are specified in the map file in the EdgeIDs section. +All pre-reaction template atoms should be linked to an initiator atom, via +at least one path that does not involve edge atoms. When the pre-reaction +template contains edge atoms, not all atoms, bonds, etc. specified in the +reaction templates will be updated. Specifically, topology that involves +only atoms that are "too near" to template edges will not be updated. The +definition of "too near the edge" depends on which interactions are defined +in the simulation. If the simulation has defined dihedrals, atoms within +two bonds of edge atoms are considered "too near the edge." If the +simulation defines angles, but not dihedrals, atoms within one bond of edge +atoms are considered "too near the edge." If just bonds are defined, only +edge atoms are considered "too near the edge." .. note:: @@ -392,6 +392,25 @@ command page. It is highly recommended to use :doc:`Type labels ` format is +necessary to infer the types of higher-order interactions. Bond, angle, +dihedral, and improper type labels must contain their constituent atom +types delimited by hyphens, e.g., ‘c2-c2-c2-n’ for a dihedral that contains +three atoms of type 'c2' and one atom of 'n'. Certain symmetries are +considered to account for equivalent ways of writing higher-order +interactions. Type labels for bonds, angles, and dihedrals are assumed to +be equivalent to those written in reverse order. For example, an angle +with type label 'c1-c2-n' is equivalent to 'n-c2-c1'. Symmetries for +impropers are more complex and are described on the doc page for each +improper style in the 'Symmetry convention' section. + The post-reacted molecule template contains a sample of the reaction site and its surrounding topology after the reaction has occurred. It must contain the same number of atoms as the pre-reacted template @@ -422,12 +441,13 @@ mandatory keyword is *equivalences*\ : N *equivalences* = # of atoms N in the reaction molecule templates -The optional keywords are *edgeIDs*\ , *deleteIDs*\ , *chiralIDs*\ , and -*constraints*\ : +The optional keywords are *edgeIDs*\ , *wildcards*\ ,*deleteIDs*\ , +*createIDs*\ , *chiralIDs*\ , and *constraints*\ : .. parsed-literal:: N *edgeIDs* = # of edge atoms N in the pre-reacted molecule template + N *wildcards* = # of atoms with wildcard atom types N N *deleteIDs* = # of atoms N that are deleted N *createIDs* = # of atoms N that are created N *chiralIDs* = # of chiral centers N @@ -443,16 +463,17 @@ templates. The first column is an atom ID of the pre-reacted molecule template, and the second column is the corresponding atom ID of the post-reacted molecule template. The first optional section begins with the keyword "EdgeIDs" and lists the atom IDs of edge atoms in the -pre-reacted molecule template. The second optional section begins with -the keyword "DeleteIDs" and lists the atom IDs of pre-reaction -template atoms to delete. The third optional section begins with the -keyword "CreateIDs" and lists the atom IDs of the post-reaction -template atoms to create. The fourth optional section begins with the -keyword "ChiralIDs" lists the atom IDs of chiral atoms whose -handedness should be enforced. The fifth optional section begins with -the keyword "Constraints" and lists additional criteria that must be -satisfied in order for the reaction to occur. Currently, there are -six types of constraints available, as discussed below: "distance", +pre-reacted molecule template. The second optional section begins with +the keyword "Wildcards" and lists the pre-reaction atom IDs of atoms that +have wildcard atom types. The third optional section begins with the +keyword "DeleteIDs" and lists the atom IDs of pre-reaction template atoms +to delete. The fourth optional section begins with the keyword "CreateIDs" +and lists the atom IDs of the post-reaction template atoms to create. The +fifth optional section begins with the keyword "ChiralIDs" lists the atom +IDs of chiral atoms whose handedness should be enforced. The sixth optional +section begins with the keyword "Constraints" and lists additional criteria +that must be satisfied in order for the reaction to occur. Currently, there +are six types of constraints available, as discussed below: "distance", "angle", "dihedral", "arrhenius", "rmsd", and "custom". A sample map file is given below: diff --git a/doc/src/improper_amoeba.rst b/doc/src/improper_amoeba.rst index 1a93b0d32ac..588887f5e73 100644 --- a/doc/src/improper_amoeba.rst +++ b/doc/src/improper_amoeba.rst @@ -41,7 +41,7 @@ information about the implementation of AMOEBA and HIPPO in LAMMPS. If the 4 atoms in an improper quadruplet (listed in the data file read by the :doc:`read_data ` command are ordered I,J,K,L then atoms I,K,L are considered to lie in a plane and atom J is -out-of-place. The angle :math:`\chi_0` is computed as the Allinger +out-of-plane. The angle :math:`\chi_0` is computed as the Allinger angle which is defined as the angle between the plane of I,K,L, and the vector from atom I to atom J. @@ -58,6 +58,15 @@ Note that the angle :math:`\chi` is computed in radians; hence ---------- +Symmetry convention +""""""""""""""""""" + +For the *amoeba* improper style, the second atom in the quadruplet is the +atom of symmetry; all other atoms are considered interchangeable. This +convention is relevant for operations that require knowledge of how atoms +are ordered, such as automatic assignment of new improper types by +:doc:`fix bond/react `. + Restrictions """""""""""" diff --git a/doc/src/improper_class2.rst b/doc/src/improper_class2.rst index 4804116bb95..4511548eba4 100644 --- a/doc/src/improper_class2.rst +++ b/doc/src/improper_class2.rst @@ -104,6 +104,15 @@ converts them to radians internally; hence the hence the various ---------- +Symmetry convention +""""""""""""""""""" + +For the *class2* improper style, the second atom in the quadruplet is the +atom of symmetry; all other atoms are considered interchangeable. This +convention is relevant for operations that require knowledge of how atoms +are ordered, such as automatic assignment of new improper types by +:doc:`fix bond/react `. + Restrictions """""""""""" diff --git a/doc/src/improper_cossq.rst b/doc/src/improper_cossq.rst index 75c14cbc44c..4345a6ae028 100644 --- a/doc/src/improper_cossq.rst +++ b/doc/src/improper_cossq.rst @@ -60,6 +60,15 @@ commands: ---------- +Symmetry convention +""""""""""""""""""" + +For the *cossq* improper style, the first atom in the quadruplet is the +atom of symmetry; all other atoms are considered interchangeable. This +convention is relevant for operations that require knowledge of how atoms +are ordered, such as automatic assignment of new improper types by +:doc:`fix bond/react `. + Restrictions """""""""""" diff --git a/doc/src/improper_cvff.rst b/doc/src/improper_cvff.rst index 1c44b9a4321..46801cc169d 100644 --- a/doc/src/improper_cvff.rst +++ b/doc/src/improper_cvff.rst @@ -62,6 +62,15 @@ commands: ---------- +Symmetry convention +""""""""""""""""""" + +For the *cvff* improper style, the first atom in the quadruplet is the +atom of symmetry; all other atoms are considered interchangeable. This +convention is relevant for operations that require knowledge of how atoms +are ordered, such as automatic assignment of new improper types by +:doc:`fix bond/react `. + Restrictions """""""""""" diff --git a/doc/src/improper_distance.rst b/doc/src/improper_distance.rst index 73953785c4d..c00becf158c 100644 --- a/doc/src/improper_distance.rst +++ b/doc/src/improper_distance.rst @@ -50,6 +50,15 @@ file or restart files read by the read_data or read_restart commands: ---------- +Symmetry convention +""""""""""""""""""" + +For the *distance* improper style, the first atom in the quadruplet is the +atom of symmetry; all other atoms are considered interchangeable. This +convention is relevant for operations that require knowledge of how atoms +are ordered, such as automatic assignment of new improper types by +:doc:`fix bond/react `. + Restrictions """""""""""" diff --git a/doc/src/improper_distharm.rst b/doc/src/improper_distharm.rst index 0399a5c6e25..53ed16ef0f4 100644 --- a/doc/src/improper_distharm.rst +++ b/doc/src/improper_distharm.rst @@ -44,6 +44,15 @@ file or restart files read by the read_data or read_restart commands: ---------- +Symmetry convention +""""""""""""""""""" + +For the *distharm* improper style, the fourth atom in the quadruplet is the +atom of symmetry; all other atoms are considered interchangeable. This +convention is relevant for operations that require knowledge of how atoms +are ordered, such as automatic assignment of new improper types by +:doc:`fix bond/react `. + Restrictions """""""""""" diff --git a/doc/src/improper_fourier.rst b/doc/src/improper_fourier.rst index bde584fb87c..213603ea42f 100644 --- a/doc/src/improper_fourier.rst +++ b/doc/src/improper_fourier.rst @@ -56,6 +56,15 @@ commands: ---------- +Symmetry convention +""""""""""""""""""" + +For the *fourier* improper style, the first and fourth atoms in the +quadruplet are atoms of symmetry; only the second and third atoms are +considered interchangeable. This convention is relevant for operations +that require knowledge of how atoms are ordered, such as automatic +assignment of new improper types by :doc:`fix bond/react `. + Restrictions """""""""""" diff --git a/doc/src/improper_harmonic.rst b/doc/src/improper_harmonic.rst index 706b8af1de5..9646c982834 100644 --- a/doc/src/improper_harmonic.rst +++ b/doc/src/improper_harmonic.rst @@ -68,6 +68,15 @@ radian\^2. ---------- +Symmetry convention +""""""""""""""""""" + +For the *harmonic* improper style, the first atom in the quadruplet is the +atom of symmetry; all other atoms are considered interchangeable. This +convention is relevant for operations that require knowledge of how atoms +are ordered, such as automatic assignment of new improper types by +:doc:`fix bond/react `. + Restrictions """""""""""" diff --git a/doc/src/improper_inversion_harmonic.rst b/doc/src/improper_inversion_harmonic.rst index 9826ab6218b..ae1bcaf30c8 100644 --- a/doc/src/improper_inversion_harmonic.rst +++ b/doc/src/improper_inversion_harmonic.rst @@ -54,6 +54,15 @@ with a barrier in between. ---------- +Symmetry convention +""""""""""""""""""" + +For the *inversion/harmonic* improper style, the first atom in the +quadruplet is the atom of symmetry; all other atoms are considered +interchangeable. This convention is relevant for operations that require +knowledge of how atoms are ordered, such as automatic assignment of new +improper types by :doc:`fix bond/react `. + Restrictions """""""""""" diff --git a/doc/src/improper_ring.rst b/doc/src/improper_ring.rst index 4bad4c9656b..af16f4f30ee 100644 --- a/doc/src/improper_ring.rst +++ b/doc/src/improper_ring.rst @@ -68,6 +68,15 @@ commands: ---------- +Symmetry convention +""""""""""""""""""" + +For the *ring* improper style, the second atom in the quadruplet is the +atom of symmetry; all other atoms are considered interchangeable. This +convention is relevant for operations that require knowledge of how atoms +are ordered, such as automatic assignment of new improper types by +:doc:`fix bond/react `. + Restrictions """""""""""" diff --git a/doc/src/improper_sqdistharm.rst b/doc/src/improper_sqdistharm.rst index 43f824733ea..bc044ebdc70 100644 --- a/doc/src/improper_sqdistharm.rst +++ b/doc/src/improper_sqdistharm.rst @@ -45,6 +45,15 @@ Note that :math:`{d_0}^2` (in units distance\^2) has be provided and not :math:` ---------- +Symmetry convention +""""""""""""""""""" + +For the *sqdistharm* improper style, the fourth atom in the quadruplet is the +atom of symmetry; all other atoms are considered interchangeable. This +convention is relevant for operations that require knowledge of how atoms +are ordered, such as automatic assignment of new improper types by +:doc:`fix bond/react `. + Restrictions """""""""""" diff --git a/doc/src/improper_umbrella.rst b/doc/src/improper_umbrella.rst index 5d4aa571e18..ee557b03770 100644 --- a/doc/src/improper_umbrella.rst +++ b/doc/src/improper_umbrella.rst @@ -60,6 +60,15 @@ commands: ---------- +Symmetry convention +""""""""""""""""""" + +For the *umbrella* improper style, the first and fourth atoms in the +quadruplet are atoms of symmetry; only the second and third atoms are +considered interchangeable. This convention is relevant for operations +that require knowledge of how atoms are ordered, such as automatic +assignment of new improper types by :doc:`fix bond/react `. + Restrictions """""""""""" diff --git a/doc/utils/sphinx-config/false_positives.txt b/doc/utils/sphinx-config/false_positives.txt index 17b423cc213..63336b4101e 100644 --- a/doc/utils/sphinx-config/false_positives.txt +++ b/doc/utils/sphinx-config/false_positives.txt @@ -3883,6 +3883,7 @@ textrm tfac tfmc tfMC +tga tgnpt tgnvt th diff --git a/examples/GRAPHICS/.gitignore b/examples/GRAPHICS/.gitignore new file mode 100644 index 00000000000..06a65f14649 --- /dev/null +++ b/examples/GRAPHICS/.gitignore @@ -0,0 +1,10 @@ +*.png +*.tga +*.ppm +*.mp4 +*.mkv +*.avi +*.mpg +*.mpeg +*.jpg +*.jpeg diff --git a/examples/GRAPHICS/README b/examples/GRAPHICS/README index 448fa166e77..138701e5e95 100644 --- a/examples/GRAPHICS/README +++ b/examples/GRAPHICS/README @@ -10,5 +10,6 @@ automatically as they are created. Here is a list of the inputs and which graphics features they demonstrate -- in.cubes-and-pyramids: visualization of body particles +- in.cubes-and-pyramids: visualization of body particles, uses progress bar - in.breakable: using autobond, color-by-property, adding objects and text +- in.water-arrows: box of water molecules, uses many kinds of arrows diff --git a/examples/GRAPHICS/data.cubes-and-pyramids b/examples/GRAPHICS/data.cubes-and-pyramids index 282a730ed86..2a6d697f6bb 100644 --- a/examples/GRAPHICS/data.cubes-and-pyramids +++ b/examples/GRAPHICS/data.cubes-and-pyramids @@ -1,7 +1,7 @@ LAMMPS data file for polygons: cubes, moment of inertia I = m edge^2/ 6 2 atoms 2 bodies -1 atom types +2 atom types 0 6 xlo xhi 0 6 ylo yhi 0 6 zlo zhi @@ -9,7 +9,7 @@ LAMMPS data file for polygons: cubes, moment of inertia I = m edge^2/ 6 Atoms 1 1 1 1 1.5 1.5 1.5 -2 1 1 1 4.0 4.0 4.0 +2 2 1 1 4.0 4.0 4.0 Bodies diff --git a/examples/GRAPHICS/h2o.mol b/examples/GRAPHICS/h2o.mol new file mode 100644 index 00000000000..97a31de69dc --- /dev/null +++ b/examples/GRAPHICS/h2o.mol @@ -0,0 +1,62 @@ +# Water molecule. SPC/E + +3 atoms +2 bonds +1 angles + +Coords + +1 1.12456 0.09298 1.27452 +2 1.53683 0.75606 1.89928 +3 0.49482 0.56390 0.65678 + +Types + +1 1 +2 2 +3 2 + +Charges + +1 -0.8472 +2 0.4236 +3 0.4236 + +Bonds + +1 1 1 2 +2 1 1 3 + +Angles + +1 1 2 1 3 + +Shake Flags + +1 1 +2 1 +3 1 + +Shake Atoms + +1 1 2 3 +2 1 2 3 +3 1 2 3 + +Shake Bond Types + +1 1 1 1 +2 1 1 1 +3 1 1 1 + +Special Bond Counts + +1 2 0 0 +2 1 1 0 +3 1 1 0 + +Special Bonds + +1 2 3 +2 1 3 +3 1 2 diff --git a/examples/GRAPHICS/in.breakable b/examples/GRAPHICS/in.breakable index ab94c6a755f..d483a000313 100644 --- a/examples/GRAPHICS/in.breakable +++ b/examples/GRAPHICS/in.breakable @@ -86,9 +86,17 @@ fix labels all graphics/labels 500 text "LAMMPS Tutorial 2 - Stretching CNT usi text "Atoms with bonds 1: $(c_count[1]) 2: $(c_count[2]) 3: $(c_count[3]) 4: $(c_count[4])" & 32.5 7.5 5.0 size 24 fontcolor white backcolor silver -dump viz all image 500 myimage.*.png c_nbond type size 1600 300 zoom 12.5 shiny 0.2 autobond 1.8 0.4 & +dump viz all image 500 breakable.*.png c_nbond type size 1600 300 zoom 12.5 shiny 0.2 autobond 1.8 0.4 & adiam 0.8 box no 0.01 view 0 90 fsaa yes ssao yes 1325123 0.6 axes yes 0.5 0.1 & fix arrows const 0 0 fix labels const 0 0 fix vel const 0 0 + +# comment out the dump image command above and uncomment the lines below to create a movie +# +#dump viz all movie 500 breakable.mp4 c_nbond type size 1600 300 zoom 12.5 shiny 0.2 autobond 1.8 0.4 & +# adiam 0.8 box no 0.01 view 0 90 fsaa yes ssao yes 1325123 0.6 axes yes 0.5 0.1 & +# fix arrows const 0 0 fix labels const 0 0 fix vel const 0 0 +#dump_modify viz framerate 8 + dump_modify viz pad 5 backcolor darkgray backcolor2 gray & fcolor arrows firebrick fcolor vel midnightblue acolor 1 lightslategray & amap 0 5 sa 1 5 midnightblue royalblue cadetblue lightslategray blue diff --git a/examples/GRAPHICS/in.cubes-and-pyramids b/examples/GRAPHICS/in.cubes-and-pyramids index f260fe1a852..bd924e73954 100644 --- a/examples/GRAPHICS/in.cubes-and-pyramids +++ b/examples/GRAPHICS/in.cubes-and-pyramids @@ -1,17 +1,19 @@ # 3d rounded cubes and tetragonal pyramids -variable r index 3 -variable steps index 1000 +variable r index 4 +variable steps index 10050 +variable out index 100 # graphics output every this many steps units lj dimension 3 boundary p p p atom_style body rounded/polyhedron 1 10 +read_data data.cubes-and-pyramids extra/atom/types 2 -read_data data.cubes-and-pyramids extra/atom/types 1 - -set atom 2 type 2 +# data file consists of one cube "atom" and one pyramid "atom" +# the cube is atom type 1 the pyramid atom type 2 +# add two atom types so we can set colors for the progress bar replicate $r $r $r @@ -35,18 +37,22 @@ neigh_modify every 1 delay 0 check yes timestep 0.001 -fix 1 all npt/body temp 1.2 1.2 0.1 iso 0.02 0.2 1.0 - +fix 1 all npt/body temp 1.2 1.2 0.1 iso 0.02 0.05 1.0 compute p2 all pressure 1_temp - -dump 2 all image 1000 image-bodies.*.png type type size 600 600 shiny 0.4 box yes 0.025 & - zoom 2.0 view 80 15 fsaa yes ssao yes 315123 0.8 body type 0.2 3 - -dump_modify 2 pad 6 backcolor darkgray backcolor2 gray boxcolor silver & - acolor 1 steelblue acolor 2 orange thermo_style custom step ke pe etotal c_p2 c_1_temp - thermo 1000 +variable progress equal step/v_steps +fix pbar all graphics/objects ${out} progbar 3 4 y 24.0 12.0 -1.4 30.0 0.5 v_progress 10 + +dump 2 all image ${out} cubes-and-pyramids.*.png type type size 600 600 shiny 0.4 & + box yes 0.025 axes no 0.5 0.1 zoom 1.5 view 80 0 fsaa yes ssao yes 315123 0.4 & + body type 0.2 3 fix pbar type 0 0 +# set cylinder diameter--^ ^-- set viz style (1 only faces, 2 cylinders, 3 both) +dump_modify 2 pad 6 backcolor darkgray backcolor2 gray boxcolor white & + acolor 1 steelblue acolor 2 orange acolor 3 slategray acolor 4 red +# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +# || colors for progress bar || + run ${steps} diff --git a/examples/GRAPHICS/in.water-arrows b/examples/GRAPHICS/in.water-arrows new file mode 100644 index 00000000000..8b9acfb99b4 --- /dev/null +++ b/examples/GRAPHICS/in.water-arrows @@ -0,0 +1,71 @@ +units real +atom_style full +region box block -5 5 -5 5 -5 5 +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 + +mass 1 15.9994 +mass 2 1.008 + +pair_style lj/cut/coul/cut 8.0 +pair_coeff 1 1 0.1553 3.166 +pair_coeff 2 2 0.0 1.0 + +bond_style zero +bond_coeff 1 1.0 + +angle_style zero +angle_coeff 1 109.47 + +# load SPC/E water and fill box +molecule water h2o.mol +create_atoms 0 random 50 34564 NULL mol water 25367 overlap 1.33 + +fix rigid all shake 0.001 10 10000 b 1 a 1 +minimize 0.0 0.0 1000 10000 + +reset_timestep 0 +timestep 1.0 +velocity all create 300.0 5463576 +unfix rigid +fix integrate all nvt temp 300 300 100.0 +fix rigid all shake 0.001 10 10000 b 1 a 1 + +# add yellow arrows showing the molecular dipole moment at the COM of the water molecules +compute molchunk all chunk/atom molecule +compute cpos all com/chunk molchunk wrap yes +compute cdip all dipole/chunk molchunk +fix vec all graphics/arrows 10 chunk molchunk cpos cdip 3 0.1 + +# add light blue and transparent arrows to atoms showing the atomic velocity +fix vel all graphics/arrows 10 velocity 50.0 0.066 autoscale 0.5 + +# add purple arrows to 8 spatial bins in 3d showing the dipole per bin +compute binchunk all chunk/atom bin/3d x lower 5.0 y lower 5.0 z lower 5.0 +compute bpos all property/chunk binchunk coord1 coord2 coord3 +compute bdip all dipole/chunk binchunk +fix bin all graphics/arrows 10 chunk binchunk bpos bdip 3 0.2 autoscale 2.0 + +# add green arrow to the center of the box showing the total dipole moment of the system +compute dip all dipole +variable scale equal 0.66 +# convert dipole vector component to bottom and tip coordinates of arrow +variable dip1x equal -v_scale*c_dip[1] +variable dip1y equal -v_scale*c_dip[2] +variable dip1z equal -v_scale*c_dip[3] +variable dip2x equal v_scale*c_dip[1] +variable dip2y equal v_scale*c_dip[2] +variable dip2z equal v_scale*c_dip[3] +fix dipole all graphics/objects 1 arrow 1 v_dip1x v_dip1y v_dip1z v_dip2x v_dip2y v_dip2z 0.3 0.2 + +dump viz all image 10 water-arrows-*.png element type size 600 600 zoom 1.3 shiny 0.2 bond atom 0.2 & + view 70 20 box yes 0.025 fsaa yes ssao yes 315465 0.8 & + fix dipole const 0 0 fix vec const 0 0 fix vel const 0 0 fix bin const 0 0 +# all arrows from fixes use the "const" style so we set the color with dump_modify below +dump_modify viz pad 9 boxcolor silver backcolor gray backcolor2 darkgray element O H adiam 1 0.5 adiam 2 0.3 bdiam 1 0.2 & + fcolor dipole forestgreen fcolor vec goldenrod fcolor vel cyan ftrans vel 0.5 fcolor bin orchid + +thermo_style custom step temp press etotal pe + +thermo 100 +run 1000 diff --git a/examples/PACKAGES/reaction/create_atoms_polystyrene/in.grow_styrene b/examples/PACKAGES/reaction/create_atoms_polystyrene/in.grow_styrene index b11218467d1..187e73b928e 100644 --- a/examples/PACKAGES/reaction/create_atoms_polystyrene/in.grow_styrene +++ b/examples/PACKAGES/reaction/create_atoms_polystyrene/in.grow_styrene @@ -41,6 +41,7 @@ fix 1 statted_grp_REACT nvt temp $T $T 100 fix 4 bond_react_MASTER_group temp/rescale 1 $T $T 1 1 thermo_style custom step temp press density f_myrxns[*] +thermo_modify colname auto thermo 100 diff --git a/examples/PACKAGES/reaction/create_atoms_polystyrene/log.10Dec2025.grow_styrene.g++.1 b/examples/PACKAGES/reaction/create_atoms_polystyrene/log.10Dec2025.grow_styrene.g++.1 new file mode 100644 index 00000000000..5c72021c592 --- /dev/null +++ b/examples/PACKAGES/reaction/create_atoms_polystyrene/log.10Dec2025.grow_styrene.g++.1 @@ -0,0 +1,286 @@ +LAMMPS (10 Dec 2025 - Development - patch_10Dec2025-120-ga51f9ba0e7-modified) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. + using 1 OpenMP thread(s) per MPI task +# use bond/react 'create atoms' feature to add 30 new styrene monomers to chain + +units real + +boundary p p p + +atom_style full + +pair_style lj/class2/coul/cut 8.5 + +angle_style class2 + +bond_style class2 + +dihedral_style class2 + +improper_style class2 + +special_bonds lj/coul 0 0 1 +pair_modify tail yes mix sixthpower + +variable T equal 530 + +read_data trimer.data extra/bond/per/atom 5 extra/angle/per/atom 15 extra/dihedral/per/atom 15 extra/improper/per/atom 25 extra/special/per/atom 25 +Reading data file ... + orthogonal box = (-200 -200 -200) to (200 200 200) + 1 by 1 by 1 MPI processor grid + reading atom labelmap ... + reading bond labelmap ... + reading angle labelmap ... + reading dihedral labelmap ... + reading improper labelmap ... + reading atoms ... + 48 atoms + scanning bonds ... + 8 = max bonds/atom + scanning angles ... + 21 = max angles/atom + scanning dihedrals ... + 33 = max dihedrals/atom + scanning impropers ... + 26 = max impropers/atom + orthogonal box = (-200 -200 -200) to (200 200 200) + 1 by 1 by 1 MPI processor grid + reading bonds ... + 50 bonds + reading angles ... + 84 angles + reading dihedrals ... + 127 dihedrals + reading impropers ... + 20 impropers +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 1 + special bond factors coul: 0 0 1 + 4 = max # of 1-2 neighbors + 8 = max # of 1-3 neighbors + 37 = max # of special neighbors + special bonds CPU = 0.001 seconds + read_data CPU = 0.012 seconds + +molecule mol1 grow_styrene_pre.molecule_template +Read molecule template mol1: +molecule template: end of styrene chain + 1 molecules + 0 fragments + 0 bodies + 30 atoms with max type 4 + 31 bonds with max type 6 + 51 angles with max type 10 + 73 dihedrals with max type 13 + 13 impropers with max type 3 +molecule mol2 grow_styrene_post.molecule_template +Read molecule template mol2: +molecule template: end of chain plus polymerized styrene + 1 molecules + 1 fragments + 0 bodies + 46 atoms with max type 4 + 48 bonds with max type 6 + 81 angles with max type 10 + 121 dihedrals with max type 13 + 19 impropers with max type 3 + +fix myrxns all bond/react stabilization yes statted_grp .03 max_rxn rxn1 30 react rxn1 all 1 0 3.0 mol1 mol2 grow_styrene.map modify_create fit create_fit overlap 2.0 stabilize_steps 200 +dynamic group bond_react_MASTER_group defined +dynamic group statted_grp_REACT defined + +fix 1 statted_grp_REACT nvt temp $T $T 100 +fix 1 statted_grp_REACT nvt temp 530 $T 100 +fix 1 statted_grp_REACT nvt temp 530 530 100 + +fix 4 bond_react_MASTER_group temp/rescale 1 $T $T 1 1 +fix 4 bond_react_MASTER_group temp/rescale 1 530 $T 1 1 +fix 4 bond_react_MASTER_group temp/rescale 1 530 530 1 1 + +thermo_style custom step temp press density f_myrxns[*] +thermo_modify colname auto + +thermo 100 + +run 8000 + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Your simulation uses code contributions which should be cited: + +- Type Label Framework: https://doi.org/10.1021/acs.jpcb.3c08419 + +@Article{Gissinger24, + author = {Jacob R. Gissinger, Ilia Nikiforov, Yaser Afshar, Brendon Waters, Moon-ki Choi, Daniel S. Karls, Alexander Stukowski, Wonpil Im, Hendrik Heinz, Axel Kohlmeyer, and Ellad B. Tadmor}, + title = {Type Label Framework for Bonded Force Fields in LAMMPS}, + journal = {J. Phys. Chem. B}, + year = 2024, + volume = 128, + number = 13, + pages = {3282--3297} +} + +- fix bond/react: https://reacter.org, https://doi.org/10.1016/j.polymer.2017.09.038, https://doi.org/10.1021/acs.macromol.0c02012, https://doi.org/10.1016/j.cpc.2024.109287 + +@Article{Gissinger17, + author = {J. R. Gissinger and B. D. Jensen and K. E. Wise}, + title = {Modeling Chemical Reactions in Classical Molecular Dynamics Simulations}, + journal = {Polymer}, + year = 2017, + volume = 128, + pages = {211--217} +} + +@Article{Gissinger20, + author = {J. R. Gissinger, B. D. Jensen, K. E. Wise}, + title = {{REACTER}: A Heuristic Method for Reactive Molecular Dynamics}, + journal = {Macromolecules}, + year = 2020, + volume = 53, + number = 22, + pages = {9953--9961} +} + +@Article{Gissinger24, + author = {J. R. Gissinger, B. D. Jensen, K. E. Wise}, + title = {Molecular Modeling of Reactive Systems with REACTER}, + journal = {Computer Physics Communications}, + year = 2024, + volume = 304, + number = 109287 +} + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Generated 6 of 6 mixed pair_coeff terms from sixthpower/sixthpower mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 10.5 + ghost atom cutoff = 10.5 + binsize = 5.25, bins = 77 77 77 + 2 neighbor lists, perpetual/occasional/extra = 1 1 0 + (1) pair lj/class2/coul/cut, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard + (2) fix bond/react, occasional, copy from (1) + attributes: half, newton on + pair build: copy + stencil: none + bin: none +Per MPI rank memory allocation (min/avg/max) = 35.42 | 35.42 | 35.42 Mbytes + Step Temp Press Density f_myrxns:rxn1 + 0 0 0.21036486 8.1070333e-06 0 + 100 669.41828 -0.06522004 1.0809378e-05 1 + 200 810.61811 0.16653153 1.0809378e-05 1 + 300 979.75657 -0.18821269 1.3511722e-05 2 + 400 919.06178 0.18888268 1.3511722e-05 2 + 500 1073.2111 -0.05552341 1.6214067e-05 3 + 600 1209.2729 -0.023867658 1.6214067e-05 3 + 700 1209.2769 -0.13210938 1.8916411e-05 4 + 800 1105.7435 0.33543549 1.8916411e-05 4 + 900 1379.2995 -0.16738078 2.1618755e-05 5 + 1000 1497.2545 0.30469745 2.1618755e-05 5 + 1100 1570.2322 -0.18779292 2.43211e-05 6 + 1200 1404.9484 0.093232839 2.43211e-05 6 + 1300 1597.0114 -0.29167688 2.7023444e-05 7 + 1400 1952.242 0.088701912 2.7023444e-05 7 + 1500 2370.5895 -0.30387029 2.9725789e-05 8 + 1600 2161.0068 0.47070982 2.9725789e-05 8 + 1700 1883.9239 -0.043243365 2.9725789e-05 8 + 1800 1908.3245 -0.25438515 2.9725789e-05 8 + 1900 1908.634 -0.20282804 2.9725789e-05 8 + 2000 2430.8224 0.087176462 3.2428133e-05 9 + 2100 2056.5849 0.0083499583 3.2428133e-05 9 + 2200 2097.9415 -0.053922765 3.2428133e-05 9 + 2300 2159.7927 0.076341918 3.2428133e-05 9 + 2400 2124.7187 0.23586127 3.2428133e-05 9 + 2500 2329.9574 -0.053180845 3.2428133e-05 9 + 2600 2377.7934 0.30029788 3.5130478e-05 10 + 2700 2590.7324 0.055672735 3.5130478e-05 10 + 2800 2559.4384 -0.24447165 3.7832822e-05 11 + 2900 2426.0972 0.12668615 3.7832822e-05 11 + 3000 2274.4138 0.20100298 3.7832822e-05 11 + 3100 2531.1841 -0.49947151 3.7832822e-05 11 + 3200 2462.9533 0.18685311 3.7832822e-05 11 + 3300 2743.1381 0.1622706 4.0535167e-05 12 + 3400 2578.1278 -0.30624132 4.0535167e-05 12 + 3500 2652.0764 -0.08282447 4.3237511e-05 13 + 3600 3167.3853 0.53177076 4.3237511e-05 13 + 3700 2914.8409 -0.23466307 4.3237511e-05 13 + 3800 3106.4567 -0.20289812 4.5939855e-05 14 + 3900 3205.9048 0.28374129 4.5939855e-05 14 + 4000 3107.5869 0.17653682 4.86422e-05 15 + 4100 3312.6495 -0.29852987 4.86422e-05 15 + 4200 3465.5089 0.4170018 5.1344544e-05 16 + 4300 3526.6386 -0.29860187 5.1344544e-05 16 + 4400 3537.3718 0.39552935 5.4046889e-05 17 + 4500 3311.6752 0.42863783 5.4046889e-05 17 + 4600 3768.6489 0.057105783 5.4046889e-05 17 + 4700 3712.4921 0.14610168 5.4046889e-05 17 + 4800 3643.74 -0.019179866 5.4046889e-05 17 + 4900 3909.9273 -0.19837831 5.4046889e-05 17 + 5000 3424.1929 -0.19687254 5.4046889e-05 17 + 5100 3638.7272 0.023098915 5.4046889e-05 17 + 5200 3977.7753 -21.300861 5.6749233e-05 18 + 5300 3789.8492 -0.29052086 5.6749233e-05 18 + 5400 3851.8855 -25.667572 5.9451578e-05 19 + 5500 4249.6071 -0.098293434 5.9451578e-05 19 + 5600 4227.2995 -32.442609 6.2153922e-05 20 + 5700 3694.6934 -0.43073896 6.2153922e-05 20 + 5800 4377.0212 -40.153256 6.4856266e-05 21 + 5900 4120.1922 -0.1463163 6.4856266e-05 21 + 6000 4432.7761 0.16849673 6.4856266e-05 21 + 6100 4891.5369 -0.44463951 6.7558611e-05 22 + 6200 4551.7134 0.2553738 6.7558611e-05 22 + 6300 4994.5563 -0.33818677 7.0260955e-05 23 + 6400 4605.13 0.030650036 7.0260955e-05 23 + 6500 4923.9092 0.26859512 7.29633e-05 24 + 6600 4381.1447 0.105865 7.29633e-05 24 + 6700 5160.2669 0.12291792 7.5665644e-05 25 + 6800 4827.7692 -0.091323348 7.5665644e-05 25 + 6900 5165.0651 -0.09122705 7.8367989e-05 26 + 7000 5100.5875 0.66782952 7.8367989e-05 26 + 7100 5677.4541 -1.2456176 8.1070333e-05 27 + 7200 5269.9087 0.41945706 8.1070333e-05 27 + 7300 5414.2367 -3.8565876 8.3772677e-05 28 + 7400 5606.9052 -0.15544319 8.3772677e-05 28 + 7500 6095.8331 -11.972753 8.6475022e-05 29 + 7600 5538.6838 0.58381658 8.6475022e-05 29 + 7700 5787.4745 -15.353718 8.9177366e-05 30 + 7800 5896.8481 -0.69028693 8.9177366e-05 30 + 7900 6179.4849 -0.15539493 8.9177366e-05 30 + 8000 5787.3226 0.10676828 8.9177366e-05 30 +Loop time of 6.40163 on 1 procs for 8000 steps with 528 atoms + +Performance: 107.972 ns/day, 0.222 hours/ns, 1249.681 timesteps/s, 659.831 katom-step/s +97.9% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 1.5815 | 1.5815 | 1.5815 | 0.0 | 24.70 +Bond | 3.4024 | 3.4024 | 3.4024 | 0.0 | 53.15 +Neigh | 1.0565 | 1.0565 | 1.0565 | 0.0 | 16.50 +Comm | 0.034309 | 0.034309 | 0.034309 | 0.0 | 0.54 +Output | 0.00093476 | 0.00093476 | 0.00093476 | 0.0 | 0.01 +Modify | 0.28082 | 0.28082 | 0.28082 | 0.0 | 4.39 +Other | | 0.04521 | | | 0.71 + +Nlocal: 528 ave 528 max 528 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 0 ave 0 max 0 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 35649 ave 35649 max 35649 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 35649 +Ave neighs/atom = 67.517045 +Ave special neighs/atom = 11.215909 +Neighbor list builds = 2170 +Dangerous builds = 0 + +# write_data final.data nofix +Total wall time: 0:00:06 diff --git a/examples/PACKAGES/reaction/create_atoms_polystyrene/log.10Dec2025.grow_styrene.g++.4 b/examples/PACKAGES/reaction/create_atoms_polystyrene/log.10Dec2025.grow_styrene.g++.4 new file mode 100644 index 00000000000..6460052377c --- /dev/null +++ b/examples/PACKAGES/reaction/create_atoms_polystyrene/log.10Dec2025.grow_styrene.g++.4 @@ -0,0 +1,286 @@ +LAMMPS (10 Dec 2025 - Development - patch_10Dec2025-120-ga51f9ba0e7-modified) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. + using 1 OpenMP thread(s) per MPI task +# use bond/react 'create atoms' feature to add 30 new styrene monomers to chain + +units real + +boundary p p p + +atom_style full + +pair_style lj/class2/coul/cut 8.5 + +angle_style class2 + +bond_style class2 + +dihedral_style class2 + +improper_style class2 + +special_bonds lj/coul 0 0 1 +pair_modify tail yes mix sixthpower + +variable T equal 530 + +read_data trimer.data extra/bond/per/atom 5 extra/angle/per/atom 15 extra/dihedral/per/atom 15 extra/improper/per/atom 25 extra/special/per/atom 25 +Reading data file ... + orthogonal box = (-200 -200 -200) to (200 200 200) + 1 by 2 by 2 MPI processor grid + reading atom labelmap ... + reading bond labelmap ... + reading angle labelmap ... + reading dihedral labelmap ... + reading improper labelmap ... + reading atoms ... + 48 atoms + scanning bonds ... + 8 = max bonds/atom + scanning angles ... + 21 = max angles/atom + scanning dihedrals ... + 33 = max dihedrals/atom + scanning impropers ... + 26 = max impropers/atom + orthogonal box = (-200 -200 -200) to (200 200 200) + 1 by 2 by 2 MPI processor grid + reading bonds ... + 50 bonds + reading angles ... + 84 angles + reading dihedrals ... + 127 dihedrals + reading impropers ... + 20 impropers +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 1 + special bond factors coul: 0 0 1 + 4 = max # of 1-2 neighbors + 8 = max # of 1-3 neighbors + 37 = max # of special neighbors + special bonds CPU = 0.000 seconds + read_data CPU = 0.008 seconds + +molecule mol1 grow_styrene_pre.molecule_template +Read molecule template mol1: +molecule template: end of styrene chain + 1 molecules + 0 fragments + 0 bodies + 30 atoms with max type 4 + 31 bonds with max type 6 + 51 angles with max type 10 + 73 dihedrals with max type 13 + 13 impropers with max type 3 +molecule mol2 grow_styrene_post.molecule_template +Read molecule template mol2: +molecule template: end of chain plus polymerized styrene + 1 molecules + 1 fragments + 0 bodies + 46 atoms with max type 4 + 48 bonds with max type 6 + 81 angles with max type 10 + 121 dihedrals with max type 13 + 19 impropers with max type 3 + +fix myrxns all bond/react stabilization yes statted_grp .03 max_rxn rxn1 30 react rxn1 all 1 0 3.0 mol1 mol2 grow_styrene.map modify_create fit create_fit overlap 2.0 stabilize_steps 200 +dynamic group bond_react_MASTER_group defined +dynamic group statted_grp_REACT defined + +fix 1 statted_grp_REACT nvt temp $T $T 100 +fix 1 statted_grp_REACT nvt temp 530 $T 100 +fix 1 statted_grp_REACT nvt temp 530 530 100 + +fix 4 bond_react_MASTER_group temp/rescale 1 $T $T 1 1 +fix 4 bond_react_MASTER_group temp/rescale 1 530 $T 1 1 +fix 4 bond_react_MASTER_group temp/rescale 1 530 530 1 1 + +thermo_style custom step temp press density f_myrxns[*] +thermo_modify colname auto + +thermo 100 + +run 8000 + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Your simulation uses code contributions which should be cited: + +- Type Label Framework: https://doi.org/10.1021/acs.jpcb.3c08419 + +@Article{Gissinger24, + author = {Jacob R. Gissinger, Ilia Nikiforov, Yaser Afshar, Brendon Waters, Moon-ki Choi, Daniel S. Karls, Alexander Stukowski, Wonpil Im, Hendrik Heinz, Axel Kohlmeyer, and Ellad B. Tadmor}, + title = {Type Label Framework for Bonded Force Fields in LAMMPS}, + journal = {J. Phys. Chem. B}, + year = 2024, + volume = 128, + number = 13, + pages = {3282--3297} +} + +- fix bond/react: https://reacter.org, https://doi.org/10.1016/j.polymer.2017.09.038, https://doi.org/10.1021/acs.macromol.0c02012, https://doi.org/10.1016/j.cpc.2024.109287 + +@Article{Gissinger17, + author = {J. R. Gissinger and B. D. Jensen and K. E. Wise}, + title = {Modeling Chemical Reactions in Classical Molecular Dynamics Simulations}, + journal = {Polymer}, + year = 2017, + volume = 128, + pages = {211--217} +} + +@Article{Gissinger20, + author = {J. R. Gissinger, B. D. Jensen, K. E. Wise}, + title = {{REACTER}: A Heuristic Method for Reactive Molecular Dynamics}, + journal = {Macromolecules}, + year = 2020, + volume = 53, + number = 22, + pages = {9953--9961} +} + +@Article{Gissinger24, + author = {J. R. Gissinger, B. D. Jensen, K. E. Wise}, + title = {Molecular Modeling of Reactive Systems with REACTER}, + journal = {Computer Physics Communications}, + year = 2024, + volume = 304, + number = 109287 +} + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Generated 6 of 6 mixed pair_coeff terms from sixthpower/sixthpower mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 10.5 + ghost atom cutoff = 10.5 + binsize = 5.25, bins = 77 77 77 + 2 neighbor lists, perpetual/occasional/extra = 1 1 0 + (1) pair lj/class2/coul/cut, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard + (2) fix bond/react, occasional, copy from (1) + attributes: half, newton on + pair build: copy + stencil: none + bin: none +Per MPI rank memory allocation (min/avg/max) = 33.79 | 33.99 | 34.57 Mbytes + Step Temp Press Density f_myrxns:rxn1 + 0 0 0.21036486 8.1070333e-06 0 + 100 671.99491 -0.040832566 1.0809378e-05 1 + 200 815.53585 0.16195456 1.0809378e-05 1 + 300 972.57557 -0.31684828 1.3511722e-05 2 + 400 1037.8793 0.28551039 1.3511722e-05 2 + 500 1073.6645 0.0037129406 1.6214067e-05 3 + 600 1086.433 0.022203019 1.6214067e-05 3 + 700 1011.575 -14.41751 1.8916411e-05 4 + 800 1276.5177 -0.30044572 1.8916411e-05 4 + 900 1772.3926 -19.01301 2.1618755e-05 5 + 1000 1633.2879 -0.12593171 2.1618755e-05 5 + 1100 1546.1631 -24.257634 2.43211e-05 6 + 1200 1663.9422 0.11893631 2.43211e-05 6 + 1300 1985.3802 -30.50461 2.7023444e-05 7 + 1400 1777.1248 -0.011469801 2.7023444e-05 7 + 1500 1911.7457 -36.752053 2.9725789e-05 8 + 1600 1872.8765 0.3211445 2.9725789e-05 8 + 1700 2222.2672 -44.666898 3.2428133e-05 9 + 1800 2199.8082 0.1719691 3.2428133e-05 9 + 1900 2541.3458 -56.492997 3.5130478e-05 10 + 2000 2345.9928 -0.16710997 3.5130478e-05 10 + 2100 2555.6481 -66.964663 3.7832822e-05 11 + 2200 2646.8489 0.015542429 3.7832822e-05 11 + 2300 2571.5609 0.51077446 3.7832822e-05 11 + 2400 2638.3228 -0.42501856 4.0535167e-05 12 + 2500 2939.2719 -0.13365666 4.0535167e-05 12 + 2600 2550.1782 -0.0014617028 4.3237511e-05 13 + 2700 2819.7157 -0.095752113 4.3237511e-05 13 + 2800 3158.648 -0.1548828 4.5939855e-05 14 + 2900 3267.0696 -0.15769637 4.5939855e-05 14 + 3000 3119.2853 -0.3295428 4.86422e-05 15 + 3100 3414.5332 -0.32231861 4.86422e-05 15 + 3200 3445.4208 0.12037818 5.1344544e-05 16 + 3300 3283.7065 0.26308172 5.1344544e-05 16 + 3400 3640.7258 0.021959462 5.4046889e-05 17 + 3500 3588.3485 -0.0022063063 5.4046889e-05 17 + 3600 3671.4798 -47.993738 5.6749233e-05 18 + 3700 3600.5468 -0.31200996 5.6749233e-05 18 + 3800 3909.9272 0.27689629 5.6749233e-05 18 + 3900 4033.4421 0.051226646 5.9451578e-05 19 + 4000 3881.4736 -0.49244344 5.9451578e-05 19 + 4100 4598.6578 0.26883958 6.2153922e-05 20 + 4200 4171.3083 -0.32344248 6.2153922e-05 20 + 4300 4256.9502 0.52348579 6.4856266e-05 21 + 4400 4338.0894 -0.38836904 6.4856266e-05 21 + 4500 4574.9893 0.028212285 6.4856266e-05 21 + 4600 4374.5487 -0.069343397 6.7558611e-05 22 + 4700 4216.8511 0.36738449 6.7558611e-05 22 + 4800 4424.3281 -0.23687362 7.0260955e-05 23 + 4900 4822.1144 -0.21266153 7.0260955e-05 23 + 5000 4684.874 -0.42990731 7.29633e-05 24 + 5100 4825.1153 -0.49929897 7.29633e-05 24 + 5200 4843.7315 -1.0340467 7.5665644e-05 25 + 5300 4650.4044 0.11725763 7.5665644e-05 25 + 5400 5236.5551 -0.60025579 7.8367989e-05 26 + 5500 5544.1803 -0.30555576 7.8367989e-05 26 + 5600 5237.7393 -1.010772 8.1070333e-05 27 + 5700 5263.0968 -0.39405014 8.1070333e-05 27 + 5800 5828.7019 -2.3283355 8.3772677e-05 28 + 5900 5279.7544 0.0088167221 8.3772677e-05 28 + 6000 5394.375 -3.6212362 8.6475022e-05 29 + 6100 5584.8701 0.57866253 8.6475022e-05 29 + 6200 5807.6669 -4.7592289 8.9177366e-05 30 + 6300 6086.8486 0.40891374 8.9177366e-05 30 + 6400 6006.2712 -0.089980295 8.9177366e-05 30 + 6500 5648.3669 -0.015263393 8.9177366e-05 30 + 6600 5758.5253 -0.81759772 8.9177366e-05 30 + 6700 6074.6226 0.3834391 8.9177366e-05 30 + 6800 6155.1442 0.39085109 8.9177366e-05 30 + 6900 6170.0942 -0.15934354 8.9177366e-05 30 + 7000 5672.8637 0.48943879 8.9177366e-05 30 + 7100 5625.9352 0.1431848 8.9177366e-05 30 + 7200 5774.49 -0.24478725 8.9177366e-05 30 + 7300 5667.2145 0.2235811 8.9177366e-05 30 + 7400 5911.2168 -0.32460041 8.9177366e-05 30 + 7500 5893.8407 -0.41412125 8.9177366e-05 30 + 7600 6269.1936 -0.14596531 8.9177366e-05 30 + 7700 6382.5545 0.53902432 8.9177366e-05 30 + 7800 5763.4975 -0.2294707 8.9177366e-05 30 + 7900 5668.2763 0.69503362 8.9177366e-05 30 + 8000 5891.4935 0.055143451 8.9177366e-05 30 +Loop time of 6.23253 on 4 procs for 8000 steps with 528 atoms + +Performance: 110.902 ns/day, 0.216 hours/ns, 1283.588 timesteps/s, 677.734 katom-step/s +99.6% 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.00035774 | 0.41759 | 1.6693 | 111.8 | 6.70 +Bond | 0.00074008 | 0.99755 | 3.9878 | 172.9 | 16.01 +Neigh | 0.31112 | 0.31135 | 0.31154 | 0.0 | 5.00 +Comm | 0.0077756 | 0.0081192 | 0.0084118 | 0.3 | 0.13 +Output | 0.00064192 | 0.00075544 | 0.0010767 | 0.0 | 0.01 +Modify | 0.24677 | 4.4896 | 5.9041 | 115.6 | 72.03 +Other | | 0.007581 | | | 0.12 + +Nlocal: 132 ave 528 max 0 min +Histogram: 3 0 0 0 0 0 0 0 0 1 +Nghost: 0 ave 0 max 0 min +Histogram: 4 0 0 0 0 0 0 0 0 0 +Neighs: 8275.75 ave 33103 max 0 min +Histogram: 3 0 0 0 0 0 0 0 0 1 + +Total # of neighbors = 33103 +Ave neighs/atom = 62.695076 +Ave special neighs/atom = 11.215909 +Neighbor list builds = 744 +Dangerous builds = 0 + +# write_data final.data nofix +Total wall time: 0:00:06 diff --git a/examples/PACKAGES/reaction/create_atoms_polystyrene/log.4Nov2022.grow_styrene.g++.1 b/examples/PACKAGES/reaction/create_atoms_polystyrene/log.4Nov2022.grow_styrene.g++.1 deleted file mode 100644 index fb9b22d1344..00000000000 --- a/examples/PACKAGES/reaction/create_atoms_polystyrene/log.4Nov2022.grow_styrene.g++.1 +++ /dev/null @@ -1,256 +0,0 @@ -LAMMPS (4 Nov 2022) -# use bond/react 'create atoms' feature to add 30 new styrene monomers to chain - -units real - -boundary p p p - -atom_style full - -pair_style lj/class2/coul/cut 8.5 - -angle_style class2 - -bond_style class2 - -dihedral_style class2 - -improper_style class2 - -variable T equal 530 - -read_data trimer.data extra/bond/per/atom 5 extra/angle/per/atom 15 extra/dihedral/per/atom 15 extra/improper/per/atom 25 extra/special/per/atom 25 -Reading data file ... - orthogonal box = (-200 -200 -200) to (200 200 200) - 1 by 1 by 1 MPI processor grid - reading atom labelmap ... - reading bond labelmap ... - reading angle labelmap ... - reading dihedral labelmap ... - reading improper labelmap ... - reading atoms ... - 48 atoms - scanning bonds ... - 8 = max bonds/atom - scanning angles ... - 21 = max angles/atom - scanning dihedrals ... - 33 = max dihedrals/atom - scanning impropers ... - 26 = max impropers/atom - reading bonds ... - 50 bonds - reading angles ... - 84 angles - reading dihedrals ... - 127 dihedrals - reading impropers ... - 20 impropers -Finding 1-2 1-3 1-4 neighbors ... - special bond factors lj: 0 0 0 - special bond factors coul: 0 0 0 - 4 = max # of 1-2 neighbors - 8 = max # of 1-3 neighbors - 17 = max # of 1-4 neighbors - 46 = max # of special neighbors - special bonds CPU = 0.000 seconds - read_data CPU = 0.011 seconds - -molecule mol1 grow_styrene_pre.molecule_template -Read molecule template mol1: - 1 molecules - 0 fragments - 30 atoms with max type 4 - 31 bonds with max type 6 - 51 angles with max type 10 - 73 dihedrals with max type 13 - 13 impropers with max type 3 -molecule mol2 grow_styrene_post.molecule_template -Read molecule template mol2: - 1 molecules - 1 fragments - 46 atoms with max type 4 - 48 bonds with max type 6 - 81 angles with max type 10 - 121 dihedrals with max type 13 - 19 impropers with max type 3 - -fix myrxns all bond/react stabilization yes statted_grp .03 react rxn1 all 1 0 3.0 mol1 mol2 grow_styrene.map modify_create fit create_fit overlap 2.0 stabilize_steps 200 max_rxn 30 -dynamic group bond_react_MASTER_group defined -dynamic group statted_grp_REACT defined - -fix 1 statted_grp_REACT nvt temp $T $T 100 -fix 1 statted_grp_REACT nvt temp 530 $T 100 -fix 1 statted_grp_REACT nvt temp 530 530 100 - -fix 4 bond_react_MASTER_group temp/rescale 1 $T $T 1 1 -fix 4 bond_react_MASTER_group temp/rescale 1 530 $T 1 1 -fix 4 bond_react_MASTER_group temp/rescale 1 530 530 1 1 - -thermo_style custom step temp press density f_myrxns[1] - -thermo 100 - -dump 1 all xyz 1 test_vis.xyz - -run 8000 - -CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE - -Your simulation uses code contributions which should be cited: - -- fix bond/react: reacter.org doi:10.1016/j.polymer.2017.09.038, doi:10.1021/acs.macromol.0c02012 - -@Article{Gissinger17, - author = {J. R. Gissinger and B. D. Jensen and K. E. Wise}, - title = {Modeling Chemical Reactions in Classical Molecular Dynamics Simulations}, - journal = {Polymer}, - year = 2017, - volume = 128, - pages = {211--217} -} - -@Article{Gissinger20, - author = {J. R. Gissinger, B. D. Jensen, K. E. Wise}, - title = {{REACTER}: A Heuristic Method for Reactive Molecular Dynamics}, - journal = {Macromolecules}, - year = 2020, - volume = 53, - number = 22, - pages = {9953--9961} -} - -CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE - -Generated 6 of 6 mixed pair_coeff terms from sixthpower/geometric mixing rule -Neighbor list info ... - update: every = 1 steps, delay = 0 steps, check = yes - max neighbors/atom: 2000, page size: 100000 - master list distance cutoff = 10.5 - ghost atom cutoff = 10.5 - binsize = 5.25, bins = 77 77 77 - 2 neighbor lists, perpetual/occasional/extra = 1 1 0 - (1) pair lj/class2/coul/cut, perpetual - attributes: half, newton on - pair build: half/bin/newton - stencil: half/bin/3d - bin: standard - (2) fix bond/react, occasional, copy from (1) - attributes: half, newton on - pair build: copy - stencil: none - bin: none -Per MPI rank memory allocation (min/avg/max) = 36.99 | 36.99 | 36.99 Mbytes - Step Temp Press Density f_myrxns[1] - 0 0 0.076588866 8.1070333e-06 0 - 100 598.41967 -0.1670029 1.0809378e-05 1 - 200 696.77845 0.11857422 1.0809378e-05 1 - 300 932.97222 -0.058615676 1.3511722e-05 2 - 400 1016.3732 0.062233715 1.3511722e-05 2 - 500 1006.451 -0.17987841 1.6214067e-05 3 - 600 1143.8859 0.33297898 1.6214067e-05 3 - 700 1209.6144 -0.22743773 1.8916411e-05 4 - 800 1429.1639 0.14048255 1.8916411e-05 4 - 900 1375.0968 -0.04016551 2.1618755e-05 5 - 1000 1583.6696 -0.23364852 2.1618755e-05 5 - 1100 1811.0697 -0.054436797 2.43211e-05 6 - 1200 1928.4658 0.012242837 2.43211e-05 6 - 1300 1666.6176 0.057157656 2.43211e-05 6 - 1400 1686.18 -28.442814 2.7023444e-05 7 - 1500 1704.6248 -0.16861218 2.7023444e-05 7 - 1600 2171.7628 -33.6156 2.9725789e-05 8 - 1700 1991.2922 -0.11813381 2.9725789e-05 8 - 1800 2037.4991 -40.015612 3.2428133e-05 9 - 1900 2143.9447 -0.090964375 3.2428133e-05 9 - 2000 1927.9564 0.29856007 3.2428133e-05 9 - 2100 2255.5877 -4.9166327 3.5130478e-05 10 - 2200 2512.5193 0.00044804842 3.5130478e-05 10 - 2300 2336.1503 -45.094726 3.7832822e-05 11 - 2400 2508.9655 -0.1024684 3.7832822e-05 11 - 2500 2747.7344 -53.939212 4.0535167e-05 12 - 2600 2790.5736 0.07042181 4.0535167e-05 12 - 2700 3014.7092 -0.0025387793 4.0535167e-05 12 - 2800 2745.0295 -0.099361314 4.3237511e-05 13 - 2900 2952.1281 -0.13667582 4.3237511e-05 13 - 3000 3032.5298 0.28882784 4.5939855e-05 14 - 3100 3149.992 0.55269076 4.5939855e-05 14 - 3200 3422.5233 -0.11794908 4.86422e-05 15 - 3300 3040.2691 -0.067532834 4.86422e-05 15 - 3400 3323.3263 0.049969149 5.1344544e-05 16 - 3500 3539.0877 -0.065546641 5.1344544e-05 16 - 3600 3894.6897 -0.24222461 5.4046889e-05 17 - 3700 3689.3513 0.21366533 5.4046889e-05 17 - 3800 3924.799 -0.60817646 5.6749233e-05 18 - 3900 3713.1947 -0.024834682 5.6749233e-05 18 - 4000 3887.6151 0.052787631 5.9451578e-05 19 - 4100 3868.2877 0.42532898 5.9451578e-05 19 - 4200 3784.9874 -0.12018512 5.9451578e-05 19 - 4300 4169.9997 0.19652089 6.2153922e-05 20 - 4400 4112.291 -0.084839982 6.2153922e-05 20 - 4500 3974.2226 -0.13641761 6.2153922e-05 20 - 4600 4064.3852 0.16435039 6.2153922e-05 20 - 4700 3880.0044 -0.42874552 6.2153922e-05 20 - 4800 4508.2324 0.20208091 6.2153922e-05 20 - 4900 4364.033 -0.56300441 6.2153922e-05 20 - 5000 4030.4642 -0.29006515 6.2153922e-05 20 - 5100 4010.9518 0.32060145 6.2153922e-05 20 - 5200 4058.5072 0.088924924 6.2153922e-05 20 - 5300 4529.9866 -0.38882748 6.4856266e-05 21 - 5400 4305.9161 0.24046553 6.4856266e-05 21 - 5500 4556.8628 -0.014044879 6.4856266e-05 21 - 5600 4730.2206 0.1526293 6.4856266e-05 21 - 5700 4810.9968 -17.600253 6.7558611e-05 22 - 5800 4655.651 -0.25941928 6.7558611e-05 22 - 5900 4507.1045 -0.084691005 6.7558611e-05 22 - 6000 4516.0965 0.092662842 7.0260955e-05 23 - 6100 4592.4068 0.10403004 7.0260955e-05 23 - 6200 4583.9491 0.1692786 7.29633e-05 24 - 6300 4512.226 0.32590723 7.29633e-05 24 - 6400 4885.9205 -0.24208842 7.5665644e-05 25 - 6500 5250.5008 0.4135064 7.5665644e-05 25 - 6600 5216.9452 0.00059199905 7.8367989e-05 26 - 6700 5302.2925 0.50452368 7.8367989e-05 26 - 6800 4931.7328 -0.064719953 8.1070333e-05 27 - 6900 5549.8746 0.55101191 8.1070333e-05 27 - 7000 5472.9107 0.31358281 8.3772677e-05 28 - 7100 5559.9339 0.14034743 8.3772677e-05 28 - 7200 5726.4492 -0.39732059 8.6475022e-05 29 - 7300 5869.324 0.18989804 8.6475022e-05 29 - 7400 6109.5519 0.11206572 8.9177366e-05 30 - 7500 5966.7085 0.2059557 8.9177366e-05 30 - 7600 6051.2064 0.025316679 8.9177366e-05 30 - 7700 5719.6669 0.16548544 8.9177366e-05 30 - 7800 6118.8183 -0.20036999 8.9177366e-05 30 - 7900 6477.1901 0.10308473 8.9177366e-05 30 - 8000 6241.9498 0.090165102 8.9177366e-05 30 -Loop time of 17.4848 on 1 procs for 8000 steps with 528 atoms - -Performance: 39.531 ns/day, 0.607 hours/ns, 457.540 timesteps/s, 241.581 katom-step/s -97.6% CPU use with 1 MPI tasks x no OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 3.0991 | 3.0991 | 3.0991 | 0.0 | 17.72 -Bond | 7.6807 | 7.6807 | 7.6807 | 0.0 | 43.93 -Neigh | 1.6906 | 1.6906 | 1.6906 | 0.0 | 9.67 -Comm | 0.019091 | 0.019091 | 0.019091 | 0.0 | 0.11 -Output | 4.5095 | 4.5095 | 4.5095 | 0.0 | 25.79 -Modify | 0.46277 | 0.46277 | 0.46277 | 0.0 | 2.65 -Other | | 0.02296 | | | 0.13 - -Nlocal: 528 ave 528 max 528 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 0 ave 0 max 0 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Neighs: 35904 ave 35904 max 35904 min -Histogram: 1 0 0 0 0 0 0 0 0 0 - -Total # of neighbors = 35904 -Ave neighs/atom = 68 -Ave special neighs/atom = 11.409091 -Neighbor list builds = 1836 -Dangerous builds = 0 - -# write_data final.data nofix -Total wall time: 0:00:17 diff --git a/examples/PACKAGES/reaction/create_atoms_polystyrene/log.4Nov2022.grow_styrene.g++.4 b/examples/PACKAGES/reaction/create_atoms_polystyrene/log.4Nov2022.grow_styrene.g++.4 deleted file mode 100644 index b14ff6c8d06..00000000000 --- a/examples/PACKAGES/reaction/create_atoms_polystyrene/log.4Nov2022.grow_styrene.g++.4 +++ /dev/null @@ -1,256 +0,0 @@ -LAMMPS (4 Nov 2022) -# use bond/react 'create atoms' feature to add 30 new styrene monomers to chain - -units real - -boundary p p p - -atom_style full - -pair_style lj/class2/coul/cut 8.5 - -angle_style class2 - -bond_style class2 - -dihedral_style class2 - -improper_style class2 - -variable T equal 530 - -read_data trimer.data extra/bond/per/atom 5 extra/angle/per/atom 15 extra/dihedral/per/atom 15 extra/improper/per/atom 25 extra/special/per/atom 25 -Reading data file ... - orthogonal box = (-200 -200 -200) to (200 200 200) - 1 by 2 by 2 MPI processor grid - reading atom labelmap ... - reading bond labelmap ... - reading angle labelmap ... - reading dihedral labelmap ... - reading improper labelmap ... - reading atoms ... - 48 atoms - scanning bonds ... - 8 = max bonds/atom - scanning angles ... - 21 = max angles/atom - scanning dihedrals ... - 33 = max dihedrals/atom - scanning impropers ... - 26 = max impropers/atom - reading bonds ... - 50 bonds - reading angles ... - 84 angles - reading dihedrals ... - 127 dihedrals - reading impropers ... - 20 impropers -Finding 1-2 1-3 1-4 neighbors ... - special bond factors lj: 0 0 0 - special bond factors coul: 0 0 0 - 4 = max # of 1-2 neighbors - 8 = max # of 1-3 neighbors - 17 = max # of 1-4 neighbors - 46 = max # of special neighbors - special bonds CPU = 0.000 seconds - read_data CPU = 0.007 seconds - -molecule mol1 grow_styrene_pre.molecule_template -Read molecule template mol1: - 1 molecules - 0 fragments - 30 atoms with max type 4 - 31 bonds with max type 6 - 51 angles with max type 10 - 73 dihedrals with max type 13 - 13 impropers with max type 3 -molecule mol2 grow_styrene_post.molecule_template -Read molecule template mol2: - 1 molecules - 1 fragments - 46 atoms with max type 4 - 48 bonds with max type 6 - 81 angles with max type 10 - 121 dihedrals with max type 13 - 19 impropers with max type 3 - -fix myrxns all bond/react stabilization yes statted_grp .03 react rxn1 all 1 0 3.0 mol1 mol2 grow_styrene.map modify_create fit create_fit overlap 2.0 stabilize_steps 200 max_rxn 30 -dynamic group bond_react_MASTER_group defined -dynamic group statted_grp_REACT defined - -fix 1 statted_grp_REACT nvt temp $T $T 100 -fix 1 statted_grp_REACT nvt temp 530 $T 100 -fix 1 statted_grp_REACT nvt temp 530 530 100 - -fix 4 bond_react_MASTER_group temp/rescale 1 $T $T 1 1 -fix 4 bond_react_MASTER_group temp/rescale 1 530 $T 1 1 -fix 4 bond_react_MASTER_group temp/rescale 1 530 530 1 1 - -thermo_style custom step temp press density f_myrxns[1] - -thermo 100 - -dump 1 all xyz 1 test_vis.xyz - -run 8000 - -CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE - -Your simulation uses code contributions which should be cited: - -- fix bond/react: reacter.org doi:10.1016/j.polymer.2017.09.038, doi:10.1021/acs.macromol.0c02012 - -@Article{Gissinger17, - author = {J. R. Gissinger and B. D. Jensen and K. E. Wise}, - title = {Modeling Chemical Reactions in Classical Molecular Dynamics Simulations}, - journal = {Polymer}, - year = 2017, - volume = 128, - pages = {211--217} -} - -@Article{Gissinger20, - author = {J. R. Gissinger, B. D. Jensen, K. E. Wise}, - title = {{REACTER}: A Heuristic Method for Reactive Molecular Dynamics}, - journal = {Macromolecules}, - year = 2020, - volume = 53, - number = 22, - pages = {9953--9961} -} - -CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE - -Generated 6 of 6 mixed pair_coeff terms from sixthpower/geometric mixing rule -Neighbor list info ... - update: every = 1 steps, delay = 0 steps, check = yes - max neighbors/atom: 2000, page size: 100000 - master list distance cutoff = 10.5 - ghost atom cutoff = 10.5 - binsize = 5.25, bins = 77 77 77 - 2 neighbor lists, perpetual/occasional/extra = 1 1 0 - (1) pair lj/class2/coul/cut, perpetual - attributes: half, newton on - pair build: half/bin/newton - stencil: half/bin/3d - bin: standard - (2) fix bond/react, occasional, copy from (1) - attributes: half, newton on - pair build: copy - stencil: none - bin: none -Per MPI rank memory allocation (min/avg/max) = 35.37 | 35.56 | 36.15 Mbytes - Step Temp Press Density f_myrxns[1] - 0 0 0.076588866 8.1070333e-06 0 - 100 598.29879 -0.17888669 1.0809378e-05 1 - 200 699.08337 0.11172183 1.0809378e-05 1 - 300 931.85797 -0.13923465 1.3511722e-05 2 - 400 893.78126 0.14680427 1.3511722e-05 2 - 500 1001.0848 -0.021703999 1.6214067e-05 3 - 600 989.24943 0.04641672 1.6214067e-05 3 - 700 1244.794 -0.19464667 1.8916411e-05 4 - 800 1210.997 -0.06710628 1.8916411e-05 4 - 900 1310.0005 0.099408095 2.1618755e-05 5 - 1000 1640.5956 -0.05975911 2.1618755e-05 5 - 1100 1380.7273 -0.025206389 2.1618755e-05 5 - 1200 1637.6542 0.057149266 2.43211e-05 6 - 1300 1757.3409 0.3232123 2.43211e-05 6 - 1400 1664.5048 -0.29656858 2.7023444e-05 7 - 1500 1578.9691 0.21997047 2.7023444e-05 7 - 1600 1848.9227 -0.11783672 2.9725789e-05 8 - 1700 1981.1695 0.28374154 2.9725789e-05 8 - 1800 2330.8852 -0.082109894 3.2428133e-05 9 - 1900 2177.4096 0.23853778 3.2428133e-05 9 - 2000 2095.1618 -1.5405667 3.5130478e-05 10 - 2100 2272.2653 0.05572226 3.5130478e-05 10 - 2200 2599.5994 -2.2307507 3.7832822e-05 11 - 2300 2457.7904 0.40228312 3.7832822e-05 11 - 2400 2372.9736 -3.3415973 4.0535167e-05 12 - 2500 2427.4613 -0.16211888 4.0535167e-05 12 - 2600 3022.2608 -4.3278098 4.3237511e-05 13 - 2700 3115.6526 0.013828954 4.3237511e-05 13 - 2800 2841.7091 -6.4163443 4.5939855e-05 14 - 2900 3047.8436 0.16052429 4.5939855e-05 14 - 3000 3373.7997 -7.7904706 4.86422e-05 15 - 3100 3381.6653 0.35152687 4.86422e-05 15 - 3200 3589.5561 -10.754027 5.1344544e-05 16 - 3300 3473.4415 -0.13274479 5.1344544e-05 16 - 3400 3696.3283 -13.75504 5.4046889e-05 17 - 3500 3486.5442 -0.31091832 5.4046889e-05 17 - 3600 3647.0818 0.34662993 5.4046889e-05 17 - 3700 3636.7138 -0.041981737 5.4046889e-05 17 - 3800 3427.6532 0.42008936 5.6749233e-05 18 - 3900 3574.0094 -0.05475272 5.6749233e-05 18 - 4000 4158.9339 0.14426361 5.9451578e-05 19 - 4100 3862.5026 0.094232438 5.9451578e-05 19 - 4200 3969.4378 -0.10602108 6.2153922e-05 20 - 4300 3840.0126 0.29190336 6.2153922e-05 20 - 4400 4365.9912 -36.954812 6.4856266e-05 21 - 4500 4565.3708 0.061879092 6.4856266e-05 21 - 4600 4565.491 -70.588435 6.7558611e-05 22 - 4700 4570.2702 -0.56661378 6.7558611e-05 22 - 4800 4445.786 0.20534323 6.7558611e-05 22 - 4900 4782.6436 0.012783481 7.0260955e-05 23 - 5000 4777.2132 0.092416308 7.0260955e-05 23 - 5100 4944.0402 0.11614993 7.29633e-05 24 - 5200 5139.165 -0.23180938 7.29633e-05 24 - 5300 4647.2328 0.13570142 7.5665644e-05 25 - 5400 4982.7355 -0.25477884 7.5665644e-05 25 - 5500 5400.5924 0.19902824 7.8367989e-05 26 - 5600 5761.3552 0.083102065 7.8367989e-05 26 - 5700 5723.8581 0.039332796 8.1070333e-05 27 - 5800 5548.0789 -0.14511631 8.1070333e-05 27 - 5900 5358.5431 -0.099694264 8.3772677e-05 28 - 6000 5591.2678 9.9924655e-05 8.3772677e-05 28 - 6100 6101.8008 0.26538732 8.6475022e-05 29 - 6200 5848.9979 0.091137862 8.6475022e-05 29 - 6300 5582.1828 -0.039900602 8.9177366e-05 30 - 6400 6077.0548 0.3191104 8.9177366e-05 30 - 6500 5794.6827 0.69322336 8.9177366e-05 30 - 6600 5610.4331 0.080420058 8.9177366e-05 30 - 6700 5615.3492 0.12810868 8.9177366e-05 30 - 6800 5900.9749 -0.31704866 8.9177366e-05 30 - 6900 6233.9524 0.010288514 8.9177366e-05 30 - 7000 5972.7488 -1.0442089 8.9177366e-05 30 - 7100 6258.1332 0.56270399 8.9177366e-05 30 - 7200 6172.5919 -0.19595153 8.9177366e-05 30 - 7300 5898.7547 0.020862491 8.9177366e-05 30 - 7400 5815.1659 -0.0020680171 8.9177366e-05 30 - 7500 6003.867 -0.12288131 8.9177366e-05 30 - 7600 5966.0609 -0.1504333 8.9177366e-05 30 - 7700 6274.3331 -0.62752757 8.9177366e-05 30 - 7800 6051.0914 0.22821201 8.9177366e-05 30 - 7900 5981.5209 -0.19623554 8.9177366e-05 30 - 8000 5835.4657 0.3602475 8.9177366e-05 30 -Loop time of 13.936 on 4 procs for 8000 steps with 528 atoms - -Performance: 49.598 ns/day, 0.484 hours/ns, 574.051 timesteps/s, 303.099 katom-step/s -99.4% CPU use with 4 MPI tasks x no OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 0.001058 | 0.78388 | 3.1317 | 153.1 | 5.62 -Bond | 0.0031874 | 2.0525 | 8.1984 | 247.7 | 14.73 -Neigh | 0.53495 | 0.53527 | 0.53551 | 0.0 | 3.84 -Comm | 0.01177 | 0.012451 | 0.013306 | 0.5 | 0.09 -Output | 1.3336 | 1.4735 | 1.7322 | 13.2 | 10.57 -Modify | 0.55142 | 9.0568 | 12.031 | 163.3 | 64.99 -Other | | 0.02159 | | | 0.15 - -Nlocal: 132 ave 528 max 0 min -Histogram: 3 0 0 0 0 0 0 0 0 1 -Nghost: 0 ave 0 max 0 min -Histogram: 4 0 0 0 0 0 0 0 0 0 -Neighs: 9115.75 ave 36463 max 0 min -Histogram: 3 0 0 0 0 0 0 0 0 1 - -Total # of neighbors = 36463 -Ave neighs/atom = 69.058712 -Ave special neighs/atom = 11.409091 -Neighbor list builds = 771 -Dangerous builds = 0 - -# write_data final.data nofix -Total wall time: 0:00:13 diff --git a/examples/PACKAGES/reaction/nylon,6-6_melt/in.large_nylon_melt b/examples/PACKAGES/reaction/nylon,6-6_melt/in.large_nylon_melt index f19eee339de..9a450119134 100644 --- a/examples/PACKAGES/reaction/nylon,6-6_melt/in.large_nylon_melt +++ b/examples/PACKAGES/reaction/nylon,6-6_melt/in.large_nylon_melt @@ -52,6 +52,7 @@ fix 1 statted_grp_REACT nvt temp 800 800 100 # fix 2 bond_react_MASTER_group temp/rescale 1 800 800 10 1 thermo_style custom step temp press density f_myrxns[*] # cumulative reaction counts +thermo_modify colname auto # restart 100 restart1 restart2 diff --git a/examples/PACKAGES/reaction/nylon,6-6_melt/log.4Nov2022.large_nylon_melt.g++.1 b/examples/PACKAGES/reaction/nylon,6-6_melt/log.10Dec2025.large_nylon_melt.g++.1 similarity index 56% rename from examples/PACKAGES/reaction/nylon,6-6_melt/log.4Nov2022.large_nylon_melt.g++.1 rename to examples/PACKAGES/reaction/nylon,6-6_melt/log.10Dec2025.large_nylon_melt.g++.1 index 440b2e5cf0b..25b7b416099 100644 --- a/examples/PACKAGES/reaction/nylon,6-6_melt/log.4Nov2022.large_nylon_melt.g++.1 +++ b/examples/PACKAGES/reaction/nylon,6-6_melt/log.10Dec2025.large_nylon_melt.g++.1 @@ -1,4 +1,6 @@ -LAMMPS (4 Nov 2022) +LAMMPS (10 Dec 2025 - Development - patch_10Dec2025-120-ga51f9ba0e7-modified) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. + using 1 OpenMP thread(s) per MPI task # 35,000 atom nylon melt example units real @@ -19,6 +21,9 @@ dihedral_style class2 improper_style class2 +special_bonds lj/coul 0 0 1 +pair_modify tail yes mix sixthpower + read_data large_nylon_melt.data.gz extra/bond/per/atom 5 extra/angle/per/atom 15 extra/dihedral/per/atom 15 extra/improper/per/atom 25 extra/special/per/atom 25 Reading data file ... orthogonal box = (-2.6834403 -2.0679138 -2.2198803) to (73.455228 73.244835 73.40648) @@ -40,6 +45,8 @@ Reading data file ... 31 = max dihedrals/atom scanning impropers ... 29 = max impropers/atom + orthogonal box = (-2.6834403 -2.0679138 -2.2198803) to (73.455228 73.244835 73.40648) + 1 by 1 by 1 MPI processor grid reading bonds ... 33600 bonds reading angles ... @@ -49,21 +56,22 @@ Reading data file ... reading impropers ... 35200 impropers Finding 1-2 1-3 1-4 neighbors ... - special bond factors lj: 0 0 0 - special bond factors coul: 0 0 0 + special bond factors lj: 0 0 1 + special bond factors coul: 0 0 1 4 = max # of 1-2 neighbors 6 = max # of 1-3 neighbors - 12 = max # of 1-4 neighbors - 41 = max # of special neighbors - special bonds CPU = 0.026 seconds - read_data CPU = 0.937 seconds + 35 = max # of special neighbors + special bonds CPU = 0.012 seconds + read_data CPU = 0.851 seconds velocity all create 800.0 4928459 dist gaussian molecule mol1 rxn1_stp1_unreacted.molecule_template Read molecule template mol1: +this is a molecule template for: initial nylon crosslink, pre-reacting 1 molecules 0 fragments + 0 bodies 18 atoms with max type 8 16 bonds with max type 12 25 angles with max type 24 @@ -71,8 +79,10 @@ Read molecule template mol1: 2 impropers with max type 9 molecule mol2 rxn1_stp1_reacted.molecule_template Read molecule template mol2: +this is a molecule template for: initial nylon crosslink, post-reacting 1 molecules 0 fragments + 0 bodies 18 atoms with max type 9 17 bonds with max type 11 31 angles with max type 23 @@ -80,8 +90,10 @@ Read molecule template mol2: 0 impropers with max type 0 molecule mol3 rxn1_stp2_unreacted.molecule_template Read molecule template mol3: +this is a molecule template for: water condensation, pre-reacting 1 molecules 0 fragments + 0 bodies 15 atoms with max type 9 14 bonds with max type 11 25 angles with max type 23 @@ -89,8 +101,10 @@ Read molecule template mol3: 0 impropers with max type 0 molecule mol4 rxn1_stp2_reacted.molecule_template Read molecule template mol4: +this is a molecule template for: water condensation, post-reacting 1 molecules 0 fragments + 0 bodies 15 atoms with max type 11 13 bonds with max type 13 19 angles with max type 25 @@ -100,9 +114,11 @@ Read molecule template mol4: thermo 50 # dump 1 all xyz 100 test_vis.xyz +# dump_modify 1 types labels fix myrxns all bond/react stabilization yes statted_grp .03 react rxn1 all 1 0.0 2.9 mol1 mol2 rxn1_stp1_map react rxn2 all 1 0.0 5.0 mol3 mol4 rxn1_stp2_map -WARNING: Fix bond/react: Atom affected by reaction rxn2 is too close to template edge (../fix_bond_react.cpp:2624) +WARNING: Fix bond/react: Atom affected by reaction rxn1 is too close to template edge (src/REACTION/fix_bond_react.cpp:2630) +WARNING: Fix bond/react: Atom affected by reaction rxn2 is too close to template edge (src/REACTION/fix_bond_react.cpp:2630) dynamic group bond_react_MASTER_group defined dynamic group statted_grp_REACT defined @@ -113,7 +129,8 @@ fix 1 statted_grp_REACT nvt temp 800 800 100 # you can use the internally created 'bond_react_MASTER_group', like so: # fix 2 bond_react_MASTER_group temp/rescale 1 800 800 10 1 -thermo_style custom step temp press density f_myrxns[1] f_myrxns[2] # cumulative reaction counts +thermo_style custom step temp press density f_myrxns[*] # cumulative reaction counts +thermo_modify colname auto # restart 100 restart1 restart2 @@ -123,7 +140,19 @@ CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE Your simulation uses code contributions which should be cited: -- fix bond/react: reacter.org doi:10.1016/j.polymer.2017.09.038, doi:10.1021/acs.macromol.0c02012 +- Type Label Framework: https://doi.org/10.1021/acs.jpcb.3c08419 + +@Article{Gissinger24, + author = {Jacob R. Gissinger, Ilia Nikiforov, Yaser Afshar, Brendon Waters, Moon-ki Choi, Daniel S. Karls, Alexander Stukowski, Wonpil Im, Hendrik Heinz, Axel Kohlmeyer, and Ellad B. Tadmor}, + title = {Type Label Framework for Bonded Force Fields in LAMMPS}, + journal = {J. Phys. Chem. B}, + year = 2024, + volume = 128, + number = 13, + pages = {3282--3297} +} + +- fix bond/react: https://reacter.org, https://doi.org/10.1016/j.polymer.2017.09.038, https://doi.org/10.1021/acs.macromol.0c02012, https://doi.org/10.1016/j.cpc.2024.109287 @Article{Gissinger17, author = {J. R. Gissinger and B. D. Jensen and K. E. Wise}, @@ -144,10 +173,19 @@ Your simulation uses code contributions which should be cited: pages = {9953--9961} } +@Article{Gissinger24, + author = {J. R. Gissinger, B. D. Jensen, K. E. Wise}, + title = {Molecular Modeling of Reactive Systems with REACTER}, + journal = {Computer Physics Communications}, + year = 2024, + volume = 304, + number = 109287 +} + CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE PPPM initialization ... - using 12-bit tables for long-range coulomb (../kspace.cpp:342) + using 12-bit tables for long-range coulomb G vector (1/distance) = 0.20765034 grid = 18 18 18 stencil order = 5 @@ -155,7 +193,7 @@ PPPM initialization ... estimated relative force accuracy = 0.000100329 using double precision KISS FFT 3d grid and FFT values/proc = 12167 5832 -Generated 55 of 55 mixed pair_coeff terms from sixthpower/geometric mixing rule +Generated 55 of 55 mixed pair_coeff terms from sixthpower/sixthpower mixing rule Neighbor list info ... update: every = 1 steps, delay = 0 steps, check = yes max neighbors/atom: 2000, page size: 100000 @@ -173,43 +211,43 @@ Neighbor list info ... pair build: copy stencil: none bin: none -Per MPI rank memory allocation (min/avg/max) = 209.8 | 209.8 | 209.8 Mbytes - Step Temp Press Density f_myrxns[1] f_myrxns[2] - 0 800 3666.3948 0.80366765 0 0 - 50 673.94821 -9679.5038 0.80366765 31 0 - 100 694.45718 -2104.8514 0.80366765 57 22 - 150 716.53915 -12356.83 0.80366765 77 50 - 200 723.33218 -1319.9666 0.80366765 84 67 -Loop time of 87.9809 on 1 procs for 200 steps with 35200 atoms - -Performance: 0.196 ns/day, 122.196 hours/ns, 2.273 timesteps/s, 80.017 katom-step/s -100.0% CPU use with 1 MPI tasks x no OpenMP threads +Per MPI rank memory allocation (min/avg/max) = 206.8 | 206.8 | 206.8 Mbytes + Step Temp Press Density f_myrxns:rxn1 f_myrxns:rxn2 + 0 800 9347.3909 0.80366765 0 0 + 50 685.33063 -9882.8359 0.80366765 34 0 + 100 711.35475 -6916.8177 0.80366765 58 28 + 150 731.39207 -5172.8555 0.80366765 79 55 + 200 741.78195 -6487.058 0.80366765 94 74 +Loop time of 53.365 on 1 procs for 200 steps with 35200 atoms + +Performance: 0.324 ns/day, 74.118 hours/ns, 3.748 timesteps/s, 131.922 katom-step/s +99.6% CPU use with 1 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 25.691 | 25.691 | 25.691 | 0.0 | 29.20 -Bond | 15.772 | 15.772 | 15.772 | 0.0 | 17.93 -Kspace | 4.611 | 4.611 | 4.611 | 0.0 | 5.24 -Neigh | 35.616 | 35.616 | 35.616 | 0.0 | 40.48 -Comm | 0.24971 | 0.24971 | 0.24971 | 0.0 | 0.28 -Output | 0.00098602 | 0.00098602 | 0.00098602 | 0.0 | 0.00 -Modify | 5.9596 | 5.9596 | 5.9596 | 0.0 | 6.77 -Other | | 0.08051 | | | 0.09 +Pair | 16.904 | 16.904 | 16.904 | 0.0 | 31.68 +Bond | 7.566 | 7.566 | 7.566 | 0.0 | 14.18 +Kspace | 1.8747 | 1.8747 | 1.8747 | 0.0 | 3.51 +Neigh | 22.813 | 22.813 | 22.813 | 0.0 | 42.75 +Comm | 0.15562 | 0.15562 | 0.15562 | 0.0 | 0.29 +Output | 0.00046647 | 0.00046647 | 0.00046647 | 0.0 | 0.00 +Modify | 4.0114 | 4.0114 | 4.0114 | 0.0 | 7.52 +Other | | 0.03991 | | | 0.07 Nlocal: 35200 ave 35200 max 35200 min Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 38403 ave 38403 max 38403 min +Nghost: 38412 ave 38412 max 38412 min Histogram: 1 0 0 0 0 0 0 0 0 0 -Neighs: 6.92764e+06 ave 6.92764e+06 max 6.92764e+06 min +Neighs: 6.92747e+06 ave 6.92747e+06 max 6.92747e+06 min Histogram: 1 0 0 0 0 0 0 0 0 0 -Total # of neighbors = 6927635 -Ave neighs/atom = 196.80781 -Ave special neighs/atom = 9.8480114 -Neighbor list builds = 128 +Total # of neighbors = 6927466 +Ave neighs/atom = 196.80301 +Ave special neighs/atom = 5.4301136 +Neighbor list builds = 140 Dangerous builds = 0 # write_restart restart_longrun -# write_data restart_longrun.data -Total wall time: 0:01:29 +# write_data restart_longrun.data nofix +Total wall time: 0:00:54 diff --git a/examples/PACKAGES/reaction/nylon,6-6_melt/log.4Nov2022.large_nylon_melt.g++.4 b/examples/PACKAGES/reaction/nylon,6-6_melt/log.10Dec2025.large_nylon_melt.g++.4 similarity index 55% rename from examples/PACKAGES/reaction/nylon,6-6_melt/log.4Nov2022.large_nylon_melt.g++.4 rename to examples/PACKAGES/reaction/nylon,6-6_melt/log.10Dec2025.large_nylon_melt.g++.4 index 52b36325b83..b681314cf49 100644 --- a/examples/PACKAGES/reaction/nylon,6-6_melt/log.4Nov2022.large_nylon_melt.g++.4 +++ b/examples/PACKAGES/reaction/nylon,6-6_melt/log.10Dec2025.large_nylon_melt.g++.4 @@ -1,4 +1,6 @@ -LAMMPS (4 Nov 2022) +LAMMPS (10 Dec 2025 - Development - patch_10Dec2025-120-ga51f9ba0e7-modified) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. + using 1 OpenMP thread(s) per MPI task # 35,000 atom nylon melt example units real @@ -19,6 +21,9 @@ dihedral_style class2 improper_style class2 +special_bonds lj/coul 0 0 1 +pair_modify tail yes mix sixthpower + read_data large_nylon_melt.data.gz extra/bond/per/atom 5 extra/angle/per/atom 15 extra/dihedral/per/atom 15 extra/improper/per/atom 25 extra/special/per/atom 25 Reading data file ... orthogonal box = (-2.6834403 -2.0679138 -2.2198803) to (73.455228 73.244835 73.40648) @@ -40,6 +45,8 @@ Reading data file ... 31 = max dihedrals/atom scanning impropers ... 29 = max impropers/atom + orthogonal box = (-2.6834403 -2.0679138 -2.2198803) to (73.455228 73.244835 73.40648) + 2 by 1 by 2 MPI processor grid reading bonds ... 33600 bonds reading angles ... @@ -49,21 +56,22 @@ Reading data file ... reading impropers ... 35200 impropers Finding 1-2 1-3 1-4 neighbors ... - special bond factors lj: 0 0 0 - special bond factors coul: 0 0 0 + special bond factors lj: 0 0 1 + special bond factors coul: 0 0 1 4 = max # of 1-2 neighbors 6 = max # of 1-3 neighbors - 12 = max # of 1-4 neighbors - 41 = max # of special neighbors + 35 = max # of special neighbors special bonds CPU = 0.007 seconds - read_data CPU = 0.854 seconds + read_data CPU = 0.748 seconds velocity all create 800.0 4928459 dist gaussian molecule mol1 rxn1_stp1_unreacted.molecule_template Read molecule template mol1: +this is a molecule template for: initial nylon crosslink, pre-reacting 1 molecules 0 fragments + 0 bodies 18 atoms with max type 8 16 bonds with max type 12 25 angles with max type 24 @@ -71,8 +79,10 @@ Read molecule template mol1: 2 impropers with max type 9 molecule mol2 rxn1_stp1_reacted.molecule_template Read molecule template mol2: +this is a molecule template for: initial nylon crosslink, post-reacting 1 molecules 0 fragments + 0 bodies 18 atoms with max type 9 17 bonds with max type 11 31 angles with max type 23 @@ -80,8 +90,10 @@ Read molecule template mol2: 0 impropers with max type 0 molecule mol3 rxn1_stp2_unreacted.molecule_template Read molecule template mol3: +this is a molecule template for: water condensation, pre-reacting 1 molecules 0 fragments + 0 bodies 15 atoms with max type 9 14 bonds with max type 11 25 angles with max type 23 @@ -89,8 +101,10 @@ Read molecule template mol3: 0 impropers with max type 0 molecule mol4 rxn1_stp2_reacted.molecule_template Read molecule template mol4: +this is a molecule template for: water condensation, post-reacting 1 molecules 0 fragments + 0 bodies 15 atoms with max type 11 13 bonds with max type 13 19 angles with max type 25 @@ -100,9 +114,11 @@ Read molecule template mol4: thermo 50 # dump 1 all xyz 100 test_vis.xyz +# dump_modify 1 types labels fix myrxns all bond/react stabilization yes statted_grp .03 react rxn1 all 1 0.0 2.9 mol1 mol2 rxn1_stp1_map react rxn2 all 1 0.0 5.0 mol3 mol4 rxn1_stp2_map -WARNING: Fix bond/react: Atom affected by reaction rxn2 is too close to template edge (../fix_bond_react.cpp:2624) +WARNING: Fix bond/react: Atom affected by reaction rxn1 is too close to template edge (src/REACTION/fix_bond_react.cpp:2630) +WARNING: Fix bond/react: Atom affected by reaction rxn2 is too close to template edge (src/REACTION/fix_bond_react.cpp:2630) dynamic group bond_react_MASTER_group defined dynamic group statted_grp_REACT defined @@ -113,7 +129,8 @@ fix 1 statted_grp_REACT nvt temp 800 800 100 # you can use the internally created 'bond_react_MASTER_group', like so: # fix 2 bond_react_MASTER_group temp/rescale 1 800 800 10 1 -thermo_style custom step temp press density f_myrxns[1] f_myrxns[2] # cumulative reaction counts +thermo_style custom step temp press density f_myrxns[*] # cumulative reaction counts +thermo_modify colname auto # restart 100 restart1 restart2 @@ -123,7 +140,19 @@ CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE Your simulation uses code contributions which should be cited: -- fix bond/react: reacter.org doi:10.1016/j.polymer.2017.09.038, doi:10.1021/acs.macromol.0c02012 +- Type Label Framework: https://doi.org/10.1021/acs.jpcb.3c08419 + +@Article{Gissinger24, + author = {Jacob R. Gissinger, Ilia Nikiforov, Yaser Afshar, Brendon Waters, Moon-ki Choi, Daniel S. Karls, Alexander Stukowski, Wonpil Im, Hendrik Heinz, Axel Kohlmeyer, and Ellad B. Tadmor}, + title = {Type Label Framework for Bonded Force Fields in LAMMPS}, + journal = {J. Phys. Chem. B}, + year = 2024, + volume = 128, + number = 13, + pages = {3282--3297} +} + +- fix bond/react: https://reacter.org, https://doi.org/10.1016/j.polymer.2017.09.038, https://doi.org/10.1021/acs.macromol.0c02012, https://doi.org/10.1016/j.cpc.2024.109287 @Article{Gissinger17, author = {J. R. Gissinger and B. D. Jensen and K. E. Wise}, @@ -144,18 +173,27 @@ Your simulation uses code contributions which should be cited: pages = {9953--9961} } +@Article{Gissinger24, + author = {J. R. Gissinger, B. D. Jensen, K. E. Wise}, + title = {Molecular Modeling of Reactive Systems with REACTER}, + journal = {Computer Physics Communications}, + year = 2024, + volume = 304, + number = 109287 +} + CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE PPPM initialization ... - using 12-bit tables for long-range coulomb (../kspace.cpp:342) + using 12-bit tables for long-range coulomb G vector (1/distance) = 0.20765034 grid = 18 18 18 stencil order = 5 estimated absolute RMS force accuracy = 0.033315619 estimated relative force accuracy = 0.000100329 using double precision KISS FFT - 3d grid and FFT values/proc = 4508 1620 -Generated 55 of 55 mixed pair_coeff terms from sixthpower/geometric mixing rule + 3d grid and FFT values/proc = 4508 1458 +Generated 55 of 55 mixed pair_coeff terms from sixthpower/sixthpower mixing rule Neighbor list info ... update: every = 1 steps, delay = 0 steps, check = yes max neighbors/atom: 2000, page size: 100000 @@ -173,43 +211,43 @@ Neighbor list info ... pair build: copy stencil: none bin: none -Per MPI rank memory allocation (min/avg/max) = 81.39 | 81.41 | 81.43 Mbytes - Step Temp Press Density f_myrxns[1] f_myrxns[2] - 0 800 3666.3948 0.80366765 0 0 - 50 673.94821 -9679.5038 0.80366765 31 0 - 100 694.36354 -2108.4881 0.80366765 57 22 - 150 716.5075 -12356.04 0.80366765 77 50 - 200 722.97306 -1308.3439 0.80366765 84 67 -Loop time of 23.1041 on 4 procs for 200 steps with 35200 atoms - -Performance: 0.748 ns/day, 32.089 hours/ns, 8.656 timesteps/s, 304.708 katom-step/s -100.0% CPU use with 4 MPI tasks x no OpenMP threads +Per MPI rank memory allocation (min/avg/max) = 79.97 | 79.98 | 79.99 Mbytes + Step Temp Press Density f_myrxns:rxn1 f_myrxns:rxn2 + 0 800 9347.3909 0.80366765 0 0 + 50 685.33063 -9882.8359 0.80366765 34 0 + 100 711.35475 -6916.8177 0.80366765 58 28 + 150 731.39207 -5172.8555 0.80366765 79 55 + 200 741.77172 -6737.2807 0.80366765 94 74 +Loop time of 14.742 on 4 procs for 200 steps with 35200 atoms + +Performance: 1.172 ns/day, 20.475 hours/ns, 13.567 timesteps/s, 477.547 katom-step/s +99.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 | 6.6935 | 6.8618 | 7.0049 | 5.1 | 29.70 -Bond | 3.8936 | 3.9807 | 4.0626 | 3.5 | 17.23 -Kspace | 1.1828 | 1.4033 | 1.6503 | 16.6 | 6.07 -Neigh | 8.7942 | 8.7945 | 8.7946 | 0.0 | 38.06 -Comm | 0.14682 | 0.15559 | 0.16441 | 1.8 | 0.67 -Output | 0.00035959 | 0.00037472 | 0.00041627 | 0.0 | 0.00 -Modify | 1.8787 | 1.8787 | 1.8788 | 0.0 | 8.13 -Other | | 0.02917 | | | 0.13 - -Nlocal: 8800 ave 8911 max 8662 min +Pair | 4.1959 | 4.3131 | 4.415 | 4.8 | 29.26 +Bond | 1.8618 | 1.8955 | 1.9242 | 1.8 | 12.86 +Kspace | 0.48599 | 0.61712 | 0.76457 | 15.6 | 4.19 +Neigh | 6.0426 | 6.0489 | 6.0553 | 0.3 | 41.03 +Comm | 0.19496 | 0.20421 | 0.21318 | 1.8 | 1.39 +Output | 0.00025729 | 0.00028156 | 0.00035095 | 0.0 | 0.00 +Modify | 1.6375 | 1.6379 | 1.6384 | 0.0 | 11.11 +Other | | 0.02493 | | | 0.17 + +Nlocal: 8800 ave 8903 max 8678 min Histogram: 1 0 0 1 0 0 0 0 1 1 -Nghost: 18358.5 ave 18438 max 18183 min -Histogram: 1 0 0 0 0 0 0 0 1 2 -Neighs: 1.73191e+06 ave 1.77313e+06 max 1.68375e+06 min +Nghost: 18363.8 ave 18442 max 18189 min +Histogram: 1 0 0 0 0 0 0 1 0 2 +Neighs: 1.73187e+06 ave 1.77044e+06 max 1.68762e+06 min Histogram: 1 0 1 0 0 0 0 0 0 2 -Total # of neighbors = 6927655 -Ave neighs/atom = 196.80838 -Ave special neighs/atom = 9.8480114 -Neighbor list builds = 128 +Total # of neighbors = 6927463 +Ave neighs/atom = 196.80293 +Ave special neighs/atom = 5.4301136 +Neighbor list builds = 140 Dangerous builds = 0 # write_restart restart_longrun -# write_data restart_longrun.data -Total wall time: 0:00:24 +# write_data restart_longrun.data nofix +Total wall time: 0:00:15 diff --git a/examples/PACKAGES/reaction/tiny_epoxy/in.tiny_epoxy.stabilized b/examples/PACKAGES/reaction/tiny_epoxy/in.tiny_epoxy.stabilized index 4c231434741..87ec15b1935 100644 --- a/examples/PACKAGES/reaction/tiny_epoxy/in.tiny_epoxy.stabilized +++ b/examples/PACKAGES/reaction/tiny_epoxy/in.tiny_epoxy.stabilized @@ -47,6 +47,7 @@ fix rxns all bond/react stabilization yes statted_grp .03 & fix 1 statted_grp_REACT nvt temp 300 300 100 thermo_style custom step temp f_rxns[*] +thermo_modify colname auto run 2000 diff --git a/examples/PACKAGES/reaction/tiny_epoxy/log.4Nov2022.tiny_epoxy.stabilized.g++.1 b/examples/PACKAGES/reaction/tiny_epoxy/log.10Dec2025.tiny_epoxy.stabilized.g++.1 similarity index 50% rename from examples/PACKAGES/reaction/tiny_epoxy/log.4Nov2022.tiny_epoxy.stabilized.g++.1 rename to examples/PACKAGES/reaction/tiny_epoxy/log.10Dec2025.tiny_epoxy.stabilized.g++.1 index 24b8fb09876..bbfe797f019 100644 --- a/examples/PACKAGES/reaction/tiny_epoxy/log.4Nov2022.tiny_epoxy.stabilized.g++.1 +++ b/examples/PACKAGES/reaction/tiny_epoxy/log.10Dec2025.tiny_epoxy.stabilized.g++.1 @@ -1,4 +1,6 @@ -LAMMPS (4 Nov 2022) +LAMMPS (10 Dec 2025 - Development - patch_10Dec2025-120-ga51f9ba0e7-modified) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. + using 1 OpenMP thread(s) per MPI task # two molecules DGEBA (diepoxy) and one DETA (linker) # two crosslinking reactions @@ -18,7 +20,10 @@ dihedral_style class2 improper_style class2 -read_data tiny_epoxy.data +special_bonds lj/coul 0 0 1 +pair_modify tail yes mix sixthpower + +read_data tiny_epoxy.data extra/special/per/atom 25 Reading data file ... orthogonal box = (10 -10 -15) to (30 20 10) 1 by 1 by 1 MPI processor grid @@ -37,6 +42,8 @@ Reading data file ... 18 = max dihedrals/atom scanning impropers ... 4 = max impropers/atom + orthogonal box = (10 -10 -15) to (30 20 10) + 1 by 1 by 1 MPI processor grid reading bonds ... 123 bonds reading angles ... @@ -46,21 +53,22 @@ Reading data file ... reading impropers ... 115 impropers Finding 1-2 1-3 1-4 neighbors ... - special bond factors lj: 0 0 0 - special bond factors coul: 0 0 0 + special bond factors lj: 0 0 1 + special bond factors coul: 0 0 1 4 = max # of 1-2 neighbors 10 = max # of 1-3 neighbors - 19 = max # of 1-4 neighbors - 22 = max # of special neighbors - special bonds CPU = 0.000 seconds - read_data CPU = 0.015 seconds + 39 = max # of special neighbors + special bonds CPU = 0.001 seconds + read_data CPU = 0.014 seconds velocity all create 300.0 4928459 dist gaussian molecule mol1 rxn1_stp1_pre.molecule_template Read molecule template mol1: +rxn1_stp1_pre 1 molecules 0 fragments + 0 bodies 31 atoms with max type 10 30 bonds with max type 15 53 angles with max type 29 @@ -68,8 +76,10 @@ Read molecule template mol1: 3 impropers with max type 5 molecule mol2 rxn1_stp1_post.molecule_template Read molecule template mol2: +rxn1_stp1_post 1 molecules 0 fragments + 0 bodies 31 atoms with max type 10 30 bonds with max type 17 55 angles with max type 36 @@ -77,8 +87,10 @@ Read molecule template mol2: 2 impropers with max type 5 molecule mol3 rxn1_stp2_post.molecule_template Read molecule template mol3: +rxn1_stp2_post 1 molecules 0 fragments + 0 bodies 31 atoms with max type 11 30 bonds with max type 18 53 angles with max type 37 @@ -86,8 +98,10 @@ Read molecule template mol3: 3 impropers with max type 5 molecule mol4 rxn2_stp1_pre.molecule_template Read molecule template mol4: +rxn2_stp1_pre 1 molecules 0 fragments + 0 bodies 42 atoms with max type 11 41 bonds with max type 18 73 angles with max type 41 @@ -95,8 +109,10 @@ Read molecule template mol4: 3 impropers with max type 5 molecule mol5 rxn2_stp1_post.molecule_template Read molecule template mol5: +rxn2_stp1_post 1 molecules 0 fragments + 0 bodies 42 atoms with max type 11 41 bonds with max type 18 75 angles with max type 37 @@ -104,8 +120,10 @@ Read molecule template mol5: 2 impropers with max type 5 molecule mol6 rxn2_stp2_post.molecule_template Read molecule template mol6: +rxn2_stp2_post 1 molecules 0 fragments + 0 bodies 42 atoms with max type 11 41 bonds with max type 19 73 angles with max type 50 @@ -115,6 +133,7 @@ Read molecule template mol6: thermo 50 # dump 1 all xyz 1 test_vis.xyz +# dump_modify 1 types labels fix rxns all bond/react stabilization yes statted_grp .03 react rxn1_stp1 all 1 0.0 5 mol1 mol2 rxn1_stp1.map react rxn1_stp2 all 1 0.0 5 mol2 mol3 rxn1_stp2.map react rxn2_stp1 all 1 0.0 5 mol4 mol5 rxn2_stp1.map react rxn2_stp2 all 1 0.0 5 mol5 mol6 rxn2_stp2.map dynamic group bond_react_MASTER_group defined @@ -123,7 +142,8 @@ dynamic group statted_grp_REACT defined fix 1 statted_grp_REACT nvt temp 300 300 100 -thermo_style custom step temp f_rxns[1] f_rxns[2] f_rxns[3] f_rxns[4] +thermo_style custom step temp f_rxns[*] +thermo_modify colname auto run 2000 @@ -131,7 +151,19 @@ CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE Your simulation uses code contributions which should be cited: -- fix bond/react: reacter.org doi:10.1016/j.polymer.2017.09.038, doi:10.1021/acs.macromol.0c02012 +- Type Label Framework: https://doi.org/10.1021/acs.jpcb.3c08419 + +@Article{Gissinger24, + author = {Jacob R. Gissinger, Ilia Nikiforov, Yaser Afshar, Brendon Waters, Moon-ki Choi, Daniel S. Karls, Alexander Stukowski, Wonpil Im, Hendrik Heinz, Axel Kohlmeyer, and Ellad B. Tadmor}, + title = {Type Label Framework for Bonded Force Fields in LAMMPS}, + journal = {J. Phys. Chem. B}, + year = 2024, + volume = 128, + number = 13, + pages = {3282--3297} +} + +- fix bond/react: https://reacter.org, https://doi.org/10.1016/j.polymer.2017.09.038, https://doi.org/10.1021/acs.macromol.0c02012, https://doi.org/10.1016/j.cpc.2024.109287 @Article{Gissinger17, author = {J. R. Gissinger and B. D. Jensen and K. E. Wise}, @@ -152,9 +184,18 @@ Your simulation uses code contributions which should be cited: pages = {9953--9961} } +@Article{Gissinger24, + author = {J. R. Gissinger, B. D. Jensen, K. E. Wise}, + title = {Molecular Modeling of Reactive Systems with REACTER}, + journal = {Computer Physics Communications}, + year = 2024, + volume = 304, + number = 109287 +} + CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE -Generated 55 of 55 mixed pair_coeff terms from sixthpower/geometric mixing rule +Generated 55 of 55 mixed pair_coeff terms from sixthpower/sixthpower mixing rule Neighbor list info ... update: every = 1 steps, delay = 0 steps, check = yes max neighbors/atom: 2000, page size: 100000 @@ -172,78 +213,78 @@ Neighbor list info ... pair build: copy stencil: none bin: none -Per MPI rank memory allocation (min/avg/max) = 16.64 | 16.64 | 16.64 Mbytes - Step Temp f_rxns[1] f_rxns[2] f_rxns[3] f_rxns[4] +Per MPI rank memory allocation (min/avg/max) = 17.76 | 17.76 | 17.76 Mbytes + Step Temp f_rxns:rxn1_stp1 f_rxns:rxn1_stp2 f_rxns:rxn2_stp1 f_rxns:rxn2_stp2 0 300 0 0 0 0 - 50 378.29345 1 0 0 0 - 100 471.04152 1 1 0 0 - 150 583.79755 1 1 1 0 - 200 526.00812 1 1 1 1 - 250 429.56812 1 1 1 1 - 300 512.54655 1 1 1 1 - 350 461.18357 1 1 1 1 - 400 379.38965 1 1 1 1 - 450 424.89528 1 1 1 1 - 500 324.72257 1 1 1 1 - 550 302.91042 1 1 1 1 - 600 253.80911 1 1 1 1 - 650 252.90262 1 1 1 1 - 700 270.62628 1 1 1 1 - 750 311.64391 1 1 1 1 - 800 318.9413 1 1 1 1 - 850 354.20196 1 1 1 1 - 900 302.19641 1 1 1 1 - 950 316.97905 1 1 1 1 - 1000 303.08194 1 1 1 1 - 1050 317.51619 1 1 1 1 - 1100 287.57204 1 1 1 1 - 1150 226.72101 1 1 1 1 - 1200 283.97519 1 1 1 1 - 1250 287.0607 1 1 1 1 - 1300 327.65278 1 1 1 1 - 1350 316.06809 1 1 1 1 - 1400 337.69947 1 1 1 1 - 1450 326.12278 1 1 1 1 - 1500 300.89265 1 1 1 1 - 1550 325.2415 1 1 1 1 - 1600 294.1844 1 1 1 1 - 1650 293.98596 1 1 1 1 - 1700 317.35477 1 1 1 1 - 1750 296.97768 1 1 1 1 - 1800 274.97297 1 1 1 1 - 1850 335.36697 1 1 1 1 - 1900 315.3756 1 1 1 1 - 1950 260.65335 1 1 1 1 - 2000 354.03612 1 1 1 1 -Loop time of 0.910097 on 1 procs for 2000 steps with 118 atoms - -Performance: 189.870 ns/day, 0.126 hours/ns, 2197.568 timesteps/s, 259.313 katom-step/s -99.9% CPU use with 1 MPI tasks x no OpenMP threads + 50 366.13708 1 0 0 0 + 100 460.17785 1 1 0 0 + 150 563.11 1 1 1 0 + 200 536.77304 1 1 1 1 + 250 498.03818 1 1 1 1 + 300 469.58111 1 1 1 1 + 350 446.76277 1 1 1 1 + 400 392.54153 1 1 1 1 + 450 329.04862 1 1 1 1 + 500 308.39632 1 1 1 1 + 550 311.01907 1 1 1 1 + 600 237.06325 1 1 1 1 + 650 266.39114 1 1 1 1 + 700 255.5141 1 1 1 1 + 750 265.68996 1 1 1 1 + 800 307.68909 1 1 1 1 + 850 288.9997 1 1 1 1 + 900 324.83272 1 1 1 1 + 950 329.62814 1 1 1 1 + 1000 292.72795 1 1 1 1 + 1050 288.99752 1 1 1 1 + 1100 309.17769 1 1 1 1 + 1150 334.54694 1 1 1 1 + 1200 291.39185 1 1 1 1 + 1250 285.41824 1 1 1 1 + 1300 278.1858 1 1 1 1 + 1350 290.69319 1 1 1 1 + 1400 281.81528 1 1 1 1 + 1450 303.36654 1 1 1 1 + 1500 314.34697 1 1 1 1 + 1550 336.77168 1 1 1 1 + 1600 305.39633 1 1 1 1 + 1650 301.20971 1 1 1 1 + 1700 300.67406 1 1 1 1 + 1750 285.00769 1 1 1 1 + 1800 282.98569 1 1 1 1 + 1850 299.07079 1 1 1 1 + 1900 279.35446 1 1 1 1 + 1950 305.10467 1 1 1 1 + 2000 336.72556 1 1 1 1 +Loop time of 0.497059 on 1 procs for 2000 steps with 118 atoms + +Performance: 347.645 ns/day, 0.069 hours/ns, 4023.666 timesteps/s, 474.793 katom-step/s +94.3% CPU use with 1 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 0.10286 | 0.10286 | 0.10286 | 0.0 | 11.30 -Bond | 0.63714 | 0.63714 | 0.63714 | 0.0 | 70.01 -Neigh | 0.013949 | 0.013949 | 0.013949 | 0.0 | 1.53 -Comm | 0.0056606 | 0.0056606 | 0.0056606 | 0.0 | 0.62 -Output | 0.00055825 | 0.00055825 | 0.00055825 | 0.0 | 0.06 -Modify | 0.14629 | 0.14629 | 0.14629 | 0.0 | 16.07 -Other | | 0.003637 | | | 0.40 +Pair | 0.057538 | 0.057538 | 0.057538 | 0.0 | 11.58 +Bond | 0.31271 | 0.31271 | 0.31271 | 0.0 | 62.91 +Neigh | 0.0082429 | 0.0082429 | 0.0082429 | 0.0 | 1.66 +Comm | 0.0093989 | 0.0093989 | 0.0093989 | 0.0 | 1.89 +Output | 0.00036701 | 0.00036701 | 0.00036701 | 0.0 | 0.07 +Modify | 0.098138 | 0.098138 | 0.098138 | 0.0 | 19.74 +Other | | 0.01066 | | | 2.14 Nlocal: 118 ave 118 max 118 min Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 372 ave 372 max 372 min +Nghost: 422 ave 422 max 422 min Histogram: 1 0 0 0 0 0 0 0 0 0 -Neighs: 3487 ave 3487 max 3487 min +Neighs: 3926 ave 3926 max 3926 min Histogram: 1 0 0 0 0 0 0 0 0 0 -Total # of neighbors = 3487 -Ave neighs/atom = 29.550847 -Ave special neighs/atom = 10.576271 -Neighbor list builds = 68 +Total # of neighbors = 3926 +Ave neighs/atom = 33.271186 +Ave special neighs/atom = 7.4576271 +Neighbor list builds = 67 Dangerous builds = 0 # write_restart restart_longrun # write_data restart_longrun.data nofix -Total wall time: 0:00:01 +Total wall time: 0:00:00 diff --git a/examples/PACKAGES/reaction/tiny_epoxy/log.4Nov2022.tiny_epoxy.stabilized.g++.4 b/examples/PACKAGES/reaction/tiny_epoxy/log.10Dec2025.tiny_epoxy.stabilized.g++.4 similarity index 50% rename from examples/PACKAGES/reaction/tiny_epoxy/log.4Nov2022.tiny_epoxy.stabilized.g++.4 rename to examples/PACKAGES/reaction/tiny_epoxy/log.10Dec2025.tiny_epoxy.stabilized.g++.4 index 5d1a80405ac..6865c654731 100644 --- a/examples/PACKAGES/reaction/tiny_epoxy/log.4Nov2022.tiny_epoxy.stabilized.g++.4 +++ b/examples/PACKAGES/reaction/tiny_epoxy/log.10Dec2025.tiny_epoxy.stabilized.g++.4 @@ -1,4 +1,6 @@ -LAMMPS (4 Nov 2022) +LAMMPS (10 Dec 2025 - Development - patch_10Dec2025-120-ga51f9ba0e7-modified) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. + using 1 OpenMP thread(s) per MPI task # two molecules DGEBA (diepoxy) and one DETA (linker) # two crosslinking reactions @@ -18,7 +20,10 @@ dihedral_style class2 improper_style class2 -read_data tiny_epoxy.data +special_bonds lj/coul 0 0 1 +pair_modify tail yes mix sixthpower + +read_data tiny_epoxy.data extra/special/per/atom 25 Reading data file ... orthogonal box = (10 -10 -15) to (30 20 10) 1 by 2 by 2 MPI processor grid @@ -37,6 +42,8 @@ Reading data file ... 18 = max dihedrals/atom scanning impropers ... 4 = max impropers/atom + orthogonal box = (10 -10 -15) to (30 20 10) + 1 by 2 by 2 MPI processor grid reading bonds ... 123 bonds reading angles ... @@ -46,21 +53,22 @@ Reading data file ... reading impropers ... 115 impropers Finding 1-2 1-3 1-4 neighbors ... - special bond factors lj: 0 0 0 - special bond factors coul: 0 0 0 + special bond factors lj: 0 0 1 + special bond factors coul: 0 0 1 4 = max # of 1-2 neighbors 10 = max # of 1-3 neighbors - 19 = max # of 1-4 neighbors - 22 = max # of special neighbors + 39 = max # of special neighbors special bonds CPU = 0.000 seconds - read_data CPU = 0.013 seconds + read_data CPU = 0.011 seconds velocity all create 300.0 4928459 dist gaussian molecule mol1 rxn1_stp1_pre.molecule_template Read molecule template mol1: +rxn1_stp1_pre 1 molecules 0 fragments + 0 bodies 31 atoms with max type 10 30 bonds with max type 15 53 angles with max type 29 @@ -68,8 +76,10 @@ Read molecule template mol1: 3 impropers with max type 5 molecule mol2 rxn1_stp1_post.molecule_template Read molecule template mol2: +rxn1_stp1_post 1 molecules 0 fragments + 0 bodies 31 atoms with max type 10 30 bonds with max type 17 55 angles with max type 36 @@ -77,8 +87,10 @@ Read molecule template mol2: 2 impropers with max type 5 molecule mol3 rxn1_stp2_post.molecule_template Read molecule template mol3: +rxn1_stp2_post 1 molecules 0 fragments + 0 bodies 31 atoms with max type 11 30 bonds with max type 18 53 angles with max type 37 @@ -86,8 +98,10 @@ Read molecule template mol3: 3 impropers with max type 5 molecule mol4 rxn2_stp1_pre.molecule_template Read molecule template mol4: +rxn2_stp1_pre 1 molecules 0 fragments + 0 bodies 42 atoms with max type 11 41 bonds with max type 18 73 angles with max type 41 @@ -95,8 +109,10 @@ Read molecule template mol4: 3 impropers with max type 5 molecule mol5 rxn2_stp1_post.molecule_template Read molecule template mol5: +rxn2_stp1_post 1 molecules 0 fragments + 0 bodies 42 atoms with max type 11 41 bonds with max type 18 75 angles with max type 37 @@ -104,8 +120,10 @@ Read molecule template mol5: 2 impropers with max type 5 molecule mol6 rxn2_stp2_post.molecule_template Read molecule template mol6: +rxn2_stp2_post 1 molecules 0 fragments + 0 bodies 42 atoms with max type 11 41 bonds with max type 19 73 angles with max type 50 @@ -115,6 +133,7 @@ Read molecule template mol6: thermo 50 # dump 1 all xyz 1 test_vis.xyz +# dump_modify 1 types labels fix rxns all bond/react stabilization yes statted_grp .03 react rxn1_stp1 all 1 0.0 5 mol1 mol2 rxn1_stp1.map react rxn1_stp2 all 1 0.0 5 mol2 mol3 rxn1_stp2.map react rxn2_stp1 all 1 0.0 5 mol4 mol5 rxn2_stp1.map react rxn2_stp2 all 1 0.0 5 mol5 mol6 rxn2_stp2.map dynamic group bond_react_MASTER_group defined @@ -123,7 +142,8 @@ dynamic group statted_grp_REACT defined fix 1 statted_grp_REACT nvt temp 300 300 100 -thermo_style custom step temp f_rxns[1] f_rxns[2] f_rxns[3] f_rxns[4] +thermo_style custom step temp f_rxns[*] +thermo_modify colname auto run 2000 @@ -131,7 +151,19 @@ CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE Your simulation uses code contributions which should be cited: -- fix bond/react: reacter.org doi:10.1016/j.polymer.2017.09.038, doi:10.1021/acs.macromol.0c02012 +- Type Label Framework: https://doi.org/10.1021/acs.jpcb.3c08419 + +@Article{Gissinger24, + author = {Jacob R. Gissinger, Ilia Nikiforov, Yaser Afshar, Brendon Waters, Moon-ki Choi, Daniel S. Karls, Alexander Stukowski, Wonpil Im, Hendrik Heinz, Axel Kohlmeyer, and Ellad B. Tadmor}, + title = {Type Label Framework for Bonded Force Fields in LAMMPS}, + journal = {J. Phys. Chem. B}, + year = 2024, + volume = 128, + number = 13, + pages = {3282--3297} +} + +- fix bond/react: https://reacter.org, https://doi.org/10.1016/j.polymer.2017.09.038, https://doi.org/10.1021/acs.macromol.0c02012, https://doi.org/10.1016/j.cpc.2024.109287 @Article{Gissinger17, author = {J. R. Gissinger and B. D. Jensen and K. E. Wise}, @@ -152,9 +184,18 @@ Your simulation uses code contributions which should be cited: pages = {9953--9961} } +@Article{Gissinger24, + author = {J. R. Gissinger, B. D. Jensen, K. E. Wise}, + title = {Molecular Modeling of Reactive Systems with REACTER}, + journal = {Computer Physics Communications}, + year = 2024, + volume = 304, + number = 109287 +} + CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE -Generated 55 of 55 mixed pair_coeff terms from sixthpower/geometric mixing rule +Generated 55 of 55 mixed pair_coeff terms from sixthpower/sixthpower mixing rule Neighbor list info ... update: every = 1 steps, delay = 0 steps, check = yes max neighbors/atom: 2000, page size: 100000 @@ -172,76 +213,76 @@ Neighbor list info ... pair build: copy stencil: none bin: none -Per MPI rank memory allocation (min/avg/max) = 16.63 | 16.63 | 16.64 Mbytes - Step Temp f_rxns[1] f_rxns[2] f_rxns[3] f_rxns[4] +Per MPI rank memory allocation (min/avg/max) = 17.75 | 17.75 | 17.76 Mbytes + Step Temp f_rxns:rxn1_stp1 f_rxns:rxn1_stp2 f_rxns:rxn2_stp1 f_rxns:rxn2_stp2 0 300 0 0 0 0 - 50 378.29345 1 0 0 0 - 100 471.04152 1 1 0 0 - 150 583.79755 1 1 1 0 - 200 526.00812 1 1 1 1 - 250 429.56812 1 1 1 1 - 300 512.54655 1 1 1 1 - 350 461.18357 1 1 1 1 - 400 379.38965 1 1 1 1 - 450 424.89528 1 1 1 1 - 500 324.72257 1 1 1 1 - 550 302.91042 1 1 1 1 - 600 253.80911 1 1 1 1 - 650 252.90262 1 1 1 1 - 700 270.62628 1 1 1 1 - 750 311.64391 1 1 1 1 - 800 318.9413 1 1 1 1 - 850 354.20196 1 1 1 1 - 900 302.19641 1 1 1 1 - 950 316.97905 1 1 1 1 - 1000 303.08194 1 1 1 1 - 1050 317.51619 1 1 1 1 - 1100 287.57204 1 1 1 1 - 1150 226.72101 1 1 1 1 - 1200 283.97519 1 1 1 1 - 1250 287.0607 1 1 1 1 - 1300 327.65278 1 1 1 1 - 1350 316.06809 1 1 1 1 - 1400 337.69947 1 1 1 1 - 1450 326.12278 1 1 1 1 - 1500 300.89265 1 1 1 1 - 1550 325.2415 1 1 1 1 - 1600 294.1844 1 1 1 1 - 1650 293.98596 1 1 1 1 - 1700 317.35477 1 1 1 1 - 1750 296.97768 1 1 1 1 - 1800 274.97297 1 1 1 1 - 1850 335.36698 1 1 1 1 - 1900 315.3756 1 1 1 1 - 1950 260.65334 1 1 1 1 - 2000 354.03612 1 1 1 1 -Loop time of 0.47159 on 4 procs for 2000 steps with 118 atoms - -Performance: 366.420 ns/day, 0.065 hours/ns, 4240.970 timesteps/s, 500.434 katom-step/s -99.9% CPU use with 4 MPI tasks x no OpenMP threads + 50 366.13708 1 0 0 0 + 100 460.17785 1 1 0 0 + 150 563.11 1 1 1 0 + 200 536.77304 1 1 1 1 + 250 498.03818 1 1 1 1 + 300 469.58111 1 1 1 1 + 350 446.76277 1 1 1 1 + 400 392.54153 1 1 1 1 + 450 329.04862 1 1 1 1 + 500 308.39632 1 1 1 1 + 550 311.01907 1 1 1 1 + 600 237.06325 1 1 1 1 + 650 266.39114 1 1 1 1 + 700 255.5141 1 1 1 1 + 750 265.68996 1 1 1 1 + 800 307.68909 1 1 1 1 + 850 288.9997 1 1 1 1 + 900 324.83272 1 1 1 1 + 950 329.62814 1 1 1 1 + 1000 292.72795 1 1 1 1 + 1050 288.99752 1 1 1 1 + 1100 309.17769 1 1 1 1 + 1150 334.54694 1 1 1 1 + 1200 291.39185 1 1 1 1 + 1250 285.41824 1 1 1 1 + 1300 278.1858 1 1 1 1 + 1350 290.69319 1 1 1 1 + 1400 281.81528 1 1 1 1 + 1450 303.36654 1 1 1 1 + 1500 314.34697 1 1 1 1 + 1550 336.77168 1 1 1 1 + 1600 305.39633 1 1 1 1 + 1650 301.20971 1 1 1 1 + 1700 300.67406 1 1 1 1 + 1750 285.00769 1 1 1 1 + 1800 282.98569 1 1 1 1 + 1850 299.07079 1 1 1 1 + 1900 279.35446 1 1 1 1 + 1950 305.10467 1 1 1 1 + 2000 336.72556 1 1 1 1 +Loop time of 0.28779 on 4 procs for 2000 steps with 118 atoms + +Performance: 600.438 ns/day, 0.040 hours/ns, 6949.513 timesteps/s, 820.043 katom-step/s +90.6% 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.016546 | 0.024458 | 0.038858 | 5.5 | 5.19 -Bond | 0.072622 | 0.16458 | 0.21778 | 13.9 | 34.90 -Neigh | 0.0056307 | 0.0056812 | 0.0057292 | 0.1 | 1.20 -Comm | 0.028022 | 0.095922 | 0.19526 | 20.3 | 20.34 -Output | 0.00034591 | 0.00041633 | 0.00062378 | 0.0 | 0.09 -Modify | 0.17613 | 0.17649 | 0.17711 | 0.1 | 37.43 -Other | | 0.00404 | | | 0.86 - -Nlocal: 29.5 ave 45 max 7 min +Pair | 0.014084 | 0.016131 | 0.020212 | 1.9 | 5.61 +Bond | 0.045223 | 0.0806 | 0.098069 | 7.4 | 28.01 +Neigh | 0.0030071 | 0.0030289 | 0.0030489 | 0.0 | 1.05 +Comm | 0.022562 | 0.040911 | 0.078218 | 11.0 | 14.22 +Output | 0.00029892 | 0.00035167 | 0.00050991 | 0.0 | 0.12 +Modify | 0.13496 | 0.13504 | 0.1352 | 0.0 | 46.92 +Other | | 0.01173 | | | 4.08 + +Nlocal: 29.5 ave 43 max 10 min Histogram: 1 0 0 0 0 0 1 1 0 1 -Nghost: 315 ave 343 max 287 min -Histogram: 1 1 0 0 0 0 0 0 1 1 -Neighs: 871.75 ave 1772 max 236 min -Histogram: 1 0 1 1 0 0 0 0 0 1 - -Total # of neighbors = 3487 -Ave neighs/atom = 29.550847 -Ave special neighs/atom = 10.576271 -Neighbor list builds = 68 +Nghost: 343 ave 378 max 308 min +Histogram: 1 0 0 0 1 1 0 0 0 1 +Neighs: 981.5 ave 1430 max 539 min +Histogram: 1 0 1 0 0 0 0 1 0 1 + +Total # of neighbors = 3926 +Ave neighs/atom = 33.271186 +Ave special neighs/atom = 7.4576271 +Neighbor list builds = 67 Dangerous builds = 0 # write_restart restart_longrun diff --git a/examples/PACKAGES/reaction/tiny_nylon/in.tiny_nylon.stabilized b/examples/PACKAGES/reaction/tiny_nylon/in.tiny_nylon.stabilized index 06ac9d5cb75..27db59e3667 100644 --- a/examples/PACKAGES/reaction/tiny_nylon/in.tiny_nylon.stabilized +++ b/examples/PACKAGES/reaction/tiny_nylon/in.tiny_nylon.stabilized @@ -52,6 +52,7 @@ fix 1 statted_grp_REACT nvt temp 300 300 100 fix 4 bond_react_MASTER_group temp/rescale 1 300 300 10 1 thermo_style custom step temp press density f_myrxns[*] +thermo_modify colname auto # restart 100 restart1 restart2 diff --git a/examples/PACKAGES/reaction/tiny_nylon/in.tiny_nylon.stabilized_variable_probability b/examples/PACKAGES/reaction/tiny_nylon/in.tiny_nylon.stabilized_variable_probability index 80f86db1ec4..55d2ef573fd 100644 --- a/examples/PACKAGES/reaction/tiny_nylon/in.tiny_nylon.stabilized_variable_probability +++ b/examples/PACKAGES/reaction/tiny_nylon/in.tiny_nylon.stabilized_variable_probability @@ -56,6 +56,7 @@ fix 1 statted_grp_REACT nvt temp 300 300 100 fix 4 bond_react_MASTER_group temp/rescale 1 300 300 10 1 thermo_style custom step temp press density v_prob1 v_prob2 f_myrxns[*] +thermo_modify colname auto # restart 100 restart1 restart2 diff --git a/examples/PACKAGES/reaction/tiny_nylon/in.tiny_nylon.unstabilized b/examples/PACKAGES/reaction/tiny_nylon/in.tiny_nylon.unstabilized index 74f521d74e1..a460e0bd9f4 100644 --- a/examples/PACKAGES/reaction/tiny_nylon/in.tiny_nylon.unstabilized +++ b/examples/PACKAGES/reaction/tiny_nylon/in.tiny_nylon.unstabilized @@ -49,6 +49,7 @@ fix myrxns all bond/react stabilization no & fix 1 all nve/limit .03 thermo_style custom step temp press density f_myrxns[*] +thermo_modify colname auto # restart 100 restart1 restart2 diff --git a/examples/PACKAGES/reaction/tiny_nylon/log.10Dec2025.tiny_nylon.stabilized.g++.1 b/examples/PACKAGES/reaction/tiny_nylon/log.10Dec2025.tiny_nylon.stabilized.g++.1 new file mode 100644 index 00000000000..84697fc01d9 --- /dev/null +++ b/examples/PACKAGES/reaction/tiny_nylon/log.10Dec2025.tiny_nylon.stabilized.g++.1 @@ -0,0 +1,449 @@ +LAMMPS (10 Dec 2025 - Development - patch_10Dec2025-120-ga51f9ba0e7-modified) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. + using 1 OpenMP thread(s) per MPI task +# two monomer nylon example +# reaction produces a condensed water molecule + +units real + +boundary p p p + +atom_style full + +kspace_style pppm 1.0e-4 + +pair_style lj/class2/coul/long 8.5 + +angle_style class2 + +bond_style class2 + +dihedral_style class2 + +improper_style class2 + +special_bonds lj/coul 0 0 1 +pair_modify tail yes mix sixthpower + +read_data tiny_nylon.data extra/bond/per/atom 5 extra/angle/per/atom 15 extra/dihedral/per/atom 15 extra/improper/per/atom 25 extra/special/per/atom 25 +Reading data file ... + orthogonal box = (-25 -25 -25) to (25 25 25) + 1 by 1 by 1 MPI processor grid + reading atom labelmap ... + reading bond labelmap ... + reading angle labelmap ... + reading dihedral labelmap ... + reading improper labelmap ... + reading atoms ... + 44 atoms + reading velocities ... + 44 velocities + scanning bonds ... + 9 = max bonds/atom + scanning angles ... + 21 = max angles/atom + scanning dihedrals ... + 29 = max dihedrals/atom + scanning impropers ... + 29 = max impropers/atom + orthogonal box = (-25 -25 -25) to (25 25 25) + 1 by 1 by 1 MPI processor grid + reading bonds ... + 42 bonds + reading angles ... + 74 angles + reading dihedrals ... + 100 dihedrals + reading impropers ... + 16 impropers +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 1 + special bond factors coul: 0 0 1 + 4 = max # of 1-2 neighbors + 6 = max # of 1-3 neighbors + 35 = max # of special neighbors + special bonds CPU = 0.001 seconds + read_data CPU = 0.013 seconds + +velocity all create 300.0 4928459 dist gaussian + +molecule mol1 rxn1_stp1_unreacted.molecule_template +Read molecule template mol1: +this is a molecule template for: initial nylon crosslink, pre-reacting + 1 molecules + 0 fragments + 0 bodies + 18 atoms with max type 8 + 16 bonds with max type 8 + 25 angles with max type 25 + 23 dihedrals with max type 33 + 2 impropers with max type 3 +molecule mol2 rxn1_stp1_reacted.molecule_template +Read molecule template mol2: +this is a molecule template for: initial nylon crosslink, post-reacting + 1 molecules + 0 fragments + 0 bodies + 18 atoms with max type 9 + 17 bonds with max type 11 + 31 angles with max type 24 + 39 dihedrals with max type 30 + 0 impropers with max type 0 +molecule mol3 rxn1_stp2_unreacted.molecule_template +Read molecule template mol3: +this is a molecule template for: water condensation, pre-reacting + 1 molecules + 0 fragments + 0 bodies + 15 atoms with max type 9 + 14 bonds with max type 11 + 25 angles with max type 24 + 30 dihedrals with max type 30 + 0 impropers with max type 0 +molecule mol4 rxn1_stp2_reacted.molecule_template +Read molecule template mol4: +this is a molecule template for: water condensation, post-reacting + 1 molecules + 0 fragments + 0 bodies + 15 atoms with max type 11 + 13 bonds with max type 13 + 19 angles with max type 26 + 16 dihedrals with max type 29 + 2 impropers with max type 5 + +thermo 50 + +# dump 1 all xyz 1 test_vis.xyz +# dump_modify 1 types labels + +fix myrxns all bond/react stabilization yes statted_grp .03 react rxn1 all 1 0.0 2.9 mol1 mol2 rxn1_stp1_map react rxn2 all 1 0.0 5.0 mol3 mol4 rxn1_stp2_map rescale_charges yes +WARNING: Fix bond/react: Atom affected by reaction rxn1 is too close to template edge (src/REACTION/fix_bond_react.cpp:2630) +WARNING: Fix bond/react: Atom affected by reaction rxn2 is too close to template edge (src/REACTION/fix_bond_react.cpp:2630) +dynamic group bond_react_MASTER_group defined +dynamic group statted_grp_REACT defined + +fix 1 statted_grp_REACT nvt temp 300 300 100 + +# optionally, you can customize behavior of reacting atoms, +# by using the internally-created 'bond_react_MASTER_group', like so: +fix 4 bond_react_MASTER_group temp/rescale 1 300 300 10 1 + +thermo_style custom step temp press density f_myrxns[*] +thermo_modify colname auto + +# restart 100 restart1 restart2 + +run 10000 + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Your simulation uses code contributions which should be cited: + +- Type Label Framework: https://doi.org/10.1021/acs.jpcb.3c08419 + +@Article{Gissinger24, + author = {Jacob R. Gissinger, Ilia Nikiforov, Yaser Afshar, Brendon Waters, Moon-ki Choi, Daniel S. Karls, Alexander Stukowski, Wonpil Im, Hendrik Heinz, Axel Kohlmeyer, and Ellad B. Tadmor}, + title = {Type Label Framework for Bonded Force Fields in LAMMPS}, + journal = {J. Phys. Chem. B}, + year = 2024, + volume = 128, + number = 13, + pages = {3282--3297} +} + +- fix bond/react: https://reacter.org, https://doi.org/10.1016/j.polymer.2017.09.038, https://doi.org/10.1021/acs.macromol.0c02012, https://doi.org/10.1016/j.cpc.2024.109287 + +@Article{Gissinger17, + author = {J. R. Gissinger and B. D. Jensen and K. E. Wise}, + title = {Modeling Chemical Reactions in Classical Molecular Dynamics Simulations}, + journal = {Polymer}, + year = 2017, + volume = 128, + pages = {211--217} +} + +@Article{Gissinger20, + author = {J. R. Gissinger, B. D. Jensen, K. E. Wise}, + title = {{REACTER}: A Heuristic Method for Reactive Molecular Dynamics}, + journal = {Macromolecules}, + year = 2020, + volume = 53, + number = 22, + pages = {9953--9961} +} + +@Article{Gissinger24, + author = {J. R. Gissinger, B. D. Jensen, K. E. Wise}, + title = {Molecular Modeling of Reactive Systems with REACTER}, + journal = {Computer Physics Communications}, + year = 2024, + volume = 304, + number = 109287 +} + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +PPPM initialization ... + using 12-bit tables for long-range coulomb + G vector (1/distance) = 0.23408048 + grid = 15 15 15 + stencil order = 5 + estimated absolute RMS force accuracy = 0.018627396 + estimated relative force accuracy = 5.6095851e-05 + using double precision KISS FFT + 3d grid and FFT values/proc = 8000 3375 +Generated 55 of 55 mixed pair_coeff terms from sixthpower/sixthpower mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 10.5 + ghost atom cutoff = 10.5 + binsize = 5.25, bins = 10 10 10 + 2 neighbor lists, perpetual/occasional/extra = 1 1 0 + (1) pair lj/class2/coul/long, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard + (2) fix bond/react, occasional, copy from (1) + attributes: half, newton on + pair build: copy + stencil: none + bin: none +Per MPI rank memory allocation (min/avg/max) = 34 | 34 | 34 Mbytes + Step Temp Press Density f_myrxns:rxn1 f_myrxns:rxn2 + 0 300 357.25587 0.0034851739 0 0 + 50 323.13357 -36.901145 0.0034851739 1 0 + 100 303.51 11.102115 0.0034851739 1 1 + 150 332.31667 -25.20854 0.0034851739 1 1 + 200 278.87792 25.724788 0.0034851739 1 1 + 250 306.00815 -9.2221074 0.0034851739 1 1 + 300 254.72154 -5.7953243 0.0034851739 1 1 + 350 267.62849 23.758906 0.0034851739 1 1 + 400 320.81812 3.3741667 0.0034851739 1 1 + 450 376.12912 -10.240072 0.0034851739 1 1 + 500 409.47719 17.579329 0.0034851739 1 1 + 550 251.53858 -1.8557267 0.0034851739 1 1 + 600 237.09927 19.34288 0.0034851739 1 1 + 650 325.85267 12.350177 0.0034851739 1 1 + 700 281.35713 2.4348132 0.0034851739 1 1 + 750 348.96295 10.699428 0.0034851739 1 1 + 800 285.14402 -34.310532 0.0034851739 1 1 + 850 272.05347 -29.232748 0.0034851739 1 1 + 900 233.75445 25.081058 0.0034851739 1 1 + 950 270.83374 36.530225 0.0034851739 1 1 + 1000 226.39852 -25.096611 0.0034851739 1 1 + 1050 252.97685 -38.37156 0.0034851739 1 1 + 1100 298.67428 53.002074 0.0034851739 1 1 + 1150 291.35413 -0.58731897 0.0034851739 1 1 + 1200 338.55035 -12.606111 0.0034851739 1 1 + 1250 273.47404 2.607543 0.0034851739 1 1 + 1300 238.32578 103.89008 0.0034851739 1 1 + 1350 289.72019 35.589762 0.0034851739 1 1 + 1400 308.55022 -14.264782 0.0034851739 1 1 + 1450 335.61808 -4.3227051 0.0034851739 1 1 + 1500 322.5053 17.455704 0.0034851739 1 1 + 1550 394.29493 9.2107081 0.0034851739 1 1 + 1600 381.1899 17.682818 0.0034851739 1 1 + 1650 335.99677 -48.364172 0.0034851739 1 1 + 1700 303.84175 -45.864487 0.0034851739 1 1 + 1750 320.31942 -11.504271 0.0034851739 1 1 + 1800 294.21365 -26.343709 0.0034851739 1 1 + 1850 279.81064 6.0658344 0.0034851739 1 1 + 1900 303.71918 -49.271788 0.0034851739 1 1 + 1950 291.23621 5.1869409 0.0034851739 1 1 + 2000 233.32832 2.109592 0.0034851739 1 1 + 2050 341.6919 48.003744 0.0034851739 1 1 + 2100 349.44789 -42.906017 0.0034851739 1 1 + 2150 329.88667 -4.1766291 0.0034851739 1 1 + 2200 337.70336 56.336888 0.0034851739 1 1 + 2250 318.31319 -12.164076 0.0034851739 1 1 + 2300 298.29507 -6.4401592 0.0034851739 1 1 + 2350 304.95999 16.417381 0.0034851739 1 1 + 2400 290.62449 3.8105734 0.0034851739 1 1 + 2450 346.62602 51.604346 0.0034851739 1 1 + 2500 259.10879 14.228307 0.0034851739 1 1 + 2550 335.33894 -16.037611 0.0034851739 1 1 + 2600 299.89407 -9.8662594 0.0034851739 1 1 + 2650 348.15539 -8.1996299 0.0034851739 1 1 + 2700 343.85656 -72.012595 0.0034851739 1 1 + 2750 378.24423 -7.2314213 0.0034851739 1 1 + 2800 329.78551 72.122685 0.0034851739 1 1 + 2850 336.43123 -26.141529 0.0034851739 1 1 + 2900 290.77205 21.589584 0.0034851739 1 1 + 2950 286.07747 31.455029 0.0034851739 1 1 + 3000 274.54408 18.865778 0.0034851739 1 1 + 3050 237.71503 21.195126 0.0034851739 1 1 + 3100 300.19233 46.381452 0.0034851739 1 1 + 3150 310.662 -48.41422 0.0034851739 1 1 + 3200 356.68406 3.4820791 0.0034851739 1 1 + 3250 345.18655 -14.929512 0.0034851739 1 1 + 3300 303.81384 -106.62742 0.0034851739 1 1 + 3350 363.1079 53.537967 0.0034851739 1 1 + 3400 344.77548 -0.32949356 0.0034851739 1 1 + 3450 285.60132 16.994506 0.0034851739 1 1 + 3500 292.34164 27.878366 0.0034851739 1 1 + 3550 313.51585 -65.418373 0.0034851739 1 1 + 3600 299.37996 7.1201351 0.0034851739 1 1 + 3650 293.80815 25.383956 0.0034851739 1 1 + 3700 318.55512 -31.086255 0.0034851739 1 1 + 3750 338.01158 4.3233345 0.0034851739 1 1 + 3800 335.62457 -21.672062 0.0034851739 1 1 + 3850 373.55792 -18.344518 0.0034851739 1 1 + 3900 299.00966 -52.411817 0.0034851739 1 1 + 3950 348.18017 16.762978 0.0034851739 1 1 + 4000 302.36814 20.412765 0.0034851739 1 1 + 4050 304.31703 -18.932636 0.0034851739 1 1 + 4100 322.3382 -12.205649 0.0034851739 1 1 + 4150 262.29776 -46.258119 0.0034851739 1 1 + 4200 265.29241 -15.879948 0.0034851739 1 1 + 4250 337.64589 -29.097853 0.0034851739 1 1 + 4300 394.67042 5.3180839 0.0034851739 1 1 + 4350 288.70522 -2.7038433 0.0034851739 1 1 + 4400 349.62275 55.384045 0.0034851739 1 1 + 4450 350.05246 -20.531148 0.0034851739 1 1 + 4500 263.12901 39.99287 0.0034851739 1 1 + 4550 245.82317 -11.107772 0.0034851739 1 1 + 4600 215.28781 -13.078366 0.0034851739 1 1 + 4650 213.62697 18.061273 0.0034851739 1 1 + 4700 283.00551 9.1457527 0.0034851739 1 1 + 4750 322.2234 -5.6773995 0.0034851739 1 1 + 4800 321.01027 24.636298 0.0034851739 1 1 + 4850 308.37924 8.0190603 0.0034851739 1 1 + 4900 313.29993 -21.926107 0.0034851739 1 1 + 4950 318.79709 -38.641178 0.0034851739 1 1 + 5000 332.5323 -10.994049 0.0034851739 1 1 + 5050 263.77853 -19.155804 0.0034851739 1 1 + 5100 249.43481 14.049613 0.0034851739 1 1 + 5150 272.43126 2.1161776 0.0034851739 1 1 + 5200 287.20643 14.651374 0.0034851739 1 1 + 5250 227.2215 14.436162 0.0034851739 1 1 + 5300 220.70331 -12.059096 0.0034851739 1 1 + 5350 294.48483 -13.056616 0.0034851739 1 1 + 5400 301.111 -13.25331 0.0034851739 1 1 + 5450 286.4577 7.6904099 0.0034851739 1 1 + 5500 307.72688 -32.456764 0.0034851739 1 1 + 5550 284.13917 -27.497649 0.0034851739 1 1 + 5600 270.02975 -16.954712 0.0034851739 1 1 + 5650 313.97465 -1.1028839 0.0034851739 1 1 + 5700 286.18167 14.125288 0.0034851739 1 1 + 5750 269.14352 27.19375 0.0034851739 1 1 + 5800 235.50295 12.547718 0.0034851739 1 1 + 5850 218.68087 48.894385 0.0034851739 1 1 + 5900 299.41286 6.9150462 0.0034851739 1 1 + 5950 283.91534 -41.435248 0.0034851739 1 1 + 6000 351.51818 -11.971798 0.0034851739 1 1 + 6050 370.17973 8.1936067 0.0034851739 1 1 + 6100 287.87457 23.844459 0.0034851739 1 1 + 6150 282.12003 14.196677 0.0034851739 1 1 + 6200 239.67426 31.389011 0.0034851739 1 1 + 6250 265.84426 -22.797645 0.0034851739 1 1 + 6300 320.48833 13.611918 0.0034851739 1 1 + 6350 354.54726 -8.6164904 0.0034851739 1 1 + 6400 351.91168 -45.632257 0.0034851739 1 1 + 6450 404.6967 8.7160731 0.0034851739 1 1 + 6500 273.77467 19.710654 0.0034851739 1 1 + 6550 283.46688 2.8728029 0.0034851739 1 1 + 6600 241.76828 -49.04184 0.0034851739 1 1 + 6650 289.50471 12.670232 0.0034851739 1 1 + 6700 261.57213 -13.663425 0.0034851739 1 1 + 6750 292.31184 18.675826 0.0034851739 1 1 + 6800 290.61615 17.153393 0.0034851739 1 1 + 6850 345.29773 -6.8794198 0.0034851739 1 1 + 6900 382.8504 0.086203475 0.0034851739 1 1 + 6950 330.68716 22.3792 0.0034851739 1 1 + 7000 351.2043 33.53224 0.0034851739 1 1 + 7050 260.75316 -3.0830773 0.0034851739 1 1 + 7100 238.61023 -25.377481 0.0034851739 1 1 + 7150 278.02381 29.708903 0.0034851739 1 1 + 7200 281.78581 -11.613886 0.0034851739 1 1 + 7250 299.19023 -40.148778 0.0034851739 1 1 + 7300 347.16566 1.6164218 0.0034851739 1 1 + 7350 334.98219 30.334651 0.0034851739 1 1 + 7400 280.26928 -31.933329 0.0034851739 1 1 + 7450 277.48917 -5.1849913 0.0034851739 1 1 + 7500 247.47699 7.6810611 0.0034851739 1 1 + 7550 223.03144 -29.416983 0.0034851739 1 1 + 7600 272.28929 8.5690923 0.0034851739 1 1 + 7650 278.73246 106.03104 0.0034851739 1 1 + 7700 262.96706 -31.491702 0.0034851739 1 1 + 7750 330.23917 21.757497 0.0034851739 1 1 + 7800 343.96783 36.898555 0.0034851739 1 1 + 7850 341.22049 -43.387928 0.0034851739 1 1 + 7900 277.06257 -71.348468 0.0034851739 1 1 + 7950 330.90733 17.613434 0.0034851739 1 1 + 8000 310.39669 -8.2136094 0.0034851739 1 1 + 8050 310.47524 -30.623829 0.0034851739 1 1 + 8100 290.2114 -24.485156 0.0034851739 1 1 + 8150 255.01637 60.297045 0.0034851739 1 1 + 8200 266.73273 2.3178283 0.0034851739 1 1 + 8250 325.75807 -36.58488 0.0034851739 1 1 + 8300 289.72733 30.040033 0.0034851739 1 1 + 8350 326.57575 -20.981666 0.0034851739 1 1 + 8400 379.29835 44.435283 0.0034851739 1 1 + 8450 333.38125 -0.05363945 0.0034851739 1 1 + 8500 305.08411 -26.538845 0.0034851739 1 1 + 8550 349.58907 66.193068 0.0034851739 1 1 + 8600 270.32146 5.1332354 0.0034851739 1 1 + 8650 248.67123 26.592957 0.0034851739 1 1 + 8700 288.11042 34.114624 0.0034851739 1 1 + 8750 252.34031 -32.966873 0.0034851739 1 1 + 8800 304.24822 6.8056503 0.0034851739 1 1 + 8850 306.08573 27.793193 0.0034851739 1 1 + 8900 341.1829 18.131124 0.0034851739 1 1 + 8950 360.96467 -49.295482 0.0034851739 1 1 + 9000 334.98737 10.524633 0.0034851739 1 1 + 9050 283.8927 -36.034176 0.0034851739 1 1 + 9100 342.99378 25.401513 0.0034851739 1 1 + 9150 275.94637 -8.2056556 0.0034851739 1 1 + 9200 329.51306 35.725721 0.0034851739 1 1 + 9250 260.20864 -1.0676031 0.0034851739 1 1 + 9300 266.63017 -35.836913 0.0034851739 1 1 + 9350 206.63311 1.9506084 0.0034851739 1 1 + 9400 275.17708 34.35797 0.0034851739 1 1 + 9450 231.6401 4.1075349 0.0034851739 1 1 + 9500 256.90247 2.0767575 0.0034851739 1 1 + 9550 234.64698 -16.583201 0.0034851739 1 1 + 9600 299.47817 24.526294 0.0034851739 1 1 + 9650 313.68135 -56.626926 0.0034851739 1 1 + 9700 315.35263 37.357037 0.0034851739 1 1 + 9750 329.98511 -37.326607 0.0034851739 1 1 + 9800 307.94446 -4.1409988 0.0034851739 1 1 + 9850 283.99269 20.593547 0.0034851739 1 1 + 9900 323.4633 42.61777 0.0034851739 1 1 + 9950 299.79118 -42.790286 0.0034851739 1 1 + 10000 290.40265 9.5959582 0.0034851739 1 1 +Loop time of 3.99067 on 1 procs for 10000 steps with 44 atoms + +Performance: 216.505 ns/day, 0.111 hours/ns, 2505.847 timesteps/s, 110.257 katom-step/s +95.8% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.13952 | 0.13952 | 0.13952 | 0.0 | 3.50 +Bond | 0.46955 | 0.46955 | 0.46955 | 0.0 | 11.77 +Kspace | 3.1889 | 3.1889 | 3.1889 | 0.0 | 79.91 +Neigh | 0.0059386 | 0.0059386 | 0.0059386 | 0.0 | 0.15 +Comm | 0.034543 | 0.034543 | 0.034543 | 0.0 | 0.87 +Output | 0.0018138 | 0.0018138 | 0.0018138 | 0.0 | 0.05 +Modify | 0.10103 | 0.10103 | 0.10103 | 0.0 | 2.53 +Other | | 0.0494 | | | 1.24 + +Nlocal: 44 ave 44 max 44 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 6 ave 6 max 6 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 876 ave 876 max 876 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 876 +Ave neighs/atom = 19.909091 +Ave special neighs/atom = 6.4090909 +Neighbor list builds = 242 +Dangerous builds = 0 + +# write_restart restart_longrun +# write_data restart_longrun.data nofix +Total wall time: 0:00:04 diff --git a/examples/PACKAGES/reaction/tiny_nylon/log.10Dec2025.tiny_nylon.stabilized.g++.4 b/examples/PACKAGES/reaction/tiny_nylon/log.10Dec2025.tiny_nylon.stabilized.g++.4 new file mode 100644 index 00000000000..8545382af84 --- /dev/null +++ b/examples/PACKAGES/reaction/tiny_nylon/log.10Dec2025.tiny_nylon.stabilized.g++.4 @@ -0,0 +1,449 @@ +LAMMPS (10 Dec 2025 - Development - patch_10Dec2025-120-ga51f9ba0e7-modified) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. + using 1 OpenMP thread(s) per MPI task +# two monomer nylon example +# reaction produces a condensed water molecule + +units real + +boundary p p p + +atom_style full + +kspace_style pppm 1.0e-4 + +pair_style lj/class2/coul/long 8.5 + +angle_style class2 + +bond_style class2 + +dihedral_style class2 + +improper_style class2 + +special_bonds lj/coul 0 0 1 +pair_modify tail yes mix sixthpower + +read_data tiny_nylon.data extra/bond/per/atom 5 extra/angle/per/atom 15 extra/dihedral/per/atom 15 extra/improper/per/atom 25 extra/special/per/atom 25 +Reading data file ... + orthogonal box = (-25 -25 -25) to (25 25 25) + 1 by 2 by 2 MPI processor grid + reading atom labelmap ... + reading bond labelmap ... + reading angle labelmap ... + reading dihedral labelmap ... + reading improper labelmap ... + reading atoms ... + 44 atoms + reading velocities ... + 44 velocities + scanning bonds ... + 9 = max bonds/atom + scanning angles ... + 21 = max angles/atom + scanning dihedrals ... + 29 = max dihedrals/atom + scanning impropers ... + 29 = max impropers/atom + orthogonal box = (-25 -25 -25) to (25 25 25) + 1 by 2 by 2 MPI processor grid + reading bonds ... + 42 bonds + reading angles ... + 74 angles + reading dihedrals ... + 100 dihedrals + reading impropers ... + 16 impropers +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 1 + special bond factors coul: 0 0 1 + 4 = max # of 1-2 neighbors + 6 = max # of 1-3 neighbors + 35 = max # of special neighbors + special bonds CPU = 0.000 seconds + read_data CPU = 0.008 seconds + +velocity all create 300.0 4928459 dist gaussian + +molecule mol1 rxn1_stp1_unreacted.molecule_template +Read molecule template mol1: +this is a molecule template for: initial nylon crosslink, pre-reacting + 1 molecules + 0 fragments + 0 bodies + 18 atoms with max type 8 + 16 bonds with max type 8 + 25 angles with max type 25 + 23 dihedrals with max type 33 + 2 impropers with max type 3 +molecule mol2 rxn1_stp1_reacted.molecule_template +Read molecule template mol2: +this is a molecule template for: initial nylon crosslink, post-reacting + 1 molecules + 0 fragments + 0 bodies + 18 atoms with max type 9 + 17 bonds with max type 11 + 31 angles with max type 24 + 39 dihedrals with max type 30 + 0 impropers with max type 0 +molecule mol3 rxn1_stp2_unreacted.molecule_template +Read molecule template mol3: +this is a molecule template for: water condensation, pre-reacting + 1 molecules + 0 fragments + 0 bodies + 15 atoms with max type 9 + 14 bonds with max type 11 + 25 angles with max type 24 + 30 dihedrals with max type 30 + 0 impropers with max type 0 +molecule mol4 rxn1_stp2_reacted.molecule_template +Read molecule template mol4: +this is a molecule template for: water condensation, post-reacting + 1 molecules + 0 fragments + 0 bodies + 15 atoms with max type 11 + 13 bonds with max type 13 + 19 angles with max type 26 + 16 dihedrals with max type 29 + 2 impropers with max type 5 + +thermo 50 + +# dump 1 all xyz 1 test_vis.xyz +# dump_modify 1 types labels + +fix myrxns all bond/react stabilization yes statted_grp .03 react rxn1 all 1 0.0 2.9 mol1 mol2 rxn1_stp1_map react rxn2 all 1 0.0 5.0 mol3 mol4 rxn1_stp2_map rescale_charges yes +WARNING: Fix bond/react: Atom affected by reaction rxn1 is too close to template edge (src/REACTION/fix_bond_react.cpp:2630) +WARNING: Fix bond/react: Atom affected by reaction rxn2 is too close to template edge (src/REACTION/fix_bond_react.cpp:2630) +dynamic group bond_react_MASTER_group defined +dynamic group statted_grp_REACT defined + +fix 1 statted_grp_REACT nvt temp 300 300 100 + +# optionally, you can customize behavior of reacting atoms, +# by using the internally-created 'bond_react_MASTER_group', like so: +fix 4 bond_react_MASTER_group temp/rescale 1 300 300 10 1 + +thermo_style custom step temp press density f_myrxns[*] +thermo_modify colname auto + +# restart 100 restart1 restart2 + +run 10000 + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Your simulation uses code contributions which should be cited: + +- Type Label Framework: https://doi.org/10.1021/acs.jpcb.3c08419 + +@Article{Gissinger24, + author = {Jacob R. Gissinger, Ilia Nikiforov, Yaser Afshar, Brendon Waters, Moon-ki Choi, Daniel S. Karls, Alexander Stukowski, Wonpil Im, Hendrik Heinz, Axel Kohlmeyer, and Ellad B. Tadmor}, + title = {Type Label Framework for Bonded Force Fields in LAMMPS}, + journal = {J. Phys. Chem. B}, + year = 2024, + volume = 128, + number = 13, + pages = {3282--3297} +} + +- fix bond/react: https://reacter.org, https://doi.org/10.1016/j.polymer.2017.09.038, https://doi.org/10.1021/acs.macromol.0c02012, https://doi.org/10.1016/j.cpc.2024.109287 + +@Article{Gissinger17, + author = {J. R. Gissinger and B. D. Jensen and K. E. Wise}, + title = {Modeling Chemical Reactions in Classical Molecular Dynamics Simulations}, + journal = {Polymer}, + year = 2017, + volume = 128, + pages = {211--217} +} + +@Article{Gissinger20, + author = {J. R. Gissinger, B. D. Jensen, K. E. Wise}, + title = {{REACTER}: A Heuristic Method for Reactive Molecular Dynamics}, + journal = {Macromolecules}, + year = 2020, + volume = 53, + number = 22, + pages = {9953--9961} +} + +@Article{Gissinger24, + author = {J. R. Gissinger, B. D. Jensen, K. E. Wise}, + title = {Molecular Modeling of Reactive Systems with REACTER}, + journal = {Computer Physics Communications}, + year = 2024, + volume = 304, + number = 109287 +} + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +PPPM initialization ... + using 12-bit tables for long-range coulomb + G vector (1/distance) = 0.23408048 + grid = 15 15 15 + stencil order = 5 + estimated absolute RMS force accuracy = 0.018627396 + estimated relative force accuracy = 5.6095851e-05 + using double precision KISS FFT + 3d grid and FFT values/proc = 3380 960 +Generated 55 of 55 mixed pair_coeff terms from sixthpower/sixthpower mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 10.5 + ghost atom cutoff = 10.5 + binsize = 5.25, bins = 10 10 10 + 2 neighbor lists, perpetual/occasional/extra = 1 1 0 + (1) pair lj/class2/coul/long, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard + (2) fix bond/react, occasional, copy from (1) + attributes: half, newton on + pair build: copy + stencil: none + bin: none +Per MPI rank memory allocation (min/avg/max) = 33.49 | 33.72 | 34.28 Mbytes + Step Temp Press Density f_myrxns:rxn1 f_myrxns:rxn2 + 0 300 357.25587 0.0034851739 0 0 + 50 323.13357 -36.901145 0.0034851739 1 0 + 100 303.51 11.102115 0.0034851739 1 1 + 150 332.31667 -25.20854 0.0034851739 1 1 + 200 278.87792 25.724788 0.0034851739 1 1 + 250 306.00815 -9.2221074 0.0034851739 1 1 + 300 254.72154 -5.7953243 0.0034851739 1 1 + 350 267.62849 23.758906 0.0034851739 1 1 + 400 320.81812 3.3741667 0.0034851739 1 1 + 450 376.12912 -10.240072 0.0034851739 1 1 + 500 409.47719 17.579329 0.0034851739 1 1 + 550 251.53858 -1.8557263 0.0034851739 1 1 + 600 237.09927 19.34288 0.0034851739 1 1 + 650 325.85267 12.350178 0.0034851739 1 1 + 700 281.35713 2.4348122 0.0034851739 1 1 + 750 348.96295 10.69943 0.0034851739 1 1 + 800 285.14402 -34.310534 0.0034851739 1 1 + 850 272.05347 -29.232749 0.0034851739 1 1 + 900 233.75445 25.081061 0.0034851739 1 1 + 950 270.83373 36.530225 0.0034851739 1 1 + 1000 226.39852 -25.096609 0.0034851739 1 1 + 1050 252.97684 -38.371559 0.0034851739 1 1 + 1100 298.6743 53.00207 0.0034851739 1 1 + 1150 291.35416 -0.58732762 0.0034851739 1 1 + 1200 338.55036 -12.606167 0.0034851739 1 1 + 1250 273.47409 2.6075067 0.0034851739 1 1 + 1300 238.32577 103.89005 0.0034851739 1 1 + 1350 289.72027 35.589704 0.0034851739 1 1 + 1400 308.55006 -14.264754 0.0034851739 1 1 + 1450 335.61777 -4.3227467 0.0034851739 1 1 + 1500 322.50612 17.455534 0.0034851739 1 1 + 1550 394.29818 9.2095587 0.0034851739 1 1 + 1600 381.18229 17.684515 0.0034851739 1 1 + 1650 335.99735 -48.364365 0.0034851739 1 1 + 1700 303.84569 -45.868295 0.0034851739 1 1 + 1750 320.31574 -11.511158 0.0034851739 1 1 + 1800 294.29633 -26.351136 0.0034851739 1 1 + 1850 279.75055 6.0763871 0.0034851739 1 1 + 1900 303.74279 -49.281254 0.0034851739 1 1 + 1950 290.97419 5.2283921 0.0034851739 1 1 + 2000 233.30717 2.14398 0.0034851739 1 1 + 2050 342.01536 48.425845 0.0034851739 1 1 + 2100 348.72835 -42.383834 0.0034851739 1 1 + 2150 336.02332 -6.2496255 0.0034851739 1 1 + 2200 334.42763 50.81371 0.0034851739 1 1 + 2250 317.27217 -8.1794166 0.0034851739 1 1 + 2300 316.88329 -6.5684312 0.0034851739 1 1 + 2350 314.09517 17.266892 0.0034851739 1 1 + 2400 302.40844 0.53558662 0.0034851739 1 1 + 2450 336.96229 35.681141 0.0034851739 1 1 + 2500 259.43054 8.8787634 0.0034851739 1 1 + 2550 348.89956 -9.2313871 0.0034851739 1 1 + 2600 327.77487 -5.8117921 0.0034851739 1 1 + 2650 341.94271 4.3187206 0.0034851739 1 1 + 2700 319.36614 -53.559459 0.0034851739 1 1 + 2750 300.45201 15.794909 0.0034851739 1 1 + 2800 310.18412 61.968091 0.0034851739 1 1 + 2850 356.66083 5.8473695 0.0034851739 1 1 + 2900 298.87875 17.062576 0.0034851739 1 1 + 2950 234.83827 0.011478315 0.0034851739 1 1 + 3000 255.72021 -24.955859 0.0034851739 1 1 + 3050 261.05671 6.732158 0.0034851739 1 1 + 3100 301.20955 24.53772 0.0034851739 1 1 + 3150 347.86946 -6.4628487 0.0034851739 1 1 + 3200 360.92312 -10.270019 0.0034851739 1 1 + 3250 314.90454 -67.580652 0.0034851739 1 1 + 3300 364.99912 32.617637 0.0034851739 1 1 + 3350 343.26776 -7.6851103 0.0034851739 1 1 + 3400 321.33638 -58.879645 0.0034851739 1 1 + 3450 279.51567 -9.7718499 0.0034851739 1 1 + 3500 227.74826 -31.715622 0.0034851739 1 1 + 3550 263.33395 40.827777 0.0034851739 1 1 + 3600 269.59956 -38.697214 0.0034851739 1 1 + 3650 291.96922 -29.580877 0.0034851739 1 1 + 3700 303.13102 -0.018201864 0.0034851739 1 1 + 3750 352.31481 -63.482684 0.0034851739 1 1 + 3800 295.03656 0.89582187 0.0034851739 1 1 + 3850 302.79362 8.7511608 0.0034851739 1 1 + 3900 272.75681 0.49698704 0.0034851739 1 1 + 3950 276.27495 7.6663447 0.0034851739 1 1 + 4000 233.8973 23.040335 0.0034851739 1 1 + 4050 281.12439 -42.01751 0.0034851739 1 1 + 4100 265.13059 16.155662 0.0034851739 1 1 + 4150 298.00657 29.721948 0.0034851739 1 1 + 4200 329.08689 -24.747356 0.0034851739 1 1 + 4250 321.90673 -5.221281 0.0034851739 1 1 + 4300 337.98416 8.5210055 0.0034851739 1 1 + 4350 300.85278 -27.200192 0.0034851739 1 1 + 4400 230.3635 -20.700954 0.0034851739 1 1 + 4450 275.54429 13.023287 0.0034851739 1 1 + 4500 306.13381 -21.191264 0.0034851739 1 1 + 4550 306.1504 -2.657042 0.0034851739 1 1 + 4600 341.25401 35.059044 0.0034851739 1 1 + 4650 359.22107 -27.61101 0.0034851739 1 1 + 4700 313.55036 -5.2086023 0.0034851739 1 1 + 4750 288.2812 49.909094 0.0034851739 1 1 + 4800 298.17232 5.7234038 0.0034851739 1 1 + 4850 256.1951 -79.42617 0.0034851739 1 1 + 4900 234.48084 69.62547 0.0034851739 1 1 + 4950 269.90503 -6.4165828 0.0034851739 1 1 + 5000 350.99397 40.598777 0.0034851739 1 1 + 5050 319.33612 -1.1883368 0.0034851739 1 1 + 5100 354.42383 0.73360221 0.0034851739 1 1 + 5150 326.20748 28.873951 0.0034851739 1 1 + 5200 338.81105 8.9061462 0.0034851739 1 1 + 5250 334.86171 3.4358714 0.0034851739 1 1 + 5300 298.76104 41.006518 0.0034851739 1 1 + 5350 251.28354 32.804747 0.0034851739 1 1 + 5400 297.96019 16.420226 0.0034851739 1 1 + 5450 257.69136 27.643858 0.0034851739 1 1 + 5500 281.53877 -19.802987 0.0034851739 1 1 + 5550 316.86241 29.360565 0.0034851739 1 1 + 5600 333.00265 8.3184564 0.0034851739 1 1 + 5650 331.66339 -9.2204992 0.0034851739 1 1 + 5700 344.72494 8.3825773 0.0034851739 1 1 + 5750 336.95916 -62.14119 0.0034851739 1 1 + 5800 349.2364 -6.2073021 0.0034851739 1 1 + 5850 286.19116 -24.769794 0.0034851739 1 1 + 5900 293.18267 -16.577457 0.0034851739 1 1 + 5950 303.66858 27.73992 0.0034851739 1 1 + 6000 306.18599 -45.264957 0.0034851739 1 1 + 6050 350.36539 -34.300224 0.0034851739 1 1 + 6100 293.08904 43.428974 0.0034851739 1 1 + 6150 338.78789 -1.6127526 0.0034851739 1 1 + 6200 266.81285 -6.9547907 0.0034851739 1 1 + 6250 302.09334 -2.7802802 0.0034851739 1 1 + 6300 295.03054 -12.331247 0.0034851739 1 1 + 6350 253.47153 14.246817 0.0034851739 1 1 + 6400 231.28789 0.32901119 0.0034851739 1 1 + 6450 271.27272 -54.235953 0.0034851739 1 1 + 6500 315.04645 -42.196648 0.0034851739 1 1 + 6550 330.60481 30.307025 0.0034851739 1 1 + 6600 320.98992 -28.743816 0.0034851739 1 1 + 6650 311.66421 -16.648914 0.0034851739 1 1 + 6700 300.60892 -22.572672 0.0034851739 1 1 + 6750 324.32174 -19.310172 0.0034851739 1 1 + 6800 297.68989 -16.093886 0.0034851739 1 1 + 6850 225.0828 29.29338 0.0034851739 1 1 + 6900 267.90034 -12.372584 0.0034851739 1 1 + 6950 245.79261 -42.881342 0.0034851739 1 1 + 7000 267.62549 58.922777 0.0034851739 1 1 + 7050 323.577 -18.38004 0.0034851739 1 1 + 7100 309.68104 -95.377822 0.0034851739 1 1 + 7150 332.28546 48.537101 0.0034851739 1 1 + 7200 349.83139 15.219649 0.0034851739 1 1 + 7250 325.55181 -41.249495 0.0034851739 1 1 + 7300 335.59076 17.706127 0.0034851739 1 1 + 7350 250.05804 32.22358 0.0034851739 1 1 + 7400 243.53926 24.755601 0.0034851739 1 1 + 7450 257.25541 -8.4391308 0.0034851739 1 1 + 7500 286.82596 -23.013062 0.0034851739 1 1 + 7550 264.88657 26.041569 0.0034851739 1 1 + 7600 285.33992 56.915984 0.0034851739 1 1 + 7650 317.10869 -53.762929 0.0034851739 1 1 + 7700 274.03399 -19.368253 0.0034851739 1 1 + 7750 278.77732 9.0740867 0.0034851739 1 1 + 7800 251.09437 23.963052 0.0034851739 1 1 + 7850 312.96586 0.68606531 0.0034851739 1 1 + 7900 272.57586 -16.82951 0.0034851739 1 1 + 7950 284.09348 2.0393754 0.0034851739 1 1 + 8000 297.93713 2.9073607 0.0034851739 1 1 + 8050 232.14368 -5.8999336 0.0034851739 1 1 + 8100 239.17712 -48.143457 0.0034851739 1 1 + 8150 281.52221 18.509439 0.0034851739 1 1 + 8200 293.08621 17.448713 0.0034851739 1 1 + 8250 294.74715 -34.751866 0.0034851739 1 1 + 8300 375.10348 -12.616628 0.0034851739 1 1 + 8350 296.77171 -28.951003 0.0034851739 1 1 + 8400 328.74999 -15.981702 0.0034851739 1 1 + 8450 347.02027 5.1750774 0.0034851739 1 1 + 8500 236.88904 59.341387 0.0034851739 1 1 + 8550 296.86734 -7.9510325 0.0034851739 1 1 + 8600 286.27144 54.121588 0.0034851739 1 1 + 8650 261.56411 27.022605 0.0034851739 1 1 + 8700 225.62856 -73.329643 0.0034851739 1 1 + 8750 268.25581 -30.45963 0.0034851739 1 1 + 8800 210.13484 49.847057 0.0034851739 1 1 + 8850 293.60544 47.320396 0.0034851739 1 1 + 8900 324.86781 -53.367836 0.0034851739 1 1 + 8950 386.26415 10.666845 0.0034851739 1 1 + 9000 320.21521 -40.989701 0.0034851739 1 1 + 9050 327.04554 -4.727706 0.0034851739 1 1 + 9100 279.63775 75.132034 0.0034851739 1 1 + 9150 299.20962 30.916634 0.0034851739 1 1 + 9200 249.44089 -4.8675917 0.0034851739 1 1 + 9250 325.92179 -8.7644595 0.0034851739 1 1 + 9300 228.532 -18.595612 0.0034851739 1 1 + 9350 296.48345 23.397966 0.0034851739 1 1 + 9400 246.75044 -39.651194 0.0034851739 1 1 + 9450 261.86878 5.8508137 0.0034851739 1 1 + 9500 341.58406 19.801719 0.0034851739 1 1 + 9550 350.96696 -16.243021 0.0034851739 1 1 + 9600 366.30949 3.3855035 0.0034851739 1 1 + 9650 321.26751 30.515937 0.0034851739 1 1 + 9700 351.86405 -21.004306 0.0034851739 1 1 + 9750 286.96073 -46.078369 0.0034851739 1 1 + 9800 247.41785 9.7089291 0.0034851739 1 1 + 9850 248.92427 -19.059663 0.0034851739 1 1 + 9900 240.6546 19.699102 0.0034851739 1 1 + 9950 251.56896 -59.269143 0.0034851739 1 1 + 10000 315.94702 -34.596575 0.0034851739 1 1 +Loop time of 2.13311 on 4 procs for 10000 steps with 44 atoms + +Performance: 405.042 ns/day, 0.059 hours/ns, 4687.986 timesteps/s, 206.271 katom-step/s +92.0% 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.016525 | 0.051358 | 0.12984 | 20.5 | 2.41 +Bond | 0.016218 | 0.13122 | 0.42052 | 46.5 | 6.15 +Kspace | 1.2385 | 1.5657 | 1.6991 | 15.3 | 73.40 +Neigh | 0.0054793 | 0.0055016 | 0.0055097 | 0.0 | 0.26 +Comm | 0.044979 | 0.05426 | 0.073946 | 5.1 | 2.54 +Output | 0.001607 | 0.0018414 | 0.002541 | 0.9 | 0.09 +Modify | 0.22851 | 0.26766 | 0.29361 | 5.3 | 12.55 +Other | | 0.05559 | | | 2.61 + +Nlocal: 11 ave 44 max 0 min +Histogram: 3 0 0 0 0 0 0 0 0 1 +Nghost: 18 ave 44 max 0 min +Histogram: 1 0 0 2 0 0 0 0 0 1 +Neighs: 226.75 ave 907 max 0 min +Histogram: 3 0 0 0 0 0 0 0 0 1 + +Total # of neighbors = 907 +Ave neighs/atom = 20.613636 +Ave special neighs/atom = 6.4090909 +Neighbor list builds = 249 +Dangerous builds = 0 + +# write_restart restart_longrun +# write_data restart_longrun.data nofix +Total wall time: 0:00:02 diff --git a/examples/PACKAGES/reaction/tiny_nylon/log.4Nov2020.tiny_nylon.stabilized_variable_probability.g++.1 b/examples/PACKAGES/reaction/tiny_nylon/log.10Dec2025.tiny_nylon.stabilized_variable_probability.g++.1 similarity index 52% rename from examples/PACKAGES/reaction/tiny_nylon/log.4Nov2020.tiny_nylon.stabilized_variable_probability.g++.1 rename to examples/PACKAGES/reaction/tiny_nylon/log.10Dec2025.tiny_nylon.stabilized_variable_probability.g++.1 index ec822e8b3b0..917615e9497 100644 --- a/examples/PACKAGES/reaction/tiny_nylon/log.4Nov2020.tiny_nylon.stabilized_variable_probability.g++.1 +++ b/examples/PACKAGES/reaction/tiny_nylon/log.10Dec2025.tiny_nylon.stabilized_variable_probability.g++.1 @@ -1,4 +1,6 @@ -LAMMPS (4 Nov 2022) +LAMMPS (10 Dec 2025 - Development - patch_10Dec2025-120-ga51f9ba0e7-modified) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. + using 1 OpenMP thread(s) per MPI task # two monomer nylon example # reaction produces a condensed water molecule @@ -20,6 +22,9 @@ dihedral_style class2 improper_style class2 +special_bonds lj/coul 0 0 1 +pair_modify tail yes mix sixthpower + read_data tiny_nylon.data extra/bond/per/atom 5 extra/angle/per/atom 15 extra/dihedral/per/atom 15 extra/improper/per/atom 25 extra/special/per/atom 25 Reading data file ... orthogonal box = (-25 -25 -25) to (25 25 25) @@ -41,6 +46,8 @@ Reading data file ... 29 = max dihedrals/atom scanning impropers ... 29 = max impropers/atom + orthogonal box = (-25 -25 -25) to (25 25 25) + 1 by 1 by 1 MPI processor grid reading bonds ... 42 bonds reading angles ... @@ -48,16 +55,15 @@ Reading data file ... reading dihedrals ... 100 dihedrals reading impropers ... - 44 impropers + 16 impropers Finding 1-2 1-3 1-4 neighbors ... - special bond factors lj: 0 0 0 - special bond factors coul: 0 0 0 + special bond factors lj: 0 0 1 + special bond factors coul: 0 0 1 4 = max # of 1-2 neighbors 6 = max # of 1-3 neighbors - 12 = max # of 1-4 neighbors - 41 = max # of special neighbors - special bonds CPU = 0.000 seconds - read_data CPU = 0.007 seconds + 35 = max # of special neighbors + special bonds CPU = 0.001 seconds + read_data CPU = 0.013 seconds variable runsteps equal 1000 variable prob1 equal step/v_runsteps*2+0.1 @@ -67,47 +73,57 @@ velocity all create 300.0 4928459 dist gaussian molecule mol1 rxn1_stp1_unreacted.molecule_template Read molecule template mol1: +this is a molecule template for: initial nylon crosslink, pre-reacting 1 molecules 0 fragments + 0 bodies 18 atoms with max type 8 - 16 bonds with max type 10 - 25 angles with max type 28 - 23 dihedrals with max type 36 + 16 bonds with max type 8 + 25 angles with max type 25 + 23 dihedrals with max type 33 2 impropers with max type 3 molecule mol2 rxn1_stp1_reacted.molecule_template Read molecule template mol2: +this is a molecule template for: initial nylon crosslink, post-reacting 1 molecules 0 fragments + 0 bodies 18 atoms with max type 9 - 17 bonds with max type 13 - 31 angles with max type 27 - 39 dihedrals with max type 33 + 17 bonds with max type 11 + 31 angles with max type 24 + 39 dihedrals with max type 30 0 impropers with max type 0 molecule mol3 rxn1_stp2_unreacted.molecule_template Read molecule template mol3: +this is a molecule template for: water condensation, pre-reacting 1 molecules 0 fragments + 0 bodies 15 atoms with max type 9 - 14 bonds with max type 13 - 25 angles with max type 27 - 30 dihedrals with max type 33 + 14 bonds with max type 11 + 25 angles with max type 24 + 30 dihedrals with max type 30 0 impropers with max type 0 molecule mol4 rxn1_stp2_reacted.molecule_template Read molecule template mol4: +this is a molecule template for: water condensation, post-reacting 1 molecules 0 fragments + 0 bodies 15 atoms with max type 11 - 13 bonds with max type 15 - 19 angles with max type 29 - 16 dihedrals with max type 32 - 2 impropers with max type 13 + 13 bonds with max type 13 + 19 angles with max type 26 + 16 dihedrals with max type 29 + 2 impropers with max type 5 thermo 50 # dump 1 all xyz 1 test_vis.xyz +# dump_modify 1 types labels -fix myrxns all bond/react stabilization yes statted_grp .03 react rxn1 all 1 0.0 5.0 mol1 mol2 rxn1_stp1_map prob v_prob1 1234 react rxn2 all 1 0.0 5.0 mol3 mol4 rxn1_stp2_map prob v_prob2 1234 -WARNING: Fix bond/react: Atom affected by reaction rxn2 is too close to template edge (../fix_bond_react.cpp:2624) +fix myrxns all bond/react stabilization yes statted_grp .03 react rxn1 all 1 0.0 5.0 mol1 mol2 rxn1_stp1_map prob v_prob1 1234 react rxn2 all 1 0.0 5.0 mol3 mol4 rxn1_stp2_map prob v_prob2 1234 rescale_charges yes +WARNING: Fix bond/react: Atom affected by reaction rxn1 is too close to template edge (src/REACTION/fix_bond_react.cpp:2630) +WARNING: Fix bond/react: Atom affected by reaction rxn2 is too close to template edge (src/REACTION/fix_bond_react.cpp:2630) dynamic group bond_react_MASTER_group defined dynamic group statted_grp_REACT defined @@ -117,7 +133,8 @@ fix 1 statted_grp_REACT nvt temp 300 300 100 # by using the internally-created 'bond_react_MASTER_group', like so: fix 4 bond_react_MASTER_group temp/rescale 1 300 300 10 1 -thermo_style custom step temp press density v_prob1 v_prob2 f_myrxns[1] f_myrxns[2] +thermo_style custom step temp press density v_prob1 v_prob2 f_myrxns[*] +thermo_modify colname auto # restart 100 restart1 restart2 @@ -128,7 +145,19 @@ CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE Your simulation uses code contributions which should be cited: -- fix bond/react: reacter.org doi:10.1016/j.polymer.2017.09.038, doi:10.1021/acs.macromol.0c02012 +- Type Label Framework: https://doi.org/10.1021/acs.jpcb.3c08419 + +@Article{Gissinger24, + author = {Jacob R. Gissinger, Ilia Nikiforov, Yaser Afshar, Brendon Waters, Moon-ki Choi, Daniel S. Karls, Alexander Stukowski, Wonpil Im, Hendrik Heinz, Axel Kohlmeyer, and Ellad B. Tadmor}, + title = {Type Label Framework for Bonded Force Fields in LAMMPS}, + journal = {J. Phys. Chem. B}, + year = 2024, + volume = 128, + number = 13, + pages = {3282--3297} +} + +- fix bond/react: https://reacter.org, https://doi.org/10.1016/j.polymer.2017.09.038, https://doi.org/10.1021/acs.macromol.0c02012, https://doi.org/10.1016/j.cpc.2024.109287 @Article{Gissinger17, author = {J. R. Gissinger and B. D. Jensen and K. E. Wise}, @@ -149,18 +178,27 @@ Your simulation uses code contributions which should be cited: pages = {9953--9961} } +@Article{Gissinger24, + author = {J. R. Gissinger, B. D. Jensen, K. E. Wise}, + title = {Molecular Modeling of Reactive Systems with REACTER}, + journal = {Computer Physics Communications}, + year = 2024, + volume = 304, + number = 109287 +} + CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE PPPM initialization ... - using 12-bit tables for long-range coulomb (../kspace.cpp:342) - G vector (1/distance) = 0.05345967 - grid = 2 2 2 + using 12-bit tables for long-range coulomb + G vector (1/distance) = 0.23408048 + grid = 15 15 15 stencil order = 5 - estimated absolute RMS force accuracy = 0.040225597 - estimated relative force accuracy = 0.00012113819 + estimated absolute RMS force accuracy = 0.018627396 + estimated relative force accuracy = 5.6095851e-05 using double precision KISS FFT - 3d grid and FFT values/proc = 343 8 -Generated 55 of 55 mixed pair_coeff terms from sixthpower/geometric mixing rule + 3d grid and FFT values/proc = 8000 3375 +Generated 55 of 55 mixed pair_coeff terms from sixthpower/sixthpower mixing rule Neighbor list info ... update: every = 1 steps, delay = 0 steps, check = yes max neighbors/atom: 2000, page size: 100000 @@ -178,60 +216,59 @@ Neighbor list info ... pair build: copy stencil: none bin: none -WARNING: Inconsistent image flags (../domain.cpp:819) -Per MPI rank memory allocation (min/avg/max) = 33.78 | 33.78 | 33.78 Mbytes - Step Temp Press Density v_prob1 v_prob2 f_myrxns[1] f_myrxns[2] - 0 300 346.78165 0.0034851739 0.1 0 0 0 - 50 265.51039 -67.489756 0.0034851739 0.2 0 1 0 - 100 596.03388 -27.815189 0.0034851739 0.3 0 1 0 - 150 500.05269 2.9684972 0.0034851739 0.4 0 1 0 - 200 511.40295 56.791868 0.0034851739 0.5 0 1 0 - 250 375.95679 -4.0587677 0.0034851739 0.6 0 1 0 - 300 371.1629 -60.689059 0.0034851739 0.7 0 1 0 - 350 336.06545 8.6411023 0.0034851739 0.8 0 1 0 - 400 301.41962 50.628044 0.0034851739 0.9 0 1 0 - 450 281.08727 -15.590922 0.0034851739 1 0 1 0 - 500 297.35323 -9.5761786 0.0034851739 1.1 0 1 0 - 550 197.45298 3.6867353 0.0034851739 1.2 1 1 1 - 600 240.1748 -19.889198 0.0034851739 1.3 1 1 1 - 650 231.57018 -13.078808 0.0034851739 1.4 1 1 1 - 700 296.00816 -18.772183 0.0034851739 1.5 1 1 1 - 750 294.94016 15.43915 0.0034851739 1.6 1 1 1 - 800 316.51231 12.070563 0.0034851739 1.7 1 1 1 - 850 348.59373 9.0940092 0.0034851739 1.8 1 1 1 - 900 330.5264 -3.4868175 0.0034851739 1.9 1 1 1 - 950 307.02461 34.643373 0.0034851739 2 1 1 1 - 1000 250.06536 5.8440413 0.0034851739 2.1 1 1 1 -Loop time of 0.202863 on 1 procs for 1000 steps with 44 atoms - -Performance: 425.903 ns/day, 0.056 hours/ns, 4929.437 timesteps/s, 216.895 katom-step/s -100.0% CPU use with 1 MPI tasks x no OpenMP threads +Per MPI rank memory allocation (min/avg/max) = 34 | 34 | 34 Mbytes + Step Temp Press Density v_prob1 v_prob2 f_myrxns:rxn1 f_myrxns:rxn2 + 0 300 357.25587 0.0034851739 0.1 0 0 0 + 50 297.593 -73.636858 0.0034851739 0.2 0 1 0 + 100 635.69969 -16.634729 0.0034851739 0.3 0 1 0 + 150 472.13618 -9.2124217 0.0034851739 0.4 0 1 0 + 200 312.18406 26.886352 0.0034851739 0.5 0 1 0 + 250 387.67728 -7.1190648 0.0034851739 0.6 0 1 0 + 300 373.31314 9.8600863 0.0034851739 0.7 0 1 0 + 350 318.46709 23.758216 0.0034851739 0.8 0 1 0 + 400 262.5636 -13.708812 0.0034851739 0.9 0 1 0 + 450 256.08862 2.5260887 0.0034851739 1 0 1 0 + 500 281.02171 15.736542 0.0034851739 1.1 0 1 0 + 550 235.12894 41.603483 0.0034851739 1.2 1 1 1 + 600 241.94013 34.146894 0.0034851739 1.3 1 1 1 + 650 241.17824 0.22806577 0.0034851739 1.4 1 1 1 + 700 238.98932 15.356012 0.0034851739 1.5 1 1 1 + 750 250.51355 -1.1167934 0.0034851739 1.6 1 1 1 + 800 309.81814 -4.2476216 0.0034851739 1.7 1 1 1 + 850 333.7352 -28.951689 0.0034851739 1.8 1 1 1 + 900 429.57911 -5.8780302 0.0034851739 1.9 1 1 1 + 950 356.68633 19.627819 0.0034851739 2 1 1 1 + 1000 253.07917 -23.352616 0.0034851739 2.1 1 1 1 +Loop time of 0.40705 on 1 procs for 1000 steps with 44 atoms + +Performance: 212.259 ns/day, 0.113 hours/ns, 2456.698 timesteps/s, 108.095 katom-step/s +97.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 | 0.025759 | 0.025759 | 0.025759 | 0.0 | 12.70 -Bond | 0.11024 | 0.11024 | 0.11024 | 0.0 | 54.34 -Kspace | 0.034344 | 0.034344 | 0.034344 | 0.0 | 16.93 -Neigh | 0.0015719 | 0.0015719 | 0.0015719 | 0.0 | 0.77 -Comm | 0.00045259 | 0.00045259 | 0.00045259 | 0.0 | 0.22 -Output | 0.0004759 | 0.0004759 | 0.0004759 | 0.0 | 0.23 -Modify | 0.028713 | 0.028713 | 0.028713 | 0.0 | 14.15 -Other | | 0.001307 | | | 0.64 +Pair | 0.013818 | 0.013818 | 0.013818 | 0.0 | 3.39 +Bond | 0.049618 | 0.049618 | 0.049618 | 0.0 | 12.19 +Kspace | 0.31789 | 0.31789 | 0.31789 | 0.0 | 78.10 +Neigh | 0.001021 | 0.001021 | 0.001021 | 0.0 | 0.25 +Comm | 0.0034781 | 0.0034781 | 0.0034781 | 0.0 | 0.85 +Output | 0.00032539 | 0.00032539 | 0.00032539 | 0.0 | 0.08 +Modify | 0.015918 | 0.015918 | 0.015918 | 0.0 | 3.91 +Other | | 0.004984 | | | 1.22 Nlocal: 44 ave 44 max 44 min Histogram: 1 0 0 0 0 0 0 0 0 0 Nghost: 3 ave 3 max 3 min Histogram: 1 0 0 0 0 0 0 0 0 0 -Neighs: 802 ave 802 max 802 min +Neighs: 827 ave 827 max 827 min Histogram: 1 0 0 0 0 0 0 0 0 0 -Total # of neighbors = 802 -Ave neighs/atom = 18.227273 -Ave special neighs/atom = 9.9090909 -Neighbor list builds = 32 +Total # of neighbors = 827 +Ave neighs/atom = 18.795455 +Ave special neighs/atom = 6.4090909 +Neighbor list builds = 31 Dangerous builds = 0 # write_restart restart_longrun -# write_data restart_longrun.data +# write_data restart_longrun.data nofix Total wall time: 0:00:00 diff --git a/examples/PACKAGES/reaction/tiny_nylon/log.4Nov2020.tiny_nylon.stabilized_variable_probability.g++.4 b/examples/PACKAGES/reaction/tiny_nylon/log.10Dec2025.tiny_nylon.stabilized_variable_probability.g++.4 similarity index 50% rename from examples/PACKAGES/reaction/tiny_nylon/log.4Nov2020.tiny_nylon.stabilized_variable_probability.g++.4 rename to examples/PACKAGES/reaction/tiny_nylon/log.10Dec2025.tiny_nylon.stabilized_variable_probability.g++.4 index d85e7fb4748..401d6a0ef6e 100644 --- a/examples/PACKAGES/reaction/tiny_nylon/log.4Nov2020.tiny_nylon.stabilized_variable_probability.g++.4 +++ b/examples/PACKAGES/reaction/tiny_nylon/log.10Dec2025.tiny_nylon.stabilized_variable_probability.g++.4 @@ -1,4 +1,6 @@ -LAMMPS (4 Nov 2022) +LAMMPS (10 Dec 2025 - Development - patch_10Dec2025-120-ga51f9ba0e7-modified) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. + using 1 OpenMP thread(s) per MPI task # two monomer nylon example # reaction produces a condensed water molecule @@ -20,6 +22,9 @@ dihedral_style class2 improper_style class2 +special_bonds lj/coul 0 0 1 +pair_modify tail yes mix sixthpower + read_data tiny_nylon.data extra/bond/per/atom 5 extra/angle/per/atom 15 extra/dihedral/per/atom 15 extra/improper/per/atom 25 extra/special/per/atom 25 Reading data file ... orthogonal box = (-25 -25 -25) to (25 25 25) @@ -41,6 +46,8 @@ Reading data file ... 29 = max dihedrals/atom scanning impropers ... 29 = max impropers/atom + orthogonal box = (-25 -25 -25) to (25 25 25) + 1 by 2 by 2 MPI processor grid reading bonds ... 42 bonds reading angles ... @@ -48,16 +55,15 @@ Reading data file ... reading dihedrals ... 100 dihedrals reading impropers ... - 44 impropers + 16 impropers Finding 1-2 1-3 1-4 neighbors ... - special bond factors lj: 0 0 0 - special bond factors coul: 0 0 0 + special bond factors lj: 0 0 1 + special bond factors coul: 0 0 1 4 = max # of 1-2 neighbors 6 = max # of 1-3 neighbors - 12 = max # of 1-4 neighbors - 41 = max # of special neighbors - special bonds CPU = 0.000 seconds - read_data CPU = 0.008 seconds + 35 = max # of special neighbors + special bonds CPU = 0.001 seconds + read_data CPU = 0.014 seconds variable runsteps equal 1000 variable prob1 equal step/v_runsteps*2+0.1 @@ -67,47 +73,57 @@ velocity all create 300.0 4928459 dist gaussian molecule mol1 rxn1_stp1_unreacted.molecule_template Read molecule template mol1: +this is a molecule template for: initial nylon crosslink, pre-reacting 1 molecules 0 fragments + 0 bodies 18 atoms with max type 8 - 16 bonds with max type 10 - 25 angles with max type 28 - 23 dihedrals with max type 36 + 16 bonds with max type 8 + 25 angles with max type 25 + 23 dihedrals with max type 33 2 impropers with max type 3 molecule mol2 rxn1_stp1_reacted.molecule_template Read molecule template mol2: +this is a molecule template for: initial nylon crosslink, post-reacting 1 molecules 0 fragments + 0 bodies 18 atoms with max type 9 - 17 bonds with max type 13 - 31 angles with max type 27 - 39 dihedrals with max type 33 + 17 bonds with max type 11 + 31 angles with max type 24 + 39 dihedrals with max type 30 0 impropers with max type 0 molecule mol3 rxn1_stp2_unreacted.molecule_template Read molecule template mol3: +this is a molecule template for: water condensation, pre-reacting 1 molecules 0 fragments + 0 bodies 15 atoms with max type 9 - 14 bonds with max type 13 - 25 angles with max type 27 - 30 dihedrals with max type 33 + 14 bonds with max type 11 + 25 angles with max type 24 + 30 dihedrals with max type 30 0 impropers with max type 0 molecule mol4 rxn1_stp2_reacted.molecule_template Read molecule template mol4: +this is a molecule template for: water condensation, post-reacting 1 molecules 0 fragments + 0 bodies 15 atoms with max type 11 - 13 bonds with max type 15 - 19 angles with max type 29 - 16 dihedrals with max type 32 - 2 impropers with max type 13 + 13 bonds with max type 13 + 19 angles with max type 26 + 16 dihedrals with max type 29 + 2 impropers with max type 5 thermo 50 # dump 1 all xyz 1 test_vis.xyz +# dump_modify 1 types labels -fix myrxns all bond/react stabilization yes statted_grp .03 react rxn1 all 1 0.0 5.0 mol1 mol2 rxn1_stp1_map prob v_prob1 1234 react rxn2 all 1 0.0 5.0 mol3 mol4 rxn1_stp2_map prob v_prob2 1234 -WARNING: Fix bond/react: Atom affected by reaction rxn2 is too close to template edge (../fix_bond_react.cpp:2624) +fix myrxns all bond/react stabilization yes statted_grp .03 react rxn1 all 1 0.0 5.0 mol1 mol2 rxn1_stp1_map prob v_prob1 1234 react rxn2 all 1 0.0 5.0 mol3 mol4 rxn1_stp2_map prob v_prob2 1234 rescale_charges yes +WARNING: Fix bond/react: Atom affected by reaction rxn1 is too close to template edge (src/REACTION/fix_bond_react.cpp:2630) +WARNING: Fix bond/react: Atom affected by reaction rxn2 is too close to template edge (src/REACTION/fix_bond_react.cpp:2630) dynamic group bond_react_MASTER_group defined dynamic group statted_grp_REACT defined @@ -117,7 +133,8 @@ fix 1 statted_grp_REACT nvt temp 300 300 100 # by using the internally-created 'bond_react_MASTER_group', like so: fix 4 bond_react_MASTER_group temp/rescale 1 300 300 10 1 -thermo_style custom step temp press density v_prob1 v_prob2 f_myrxns[1] f_myrxns[2] +thermo_style custom step temp press density v_prob1 v_prob2 f_myrxns[*] +thermo_modify colname auto # restart 100 restart1 restart2 @@ -128,7 +145,19 @@ CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE Your simulation uses code contributions which should be cited: -- fix bond/react: reacter.org doi:10.1016/j.polymer.2017.09.038, doi:10.1021/acs.macromol.0c02012 +- Type Label Framework: https://doi.org/10.1021/acs.jpcb.3c08419 + +@Article{Gissinger24, + author = {Jacob R. Gissinger, Ilia Nikiforov, Yaser Afshar, Brendon Waters, Moon-ki Choi, Daniel S. Karls, Alexander Stukowski, Wonpil Im, Hendrik Heinz, Axel Kohlmeyer, and Ellad B. Tadmor}, + title = {Type Label Framework for Bonded Force Fields in LAMMPS}, + journal = {J. Phys. Chem. B}, + year = 2024, + volume = 128, + number = 13, + pages = {3282--3297} +} + +- fix bond/react: https://reacter.org, https://doi.org/10.1016/j.polymer.2017.09.038, https://doi.org/10.1021/acs.macromol.0c02012, https://doi.org/10.1016/j.cpc.2024.109287 @Article{Gissinger17, author = {J. R. Gissinger and B. D. Jensen and K. E. Wise}, @@ -149,18 +178,27 @@ Your simulation uses code contributions which should be cited: pages = {9953--9961} } +@Article{Gissinger24, + author = {J. R. Gissinger, B. D. Jensen, K. E. Wise}, + title = {Molecular Modeling of Reactive Systems with REACTER}, + journal = {Computer Physics Communications}, + year = 2024, + volume = 304, + number = 109287 +} + CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE PPPM initialization ... - using 12-bit tables for long-range coulomb (../kspace.cpp:342) - G vector (1/distance) = 0.05345967 - grid = 2 2 2 + using 12-bit tables for long-range coulomb + G vector (1/distance) = 0.23408048 + grid = 15 15 15 stencil order = 5 - estimated absolute RMS force accuracy = 0.040225597 - estimated relative force accuracy = 0.00012113819 + estimated absolute RMS force accuracy = 0.018627396 + estimated relative force accuracy = 5.6095851e-05 using double precision KISS FFT - 3d grid and FFT values/proc = 252 2 -Generated 55 of 55 mixed pair_coeff terms from sixthpower/geometric mixing rule + 3d grid and FFT values/proc = 3380 960 +Generated 55 of 55 mixed pair_coeff terms from sixthpower/sixthpower mixing rule Neighbor list info ... update: every = 1 steps, delay = 0 steps, check = yes max neighbors/atom: 2000, page size: 100000 @@ -178,60 +216,59 @@ Neighbor list info ... pair build: copy stencil: none bin: none -WARNING: Inconsistent image flags (../domain.cpp:819) -Per MPI rank memory allocation (min/avg/max) = 33.66 | 33.88 | 34.43 Mbytes - Step Temp Press Density v_prob1 v_prob2 f_myrxns[1] f_myrxns[2] - 0 300 346.78165 0.0034851739 0.1 0 0 0 - 50 275.80938 -29.158908 0.0034851739 0.2 0 1 0 - 100 751.80013 8.8967942 0.0034851739 0.3 0 1 0 - 150 412.82804 61.44542 0.0034851739 0.4 0 1 0 - 200 432.95275 81.052275 0.0034851739 0.5 0 1 0 - 250 338.65702 -39.770422 0.0034851739 0.6 0 1 0 - 300 326.15993 -46.690912 0.0034851739 0.7 0 1 0 - 350 286.66126 51.986782 0.0034851739 0.8 0 1 0 - 400 244.24575 25.460254 0.0034851739 0.9 0 1 0 - 450 294.06274 5.0448726 0.0034851739 1 0 1 0 - 500 280.71089 0.86710712 0.0034851739 1.1 0 1 0 - 550 241.94123 -5.7812057 0.0034851739 1.2 1 1 1 - 600 235.1535 61.669814 0.0034851739 1.3 1 1 1 - 650 359.33618 -22.053171 0.0034851739 1.4 1 1 1 - 700 329.37555 -4.7839581 0.0034851739 1.5 1 1 1 - 750 285.76974 11.553815 0.0034851739 1.6 1 1 1 - 800 303.29561 16.017529 0.0034851739 1.7 1 1 1 - 850 256.86479 8.7487305 0.0034851739 1.8 1 1 1 - 900 292.29316 -11.376211 0.0034851739 1.9 1 1 1 - 950 293.47531 -2.7153276 0.0034851739 2 1 1 1 - 1000 303.66454 -4.8603249 0.0034851739 2.1 1 1 1 -Loop time of 0.195512 on 4 procs for 1000 steps with 44 atoms - -Performance: 441.916 ns/day, 0.054 hours/ns, 5114.771 timesteps/s, 225.050 katom-step/s -99.9% CPU use with 4 MPI tasks x no OpenMP threads +Per MPI rank memory allocation (min/avg/max) = 33.49 | 33.72 | 34.28 Mbytes + Step Temp Press Density v_prob1 v_prob2 f_myrxns:rxn1 f_myrxns:rxn2 + 0 300 357.25587 0.0034851739 0.1 0 0 0 + 50 309.04364 -44.893527 0.0034851739 0.2 0 1 0 + 100 589.37333 -67.071528 0.0034851739 0.3 0 1 0 + 150 618.85066 -27.62431 0.0034851739 0.4 0 1 0 + 200 590.83633 -8.4502898 0.0034851739 0.5 0 1 0 + 250 424.21214 -18.805456 0.0034851739 0.6 0 1 0 + 300 379.29253 -53.636603 0.0034851739 0.7 0 1 0 + 350 322.82257 25.689105 0.0034851739 0.8 0 1 0 + 400 288.58223 5.1539476 0.0034851739 0.9 0 1 0 + 450 242.08086 -41.170718 0.0034851739 1 0 1 0 + 500 292.10549 -51.176697 0.0034851739 1.1 0 1 0 + 550 215.25272 15.57191 0.0034851739 1.2 1 1 1 + 600 274.36725 17.873224 0.0034851739 1.3 1 1 1 + 650 284.3847 -25.412561 0.0034851739 1.4 1 1 1 + 700 339.44889 9.3842034 0.0034851739 1.5 1 1 1 + 750 309.58637 15.911362 0.0034851739 1.6 1 1 1 + 800 344.69627 30.869614 0.0034851739 1.7 1 1 1 + 850 303.19449 -13.292901 0.0034851739 1.8 1 1 1 + 900 282.21839 65.294443 0.0034851739 1.9 1 1 1 + 950 319.01904 -27.224062 0.0034851739 2 1 1 1 + 1000 284.0784 25.378691 0.0034851739 2.1 1 1 1 +Loop time of 0.218585 on 4 procs for 1000 steps with 44 atoms + +Performance: 395.270 ns/day, 0.061 hours/ns, 4574.887 timesteps/s, 201.295 katom-step/s +91.6% 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.000163 | 0.0068784 | 0.016583 | 8.5 | 3.52 -Bond | 0.00040383 | 0.028615 | 0.083462 | 20.0 | 14.64 -Kspace | 0.043566 | 0.10199 | 0.13314 | 11.4 | 52.16 -Neigh | 0.00096634 | 0.00097064 | 0.00097509 | 0.0 | 0.50 -Comm | 0.0052532 | 0.0093802 | 0.014076 | 3.2 | 4.80 -Output | 0.00039802 | 0.00043637 | 0.00050031 | 0.0 | 0.22 -Modify | 0.043549 | 0.045538 | 0.049781 | 1.2 | 23.29 -Other | | 0.001708 | | | 0.87 - -Nlocal: 11 ave 29 max 0 min +Pair | 0.0016695 | 0.0056227 | 0.0095739 | 5.3 | 2.57 +Bond | 0.0016665 | 0.014093 | 0.033524 | 11.3 | 6.45 +Kspace | 0.12764 | 0.1489 | 0.16368 | 4.0 | 68.12 +Neigh | 0.00064261 | 0.0007357 | 0.00077083 | 0.0 | 0.34 +Comm | 0.0048789 | 0.0057607 | 0.0071 | 1.2 | 2.64 +Output | 0.00062878 | 0.00066602 | 0.00077775 | 0.0 | 0.30 +Modify | 0.034703 | 0.037091 | 0.03954 | 1.2 | 16.97 +Other | | 0.00572 | | | 2.62 + +Nlocal: 11 ave 28 max 0 min Histogram: 2 0 0 0 0 1 0 0 0 1 -Nghost: 32.5 ave 45 max 16 min -Histogram: 1 0 0 1 0 0 0 0 1 1 -Neighs: 196.25 ave 448 max 0 min -Histogram: 2 0 0 0 0 0 0 1 0 1 - -Total # of neighbors = 785 -Ave neighs/atom = 17.840909 -Ave special neighs/atom = 9.9090909 -Neighbor list builds = 27 +Nghost: 33 ave 44 max 16 min +Histogram: 1 0 0 0 1 0 0 0 0 2 +Neighs: 214.75 ave 630 max 0 min +Histogram: 2 0 0 1 0 0 0 0 0 1 + +Total # of neighbors = 859 +Ave neighs/atom = 19.522727 +Ave special neighs/atom = 6.4090909 +Neighbor list builds = 26 Dangerous builds = 0 # write_restart restart_longrun -# write_data restart_longrun.data +# write_data restart_longrun.data nofix Total wall time: 0:00:00 diff --git a/examples/PACKAGES/reaction/tiny_nylon/log.10Dec2025.tiny_nylon.unstabilized.g++.1 b/examples/PACKAGES/reaction/tiny_nylon/log.10Dec2025.tiny_nylon.unstabilized.g++.1 new file mode 100644 index 00000000000..05a55b42246 --- /dev/null +++ b/examples/PACKAGES/reaction/tiny_nylon/log.10Dec2025.tiny_nylon.unstabilized.g++.1 @@ -0,0 +1,265 @@ +LAMMPS (10 Dec 2025 - Development - patch_10Dec2025-120-ga51f9ba0e7-modified) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. + using 1 OpenMP thread(s) per MPI task +# two monomer nylon example +# reaction produces a condensed water molecule + +units real + +boundary p p p + +atom_style full + +kspace_style pppm 1.0e-4 + +pair_style lj/class2/coul/long 8.5 + +angle_style class2 + +bond_style class2 + +dihedral_style class2 + +improper_style class2 + +special_bonds lj/coul 0 0 1 +pair_modify tail yes mix sixthpower + +read_data tiny_nylon.data extra/bond/per/atom 5 extra/angle/per/atom 15 extra/dihedral/per/atom 15 extra/improper/per/atom 25 extra/special/per/atom 25 +Reading data file ... + orthogonal box = (-25 -25 -25) to (25 25 25) + 1 by 1 by 1 MPI processor grid + reading atom labelmap ... + reading bond labelmap ... + reading angle labelmap ... + reading dihedral labelmap ... + reading improper labelmap ... + reading atoms ... + 44 atoms + reading velocities ... + 44 velocities + scanning bonds ... + 9 = max bonds/atom + scanning angles ... + 21 = max angles/atom + scanning dihedrals ... + 29 = max dihedrals/atom + scanning impropers ... + 29 = max impropers/atom + orthogonal box = (-25 -25 -25) to (25 25 25) + 1 by 1 by 1 MPI processor grid + reading bonds ... + 42 bonds + reading angles ... + 74 angles + reading dihedrals ... + 100 dihedrals + reading impropers ... + 16 impropers +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 1 + special bond factors coul: 0 0 1 + 4 = max # of 1-2 neighbors + 6 = max # of 1-3 neighbors + 35 = max # of special neighbors + special bonds CPU = 0.001 seconds + read_data CPU = 0.013 seconds + + +velocity all create 300.0 4928459 dist gaussian + +molecule mol1 rxn1_stp1_unreacted.molecule_template +Read molecule template mol1: +this is a molecule template for: initial nylon crosslink, pre-reacting + 1 molecules + 0 fragments + 0 bodies + 18 atoms with max type 8 + 16 bonds with max type 8 + 25 angles with max type 25 + 23 dihedrals with max type 33 + 2 impropers with max type 3 +molecule mol2 rxn1_stp1_reacted.molecule_template +Read molecule template mol2: +this is a molecule template for: initial nylon crosslink, post-reacting + 1 molecules + 0 fragments + 0 bodies + 18 atoms with max type 9 + 17 bonds with max type 11 + 31 angles with max type 24 + 39 dihedrals with max type 30 + 0 impropers with max type 0 +molecule mol3 rxn1_stp2_unreacted.molecule_template +Read molecule template mol3: +this is a molecule template for: water condensation, pre-reacting + 1 molecules + 0 fragments + 0 bodies + 15 atoms with max type 9 + 14 bonds with max type 11 + 25 angles with max type 24 + 30 dihedrals with max type 30 + 0 impropers with max type 0 +molecule mol4 rxn1_stp2_reacted.molecule_template +Read molecule template mol4: +this is a molecule template for: water condensation, post-reacting + 1 molecules + 0 fragments + 0 bodies + 15 atoms with max type 11 + 13 bonds with max type 13 + 19 angles with max type 26 + 16 dihedrals with max type 29 + 2 impropers with max type 5 + +thermo 50 + +# dump 1 all xyz 1 test_vis.xyz +# dump_modify 1 types labels + +fix myrxns all bond/react stabilization no react rxn1 all 1 0.0 2.9 mol1 mol2 rxn1_stp1_map react rxn2 all 1 0.0 5.0 mol3 mol4 rxn1_stp2_map rescale_charges yes +WARNING: Fix bond/react: Atom affected by reaction rxn1 is too close to template edge (src/REACTION/fix_bond_react.cpp:2630) +WARNING: Fix bond/react: Atom affected by reaction rxn2 is too close to template edge (src/REACTION/fix_bond_react.cpp:2630) +dynamic group bond_react_MASTER_group defined + +fix 1 all nve/limit .03 + +thermo_style custom step temp press density f_myrxns[*] +thermo_modify colname auto + +# restart 100 restart1 restart2 + +run 1000 + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Your simulation uses code contributions which should be cited: + +- Type Label Framework: https://doi.org/10.1021/acs.jpcb.3c08419 + +@Article{Gissinger24, + author = {Jacob R. Gissinger, Ilia Nikiforov, Yaser Afshar, Brendon Waters, Moon-ki Choi, Daniel S. Karls, Alexander Stukowski, Wonpil Im, Hendrik Heinz, Axel Kohlmeyer, and Ellad B. Tadmor}, + title = {Type Label Framework for Bonded Force Fields in LAMMPS}, + journal = {J. Phys. Chem. B}, + year = 2024, + volume = 128, + number = 13, + pages = {3282--3297} +} + +- fix bond/react: https://reacter.org, https://doi.org/10.1016/j.polymer.2017.09.038, https://doi.org/10.1021/acs.macromol.0c02012, https://doi.org/10.1016/j.cpc.2024.109287 + +@Article{Gissinger17, + author = {J. R. Gissinger and B. D. Jensen and K. E. Wise}, + title = {Modeling Chemical Reactions in Classical Molecular Dynamics Simulations}, + journal = {Polymer}, + year = 2017, + volume = 128, + pages = {211--217} +} + +@Article{Gissinger20, + author = {J. R. Gissinger, B. D. Jensen, K. E. Wise}, + title = {{REACTER}: A Heuristic Method for Reactive Molecular Dynamics}, + journal = {Macromolecules}, + year = 2020, + volume = 53, + number = 22, + pages = {9953--9961} +} + +@Article{Gissinger24, + author = {J. R. Gissinger, B. D. Jensen, K. E. Wise}, + title = {Molecular Modeling of Reactive Systems with REACTER}, + journal = {Computer Physics Communications}, + year = 2024, + volume = 304, + number = 109287 +} + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +PPPM initialization ... + using 12-bit tables for long-range coulomb + G vector (1/distance) = 0.23408048 + grid = 15 15 15 + stencil order = 5 + estimated absolute RMS force accuracy = 0.018627396 + estimated relative force accuracy = 5.6095851e-05 + using double precision KISS FFT + 3d grid and FFT values/proc = 8000 3375 +Generated 55 of 55 mixed pair_coeff terms from sixthpower/sixthpower mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 10.5 + ghost atom cutoff = 10.5 + binsize = 5.25, bins = 10 10 10 + 2 neighbor lists, perpetual/occasional/extra = 1 1 0 + (1) pair lj/class2/coul/long, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard + (2) fix bond/react, occasional, copy from (1) + attributes: half, newton on + pair build: copy + stencil: none + bin: none +Per MPI rank memory allocation (min/avg/max) = 33.94 | 33.94 | 33.94 Mbytes + Step Temp Press Density f_myrxns:rxn1 f_myrxns:rxn2 + 0 300 357.25587 0.0034851739 0 0 + 50 618.84599 -54.277814 0.0034851739 1 0 + 100 637.6005 29.137861 0.0034851739 1 1 + 150 328.95745 9.360084 0.0034851739 1 1 + 200 350.18518 -41.575227 0.0034851739 1 1 + 250 298.3552 -38.859769 0.0034851739 1 1 + 300 305.55675 9.7354805 0.0034851739 1 1 + 350 279.89918 14.934344 0.0034851739 1 1 + 400 344.74622 -9.0836987 0.0034851739 1 1 + 450 340.16608 -1.8402841 0.0034851739 1 1 + 500 337.66172 -20.221609 0.0034851739 1 1 + 550 299.32583 -6.2997914 0.0034851739 1 1 + 600 276.11416 -1.0711093 0.0034851739 1 1 + 650 280.6316 9.5284017 0.0034851739 1 1 + 700 220.28799 5.5872301 0.0034851739 1 1 + 750 242.1958 9.2274784 0.0034851739 1 1 + 800 237.12035 17.207233 0.0034851739 1 1 + 850 242.99316 -18.656211 0.0034851739 1 1 + 900 253.14562 8.8365064 0.0034851739 1 1 + 950 209.56259 27.184259 0.0034851739 1 1 + 1000 236.86804 -27.03529 0.0034851739 1 1 +Loop time of 0.401613 on 1 procs for 1000 steps with 44 atoms + +Performance: 215.133 ns/day, 0.112 hours/ns, 2489.960 timesteps/s, 109.558 katom-step/s +96.6% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.012966 | 0.012966 | 0.012966 | 0.0 | 3.23 +Bond | 0.047729 | 0.047729 | 0.047729 | 0.0 | 11.88 +Kspace | 0.32269 | 0.32269 | 0.32269 | 0.0 | 80.35 +Neigh | 0.00071859 | 0.00071859 | 0.00071859 | 0.0 | 0.18 +Comm | 0.0034484 | 0.0034484 | 0.0034484 | 0.0 | 0.86 +Output | 0.0002501 | 0.0002501 | 0.0002501 | 0.0 | 0.06 +Modify | 0.0088698 | 0.0088698 | 0.0088698 | 0.0 | 2.21 +Other | | 0.004941 | | | 1.23 + +Nlocal: 44 ave 44 max 44 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 0 ave 0 max 0 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 819 ave 819 max 819 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 819 +Ave neighs/atom = 18.613636 +Ave special neighs/atom = 6.4090909 +Neighbor list builds = 26 +Dangerous builds = 0 + +# write_restart restart_longrun +# write_data restart_longrun.data nofix +Total wall time: 0:00:00 diff --git a/examples/PACKAGES/reaction/tiny_nylon/log.10Dec2025.tiny_nylon.unstabilized.g++.4 b/examples/PACKAGES/reaction/tiny_nylon/log.10Dec2025.tiny_nylon.unstabilized.g++.4 new file mode 100644 index 00000000000..528d4c43998 --- /dev/null +++ b/examples/PACKAGES/reaction/tiny_nylon/log.10Dec2025.tiny_nylon.unstabilized.g++.4 @@ -0,0 +1,265 @@ +LAMMPS (10 Dec 2025 - Development - patch_10Dec2025-120-ga51f9ba0e7-modified) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. + using 1 OpenMP thread(s) per MPI task +# two monomer nylon example +# reaction produces a condensed water molecule + +units real + +boundary p p p + +atom_style full + +kspace_style pppm 1.0e-4 + +pair_style lj/class2/coul/long 8.5 + +angle_style class2 + +bond_style class2 + +dihedral_style class2 + +improper_style class2 + +special_bonds lj/coul 0 0 1 +pair_modify tail yes mix sixthpower + +read_data tiny_nylon.data extra/bond/per/atom 5 extra/angle/per/atom 15 extra/dihedral/per/atom 15 extra/improper/per/atom 25 extra/special/per/atom 25 +Reading data file ... + orthogonal box = (-25 -25 -25) to (25 25 25) + 1 by 2 by 2 MPI processor grid + reading atom labelmap ... + reading bond labelmap ... + reading angle labelmap ... + reading dihedral labelmap ... + reading improper labelmap ... + reading atoms ... + 44 atoms + reading velocities ... + 44 velocities + scanning bonds ... + 9 = max bonds/atom + scanning angles ... + 21 = max angles/atom + scanning dihedrals ... + 29 = max dihedrals/atom + scanning impropers ... + 29 = max impropers/atom + orthogonal box = (-25 -25 -25) to (25 25 25) + 1 by 2 by 2 MPI processor grid + reading bonds ... + 42 bonds + reading angles ... + 74 angles + reading dihedrals ... + 100 dihedrals + reading impropers ... + 16 impropers +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 1 + special bond factors coul: 0 0 1 + 4 = max # of 1-2 neighbors + 6 = max # of 1-3 neighbors + 35 = max # of special neighbors + special bonds CPU = 0.000 seconds + read_data CPU = 0.008 seconds + + +velocity all create 300.0 4928459 dist gaussian + +molecule mol1 rxn1_stp1_unreacted.molecule_template +Read molecule template mol1: +this is a molecule template for: initial nylon crosslink, pre-reacting + 1 molecules + 0 fragments + 0 bodies + 18 atoms with max type 8 + 16 bonds with max type 8 + 25 angles with max type 25 + 23 dihedrals with max type 33 + 2 impropers with max type 3 +molecule mol2 rxn1_stp1_reacted.molecule_template +Read molecule template mol2: +this is a molecule template for: initial nylon crosslink, post-reacting + 1 molecules + 0 fragments + 0 bodies + 18 atoms with max type 9 + 17 bonds with max type 11 + 31 angles with max type 24 + 39 dihedrals with max type 30 + 0 impropers with max type 0 +molecule mol3 rxn1_stp2_unreacted.molecule_template +Read molecule template mol3: +this is a molecule template for: water condensation, pre-reacting + 1 molecules + 0 fragments + 0 bodies + 15 atoms with max type 9 + 14 bonds with max type 11 + 25 angles with max type 24 + 30 dihedrals with max type 30 + 0 impropers with max type 0 +molecule mol4 rxn1_stp2_reacted.molecule_template +Read molecule template mol4: +this is a molecule template for: water condensation, post-reacting + 1 molecules + 0 fragments + 0 bodies + 15 atoms with max type 11 + 13 bonds with max type 13 + 19 angles with max type 26 + 16 dihedrals with max type 29 + 2 impropers with max type 5 + +thermo 50 + +# dump 1 all xyz 1 test_vis.xyz +# dump_modify 1 types labels + +fix myrxns all bond/react stabilization no react rxn1 all 1 0.0 2.9 mol1 mol2 rxn1_stp1_map react rxn2 all 1 0.0 5.0 mol3 mol4 rxn1_stp2_map rescale_charges yes +WARNING: Fix bond/react: Atom affected by reaction rxn1 is too close to template edge (src/REACTION/fix_bond_react.cpp:2630) +WARNING: Fix bond/react: Atom affected by reaction rxn2 is too close to template edge (src/REACTION/fix_bond_react.cpp:2630) +dynamic group bond_react_MASTER_group defined + +fix 1 all nve/limit .03 + +thermo_style custom step temp press density f_myrxns[*] +thermo_modify colname auto + +# restart 100 restart1 restart2 + +run 1000 + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Your simulation uses code contributions which should be cited: + +- Type Label Framework: https://doi.org/10.1021/acs.jpcb.3c08419 + +@Article{Gissinger24, + author = {Jacob R. Gissinger, Ilia Nikiforov, Yaser Afshar, Brendon Waters, Moon-ki Choi, Daniel S. Karls, Alexander Stukowski, Wonpil Im, Hendrik Heinz, Axel Kohlmeyer, and Ellad B. Tadmor}, + title = {Type Label Framework for Bonded Force Fields in LAMMPS}, + journal = {J. Phys. Chem. B}, + year = 2024, + volume = 128, + number = 13, + pages = {3282--3297} +} + +- fix bond/react: https://reacter.org, https://doi.org/10.1016/j.polymer.2017.09.038, https://doi.org/10.1021/acs.macromol.0c02012, https://doi.org/10.1016/j.cpc.2024.109287 + +@Article{Gissinger17, + author = {J. R. Gissinger and B. D. Jensen and K. E. Wise}, + title = {Modeling Chemical Reactions in Classical Molecular Dynamics Simulations}, + journal = {Polymer}, + year = 2017, + volume = 128, + pages = {211--217} +} + +@Article{Gissinger20, + author = {J. R. Gissinger, B. D. Jensen, K. E. Wise}, + title = {{REACTER}: A Heuristic Method for Reactive Molecular Dynamics}, + journal = {Macromolecules}, + year = 2020, + volume = 53, + number = 22, + pages = {9953--9961} +} + +@Article{Gissinger24, + author = {J. R. Gissinger, B. D. Jensen, K. E. Wise}, + title = {Molecular Modeling of Reactive Systems with REACTER}, + journal = {Computer Physics Communications}, + year = 2024, + volume = 304, + number = 109287 +} + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +PPPM initialization ... + using 12-bit tables for long-range coulomb + G vector (1/distance) = 0.23408048 + grid = 15 15 15 + stencil order = 5 + estimated absolute RMS force accuracy = 0.018627396 + estimated relative force accuracy = 5.6095851e-05 + using double precision KISS FFT + 3d grid and FFT values/proc = 3380 960 +Generated 55 of 55 mixed pair_coeff terms from sixthpower/sixthpower mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 10.5 + ghost atom cutoff = 10.5 + binsize = 5.25, bins = 10 10 10 + 2 neighbor lists, perpetual/occasional/extra = 1 1 0 + (1) pair lj/class2/coul/long, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard + (2) fix bond/react, occasional, copy from (1) + attributes: half, newton on + pair build: copy + stencil: none + bin: none +Per MPI rank memory allocation (min/avg/max) = 33.43 | 33.66 | 34.22 Mbytes + Step Temp Press Density f_myrxns:rxn1 f_myrxns:rxn2 + 0 300 357.25587 0.0034851739 0 0 + 50 618.84599 -54.277814 0.0034851739 1 0 + 100 637.6005 29.137861 0.0034851739 1 1 + 150 328.95745 9.360084 0.0034851739 1 1 + 200 350.18518 -41.575227 0.0034851739 1 1 + 250 298.3552 -38.859769 0.0034851739 1 1 + 300 305.55675 9.7354805 0.0034851739 1 1 + 350 279.89918 14.934344 0.0034851739 1 1 + 400 344.74622 -9.0836987 0.0034851739 1 1 + 450 340.16608 -1.8402841 0.0034851739 1 1 + 500 337.66172 -20.221609 0.0034851739 1 1 + 550 299.32583 -6.2997914 0.0034851739 1 1 + 600 276.11416 -1.0711094 0.0034851739 1 1 + 650 280.6316 9.5284019 0.0034851739 1 1 + 700 220.28799 5.5872302 0.0034851739 1 1 + 750 242.1958 9.2274785 0.0034851739 1 1 + 800 237.12035 17.207234 0.0034851739 1 1 + 850 242.99316 -18.656211 0.0034851739 1 1 + 900 253.14562 8.8365069 0.0034851739 1 1 + 950 209.56259 27.184259 0.0034851739 1 1 + 1000 236.86804 -27.03529 0.0034851739 1 1 +Loop time of 0.210884 on 4 procs for 1000 steps with 44 atoms + +Performance: 409.705 ns/day, 0.059 hours/ns, 4741.953 timesteps/s, 208.646 katom-step/s +87.6% 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.0016674 | 0.0050711 | 0.010487 | 5.2 | 2.40 +Bond | 0.0016081 | 0.013403 | 0.030965 | 10.8 | 6.36 +Kspace | 0.13413 | 0.15468 | 0.16819 | 3.7 | 73.35 +Neigh | 0.0006915 | 0.00071954 | 0.00073249 | 0.0 | 0.34 +Comm | 0.0047863 | 0.0058585 | 0.007688 | 1.6 | 2.78 +Output | 0.000201 | 0.00023542 | 0.00033866 | 0.0 | 0.11 +Modify | 0.022479 | 0.02522 | 0.027994 | 1.7 | 11.96 +Other | | 0.005696 | | | 2.70 + +Nlocal: 11 ave 36 max 0 min +Histogram: 2 0 1 0 0 0 0 0 0 1 +Nghost: 28.75 ave 37 max 5 min +Histogram: 1 0 0 0 0 0 0 0 0 3 +Neighs: 204.75 ave 773 max 0 min +Histogram: 3 0 0 0 0 0 0 0 0 1 + +Total # of neighbors = 819 +Ave neighs/atom = 18.613636 +Ave special neighs/atom = 6.4090909 +Neighbor list builds = 26 +Dangerous builds = 0 + +# write_restart restart_longrun +# write_data restart_longrun.data nofix +Total wall time: 0:00:00 diff --git a/examples/PACKAGES/reaction/tiny_nylon/log.4Nov2020.tiny_nylon.stabilized.g++.1 b/examples/PACKAGES/reaction/tiny_nylon/log.4Nov2020.tiny_nylon.stabilized.g++.1 deleted file mode 100644 index 9a2d240ca49..00000000000 --- a/examples/PACKAGES/reaction/tiny_nylon/log.4Nov2020.tiny_nylon.stabilized.g++.1 +++ /dev/null @@ -1,412 +0,0 @@ -LAMMPS (4 Nov 2022) -# two monomer nylon example -# reaction produces a condensed water molecule - -units real - -boundary p p p - -atom_style full - -kspace_style pppm 1.0e-4 - -pair_style lj/class2/coul/long 8.5 - -angle_style class2 - -bond_style class2 - -dihedral_style class2 - -improper_style class2 - -read_data tiny_nylon.data extra/bond/per/atom 5 extra/angle/per/atom 15 extra/dihedral/per/atom 15 extra/improper/per/atom 25 extra/special/per/atom 25 -Reading data file ... - orthogonal box = (-25 -25 -25) to (25 25 25) - 1 by 1 by 1 MPI processor grid - reading atom labelmap ... - reading bond labelmap ... - reading angle labelmap ... - reading dihedral labelmap ... - reading improper labelmap ... - reading atoms ... - 44 atoms - reading velocities ... - 44 velocities - scanning bonds ... - 9 = max bonds/atom - scanning angles ... - 21 = max angles/atom - scanning dihedrals ... - 29 = max dihedrals/atom - scanning impropers ... - 29 = max impropers/atom - reading bonds ... - 42 bonds - reading angles ... - 74 angles - reading dihedrals ... - 100 dihedrals - reading impropers ... - 44 impropers -Finding 1-2 1-3 1-4 neighbors ... - special bond factors lj: 0 0 0 - special bond factors coul: 0 0 0 - 4 = max # of 1-2 neighbors - 6 = max # of 1-3 neighbors - 12 = max # of 1-4 neighbors - 41 = max # of special neighbors - special bonds CPU = 0.000 seconds - read_data CPU = 0.007 seconds - -velocity all create 300.0 4928459 dist gaussian - -molecule mol1 rxn1_stp1_unreacted.molecule_template -Read molecule template mol1: - 1 molecules - 0 fragments - 18 atoms with max type 8 - 16 bonds with max type 10 - 25 angles with max type 28 - 23 dihedrals with max type 36 - 2 impropers with max type 3 -molecule mol2 rxn1_stp1_reacted.molecule_template -Read molecule template mol2: - 1 molecules - 0 fragments - 18 atoms with max type 9 - 17 bonds with max type 13 - 31 angles with max type 27 - 39 dihedrals with max type 33 - 0 impropers with max type 0 -molecule mol3 rxn1_stp2_unreacted.molecule_template -Read molecule template mol3: - 1 molecules - 0 fragments - 15 atoms with max type 9 - 14 bonds with max type 13 - 25 angles with max type 27 - 30 dihedrals with max type 33 - 0 impropers with max type 0 -molecule mol4 rxn1_stp2_reacted.molecule_template -Read molecule template mol4: - 1 molecules - 0 fragments - 15 atoms with max type 11 - 13 bonds with max type 15 - 19 angles with max type 29 - 16 dihedrals with max type 32 - 2 impropers with max type 13 - -thermo 50 - -# dump 1 all xyz 1 test_vis.xyz - -fix myrxns all bond/react stabilization yes statted_grp .03 react rxn1 all 1 0.0 2.9 mol1 mol2 rxn1_stp1_map react rxn2 all 1 0.0 5.0 mol3 mol4 rxn1_stp2_map -WARNING: Fix bond/react: Atom affected by reaction rxn2 is too close to template edge (../fix_bond_react.cpp:2624) -dynamic group bond_react_MASTER_group defined -dynamic group statted_grp_REACT defined - -fix 1 statted_grp_REACT nvt temp 300 300 100 - -# optionally, you can customize behavior of reacting atoms, -# by using the internally-created 'bond_react_MASTER_group', like so: -fix 4 bond_react_MASTER_group temp/rescale 1 300 300 10 1 - -thermo_style custom step temp press density f_myrxns[1] f_myrxns[2] - -# restart 100 restart1 restart2 - -run 10000 - -CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE - -Your simulation uses code contributions which should be cited: - -- fix bond/react: reacter.org doi:10.1016/j.polymer.2017.09.038, doi:10.1021/acs.macromol.0c02012 - -@Article{Gissinger17, - author = {J. R. Gissinger and B. D. Jensen and K. E. Wise}, - title = {Modeling Chemical Reactions in Classical Molecular Dynamics Simulations}, - journal = {Polymer}, - year = 2017, - volume = 128, - pages = {211--217} -} - -@Article{Gissinger20, - author = {J. R. Gissinger, B. D. Jensen, K. E. Wise}, - title = {{REACTER}: A Heuristic Method for Reactive Molecular Dynamics}, - journal = {Macromolecules}, - year = 2020, - volume = 53, - number = 22, - pages = {9953--9961} -} - -CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE - -PPPM initialization ... - using 12-bit tables for long-range coulomb (../kspace.cpp:342) - G vector (1/distance) = 0.05345967 - grid = 2 2 2 - stencil order = 5 - estimated absolute RMS force accuracy = 0.040225597 - estimated relative force accuracy = 0.00012113819 - using double precision KISS FFT - 3d grid and FFT values/proc = 343 8 -Generated 55 of 55 mixed pair_coeff terms from sixthpower/geometric mixing rule -Neighbor list info ... - update: every = 1 steps, delay = 0 steps, check = yes - max neighbors/atom: 2000, page size: 100000 - master list distance cutoff = 10.5 - ghost atom cutoff = 10.5 - binsize = 5.25, bins = 10 10 10 - 2 neighbor lists, perpetual/occasional/extra = 1 1 0 - (1) pair lj/class2/coul/long, perpetual - attributes: half, newton on - pair build: half/bin/newton - stencil: half/bin/3d - bin: standard - (2) fix bond/react, occasional, copy from (1) - attributes: half, newton on - pair build: copy - stencil: none - bin: none -WARNING: Inconsistent image flags (../domain.cpp:819) -Per MPI rank memory allocation (min/avg/max) = 33.78 | 33.78 | 33.78 Mbytes - Step Temp Press Density f_myrxns[1] f_myrxns[2] - 0 300 346.78165 0.0034851739 0 0 - 50 283.51963 -47.16359 0.0034851739 1 0 - 100 256.04648 21.778898 0.0034851739 1 1 - 150 450.78138 -11.7887 0.0034851739 1 1 - 200 400.15754 49.489858 0.0034851739 1 1 - 250 347.06066 68.952063 0.0034851739 1 1 - 300 291.89228 -1.5986302 0.0034851739 1 1 - 350 290.25995 17.634558 0.0034851739 1 1 - 400 234.89168 26.36452 0.0034851739 1 1 - 450 305.80709 -28.923896 0.0034851739 1 1 - 500 375.19218 -37.024375 0.0034851739 1 1 - 550 321.86944 -4.6961825 0.0034851739 1 1 - 600 307.2639 -31.393161 0.0034851739 1 1 - 650 255.95833 8.4995589 0.0034851739 1 1 - 700 294.54665 -17.06105 0.0034851739 1 1 - 750 273.08231 -10.7175 0.0034851739 1 1 - 800 249.69175 9.9777683 0.0034851739 1 1 - 850 307.71806 -6.9950048 0.0034851739 1 1 - 900 367.39855 9.9874985 0.0034851739 1 1 - 950 327.57334 -4.7029779 0.0034851739 1 1 - 1000 348.85247 15.763492 0.0034851739 1 1 - 1050 328.94435 -35.031279 0.0034851739 1 1 - 1100 283.23971 -16.937443 0.0034851739 1 1 - 1150 266.69676 42.308482 0.0034851739 1 1 - 1200 244.61493 -8.291143 0.0034851739 1 1 - 1250 206.68495 6.6280168 0.0034851739 1 1 - 1300 257.83339 -7.0826267 0.0034851739 1 1 - 1350 358.0875 -7.6024741 0.0034851739 1 1 - 1400 353.66614 18.091914 0.0034851739 1 1 - 1450 302.27969 13.828755 0.0034851739 1 1 - 1500 262.57851 9.256794 0.0034851739 1 1 - 1550 252.39493 1.2438641 0.0034851739 1 1 - 1600 247.18352 10.008173 0.0034851739 1 1 - 1650 290.30112 -2.1829035 0.0034851739 1 1 - 1700 272.78999 -57.305766 0.0034851739 1 1 - 1750 253.35258 24.729795 0.0034851739 1 1 - 1800 278.67831 -0.95016566 0.0034851739 1 1 - 1850 302.04743 16.002867 0.0034851739 1 1 - 1900 330.67188 -22.034206 0.0034851739 1 1 - 1950 342.64206 8.0076017 0.0034851739 1 1 - 2000 348.74388 -12.159887 0.0034851739 1 1 - 2050 300.48093 36.01054 0.0034851739 1 1 - 2100 275.01699 8.7612261 0.0034851739 1 1 - 2150 303.92758 10.317056 0.0034851739 1 1 - 2200 308.89457 33.245018 0.0034851739 1 1 - 2250 265.74177 35.857118 0.0034851739 1 1 - 2300 273.40088 53.001593 0.0034851739 1 1 - 2350 287.74746 -0.14590128 0.0034851739 1 1 - 2400 278.76055 -8.2080851 0.0034851739 1 1 - 2450 331.88978 39.025208 0.0034851739 1 1 - 2500 280.04045 -21.423616 0.0034851739 1 1 - 2550 388.81531 -12.350023 0.0034851739 1 1 - 2600 311.13452 -13.287102 0.0034851739 1 1 - 2650 325.07681 88.710878 0.0034851739 1 1 - 2700 319.08502 14.118057 0.0034851739 1 1 - 2750 261.72066 26.051675 0.0034851739 1 1 - 2800 281.03508 -21.200833 0.0034851739 1 1 - 2850 312.27359 4.3892078 0.0034851739 1 1 - 2900 274.81147 -12.738114 0.0034851739 1 1 - 2950 281.76969 11.198451 0.0034851739 1 1 - 3000 291.83918 48.595884 0.0034851739 1 1 - 3050 297.40189 -24.91102 0.0034851739 1 1 - 3100 341.47331 13.82699 0.0034851739 1 1 - 3150 347.51825 -10.458257 0.0034851739 1 1 - 3200 301.24666 26.550464 0.0034851739 1 1 - 3250 281.3679 -23.02985 0.0034851739 1 1 - 3300 279.8332 -53.222264 0.0034851739 1 1 - 3350 289.41496 -8.793156 0.0034851739 1 1 - 3400 288.5722 -25.441134 0.0034851739 1 1 - 3450 259.59524 77.884773 0.0034851739 1 1 - 3500 296.00389 30.3654 0.0034851739 1 1 - 3550 302.14443 -5.1101538 0.0034851739 1 1 - 3600 288.98098 -12.688781 0.0034851739 1 1 - 3650 333.83238 -33.121195 0.0034851739 1 1 - 3700 347.7556 -24.693995 0.0034851739 1 1 - 3750 354.42689 6.7030374 0.0034851739 1 1 - 3800 341.24011 -18.775449 0.0034851739 1 1 - 3850 320.50998 35.492418 0.0034851739 1 1 - 3900 326.81918 -49.073015 0.0034851739 1 1 - 3950 299.55145 -19.487946 0.0034851739 1 1 - 4000 308.81019 30.579971 0.0034851739 1 1 - 4050 251.83279 -17.500379 0.0034851739 1 1 - 4100 242.0783 21.228088 0.0034851739 1 1 - 4150 265.59921 -3.9446469 0.0034851739 1 1 - 4200 369.32464 -14.626205 0.0034851739 1 1 - 4250 346.22904 -32.749662 0.0034851739 1 1 - 4300 369.43175 11.916047 0.0034851739 1 1 - 4350 321.17007 -9.3009147 0.0034851739 1 1 - 4400 312.41821 -31.360537 0.0034851739 1 1 - 4450 281.59211 40.338618 0.0034851739 1 1 - 4500 289.10806 -4.2135222 0.0034851739 1 1 - 4550 317.55705 -4.3727576 0.0034851739 1 1 - 4600 310.64469 -14.403478 0.0034851739 1 1 - 4650 284.43433 37.416848 0.0034851739 1 1 - 4700 353.88469 7.7633789 0.0034851739 1 1 - 4750 328.48834 -60.780145 0.0034851739 1 1 - 4800 390.23986 4.2691385 0.0034851739 1 1 - 4850 364.06188 40.18245 0.0034851739 1 1 - 4900 304.64696 6.3557092 0.0034851739 1 1 - 4950 309.12139 -16.598924 0.0034851739 1 1 - 5000 311.03552 14.748037 0.0034851739 1 1 - 5050 320.97847 -26.733755 0.0034851739 1 1 - 5100 275.1237 -29.734972 0.0034851739 1 1 - 5150 287.76954 -2.5726321 0.0034851739 1 1 - 5200 267.72493 -6.6677739 0.0034851739 1 1 - 5250 290.63862 29.209807 0.0034851739 1 1 - 5300 276.51052 -19.746615 0.0034851739 1 1 - 5350 255.69196 25.130356 0.0034851739 1 1 - 5400 313.43108 -18.556701 0.0034851739 1 1 - 5450 327.91785 -16.08265 0.0034851739 1 1 - 5500 342.03301 33.271603 0.0034851739 1 1 - 5550 272.96564 -5.0247163 0.0034851739 1 1 - 5600 315.93807 -16.793394 0.0034851739 1 1 - 5650 294.66353 19.720691 0.0034851739 1 1 - 5700 283.4631 -6.5193772 0.0034851739 1 1 - 5750 261.06436 12.755679 0.0034851739 1 1 - 5800 274.15767 -9.6693117 0.0034851739 1 1 - 5850 271.1371 18.441828 0.0034851739 1 1 - 5900 283.39277 -4.6324708 0.0034851739 1 1 - 5950 326.30497 12.106133 0.0034851739 1 1 - 6000 316.91847 -32.864812 0.0034851739 1 1 - 6050 344.86369 21.226768 0.0034851739 1 1 - 6100 295.85211 -7.3603837 0.0034851739 1 1 - 6150 256.72292 4.6010174 0.0034851739 1 1 - 6200 248.33379 -20.795929 0.0034851739 1 1 - 6250 259.4054 63.590928 0.0034851739 1 1 - 6300 264.16648 2.6570242 0.0034851739 1 1 - 6350 243.22677 -18.621317 0.0034851739 1 1 - 6400 269.96092 53.832036 0.0034851739 1 1 - 6450 252.06358 -26.231052 0.0034851739 1 1 - 6500 275.4825 25.577441 0.0034851739 1 1 - 6550 298.27441 11.17373 0.0034851739 1 1 - 6600 297.29358 -21.382334 0.0034851739 1 1 - 6650 334.78542 38.892678 0.0034851739 1 1 - 6700 299.48699 -20.336163 0.0034851739 1 1 - 6750 315.01936 21.000444 0.0034851739 1 1 - 6800 244.68344 -6.3625659 0.0034851739 1 1 - 6850 251.56543 27.857872 0.0034851739 1 1 - 6900 280.81518 -12.494398 0.0034851739 1 1 - 6950 273.87437 -34.211085 0.0034851739 1 1 - 7000 274.91068 33.483158 0.0034851739 1 1 - 7050 298.56432 -61.821668 0.0034851739 1 1 - 7100 299.08395 10.365875 0.0034851739 1 1 - 7150 317.38233 29.049831 0.0034851739 1 1 - 7200 317.24932 -27.515026 0.0034851739 1 1 - 7250 305.63931 12.732123 0.0034851739 1 1 - 7300 309.44007 -53.922033 0.0034851739 1 1 - 7350 280.35029 45.495031 0.0034851739 1 1 - 7400 228.60929 1.7072084 0.0034851739 1 1 - 7450 276.206 -19.170327 0.0034851739 1 1 - 7500 257.9851 77.105642 0.0034851739 1 1 - 7550 306.46848 -29.189265 0.0034851739 1 1 - 7600 296.84522 -20.83365 0.0034851739 1 1 - 7650 296.5965 -14.890206 0.0034851739 1 1 - 7700 322.80474 44.883023 0.0034851739 1 1 - 7750 293.7355 -48.487658 0.0034851739 1 1 - 7800 358.41838 13.156339 0.0034851739 1 1 - 7850 293.81457 -19.50566 0.0034851739 1 1 - 7900 309.49618 -28.562417 0.0034851739 1 1 - 7950 285.6339 -22.488886 0.0034851739 1 1 - 8000 262.85312 57.125049 0.0034851739 1 1 - 8050 243.28673 -28.082125 0.0034851739 1 1 - 8100 279.71604 10.011975 0.0034851739 1 1 - 8150 344.77027 -56.89744 0.0034851739 1 1 - 8200 366.36063 21.02453 0.0034851739 1 1 - 8250 347.07209 2.7752885 0.0034851739 1 1 - 8300 337.74753 -10.957676 0.0034851739 1 1 - 8350 300.41188 -22.840776 0.0034851739 1 1 - 8400 282.27447 0.32063982 0.0034851739 1 1 - 8450 285.40722 -3.7167264 0.0034851739 1 1 - 8500 321.32722 -21.308158 0.0034851739 1 1 - 8550 293.65903 15.681219 0.0034851739 1 1 - 8600 293.38929 37.727045 0.0034851739 1 1 - 8650 299.55185 -15.004573 0.0034851739 1 1 - 8700 270.7608 14.615287 0.0034851739 1 1 - 8750 306.46813 67.018302 0.0034851739 1 1 - 8800 308.35025 -91.212286 0.0034851739 1 1 - 8850 349.40419 31.906004 0.0034851739 1 1 - 8900 351.32706 -24.901778 0.0034851739 1 1 - 8950 320.84369 18.380221 0.0034851739 1 1 - 9000 289.2862 9.981138 0.0034851739 1 1 - 9050 270.53883 12.028672 0.0034851739 1 1 - 9100 270.63206 -0.87842772 0.0034851739 1 1 - 9150 274.30671 -4.1228725 0.0034851739 1 1 - 9200 343.78546 20.427647 0.0034851739 1 1 - 9250 348.1019 13.339075 0.0034851739 1 1 - 9300 345.11791 -32.515359 0.0034851739 1 1 - 9350 329.8365 12.644587 0.0034851739 1 1 - 9400 286.41337 -28.79111 0.0034851739 1 1 - 9450 321.92318 32.154255 0.0034851739 1 1 - 9500 302.68527 -42.576022 0.0034851739 1 1 - 9550 335.24034 26.675219 0.0034851739 1 1 - 9600 270.62012 17.230138 0.0034851739 1 1 - 9650 273.71088 35.651219 0.0034851739 1 1 - 9700 286.2141 -26.15835 0.0034851739 1 1 - 9750 262.25352 -4.1954047 0.0034851739 1 1 - 9800 314.29455 23.252049 0.0034851739 1 1 - 9850 273.71272 -29.586039 0.0034851739 1 1 - 9900 300.63743 42.595289 0.0034851739 1 1 - 9950 367.68979 -64.582508 0.0034851739 1 1 - 10000 357.17941 31.607766 0.0034851739 1 1 -Loop time of 1.82433 on 1 procs for 10000 steps with 44 atoms - -Performance: 473.599 ns/day, 0.051 hours/ns, 5481.467 timesteps/s, 241.185 katom-step/s -99.8% CPU use with 1 MPI tasks x no OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 0.25039 | 0.25039 | 0.25039 | 0.0 | 13.72 -Bond | 1.0461 | 1.0461 | 1.0461 | 0.0 | 57.34 -Kspace | 0.34339 | 0.34339 | 0.34339 | 0.0 | 18.82 -Neigh | 0.0097352 | 0.0097352 | 0.0097352 | 0.0 | 0.53 -Comm | 0.0047764 | 0.0047764 | 0.0047764 | 0.0 | 0.26 -Output | 0.0030537 | 0.0030537 | 0.0030537 | 0.0 | 0.17 -Modify | 0.15534 | 0.15534 | 0.15534 | 0.0 | 8.51 -Other | | 0.01155 | | | 0.63 - -Nlocal: 44 ave 44 max 44 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 44 ave 44 max 44 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Neighs: 823 ave 823 max 823 min -Histogram: 1 0 0 0 0 0 0 0 0 0 - -Total # of neighbors = 823 -Ave neighs/atom = 18.704545 -Ave special neighs/atom = 9.9090909 -Neighbor list builds = 221 -Dangerous builds = 0 - -# write_restart restart_longrun -# write_data restart_longrun.data -Total wall time: 0:00:01 diff --git a/examples/PACKAGES/reaction/tiny_nylon/log.4Nov2020.tiny_nylon.stabilized.g++.4 b/examples/PACKAGES/reaction/tiny_nylon/log.4Nov2020.tiny_nylon.stabilized.g++.4 deleted file mode 100644 index 0a30cd69848..00000000000 --- a/examples/PACKAGES/reaction/tiny_nylon/log.4Nov2020.tiny_nylon.stabilized.g++.4 +++ /dev/null @@ -1,412 +0,0 @@ -LAMMPS (4 Nov 2022) -# two monomer nylon example -# reaction produces a condensed water molecule - -units real - -boundary p p p - -atom_style full - -kspace_style pppm 1.0e-4 - -pair_style lj/class2/coul/long 8.5 - -angle_style class2 - -bond_style class2 - -dihedral_style class2 - -improper_style class2 - -read_data tiny_nylon.data extra/bond/per/atom 5 extra/angle/per/atom 15 extra/dihedral/per/atom 15 extra/improper/per/atom 25 extra/special/per/atom 25 -Reading data file ... - orthogonal box = (-25 -25 -25) to (25 25 25) - 1 by 2 by 2 MPI processor grid - reading atom labelmap ... - reading bond labelmap ... - reading angle labelmap ... - reading dihedral labelmap ... - reading improper labelmap ... - reading atoms ... - 44 atoms - reading velocities ... - 44 velocities - scanning bonds ... - 9 = max bonds/atom - scanning angles ... - 21 = max angles/atom - scanning dihedrals ... - 29 = max dihedrals/atom - scanning impropers ... - 29 = max impropers/atom - reading bonds ... - 42 bonds - reading angles ... - 74 angles - reading dihedrals ... - 100 dihedrals - reading impropers ... - 44 impropers -Finding 1-2 1-3 1-4 neighbors ... - special bond factors lj: 0 0 0 - special bond factors coul: 0 0 0 - 4 = max # of 1-2 neighbors - 6 = max # of 1-3 neighbors - 12 = max # of 1-4 neighbors - 41 = max # of special neighbors - special bonds CPU = 0.000 seconds - read_data CPU = 0.008 seconds - -velocity all create 300.0 4928459 dist gaussian - -molecule mol1 rxn1_stp1_unreacted.molecule_template -Read molecule template mol1: - 1 molecules - 0 fragments - 18 atoms with max type 8 - 16 bonds with max type 10 - 25 angles with max type 28 - 23 dihedrals with max type 36 - 2 impropers with max type 3 -molecule mol2 rxn1_stp1_reacted.molecule_template -Read molecule template mol2: - 1 molecules - 0 fragments - 18 atoms with max type 9 - 17 bonds with max type 13 - 31 angles with max type 27 - 39 dihedrals with max type 33 - 0 impropers with max type 0 -molecule mol3 rxn1_stp2_unreacted.molecule_template -Read molecule template mol3: - 1 molecules - 0 fragments - 15 atoms with max type 9 - 14 bonds with max type 13 - 25 angles with max type 27 - 30 dihedrals with max type 33 - 0 impropers with max type 0 -molecule mol4 rxn1_stp2_reacted.molecule_template -Read molecule template mol4: - 1 molecules - 0 fragments - 15 atoms with max type 11 - 13 bonds with max type 15 - 19 angles with max type 29 - 16 dihedrals with max type 32 - 2 impropers with max type 13 - -thermo 50 - -# dump 1 all xyz 1 test_vis.xyz - -fix myrxns all bond/react stabilization yes statted_grp .03 react rxn1 all 1 0.0 2.9 mol1 mol2 rxn1_stp1_map react rxn2 all 1 0.0 5.0 mol3 mol4 rxn1_stp2_map -WARNING: Fix bond/react: Atom affected by reaction rxn2 is too close to template edge (../fix_bond_react.cpp:2624) -dynamic group bond_react_MASTER_group defined -dynamic group statted_grp_REACT defined - -fix 1 statted_grp_REACT nvt temp 300 300 100 - -# optionally, you can customize behavior of reacting atoms, -# by using the internally-created 'bond_react_MASTER_group', like so: -fix 4 bond_react_MASTER_group temp/rescale 1 300 300 10 1 - -thermo_style custom step temp press density f_myrxns[1] f_myrxns[2] - -# restart 100 restart1 restart2 - -run 10000 - -CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE - -Your simulation uses code contributions which should be cited: - -- fix bond/react: reacter.org doi:10.1016/j.polymer.2017.09.038, doi:10.1021/acs.macromol.0c02012 - -@Article{Gissinger17, - author = {J. R. Gissinger and B. D. Jensen and K. E. Wise}, - title = {Modeling Chemical Reactions in Classical Molecular Dynamics Simulations}, - journal = {Polymer}, - year = 2017, - volume = 128, - pages = {211--217} -} - -@Article{Gissinger20, - author = {J. R. Gissinger, B. D. Jensen, K. E. Wise}, - title = {{REACTER}: A Heuristic Method for Reactive Molecular Dynamics}, - journal = {Macromolecules}, - year = 2020, - volume = 53, - number = 22, - pages = {9953--9961} -} - -CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE - -PPPM initialization ... - using 12-bit tables for long-range coulomb (../kspace.cpp:342) - G vector (1/distance) = 0.05345967 - grid = 2 2 2 - stencil order = 5 - estimated absolute RMS force accuracy = 0.040225597 - estimated relative force accuracy = 0.00012113819 - using double precision KISS FFT - 3d grid and FFT values/proc = 252 2 -Generated 55 of 55 mixed pair_coeff terms from sixthpower/geometric mixing rule -Neighbor list info ... - update: every = 1 steps, delay = 0 steps, check = yes - max neighbors/atom: 2000, page size: 100000 - master list distance cutoff = 10.5 - ghost atom cutoff = 10.5 - binsize = 5.25, bins = 10 10 10 - 2 neighbor lists, perpetual/occasional/extra = 1 1 0 - (1) pair lj/class2/coul/long, perpetual - attributes: half, newton on - pair build: half/bin/newton - stencil: half/bin/3d - bin: standard - (2) fix bond/react, occasional, copy from (1) - attributes: half, newton on - pair build: copy - stencil: none - bin: none -WARNING: Inconsistent image flags (../domain.cpp:819) -Per MPI rank memory allocation (min/avg/max) = 33.66 | 33.88 | 34.43 Mbytes - Step Temp Press Density f_myrxns[1] f_myrxns[2] - 0 300 346.78165 0.0034851739 0 0 - 50 283.51963 -47.16359 0.0034851739 1 0 - 100 256.04648 21.778898 0.0034851739 1 1 - 150 450.78138 -11.7887 0.0034851739 1 1 - 200 400.15754 49.489858 0.0034851739 1 1 - 250 347.06066 68.952063 0.0034851739 1 1 - 300 291.89228 -1.5986302 0.0034851739 1 1 - 350 290.25995 17.634558 0.0034851739 1 1 - 400 234.89168 26.36452 0.0034851739 1 1 - 450 305.80709 -28.923896 0.0034851739 1 1 - 500 375.19218 -37.024375 0.0034851739 1 1 - 550 321.86944 -4.6961825 0.0034851739 1 1 - 600 307.2639 -31.393161 0.0034851739 1 1 - 650 255.95833 8.4995589 0.0034851739 1 1 - 700 294.54665 -17.06105 0.0034851739 1 1 - 750 273.08231 -10.7175 0.0034851739 1 1 - 800 249.69175 9.9777684 0.0034851739 1 1 - 850 307.71806 -6.9950047 0.0034851739 1 1 - 900 367.39855 9.9874984 0.0034851739 1 1 - 950 327.57334 -4.702978 0.0034851739 1 1 - 1000 348.85247 15.763492 0.0034851739 1 1 - 1050 328.94435 -35.031279 0.0034851739 1 1 - 1100 283.23971 -16.937443 0.0034851739 1 1 - 1150 266.69676 42.308482 0.0034851739 1 1 - 1200 244.61493 -8.2911432 0.0034851739 1 1 - 1250 206.68495 6.6280166 0.0034851739 1 1 - 1300 257.83339 -7.0826264 0.0034851739 1 1 - 1350 358.0875 -7.602474 0.0034851739 1 1 - 1400 353.66614 18.091914 0.0034851739 1 1 - 1450 302.27969 13.828755 0.0034851739 1 1 - 1500 262.57851 9.2567956 0.0034851739 1 1 - 1550 252.39492 1.2438631 0.0034851739 1 1 - 1600 247.18352 10.008173 0.0034851739 1 1 - 1650 290.30112 -2.1829055 0.0034851739 1 1 - 1700 272.78999 -57.305766 0.0034851739 1 1 - 1750 253.35258 24.729797 0.0034851739 1 1 - 1800 278.67832 -0.95017071 0.0034851739 1 1 - 1850 302.04743 16.002872 0.0034851739 1 1 - 1900 330.67188 -22.034206 0.0034851739 1 1 - 1950 342.64206 8.0075967 0.0034851739 1 1 - 2000 348.74388 -12.159899 0.0034851739 1 1 - 2050 300.48095 36.010534 0.0034851739 1 1 - 2100 275.017 8.7612294 0.0034851739 1 1 - 2150 303.92758 10.317032 0.0034851739 1 1 - 2200 308.89452 33.245012 0.0034851739 1 1 - 2250 265.74176 35.857111 0.0034851739 1 1 - 2300 273.40086 53.001626 0.0034851739 1 1 - 2350 287.74753 -0.14586562 0.0034851739 1 1 - 2400 278.7606 -8.20812 0.0034851739 1 1 - 2450 331.88979 39.02519 0.0034851739 1 1 - 2500 280.04041 -21.423589 0.0034851739 1 1 - 2550 388.81536 -12.350053 0.0034851739 1 1 - 2600 311.13468 -13.286785 0.0034851739 1 1 - 2650 325.07686 88.710881 0.0034851739 1 1 - 2700 319.08471 14.118288 0.0034851739 1 1 - 2750 261.72067 26.051439 0.0034851739 1 1 - 2800 281.03459 -21.201297 0.0034851739 1 1 - 2850 312.27342 4.3904047 0.0034851739 1 1 - 2900 274.81152 -12.739138 0.0034851739 1 1 - 2950 281.76873 11.199981 0.0034851739 1 1 - 3000 291.8377 48.595661 0.0034851739 1 1 - 3050 297.40212 -24.911752 0.0034851739 1 1 - 3100 341.48252 13.825136 0.0034851739 1 1 - 3150 347.5099 -10.452847 0.0034851739 1 1 - 3200 301.24901 26.553909 0.0034851739 1 1 - 3250 281.35392 -23.028031 0.0034851739 1 1 - 3300 279.82881 -53.225332 0.0034851739 1 1 - 3350 289.41016 -8.7866567 0.0034851739 1 1 - 3400 288.56923 -25.445059 0.0034851739 1 1 - 3450 259.59956 77.88466 0.0034851739 1 1 - 3500 295.99591 30.357393 0.0034851739 1 1 - 3550 302.1675 -5.103997 0.0034851739 1 1 - 3600 289.00244 -12.687621 0.0034851739 1 1 - 3650 333.89968 -33.124064 0.0034851739 1 1 - 3700 347.82328 -24.745583 0.0034851739 1 1 - 3750 354.51391 6.7131611 0.0034851739 1 1 - 3800 341.31124 -18.777474 0.0034851739 1 1 - 3850 320.48132 35.547595 0.0034851739 1 1 - 3900 326.8911 -49.153151 0.0034851739 1 1 - 3950 299.65543 -19.443322 0.0034851739 1 1 - 4000 308.97943 30.368402 0.0034851739 1 1 - 4050 251.46183 -17.518988 0.0034851739 1 1 - 4100 241.50223 22.103347 0.0034851739 1 1 - 4150 265.01178 -4.4952098 0.0034851739 1 1 - 4200 369.78569 -14.603579 0.0034851739 1 1 - 4250 348.20071 -33.060693 0.0034851739 1 1 - 4300 368.11836 11.897676 0.0034851739 1 1 - 4350 321.1145 -9.3124104 0.0034851739 1 1 - 4400 313.95395 -31.940883 0.0034851739 1 1 - 4450 280.50985 41.398853 0.0034851739 1 1 - 4500 289.36914 -2.3915112 0.0034851739 1 1 - 4550 318.52735 -5.0086703 0.0034851739 1 1 - 4600 308.68169 -13.642004 0.0034851739 1 1 - 4650 285.24153 35.314806 0.0034851739 1 1 - 4700 357.15021 8.8271927 0.0034851739 1 1 - 4750 359.11051 -59.672314 0.0034851739 1 1 - 4800 453.11584 0.54316266 0.0034851739 1 1 - 4850 392.52232 46.350736 0.0034851739 1 1 - 4900 310.42864 5.9002223 0.0034851739 1 1 - 4950 285.97355 -19.321724 0.0034851739 1 1 - 5000 309.41828 18.331381 0.0034851739 1 1 - 5050 324.96434 -27.143631 0.0034851739 1 1 - 5100 266.49422 -26.977074 0.0034851739 1 1 - 5150 295.35576 -14.271299 0.0034851739 1 1 - 5200 275.8961 14.057873 0.0034851739 1 1 - 5250 332.75955 26.04747 0.0034851739 1 1 - 5300 296.57102 -20.904181 0.0034851739 1 1 - 5350 264.68808 29.533914 0.0034851739 1 1 - 5400 293.373 -13.579532 0.0034851739 1 1 - 5450 290.55933 9.3458628 0.0034851739 1 1 - 5500 340.54834 8.8308229 0.0034851739 1 1 - 5550 336.08713 -6.9696582 0.0034851739 1 1 - 5600 331.77668 -7.9756709 0.0034851739 1 1 - 5650 307.8419 -10.263349 0.0034851739 1 1 - 5700 262.70119 78.855544 0.0034851739 1 1 - 5750 285.37985 -15.4042 0.0034851739 1 1 - 5800 267.44612 -30.053955 0.0034851739 1 1 - 5850 241.52125 3.2904907 0.0034851739 1 1 - 5900 265.13367 27.69901 0.0034851739 1 1 - 5950 277.95155 18.419031 0.0034851739 1 1 - 6000 309.62777 -20.054029 0.0034851739 1 1 - 6050 363.41588 16.435337 0.0034851739 1 1 - 6100 348.85793 -14.513241 0.0034851739 1 1 - 6150 323.73745 56.990265 0.0034851739 1 1 - 6200 338.66823 -19.93498 0.0034851739 1 1 - 6250 325.41329 -13.824943 0.0034851739 1 1 - 6300 279.82345 -9.0557197 0.0034851739 1 1 - 6350 285.90705 52.434161 0.0034851739 1 1 - 6400 260.34102 -15.766595 0.0034851739 1 1 - 6450 304.65686 7.5058044 0.0034851739 1 1 - 6500 265.02097 1.7203356 0.0034851739 1 1 - 6550 293.35057 1.8896974 0.0034851739 1 1 - 6600 284.06837 -9.3674953 0.0034851739 1 1 - 6650 307.29863 -2.3882614 0.0034851739 1 1 - 6700 336.20676 43.913926 0.0034851739 1 1 - 6750 291.53938 -16.749433 0.0034851739 1 1 - 6800 298.4418 -13.340335 0.0034851739 1 1 - 6850 264.13368 -11.219357 0.0034851739 1 1 - 6900 273.63109 -15.897238 0.0034851739 1 1 - 6950 282.64715 6.8275423 0.0034851739 1 1 - 7000 277.4091 -25.381099 0.0034851739 1 1 - 7050 278.07001 63.552969 0.0034851739 1 1 - 7100 293.33358 22.103462 0.0034851739 1 1 - 7150 308.36447 -27.212203 0.0034851739 1 1 - 7200 251.45077 -40.385347 0.0034851739 1 1 - 7250 317.57808 1.0302048 0.0034851739 1 1 - 7300 348.52627 48.392457 0.0034851739 1 1 - 7350 356.5821 27.933626 0.0034851739 1 1 - 7400 311.29835 -18.899768 0.0034851739 1 1 - 7450 274.24476 -19.41577 0.0034851739 1 1 - 7500 261.38075 1.2110527 0.0034851739 1 1 - 7550 299.78907 -17.64954 0.0034851739 1 1 - 7600 271.36191 25.99439 0.0034851739 1 1 - 7650 287.51241 1.532789 0.0034851739 1 1 - 7700 280.87778 -31.828432 0.0034851739 1 1 - 7750 312.22588 45.320976 0.0034851739 1 1 - 7800 312.73849 4.1022573 0.0034851739 1 1 - 7850 299.18742 50.272069 0.0034851739 1 1 - 7900 312.4916 -34.425195 0.0034851739 1 1 - 7950 284.5205 15.716375 0.0034851739 1 1 - 8000 248.39764 -7.1922339 0.0034851739 1 1 - 8050 242.65659 -32.701773 0.0034851739 1 1 - 8100 228.76112 54.351 0.0034851739 1 1 - 8150 308.67672 -15.835344 0.0034851739 1 1 - 8200 304.26746 -11.106867 0.0034851739 1 1 - 8250 338.67601 44.199636 0.0034851739 1 1 - 8300 308.59612 -9.6487546 0.0034851739 1 1 - 8350 287.08027 11.036122 0.0034851739 1 1 - 8400 319.79578 -78.918735 0.0034851739 1 1 - 8450 320.78978 57.275745 0.0034851739 1 1 - 8500 282.90803 33.716746 0.0034851739 1 1 - 8550 235.23686 -44.587941 0.0034851739 1 1 - 8600 265.62925 45.976855 0.0034851739 1 1 - 8650 260.35429 -9.3951434 0.0034851739 1 1 - 8700 236.16314 19.504695 0.0034851739 1 1 - 8750 291.51087 -13.996885 0.0034851739 1 1 - 8800 357.00246 -26.674845 0.0034851739 1 1 - 8850 327.72543 15.954838 0.0034851739 1 1 - 8900 321.17809 -14.794959 0.0034851739 1 1 - 8950 357.51102 39.861567 0.0034851739 1 1 - 9000 286.68385 -52.799636 0.0034851739 1 1 - 9050 283.96224 13.044025 0.0034851739 1 1 - 9100 304.04431 25.510777 0.0034851739 1 1 - 9150 261.33631 -18.611794 0.0034851739 1 1 - 9200 297.50501 25.733551 0.0034851739 1 1 - 9250 279.85018 -26.91045 0.0034851739 1 1 - 9300 336.07358 35.385228 0.0034851739 1 1 - 9350 326.27961 -36.941794 0.0034851739 1 1 - 9400 400.42857 7.5301492 0.0034851739 1 1 - 9450 296.80174 11.898673 0.0034851739 1 1 - 9500 275.98796 41.303486 0.0034851739 1 1 - 9550 278.56924 31.033397 0.0034851739 1 1 - 9600 260.24476 -11.416595 0.0034851739 1 1 - 9650 281.86065 12.60709 0.0034851739 1 1 - 9700 287.26789 -29.086626 0.0034851739 1 1 - 9750 290.82789 3.2830325 0.0034851739 1 1 - 9800 270.99421 -25.824595 0.0034851739 1 1 - 9850 385.1884 4.1048816 0.0034851739 1 1 - 9900 363.1711 18.815879 0.0034851739 1 1 - 9950 344.93572 17.375158 0.0034851739 1 1 - 10000 335.65852 -0.84087429 0.0034851739 1 1 -Loop time of 1.78856 on 4 procs for 10000 steps with 44 atoms - -Performance: 483.070 ns/day, 0.050 hours/ns, 5591.087 timesteps/s, 246.008 katom-step/s -100.0% CPU use with 4 MPI tasks x no OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 0.0021174 | 0.066025 | 0.20024 | 31.5 | 3.69 -Bond | 0.0035593 | 0.2715 | 0.74757 | 58.6 | 15.18 -Kspace | 0.50386 | 1.0492 | 1.3455 | 33.6 | 58.66 -Neigh | 0.0079056 | 0.0079463 | 0.0079766 | 0.0 | 0.44 -Comm | 0.044284 | 0.08173 | 0.10388 | 8.1 | 4.57 -Output | 0.0021661 | 0.0024497 | 0.0031314 | 0.8 | 0.14 -Modify | 0.2648 | 0.29459 | 0.33479 | 5.5 | 16.47 -Other | | 0.01514 | | | 0.85 - -Nlocal: 11 ave 41 max 0 min -Histogram: 3 0 0 0 0 0 0 0 0 1 -Nghost: 27.5 ave 41 max 0 min -Histogram: 1 0 0 0 0 0 0 0 2 1 -Neighs: 205.75 ave 820 max 0 min -Histogram: 3 0 0 0 0 0 0 0 0 1 - -Total # of neighbors = 823 -Ave neighs/atom = 18.704545 -Ave special neighs/atom = 9.9090909 -Neighbor list builds = 225 -Dangerous builds = 0 - -# write_restart restart_longrun -# write_data restart_longrun.data -Total wall time: 0:00:01 diff --git a/examples/PACKAGES/reaction/tiny_nylon/log.4Nov2020.tiny_nylon.unstabilized.g++.1 b/examples/PACKAGES/reaction/tiny_nylon/log.4Nov2020.tiny_nylon.unstabilized.g++.1 deleted file mode 100644 index 5d696dae456..00000000000 --- a/examples/PACKAGES/reaction/tiny_nylon/log.4Nov2020.tiny_nylon.unstabilized.g++.1 +++ /dev/null @@ -1,228 +0,0 @@ -LAMMPS (4 Nov 2022) -# two monomer nylon example -# reaction produces a condensed water molecule - -units real - -boundary p p p - -atom_style full - -kspace_style pppm 1.0e-4 - -pair_style lj/class2/coul/long 8.5 - -angle_style class2 - -bond_style class2 - -dihedral_style class2 - -improper_style class2 - -read_data tiny_nylon.data extra/bond/per/atom 5 extra/angle/per/atom 15 extra/dihedral/per/atom 15 extra/improper/per/atom 25 extra/special/per/atom 25 -Reading data file ... - orthogonal box = (-25 -25 -25) to (25 25 25) - 1 by 1 by 1 MPI processor grid - reading atom labelmap ... - reading bond labelmap ... - reading angle labelmap ... - reading dihedral labelmap ... - reading improper labelmap ... - reading atoms ... - 44 atoms - reading velocities ... - 44 velocities - scanning bonds ... - 9 = max bonds/atom - scanning angles ... - 21 = max angles/atom - scanning dihedrals ... - 29 = max dihedrals/atom - scanning impropers ... - 29 = max impropers/atom - reading bonds ... - 42 bonds - reading angles ... - 74 angles - reading dihedrals ... - 100 dihedrals - reading impropers ... - 44 impropers -Finding 1-2 1-3 1-4 neighbors ... - special bond factors lj: 0 0 0 - special bond factors coul: 0 0 0 - 4 = max # of 1-2 neighbors - 6 = max # of 1-3 neighbors - 12 = max # of 1-4 neighbors - 41 = max # of special neighbors - special bonds CPU = 0.000 seconds - read_data CPU = 0.008 seconds - - -velocity all create 300.0 4928459 dist gaussian - -molecule mol1 rxn1_stp1_unreacted.molecule_template -Read molecule template mol1: - 1 molecules - 0 fragments - 18 atoms with max type 8 - 16 bonds with max type 10 - 25 angles with max type 28 - 23 dihedrals with max type 36 - 2 impropers with max type 3 -molecule mol2 rxn1_stp1_reacted.molecule_template -Read molecule template mol2: - 1 molecules - 0 fragments - 18 atoms with max type 9 - 17 bonds with max type 13 - 31 angles with max type 27 - 39 dihedrals with max type 33 - 0 impropers with max type 0 -molecule mol3 rxn1_stp2_unreacted.molecule_template -Read molecule template mol3: - 1 molecules - 0 fragments - 15 atoms with max type 9 - 14 bonds with max type 13 - 25 angles with max type 27 - 30 dihedrals with max type 33 - 0 impropers with max type 0 -molecule mol4 rxn1_stp2_reacted.molecule_template -Read molecule template mol4: - 1 molecules - 0 fragments - 15 atoms with max type 11 - 13 bonds with max type 15 - 19 angles with max type 29 - 16 dihedrals with max type 32 - 2 impropers with max type 13 - -thermo 50 - -# dump 1 all xyz 1 test_vis.xyz - -fix myrxns all bond/react stabilization no react rxn1 all 1 0.0 2.9 mol1 mol2 rxn1_stp1_map react rxn2 all 1 0.0 5.0 mol3 mol4 rxn1_stp2_map -WARNING: Fix bond/react: Atom affected by reaction rxn2 is too close to template edge (../fix_bond_react.cpp:2624) -dynamic group bond_react_MASTER_group defined - -fix 1 all nve/limit .03 - -thermo_style custom step temp press density f_myrxns[1] f_myrxns[2] - -# restart 100 restart1 restart2 - -run 1000 - -CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE - -Your simulation uses code contributions which should be cited: - -- fix bond/react: reacter.org doi:10.1016/j.polymer.2017.09.038, doi:10.1021/acs.macromol.0c02012 - -@Article{Gissinger17, - author = {J. R. Gissinger and B. D. Jensen and K. E. Wise}, - title = {Modeling Chemical Reactions in Classical Molecular Dynamics Simulations}, - journal = {Polymer}, - year = 2017, - volume = 128, - pages = {211--217} -} - -@Article{Gissinger20, - author = {J. R. Gissinger, B. D. Jensen, K. E. Wise}, - title = {{REACTER}: A Heuristic Method for Reactive Molecular Dynamics}, - journal = {Macromolecules}, - year = 2020, - volume = 53, - number = 22, - pages = {9953--9961} -} - -CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE - -PPPM initialization ... - using 12-bit tables for long-range coulomb (../kspace.cpp:342) - G vector (1/distance) = 0.05345967 - grid = 2 2 2 - stencil order = 5 - estimated absolute RMS force accuracy = 0.040225597 - estimated relative force accuracy = 0.00012113819 - using double precision KISS FFT - 3d grid and FFT values/proc = 343 8 -Generated 55 of 55 mixed pair_coeff terms from sixthpower/geometric mixing rule -Neighbor list info ... - update: every = 1 steps, delay = 0 steps, check = yes - max neighbors/atom: 2000, page size: 100000 - master list distance cutoff = 10.5 - ghost atom cutoff = 10.5 - binsize = 5.25, bins = 10 10 10 - 2 neighbor lists, perpetual/occasional/extra = 1 1 0 - (1) pair lj/class2/coul/long, perpetual - attributes: half, newton on - pair build: half/bin/newton - stencil: half/bin/3d - bin: standard - (2) fix bond/react, occasional, copy from (1) - attributes: half, newton on - pair build: copy - stencil: none - bin: none -WARNING: Inconsistent image flags (../domain.cpp:819) -Per MPI rank memory allocation (min/avg/max) = 33.72 | 33.72 | 33.72 Mbytes - Step Temp Press Density f_myrxns[1] f_myrxns[2] - 0 300 346.78165 0.0034851739 0 0 - 50 530.51001 -15.418012 0.0034851739 1 0 - 100 677.21327 16.545108 0.0034851739 1 1 - 150 386.79268 -28.445486 0.0034851739 1 1 - 200 380.29074 1.8065066 0.0034851739 1 1 - 250 353.27609 -7.3505628 0.0034851739 1 1 - 300 357.84405 -7.0569 0.0034851739 1 1 - 350 337.65224 54.441683 0.0034851739 1 1 - 400 322.54035 20.338902 0.0034851739 1 1 - 450 316.91217 44.76973 0.0034851739 1 1 - 500 345.40444 -8.2133383 0.0034851739 1 1 - 550 296.22085 -30.331582 0.0034851739 1 1 - 600 263.8024 -36.834323 0.0034851739 1 1 - 650 284.05699 1.2532577 0.0034851739 1 1 - 700 274.86269 4.6881357 0.0034851739 1 1 - 750 298.72284 -18.225831 0.0034851739 1 1 - 800 292.72143 -5.1622029 0.0034851739 1 1 - 850 279.30224 -10.72513 0.0034851739 1 1 - 900 284.97331 30.268801 0.0034851739 1 1 - 950 262.46089 16.98134 0.0034851739 1 1 - 1000 297.55359 28.583097 0.0034851739 1 1 -Loop time of 0.175951 on 1 procs for 1000 steps with 44 atoms - -Performance: 491.045 ns/day, 0.049 hours/ns, 5683.388 timesteps/s, 250.069 katom-step/s -99.6% CPU use with 1 MPI tasks x no OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 0.022992 | 0.022992 | 0.022992 | 0.0 | 13.07 -Bond | 0.1045 | 0.1045 | 0.1045 | 0.0 | 59.39 -Kspace | 0.034057 | 0.034057 | 0.034057 | 0.0 | 19.36 -Neigh | 0.0013592 | 0.0013592 | 0.0013592 | 0.0 | 0.77 -Comm | 0.00040677 | 0.00040677 | 0.00040677 | 0.0 | 0.23 -Output | 0.00030929 | 0.00030929 | 0.00030929 | 0.0 | 0.18 -Modify | 0.01121 | 0.01121 | 0.01121 | 0.0 | 6.37 -Other | | 0.001118 | | | 0.64 - -Nlocal: 44 ave 44 max 44 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 8 ave 8 max 8 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Neighs: 810 ave 810 max 810 min -Histogram: 1 0 0 0 0 0 0 0 0 0 - -Total # of neighbors = 810 -Ave neighs/atom = 18.409091 -Ave special neighs/atom = 9.9090909 -Neighbor list builds = 28 -Dangerous builds = 0 - -# write_restart restart_longrun -# write_data restart_longrun.data -Total wall time: 0:00:00 diff --git a/examples/PACKAGES/reaction/tiny_nylon/log.4Nov2020.tiny_nylon.unstabilized.g++.4 b/examples/PACKAGES/reaction/tiny_nylon/log.4Nov2020.tiny_nylon.unstabilized.g++.4 deleted file mode 100644 index 0b022918bed..00000000000 --- a/examples/PACKAGES/reaction/tiny_nylon/log.4Nov2020.tiny_nylon.unstabilized.g++.4 +++ /dev/null @@ -1,228 +0,0 @@ -LAMMPS (4 Nov 2022) -# two monomer nylon example -# reaction produces a condensed water molecule - -units real - -boundary p p p - -atom_style full - -kspace_style pppm 1.0e-4 - -pair_style lj/class2/coul/long 8.5 - -angle_style class2 - -bond_style class2 - -dihedral_style class2 - -improper_style class2 - -read_data tiny_nylon.data extra/bond/per/atom 5 extra/angle/per/atom 15 extra/dihedral/per/atom 15 extra/improper/per/atom 25 extra/special/per/atom 25 -Reading data file ... - orthogonal box = (-25 -25 -25) to (25 25 25) - 1 by 2 by 2 MPI processor grid - reading atom labelmap ... - reading bond labelmap ... - reading angle labelmap ... - reading dihedral labelmap ... - reading improper labelmap ... - reading atoms ... - 44 atoms - reading velocities ... - 44 velocities - scanning bonds ... - 9 = max bonds/atom - scanning angles ... - 21 = max angles/atom - scanning dihedrals ... - 29 = max dihedrals/atom - scanning impropers ... - 29 = max impropers/atom - reading bonds ... - 42 bonds - reading angles ... - 74 angles - reading dihedrals ... - 100 dihedrals - reading impropers ... - 44 impropers -Finding 1-2 1-3 1-4 neighbors ... - special bond factors lj: 0 0 0 - special bond factors coul: 0 0 0 - 4 = max # of 1-2 neighbors - 6 = max # of 1-3 neighbors - 12 = max # of 1-4 neighbors - 41 = max # of special neighbors - special bonds CPU = 0.000 seconds - read_data CPU = 0.008 seconds - - -velocity all create 300.0 4928459 dist gaussian - -molecule mol1 rxn1_stp1_unreacted.molecule_template -Read molecule template mol1: - 1 molecules - 0 fragments - 18 atoms with max type 8 - 16 bonds with max type 10 - 25 angles with max type 28 - 23 dihedrals with max type 36 - 2 impropers with max type 3 -molecule mol2 rxn1_stp1_reacted.molecule_template -Read molecule template mol2: - 1 molecules - 0 fragments - 18 atoms with max type 9 - 17 bonds with max type 13 - 31 angles with max type 27 - 39 dihedrals with max type 33 - 0 impropers with max type 0 -molecule mol3 rxn1_stp2_unreacted.molecule_template -Read molecule template mol3: - 1 molecules - 0 fragments - 15 atoms with max type 9 - 14 bonds with max type 13 - 25 angles with max type 27 - 30 dihedrals with max type 33 - 0 impropers with max type 0 -molecule mol4 rxn1_stp2_reacted.molecule_template -Read molecule template mol4: - 1 molecules - 0 fragments - 15 atoms with max type 11 - 13 bonds with max type 15 - 19 angles with max type 29 - 16 dihedrals with max type 32 - 2 impropers with max type 13 - -thermo 50 - -# dump 1 all xyz 1 test_vis.xyz - -fix myrxns all bond/react stabilization no react rxn1 all 1 0.0 2.9 mol1 mol2 rxn1_stp1_map react rxn2 all 1 0.0 5.0 mol3 mol4 rxn1_stp2_map -WARNING: Fix bond/react: Atom affected by reaction rxn2 is too close to template edge (../fix_bond_react.cpp:2624) -dynamic group bond_react_MASTER_group defined - -fix 1 all nve/limit .03 - -thermo_style custom step temp press density f_myrxns[1] f_myrxns[2] - -# restart 100 restart1 restart2 - -run 1000 - -CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE - -Your simulation uses code contributions which should be cited: - -- fix bond/react: reacter.org doi:10.1016/j.polymer.2017.09.038, doi:10.1021/acs.macromol.0c02012 - -@Article{Gissinger17, - author = {J. R. Gissinger and B. D. Jensen and K. E. Wise}, - title = {Modeling Chemical Reactions in Classical Molecular Dynamics Simulations}, - journal = {Polymer}, - year = 2017, - volume = 128, - pages = {211--217} -} - -@Article{Gissinger20, - author = {J. R. Gissinger, B. D. Jensen, K. E. Wise}, - title = {{REACTER}: A Heuristic Method for Reactive Molecular Dynamics}, - journal = {Macromolecules}, - year = 2020, - volume = 53, - number = 22, - pages = {9953--9961} -} - -CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE - -PPPM initialization ... - using 12-bit tables for long-range coulomb (../kspace.cpp:342) - G vector (1/distance) = 0.05345967 - grid = 2 2 2 - stencil order = 5 - estimated absolute RMS force accuracy = 0.040225597 - estimated relative force accuracy = 0.00012113819 - using double precision KISS FFT - 3d grid and FFT values/proc = 252 2 -Generated 55 of 55 mixed pair_coeff terms from sixthpower/geometric mixing rule -Neighbor list info ... - update: every = 1 steps, delay = 0 steps, check = yes - max neighbors/atom: 2000, page size: 100000 - master list distance cutoff = 10.5 - ghost atom cutoff = 10.5 - binsize = 5.25, bins = 10 10 10 - 2 neighbor lists, perpetual/occasional/extra = 1 1 0 - (1) pair lj/class2/coul/long, perpetual - attributes: half, newton on - pair build: half/bin/newton - stencil: half/bin/3d - bin: standard - (2) fix bond/react, occasional, copy from (1) - attributes: half, newton on - pair build: copy - stencil: none - bin: none -WARNING: Inconsistent image flags (../domain.cpp:819) -Per MPI rank memory allocation (min/avg/max) = 33.59 | 33.82 | 34.37 Mbytes - Step Temp Press Density f_myrxns[1] f_myrxns[2] - 0 300 346.78165 0.0034851739 0 0 - 50 530.51001 -15.418012 0.0034851739 1 0 - 100 677.21327 16.545108 0.0034851739 1 1 - 150 386.79268 -28.445486 0.0034851739 1 1 - 200 380.29074 1.8065066 0.0034851739 1 1 - 250 353.27609 -7.3505628 0.0034851739 1 1 - 300 357.84405 -7.0569 0.0034851739 1 1 - 350 337.65224 54.441683 0.0034851739 1 1 - 400 322.54035 20.338902 0.0034851739 1 1 - 450 316.91217 44.76973 0.0034851739 1 1 - 500 345.40444 -8.2133383 0.0034851739 1 1 - 550 296.22085 -30.331582 0.0034851739 1 1 - 600 263.8024 -36.834323 0.0034851739 1 1 - 650 284.05699 1.2532577 0.0034851739 1 1 - 700 274.86269 4.6881357 0.0034851739 1 1 - 750 298.72284 -18.225831 0.0034851739 1 1 - 800 292.72143 -5.1622029 0.0034851739 1 1 - 850 279.30224 -10.72513 0.0034851739 1 1 - 900 284.97331 30.268801 0.0034851739 1 1 - 950 262.46089 16.98134 0.0034851739 1 1 - 1000 297.55359 28.583097 0.0034851739 1 1 -Loop time of 0.179911 on 4 procs for 1000 steps with 44 atoms - -Performance: 480.238 ns/day, 0.050 hours/ns, 5558.315 timesteps/s, 244.566 katom-step/s -99.9% CPU use with 4 MPI tasks x no OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 0.0001131 | 0.0060483 | 0.016546 | 8.7 | 3.36 -Bond | 0.00024262 | 0.027106 | 0.07455 | 18.6 | 15.07 -Kspace | 0.059795 | 0.11105 | 0.13995 | 9.9 | 61.72 -Neigh | 0.0012033 | 0.0012139 | 0.0012228 | 0.0 | 0.67 -Comm | 0.0056243 | 0.0098345 | 0.013482 | 2.9 | 5.47 -Output | 0.00025378 | 0.0002833 | 0.00034961 | 0.0 | 0.16 -Modify | 0.020145 | 0.02287 | 0.027899 | 2.1 | 12.71 -Other | | 0.001506 | | | 0.84 - -Nlocal: 11 ave 41 max 0 min -Histogram: 3 0 0 0 0 0 0 0 0 1 -Nghost: 34.5 ave 46 max 8 min -Histogram: 1 0 0 0 0 0 0 0 2 1 -Neighs: 202.5 ave 807 max 0 min -Histogram: 3 0 0 0 0 0 0 0 0 1 - -Total # of neighbors = 810 -Ave neighs/atom = 18.409091 -Ave special neighs/atom = 9.9090909 -Neighbor list builds = 28 -Dangerous builds = 0 - -# write_restart restart_longrun -# write_data restart_longrun.data -Total wall time: 0:00:00 diff --git a/examples/PACKAGES/reaction/tiny_nylon_json/in.tiny_nylon.stabilized b/examples/PACKAGES/reaction/tiny_nylon_json/in.tiny_nylon.stabilized index a8a4492bfbc..082f0085eaa 100644 --- a/examples/PACKAGES/reaction/tiny_nylon_json/in.tiny_nylon.stabilized +++ b/examples/PACKAGES/reaction/tiny_nylon_json/in.tiny_nylon.stabilized @@ -52,6 +52,7 @@ fix 1 statted_grp_REACT nvt temp 300 300 100 fix 4 bond_react_MASTER_group temp/rescale 1 300 300 10 1 thermo_style custom step temp press density f_myrxns[*] +thermo_modify colname auto # restart 100 restart1 restart2 diff --git a/examples/PACKAGES/reaction/tiny_nylon_json/log.10Dec2025.tiny_nylon.stabilized.g++.1 b/examples/PACKAGES/reaction/tiny_nylon_json/log.10Dec2025.tiny_nylon.stabilized.g++.1 new file mode 100644 index 00000000000..4fa746075f4 --- /dev/null +++ b/examples/PACKAGES/reaction/tiny_nylon_json/log.10Dec2025.tiny_nylon.stabilized.g++.1 @@ -0,0 +1,449 @@ +LAMMPS (10 Dec 2025 - Development - patch_10Dec2025-120-ga51f9ba0e7-modified) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. + using 1 OpenMP thread(s) per MPI task +# two monomer nylon example +# reaction produces a condensed water molecule + +units real + +boundary p p p + +atom_style full + +kspace_style pppm 1.0e-4 + +pair_style lj/class2/coul/long 8.5 + +angle_style class2 + +bond_style class2 + +dihedral_style class2 + +improper_style class2 + +special_bonds lj/coul 0 0 1 +pair_modify tail yes mix sixthpower + +read_data tiny_nylon.data extra/bond/per/atom 5 extra/angle/per/atom 15 extra/dihedral/per/atom 15 extra/improper/per/atom 25 extra/special/per/atom 25 +Reading data file ... + orthogonal box = (-25 -25 -25) to (25 25 25) + 1 by 1 by 1 MPI processor grid + reading atom labelmap ... + reading bond labelmap ... + reading angle labelmap ... + reading dihedral labelmap ... + reading improper labelmap ... + reading atoms ... + 44 atoms + reading velocities ... + 44 velocities + scanning bonds ... + 9 = max bonds/atom + scanning angles ... + 21 = max angles/atom + scanning dihedrals ... + 29 = max dihedrals/atom + scanning impropers ... + 29 = max impropers/atom + orthogonal box = (-25 -25 -25) to (25 25 25) + 1 by 1 by 1 MPI processor grid + reading bonds ... + 42 bonds + reading angles ... + 74 angles + reading dihedrals ... + 100 dihedrals + reading impropers ... + 16 impropers +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 1 + special bond factors coul: 0 0 1 + 4 = max # of 1-2 neighbors + 6 = max # of 1-3 neighbors + 35 = max # of special neighbors + special bonds CPU = 0.001 seconds + read_data CPU = 0.014 seconds + +velocity all create 300.0 4928459 dist gaussian + +molecule mol1 rxn1_stp1_unreacted.json +Read molecule template mol1: +(no title) + 1 molecules + 0 fragments + 0 bodies + 18 atoms with max type 8 + 16 bonds with max type 8 + 25 angles with max type 25 + 23 dihedrals with max type 33 + 2 impropers with max type 3 +molecule mol2 rxn1_stp1_reacted.json +Read molecule template mol2: +(no title) + 1 molecules + 0 fragments + 0 bodies + 18 atoms with max type 9 + 17 bonds with max type 11 + 31 angles with max type 24 + 39 dihedrals with max type 30 + 0 impropers with max type 0 +molecule mol3 rxn1_stp2_unreacted.json +Read molecule template mol3: +(no title) + 1 molecules + 0 fragments + 0 bodies + 15 atoms with max type 9 + 14 bonds with max type 11 + 25 angles with max type 24 + 30 dihedrals with max type 30 + 0 impropers with max type 0 +molecule mol4 rxn1_stp2_reacted.json +Read molecule template mol4: +(no title) + 1 molecules + 0 fragments + 0 bodies + 15 atoms with max type 11 + 13 bonds with max type 13 + 19 angles with max type 26 + 16 dihedrals with max type 29 + 2 impropers with max type 5 + +thermo 50 + +# dump 1 all xyz 1 test_vis.xyz +# dump_modify 1 types labels + +fix myrxns all bond/react stabilization yes statted_grp .03 react rxn1 all 1 0.0 2.9 mol1 mol2 rxn1_stp1_map react rxn2 all 1 0.0 5.0 mol3 mol4 rxn1_stp2_map rescale_charges yes +WARNING: Fix bond/react: Atom affected by reaction rxn1 is too close to template edge (src/REACTION/fix_bond_react.cpp:2630) +WARNING: Fix bond/react: Atom affected by reaction rxn2 is too close to template edge (src/REACTION/fix_bond_react.cpp:2630) +dynamic group bond_react_MASTER_group defined +dynamic group statted_grp_REACT defined + +fix 1 statted_grp_REACT nvt temp 300 300 100 + +# optionally, you can customize behavior of reacting atoms, +# by using the internally-created 'bond_react_MASTER_group', like so: +fix 4 bond_react_MASTER_group temp/rescale 1 300 300 10 1 + +thermo_style custom step temp press density f_myrxns[*] +thermo_modify colname auto + +# restart 100 restart1 restart2 + +run 10000 + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Your simulation uses code contributions which should be cited: + +- Type Label Framework: https://doi.org/10.1021/acs.jpcb.3c08419 + +@Article{Gissinger24, + author = {Jacob R. Gissinger, Ilia Nikiforov, Yaser Afshar, Brendon Waters, Moon-ki Choi, Daniel S. Karls, Alexander Stukowski, Wonpil Im, Hendrik Heinz, Axel Kohlmeyer, and Ellad B. Tadmor}, + title = {Type Label Framework for Bonded Force Fields in LAMMPS}, + journal = {J. Phys. Chem. B}, + year = 2024, + volume = 128, + number = 13, + pages = {3282--3297} +} + +- fix bond/react: https://reacter.org, https://doi.org/10.1016/j.polymer.2017.09.038, https://doi.org/10.1021/acs.macromol.0c02012, https://doi.org/10.1016/j.cpc.2024.109287 + +@Article{Gissinger17, + author = {J. R. Gissinger and B. D. Jensen and K. E. Wise}, + title = {Modeling Chemical Reactions in Classical Molecular Dynamics Simulations}, + journal = {Polymer}, + year = 2017, + volume = 128, + pages = {211--217} +} + +@Article{Gissinger20, + author = {J. R. Gissinger, B. D. Jensen, K. E. Wise}, + title = {{REACTER}: A Heuristic Method for Reactive Molecular Dynamics}, + journal = {Macromolecules}, + year = 2020, + volume = 53, + number = 22, + pages = {9953--9961} +} + +@Article{Gissinger24, + author = {J. R. Gissinger, B. D. Jensen, K. E. Wise}, + title = {Molecular Modeling of Reactive Systems with REACTER}, + journal = {Computer Physics Communications}, + year = 2024, + volume = 304, + number = 109287 +} + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +PPPM initialization ... + using 12-bit tables for long-range coulomb + G vector (1/distance) = 0.23408048 + grid = 15 15 15 + stencil order = 5 + estimated absolute RMS force accuracy = 0.018627396 + estimated relative force accuracy = 5.6095851e-05 + using double precision KISS FFT + 3d grid and FFT values/proc = 8000 3375 +Generated 55 of 55 mixed pair_coeff terms from sixthpower/sixthpower mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 10.5 + ghost atom cutoff = 10.5 + binsize = 5.25, bins = 10 10 10 + 2 neighbor lists, perpetual/occasional/extra = 1 1 0 + (1) pair lj/class2/coul/long, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard + (2) fix bond/react, occasional, copy from (1) + attributes: half, newton on + pair build: copy + stencil: none + bin: none +Per MPI rank memory allocation (min/avg/max) = 34 | 34 | 34 Mbytes + Step Temp Press Density f_myrxns:rxn1 f_myrxns:rxn2 + 0 300 357.25587 0.0034851739 0 0 + 50 323.13357 -36.901145 0.0034851739 1 0 + 100 303.51 11.102115 0.0034851739 1 1 + 150 332.31667 -25.20854 0.0034851739 1 1 + 200 278.87792 25.724788 0.0034851739 1 1 + 250 306.00815 -9.2221074 0.0034851739 1 1 + 300 254.72154 -5.7953243 0.0034851739 1 1 + 350 267.62849 23.758906 0.0034851739 1 1 + 400 320.81812 3.3741667 0.0034851739 1 1 + 450 376.12912 -10.240072 0.0034851739 1 1 + 500 409.47719 17.579329 0.0034851739 1 1 + 550 251.53858 -1.8557267 0.0034851739 1 1 + 600 237.09927 19.34288 0.0034851739 1 1 + 650 325.85267 12.350177 0.0034851739 1 1 + 700 281.35713 2.4348132 0.0034851739 1 1 + 750 348.96295 10.699428 0.0034851739 1 1 + 800 285.14402 -34.310532 0.0034851739 1 1 + 850 272.05347 -29.232748 0.0034851739 1 1 + 900 233.75445 25.081058 0.0034851739 1 1 + 950 270.83374 36.530225 0.0034851739 1 1 + 1000 226.39852 -25.096611 0.0034851739 1 1 + 1050 252.97685 -38.37156 0.0034851739 1 1 + 1100 298.67428 53.002074 0.0034851739 1 1 + 1150 291.35413 -0.58731897 0.0034851739 1 1 + 1200 338.55035 -12.606111 0.0034851739 1 1 + 1250 273.47404 2.607543 0.0034851739 1 1 + 1300 238.32578 103.89008 0.0034851739 1 1 + 1350 289.72019 35.589762 0.0034851739 1 1 + 1400 308.55022 -14.264782 0.0034851739 1 1 + 1450 335.61808 -4.3227051 0.0034851739 1 1 + 1500 322.5053 17.455704 0.0034851739 1 1 + 1550 394.29493 9.2107081 0.0034851739 1 1 + 1600 381.1899 17.682818 0.0034851739 1 1 + 1650 335.99677 -48.364172 0.0034851739 1 1 + 1700 303.84175 -45.864487 0.0034851739 1 1 + 1750 320.31942 -11.504271 0.0034851739 1 1 + 1800 294.21365 -26.343709 0.0034851739 1 1 + 1850 279.81064 6.0658344 0.0034851739 1 1 + 1900 303.71918 -49.271788 0.0034851739 1 1 + 1950 291.23621 5.1869409 0.0034851739 1 1 + 2000 233.32832 2.109592 0.0034851739 1 1 + 2050 341.6919 48.003744 0.0034851739 1 1 + 2100 349.44789 -42.906017 0.0034851739 1 1 + 2150 329.88667 -4.1766291 0.0034851739 1 1 + 2200 337.70336 56.336888 0.0034851739 1 1 + 2250 318.31319 -12.164076 0.0034851739 1 1 + 2300 298.29507 -6.4401592 0.0034851739 1 1 + 2350 304.95999 16.417381 0.0034851739 1 1 + 2400 290.62449 3.8105734 0.0034851739 1 1 + 2450 346.62602 51.604346 0.0034851739 1 1 + 2500 259.10879 14.228307 0.0034851739 1 1 + 2550 335.33894 -16.037611 0.0034851739 1 1 + 2600 299.89407 -9.8662594 0.0034851739 1 1 + 2650 348.15539 -8.1996299 0.0034851739 1 1 + 2700 343.85656 -72.012595 0.0034851739 1 1 + 2750 378.24423 -7.2314213 0.0034851739 1 1 + 2800 329.78551 72.122685 0.0034851739 1 1 + 2850 336.43123 -26.141529 0.0034851739 1 1 + 2900 290.77205 21.589584 0.0034851739 1 1 + 2950 286.07747 31.455029 0.0034851739 1 1 + 3000 274.54408 18.865778 0.0034851739 1 1 + 3050 237.71503 21.195126 0.0034851739 1 1 + 3100 300.19233 46.381452 0.0034851739 1 1 + 3150 310.662 -48.41422 0.0034851739 1 1 + 3200 356.68406 3.4820791 0.0034851739 1 1 + 3250 345.18655 -14.929512 0.0034851739 1 1 + 3300 303.81384 -106.62742 0.0034851739 1 1 + 3350 363.1079 53.537967 0.0034851739 1 1 + 3400 344.77548 -0.32949356 0.0034851739 1 1 + 3450 285.60132 16.994506 0.0034851739 1 1 + 3500 292.34164 27.878366 0.0034851739 1 1 + 3550 313.51585 -65.418373 0.0034851739 1 1 + 3600 299.37996 7.1201351 0.0034851739 1 1 + 3650 293.80815 25.383956 0.0034851739 1 1 + 3700 318.55512 -31.086255 0.0034851739 1 1 + 3750 338.01158 4.3233345 0.0034851739 1 1 + 3800 335.62457 -21.672062 0.0034851739 1 1 + 3850 373.55792 -18.344518 0.0034851739 1 1 + 3900 299.00966 -52.411817 0.0034851739 1 1 + 3950 348.18017 16.762978 0.0034851739 1 1 + 4000 302.36814 20.412765 0.0034851739 1 1 + 4050 304.31703 -18.932636 0.0034851739 1 1 + 4100 322.3382 -12.205649 0.0034851739 1 1 + 4150 262.29776 -46.258119 0.0034851739 1 1 + 4200 265.29241 -15.879948 0.0034851739 1 1 + 4250 337.64589 -29.097853 0.0034851739 1 1 + 4300 394.67042 5.3180839 0.0034851739 1 1 + 4350 288.70522 -2.7038433 0.0034851739 1 1 + 4400 349.62275 55.384045 0.0034851739 1 1 + 4450 350.05246 -20.531148 0.0034851739 1 1 + 4500 263.12901 39.99287 0.0034851739 1 1 + 4550 245.82317 -11.107772 0.0034851739 1 1 + 4600 215.28781 -13.078366 0.0034851739 1 1 + 4650 213.62697 18.061273 0.0034851739 1 1 + 4700 283.00551 9.1457527 0.0034851739 1 1 + 4750 322.2234 -5.6773995 0.0034851739 1 1 + 4800 321.01027 24.636298 0.0034851739 1 1 + 4850 308.37924 8.0190603 0.0034851739 1 1 + 4900 313.29993 -21.926107 0.0034851739 1 1 + 4950 318.79709 -38.641178 0.0034851739 1 1 + 5000 332.5323 -10.994049 0.0034851739 1 1 + 5050 263.77853 -19.155804 0.0034851739 1 1 + 5100 249.43481 14.049613 0.0034851739 1 1 + 5150 272.43126 2.1161776 0.0034851739 1 1 + 5200 287.20643 14.651374 0.0034851739 1 1 + 5250 227.2215 14.436162 0.0034851739 1 1 + 5300 220.70331 -12.059096 0.0034851739 1 1 + 5350 294.48483 -13.056616 0.0034851739 1 1 + 5400 301.111 -13.25331 0.0034851739 1 1 + 5450 286.4577 7.6904099 0.0034851739 1 1 + 5500 307.72688 -32.456764 0.0034851739 1 1 + 5550 284.13917 -27.497649 0.0034851739 1 1 + 5600 270.02975 -16.954712 0.0034851739 1 1 + 5650 313.97465 -1.1028839 0.0034851739 1 1 + 5700 286.18167 14.125288 0.0034851739 1 1 + 5750 269.14352 27.19375 0.0034851739 1 1 + 5800 235.50295 12.547718 0.0034851739 1 1 + 5850 218.68087 48.894385 0.0034851739 1 1 + 5900 299.41286 6.9150462 0.0034851739 1 1 + 5950 283.91534 -41.435248 0.0034851739 1 1 + 6000 351.51818 -11.971798 0.0034851739 1 1 + 6050 370.17973 8.1936067 0.0034851739 1 1 + 6100 287.87457 23.844459 0.0034851739 1 1 + 6150 282.12003 14.196677 0.0034851739 1 1 + 6200 239.67426 31.389011 0.0034851739 1 1 + 6250 265.84426 -22.797645 0.0034851739 1 1 + 6300 320.48833 13.611918 0.0034851739 1 1 + 6350 354.54726 -8.6164904 0.0034851739 1 1 + 6400 351.91168 -45.632257 0.0034851739 1 1 + 6450 404.6967 8.7160731 0.0034851739 1 1 + 6500 273.77467 19.710654 0.0034851739 1 1 + 6550 283.46688 2.8728029 0.0034851739 1 1 + 6600 241.76828 -49.04184 0.0034851739 1 1 + 6650 289.50471 12.670232 0.0034851739 1 1 + 6700 261.57213 -13.663425 0.0034851739 1 1 + 6750 292.31184 18.675826 0.0034851739 1 1 + 6800 290.61615 17.153393 0.0034851739 1 1 + 6850 345.29773 -6.8794198 0.0034851739 1 1 + 6900 382.8504 0.086203475 0.0034851739 1 1 + 6950 330.68716 22.3792 0.0034851739 1 1 + 7000 351.2043 33.53224 0.0034851739 1 1 + 7050 260.75316 -3.0830773 0.0034851739 1 1 + 7100 238.61023 -25.377481 0.0034851739 1 1 + 7150 278.02381 29.708903 0.0034851739 1 1 + 7200 281.78581 -11.613886 0.0034851739 1 1 + 7250 299.19023 -40.148778 0.0034851739 1 1 + 7300 347.16566 1.6164218 0.0034851739 1 1 + 7350 334.98219 30.334651 0.0034851739 1 1 + 7400 280.26928 -31.933329 0.0034851739 1 1 + 7450 277.48917 -5.1849913 0.0034851739 1 1 + 7500 247.47699 7.6810611 0.0034851739 1 1 + 7550 223.03144 -29.416983 0.0034851739 1 1 + 7600 272.28929 8.5690923 0.0034851739 1 1 + 7650 278.73246 106.03104 0.0034851739 1 1 + 7700 262.96706 -31.491702 0.0034851739 1 1 + 7750 330.23917 21.757497 0.0034851739 1 1 + 7800 343.96783 36.898555 0.0034851739 1 1 + 7850 341.22049 -43.387928 0.0034851739 1 1 + 7900 277.06257 -71.348468 0.0034851739 1 1 + 7950 330.90733 17.613434 0.0034851739 1 1 + 8000 310.39669 -8.2136094 0.0034851739 1 1 + 8050 310.47524 -30.623829 0.0034851739 1 1 + 8100 290.2114 -24.485156 0.0034851739 1 1 + 8150 255.01637 60.297045 0.0034851739 1 1 + 8200 266.73273 2.3178283 0.0034851739 1 1 + 8250 325.75807 -36.58488 0.0034851739 1 1 + 8300 289.72733 30.040033 0.0034851739 1 1 + 8350 326.57575 -20.981666 0.0034851739 1 1 + 8400 379.29835 44.435283 0.0034851739 1 1 + 8450 333.38125 -0.05363945 0.0034851739 1 1 + 8500 305.08411 -26.538845 0.0034851739 1 1 + 8550 349.58907 66.193068 0.0034851739 1 1 + 8600 270.32146 5.1332354 0.0034851739 1 1 + 8650 248.67123 26.592957 0.0034851739 1 1 + 8700 288.11042 34.114624 0.0034851739 1 1 + 8750 252.34031 -32.966873 0.0034851739 1 1 + 8800 304.24822 6.8056503 0.0034851739 1 1 + 8850 306.08573 27.793193 0.0034851739 1 1 + 8900 341.1829 18.131124 0.0034851739 1 1 + 8950 360.96467 -49.295482 0.0034851739 1 1 + 9000 334.98737 10.524633 0.0034851739 1 1 + 9050 283.8927 -36.034176 0.0034851739 1 1 + 9100 342.99378 25.401513 0.0034851739 1 1 + 9150 275.94637 -8.2056556 0.0034851739 1 1 + 9200 329.51306 35.725721 0.0034851739 1 1 + 9250 260.20864 -1.0676031 0.0034851739 1 1 + 9300 266.63017 -35.836913 0.0034851739 1 1 + 9350 206.63311 1.9506084 0.0034851739 1 1 + 9400 275.17708 34.35797 0.0034851739 1 1 + 9450 231.6401 4.1075349 0.0034851739 1 1 + 9500 256.90247 2.0767575 0.0034851739 1 1 + 9550 234.64698 -16.583201 0.0034851739 1 1 + 9600 299.47817 24.526294 0.0034851739 1 1 + 9650 313.68135 -56.626926 0.0034851739 1 1 + 9700 315.35263 37.357037 0.0034851739 1 1 + 9750 329.98511 -37.326607 0.0034851739 1 1 + 9800 307.94446 -4.1409988 0.0034851739 1 1 + 9850 283.99269 20.593547 0.0034851739 1 1 + 9900 323.4633 42.61777 0.0034851739 1 1 + 9950 299.79118 -42.790286 0.0034851739 1 1 + 10000 290.40265 9.5959582 0.0034851739 1 1 +Loop time of 3.98085 on 1 procs for 10000 steps with 44 atoms + +Performance: 217.039 ns/day, 0.111 hours/ns, 2512.025 timesteps/s, 110.529 katom-step/s +96.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 | 0.13828 | 0.13828 | 0.13828 | 0.0 | 3.47 +Bond | 0.46996 | 0.46996 | 0.46996 | 0.0 | 11.81 +Kspace | 3.1813 | 3.1813 | 3.1813 | 0.0 | 79.92 +Neigh | 0.005946 | 0.005946 | 0.005946 | 0.0 | 0.15 +Comm | 0.034343 | 0.034343 | 0.034343 | 0.0 | 0.86 +Output | 0.0019136 | 0.0019136 | 0.0019136 | 0.0 | 0.05 +Modify | 0.099849 | 0.099849 | 0.099849 | 0.0 | 2.51 +Other | | 0.04923 | | | 1.24 + +Nlocal: 44 ave 44 max 44 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 6 ave 6 max 6 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 876 ave 876 max 876 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 876 +Ave neighs/atom = 19.909091 +Ave special neighs/atom = 6.4090909 +Neighbor list builds = 242 +Dangerous builds = 0 + +# write_restart restart_longrun +# write_data restart_longrun.data +Total wall time: 0:00:04 diff --git a/examples/PACKAGES/reaction/tiny_nylon_json/log.10Dec2025.tiny_nylon.stabilized.g++.4 b/examples/PACKAGES/reaction/tiny_nylon_json/log.10Dec2025.tiny_nylon.stabilized.g++.4 new file mode 100644 index 00000000000..6e57ae568e7 --- /dev/null +++ b/examples/PACKAGES/reaction/tiny_nylon_json/log.10Dec2025.tiny_nylon.stabilized.g++.4 @@ -0,0 +1,449 @@ +LAMMPS (10 Dec 2025 - Development - patch_10Dec2025-120-ga51f9ba0e7-modified) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. + using 1 OpenMP thread(s) per MPI task +# two monomer nylon example +# reaction produces a condensed water molecule + +units real + +boundary p p p + +atom_style full + +kspace_style pppm 1.0e-4 + +pair_style lj/class2/coul/long 8.5 + +angle_style class2 + +bond_style class2 + +dihedral_style class2 + +improper_style class2 + +special_bonds lj/coul 0 0 1 +pair_modify tail yes mix sixthpower + +read_data tiny_nylon.data extra/bond/per/atom 5 extra/angle/per/atom 15 extra/dihedral/per/atom 15 extra/improper/per/atom 25 extra/special/per/atom 25 +Reading data file ... + orthogonal box = (-25 -25 -25) to (25 25 25) + 1 by 2 by 2 MPI processor grid + reading atom labelmap ... + reading bond labelmap ... + reading angle labelmap ... + reading dihedral labelmap ... + reading improper labelmap ... + reading atoms ... + 44 atoms + reading velocities ... + 44 velocities + scanning bonds ... + 9 = max bonds/atom + scanning angles ... + 21 = max angles/atom + scanning dihedrals ... + 29 = max dihedrals/atom + scanning impropers ... + 29 = max impropers/atom + orthogonal box = (-25 -25 -25) to (25 25 25) + 1 by 2 by 2 MPI processor grid + reading bonds ... + 42 bonds + reading angles ... + 74 angles + reading dihedrals ... + 100 dihedrals + reading impropers ... + 16 impropers +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 1 + special bond factors coul: 0 0 1 + 4 = max # of 1-2 neighbors + 6 = max # of 1-3 neighbors + 35 = max # of special neighbors + special bonds CPU = 0.001 seconds + read_data CPU = 0.011 seconds + +velocity all create 300.0 4928459 dist gaussian + +molecule mol1 rxn1_stp1_unreacted.json +Read molecule template mol1: +(no title) + 1 molecules + 0 fragments + 0 bodies + 18 atoms with max type 8 + 16 bonds with max type 8 + 25 angles with max type 25 + 23 dihedrals with max type 33 + 2 impropers with max type 3 +molecule mol2 rxn1_stp1_reacted.json +Read molecule template mol2: +(no title) + 1 molecules + 0 fragments + 0 bodies + 18 atoms with max type 9 + 17 bonds with max type 11 + 31 angles with max type 24 + 39 dihedrals with max type 30 + 0 impropers with max type 0 +molecule mol3 rxn1_stp2_unreacted.json +Read molecule template mol3: +(no title) + 1 molecules + 0 fragments + 0 bodies + 15 atoms with max type 9 + 14 bonds with max type 11 + 25 angles with max type 24 + 30 dihedrals with max type 30 + 0 impropers with max type 0 +molecule mol4 rxn1_stp2_reacted.json +Read molecule template mol4: +(no title) + 1 molecules + 0 fragments + 0 bodies + 15 atoms with max type 11 + 13 bonds with max type 13 + 19 angles with max type 26 + 16 dihedrals with max type 29 + 2 impropers with max type 5 + +thermo 50 + +# dump 1 all xyz 1 test_vis.xyz +# dump_modify 1 types labels + +fix myrxns all bond/react stabilization yes statted_grp .03 react rxn1 all 1 0.0 2.9 mol1 mol2 rxn1_stp1_map react rxn2 all 1 0.0 5.0 mol3 mol4 rxn1_stp2_map rescale_charges yes +WARNING: Fix bond/react: Atom affected by reaction rxn1 is too close to template edge (src/REACTION/fix_bond_react.cpp:2630) +WARNING: Fix bond/react: Atom affected by reaction rxn2 is too close to template edge (src/REACTION/fix_bond_react.cpp:2630) +dynamic group bond_react_MASTER_group defined +dynamic group statted_grp_REACT defined + +fix 1 statted_grp_REACT nvt temp 300 300 100 + +# optionally, you can customize behavior of reacting atoms, +# by using the internally-created 'bond_react_MASTER_group', like so: +fix 4 bond_react_MASTER_group temp/rescale 1 300 300 10 1 + +thermo_style custom step temp press density f_myrxns[*] +thermo_modify colname auto + +# restart 100 restart1 restart2 + +run 10000 + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Your simulation uses code contributions which should be cited: + +- Type Label Framework: https://doi.org/10.1021/acs.jpcb.3c08419 + +@Article{Gissinger24, + author = {Jacob R. Gissinger, Ilia Nikiforov, Yaser Afshar, Brendon Waters, Moon-ki Choi, Daniel S. Karls, Alexander Stukowski, Wonpil Im, Hendrik Heinz, Axel Kohlmeyer, and Ellad B. Tadmor}, + title = {Type Label Framework for Bonded Force Fields in LAMMPS}, + journal = {J. Phys. Chem. B}, + year = 2024, + volume = 128, + number = 13, + pages = {3282--3297} +} + +- fix bond/react: https://reacter.org, https://doi.org/10.1016/j.polymer.2017.09.038, https://doi.org/10.1021/acs.macromol.0c02012, https://doi.org/10.1016/j.cpc.2024.109287 + +@Article{Gissinger17, + author = {J. R. Gissinger and B. D. Jensen and K. E. Wise}, + title = {Modeling Chemical Reactions in Classical Molecular Dynamics Simulations}, + journal = {Polymer}, + year = 2017, + volume = 128, + pages = {211--217} +} + +@Article{Gissinger20, + author = {J. R. Gissinger, B. D. Jensen, K. E. Wise}, + title = {{REACTER}: A Heuristic Method for Reactive Molecular Dynamics}, + journal = {Macromolecules}, + year = 2020, + volume = 53, + number = 22, + pages = {9953--9961} +} + +@Article{Gissinger24, + author = {J. R. Gissinger, B. D. Jensen, K. E. Wise}, + title = {Molecular Modeling of Reactive Systems with REACTER}, + journal = {Computer Physics Communications}, + year = 2024, + volume = 304, + number = 109287 +} + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +PPPM initialization ... + using 12-bit tables for long-range coulomb + G vector (1/distance) = 0.23408048 + grid = 15 15 15 + stencil order = 5 + estimated absolute RMS force accuracy = 0.018627396 + estimated relative force accuracy = 5.6095851e-05 + using double precision KISS FFT + 3d grid and FFT values/proc = 3380 960 +Generated 55 of 55 mixed pair_coeff terms from sixthpower/sixthpower mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 10.5 + ghost atom cutoff = 10.5 + binsize = 5.25, bins = 10 10 10 + 2 neighbor lists, perpetual/occasional/extra = 1 1 0 + (1) pair lj/class2/coul/long, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard + (2) fix bond/react, occasional, copy from (1) + attributes: half, newton on + pair build: copy + stencil: none + bin: none +Per MPI rank memory allocation (min/avg/max) = 33.49 | 33.72 | 34.28 Mbytes + Step Temp Press Density f_myrxns:rxn1 f_myrxns:rxn2 + 0 300 357.25587 0.0034851739 0 0 + 50 323.13357 -36.901145 0.0034851739 1 0 + 100 303.51 11.102115 0.0034851739 1 1 + 150 332.31667 -25.20854 0.0034851739 1 1 + 200 278.87792 25.724788 0.0034851739 1 1 + 250 306.00815 -9.2221074 0.0034851739 1 1 + 300 254.72154 -5.7953243 0.0034851739 1 1 + 350 267.62849 23.758906 0.0034851739 1 1 + 400 320.81812 3.3741667 0.0034851739 1 1 + 450 376.12912 -10.240072 0.0034851739 1 1 + 500 409.47719 17.579329 0.0034851739 1 1 + 550 251.53858 -1.8557263 0.0034851739 1 1 + 600 237.09927 19.34288 0.0034851739 1 1 + 650 325.85267 12.350178 0.0034851739 1 1 + 700 281.35713 2.4348122 0.0034851739 1 1 + 750 348.96295 10.69943 0.0034851739 1 1 + 800 285.14402 -34.310534 0.0034851739 1 1 + 850 272.05347 -29.232749 0.0034851739 1 1 + 900 233.75445 25.081061 0.0034851739 1 1 + 950 270.83373 36.530225 0.0034851739 1 1 + 1000 226.39852 -25.096609 0.0034851739 1 1 + 1050 252.97684 -38.371559 0.0034851739 1 1 + 1100 298.6743 53.00207 0.0034851739 1 1 + 1150 291.35416 -0.58732762 0.0034851739 1 1 + 1200 338.55036 -12.606167 0.0034851739 1 1 + 1250 273.47409 2.6075067 0.0034851739 1 1 + 1300 238.32577 103.89005 0.0034851739 1 1 + 1350 289.72027 35.589704 0.0034851739 1 1 + 1400 308.55006 -14.264754 0.0034851739 1 1 + 1450 335.61777 -4.3227467 0.0034851739 1 1 + 1500 322.50612 17.455534 0.0034851739 1 1 + 1550 394.29818 9.2095587 0.0034851739 1 1 + 1600 381.18229 17.684515 0.0034851739 1 1 + 1650 335.99735 -48.364365 0.0034851739 1 1 + 1700 303.84569 -45.868295 0.0034851739 1 1 + 1750 320.31574 -11.511158 0.0034851739 1 1 + 1800 294.29633 -26.351136 0.0034851739 1 1 + 1850 279.75055 6.0763871 0.0034851739 1 1 + 1900 303.74279 -49.281254 0.0034851739 1 1 + 1950 290.97419 5.2283921 0.0034851739 1 1 + 2000 233.30717 2.14398 0.0034851739 1 1 + 2050 342.01536 48.425845 0.0034851739 1 1 + 2100 348.72835 -42.383834 0.0034851739 1 1 + 2150 336.02332 -6.2496255 0.0034851739 1 1 + 2200 334.42763 50.81371 0.0034851739 1 1 + 2250 317.27217 -8.1794166 0.0034851739 1 1 + 2300 316.88329 -6.5684312 0.0034851739 1 1 + 2350 314.09517 17.266892 0.0034851739 1 1 + 2400 302.40844 0.53558662 0.0034851739 1 1 + 2450 336.96229 35.681141 0.0034851739 1 1 + 2500 259.43054 8.8787634 0.0034851739 1 1 + 2550 348.89956 -9.2313871 0.0034851739 1 1 + 2600 327.77487 -5.8117921 0.0034851739 1 1 + 2650 341.94271 4.3187206 0.0034851739 1 1 + 2700 319.36614 -53.559459 0.0034851739 1 1 + 2750 300.45201 15.794909 0.0034851739 1 1 + 2800 310.18412 61.968091 0.0034851739 1 1 + 2850 356.66083 5.8473695 0.0034851739 1 1 + 2900 298.87875 17.062576 0.0034851739 1 1 + 2950 234.83827 0.011478315 0.0034851739 1 1 + 3000 255.72021 -24.955859 0.0034851739 1 1 + 3050 261.05671 6.732158 0.0034851739 1 1 + 3100 301.20955 24.53772 0.0034851739 1 1 + 3150 347.86946 -6.4628487 0.0034851739 1 1 + 3200 360.92312 -10.270019 0.0034851739 1 1 + 3250 314.90454 -67.580652 0.0034851739 1 1 + 3300 364.99912 32.617637 0.0034851739 1 1 + 3350 343.26776 -7.6851103 0.0034851739 1 1 + 3400 321.33638 -58.879645 0.0034851739 1 1 + 3450 279.51567 -9.7718499 0.0034851739 1 1 + 3500 227.74826 -31.715622 0.0034851739 1 1 + 3550 263.33395 40.827777 0.0034851739 1 1 + 3600 269.59956 -38.697214 0.0034851739 1 1 + 3650 291.96922 -29.580877 0.0034851739 1 1 + 3700 303.13102 -0.018201864 0.0034851739 1 1 + 3750 352.31481 -63.482684 0.0034851739 1 1 + 3800 295.03656 0.89582187 0.0034851739 1 1 + 3850 302.79362 8.7511608 0.0034851739 1 1 + 3900 272.75681 0.49698704 0.0034851739 1 1 + 3950 276.27495 7.6663447 0.0034851739 1 1 + 4000 233.8973 23.040335 0.0034851739 1 1 + 4050 281.12439 -42.01751 0.0034851739 1 1 + 4100 265.13059 16.155662 0.0034851739 1 1 + 4150 298.00657 29.721948 0.0034851739 1 1 + 4200 329.08689 -24.747356 0.0034851739 1 1 + 4250 321.90673 -5.221281 0.0034851739 1 1 + 4300 337.98416 8.5210055 0.0034851739 1 1 + 4350 300.85278 -27.200192 0.0034851739 1 1 + 4400 230.3635 -20.700954 0.0034851739 1 1 + 4450 275.54429 13.023287 0.0034851739 1 1 + 4500 306.13381 -21.191264 0.0034851739 1 1 + 4550 306.1504 -2.657042 0.0034851739 1 1 + 4600 341.25401 35.059044 0.0034851739 1 1 + 4650 359.22107 -27.61101 0.0034851739 1 1 + 4700 313.55036 -5.2086023 0.0034851739 1 1 + 4750 288.2812 49.909094 0.0034851739 1 1 + 4800 298.17232 5.7234038 0.0034851739 1 1 + 4850 256.1951 -79.42617 0.0034851739 1 1 + 4900 234.48084 69.62547 0.0034851739 1 1 + 4950 269.90503 -6.4165828 0.0034851739 1 1 + 5000 350.99397 40.598777 0.0034851739 1 1 + 5050 319.33612 -1.1883368 0.0034851739 1 1 + 5100 354.42383 0.73360221 0.0034851739 1 1 + 5150 326.20748 28.873951 0.0034851739 1 1 + 5200 338.81105 8.9061462 0.0034851739 1 1 + 5250 334.86171 3.4358714 0.0034851739 1 1 + 5300 298.76104 41.006518 0.0034851739 1 1 + 5350 251.28354 32.804747 0.0034851739 1 1 + 5400 297.96019 16.420226 0.0034851739 1 1 + 5450 257.69136 27.643858 0.0034851739 1 1 + 5500 281.53877 -19.802987 0.0034851739 1 1 + 5550 316.86241 29.360565 0.0034851739 1 1 + 5600 333.00265 8.3184564 0.0034851739 1 1 + 5650 331.66339 -9.2204992 0.0034851739 1 1 + 5700 344.72494 8.3825773 0.0034851739 1 1 + 5750 336.95916 -62.14119 0.0034851739 1 1 + 5800 349.2364 -6.2073021 0.0034851739 1 1 + 5850 286.19116 -24.769794 0.0034851739 1 1 + 5900 293.18267 -16.577457 0.0034851739 1 1 + 5950 303.66858 27.73992 0.0034851739 1 1 + 6000 306.18599 -45.264957 0.0034851739 1 1 + 6050 350.36539 -34.300224 0.0034851739 1 1 + 6100 293.08904 43.428974 0.0034851739 1 1 + 6150 338.78789 -1.6127526 0.0034851739 1 1 + 6200 266.81285 -6.9547907 0.0034851739 1 1 + 6250 302.09334 -2.7802802 0.0034851739 1 1 + 6300 295.03054 -12.331247 0.0034851739 1 1 + 6350 253.47153 14.246817 0.0034851739 1 1 + 6400 231.28789 0.32901119 0.0034851739 1 1 + 6450 271.27272 -54.235953 0.0034851739 1 1 + 6500 315.04645 -42.196648 0.0034851739 1 1 + 6550 330.60481 30.307025 0.0034851739 1 1 + 6600 320.98992 -28.743816 0.0034851739 1 1 + 6650 311.66421 -16.648914 0.0034851739 1 1 + 6700 300.60892 -22.572672 0.0034851739 1 1 + 6750 324.32174 -19.310172 0.0034851739 1 1 + 6800 297.68989 -16.093886 0.0034851739 1 1 + 6850 225.0828 29.29338 0.0034851739 1 1 + 6900 267.90034 -12.372584 0.0034851739 1 1 + 6950 245.79261 -42.881342 0.0034851739 1 1 + 7000 267.62549 58.922777 0.0034851739 1 1 + 7050 323.577 -18.38004 0.0034851739 1 1 + 7100 309.68104 -95.377822 0.0034851739 1 1 + 7150 332.28546 48.537101 0.0034851739 1 1 + 7200 349.83139 15.219649 0.0034851739 1 1 + 7250 325.55181 -41.249495 0.0034851739 1 1 + 7300 335.59076 17.706127 0.0034851739 1 1 + 7350 250.05804 32.22358 0.0034851739 1 1 + 7400 243.53926 24.755601 0.0034851739 1 1 + 7450 257.25541 -8.4391308 0.0034851739 1 1 + 7500 286.82596 -23.013062 0.0034851739 1 1 + 7550 264.88657 26.041569 0.0034851739 1 1 + 7600 285.33992 56.915984 0.0034851739 1 1 + 7650 317.10869 -53.762929 0.0034851739 1 1 + 7700 274.03399 -19.368253 0.0034851739 1 1 + 7750 278.77732 9.0740867 0.0034851739 1 1 + 7800 251.09437 23.963052 0.0034851739 1 1 + 7850 312.96586 0.68606531 0.0034851739 1 1 + 7900 272.57586 -16.82951 0.0034851739 1 1 + 7950 284.09348 2.0393754 0.0034851739 1 1 + 8000 297.93713 2.9073607 0.0034851739 1 1 + 8050 232.14368 -5.8999336 0.0034851739 1 1 + 8100 239.17712 -48.143457 0.0034851739 1 1 + 8150 281.52221 18.509439 0.0034851739 1 1 + 8200 293.08621 17.448713 0.0034851739 1 1 + 8250 294.74715 -34.751866 0.0034851739 1 1 + 8300 375.10348 -12.616628 0.0034851739 1 1 + 8350 296.77171 -28.951003 0.0034851739 1 1 + 8400 328.74999 -15.981702 0.0034851739 1 1 + 8450 347.02027 5.1750774 0.0034851739 1 1 + 8500 236.88904 59.341387 0.0034851739 1 1 + 8550 296.86734 -7.9510325 0.0034851739 1 1 + 8600 286.27144 54.121588 0.0034851739 1 1 + 8650 261.56411 27.022605 0.0034851739 1 1 + 8700 225.62856 -73.329643 0.0034851739 1 1 + 8750 268.25581 -30.45963 0.0034851739 1 1 + 8800 210.13484 49.847057 0.0034851739 1 1 + 8850 293.60544 47.320396 0.0034851739 1 1 + 8900 324.86781 -53.367836 0.0034851739 1 1 + 8950 386.26415 10.666845 0.0034851739 1 1 + 9000 320.21521 -40.989701 0.0034851739 1 1 + 9050 327.04554 -4.727706 0.0034851739 1 1 + 9100 279.63775 75.132034 0.0034851739 1 1 + 9150 299.20962 30.916634 0.0034851739 1 1 + 9200 249.44089 -4.8675917 0.0034851739 1 1 + 9250 325.92179 -8.7644595 0.0034851739 1 1 + 9300 228.532 -18.595612 0.0034851739 1 1 + 9350 296.48345 23.397966 0.0034851739 1 1 + 9400 246.75044 -39.651194 0.0034851739 1 1 + 9450 261.86878 5.8508137 0.0034851739 1 1 + 9500 341.58406 19.801719 0.0034851739 1 1 + 9550 350.96696 -16.243021 0.0034851739 1 1 + 9600 366.30949 3.3855035 0.0034851739 1 1 + 9650 321.26751 30.515937 0.0034851739 1 1 + 9700 351.86405 -21.004306 0.0034851739 1 1 + 9750 286.96073 -46.078369 0.0034851739 1 1 + 9800 247.41785 9.7089291 0.0034851739 1 1 + 9850 248.92427 -19.059663 0.0034851739 1 1 + 9900 240.6546 19.699102 0.0034851739 1 1 + 9950 251.56896 -59.269143 0.0034851739 1 1 + 10000 315.94702 -34.596575 0.0034851739 1 1 +Loop time of 2.15135 on 4 procs for 10000 steps with 44 atoms + +Performance: 401.608 ns/day, 0.060 hours/ns, 4648.239 timesteps/s, 204.523 katom-step/s +93.2% 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.016482 | 0.051932 | 0.13138 | 20.7 | 2.41 +Bond | 0.016299 | 0.13256 | 0.4249 | 46.8 | 6.16 +Kspace | 1.2495 | 1.5811 | 1.7169 | 15.4 | 73.50 +Neigh | 0.0053509 | 0.0053697 | 0.0053769 | 0.0 | 0.25 +Comm | 0.045573 | 0.054742 | 0.073467 | 4.8 | 2.54 +Output | 0.0015426 | 0.0017313 | 0.0022907 | 0.8 | 0.08 +Modify | 0.2299 | 0.26859 | 0.29393 | 5.2 | 12.48 +Other | | 0.05528 | | | 2.57 + +Nlocal: 11 ave 44 max 0 min +Histogram: 3 0 0 0 0 0 0 0 0 1 +Nghost: 18 ave 44 max 0 min +Histogram: 1 0 0 2 0 0 0 0 0 1 +Neighs: 226.75 ave 907 max 0 min +Histogram: 3 0 0 0 0 0 0 0 0 1 + +Total # of neighbors = 907 +Ave neighs/atom = 20.613636 +Ave special neighs/atom = 6.4090909 +Neighbor list builds = 249 +Dangerous builds = 0 + +# write_restart restart_longrun +# write_data restart_longrun.data +Total wall time: 0:00:02 diff --git a/examples/PACKAGES/reaction/tiny_nylon_json/log.tiny_nylon.stabilized.12Jun2025.g++.1 b/examples/PACKAGES/reaction/tiny_nylon_json/log.tiny_nylon.stabilized.12Jun2025.g++.1 deleted file mode 100644 index eb8546b4bec..00000000000 --- a/examples/PACKAGES/reaction/tiny_nylon_json/log.tiny_nylon.stabilized.12Jun2025.g++.1 +++ /dev/null @@ -1,444 +0,0 @@ -LAMMPS (2 Apr 2025 - Development - patch_2Apr2025-583-g5868aa095d-modified) -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:99) - using 1 OpenMP thread(s) per MPI task -# two monomer nylon example -# reaction produces a condensed water molecule - -units real - -boundary p p p - -atom_style full - -kspace_style pppm 1.0e-4 - -pair_style lj/class2/coul/long 8.5 - -angle_style class2 - -bond_style class2 - -dihedral_style class2 - -improper_style class2 - -special_bonds lj/coul 0 0 1 -pair_modify tail yes mix sixthpower - -read_data tiny_nylon.data extra/bond/per/atom 5 extra/angle/per/atom 15 extra/dihedral/per/atom 15 extra/improper/per/atom 25 extra/special/per/atom 25 -Reading data file ... - orthogonal box = (-25 -25 -25) to (25 25 25) - 1 by 1 by 1 MPI processor grid - reading atom labelmap ... - reading bond labelmap ... - reading angle labelmap ... - reading dihedral labelmap ... - reading improper labelmap ... - reading atoms ... - 44 atoms - reading velocities ... - 44 velocities - scanning bonds ... - 9 = max bonds/atom - scanning angles ... - 21 = max angles/atom - scanning dihedrals ... - 29 = max dihedrals/atom - scanning impropers ... - 29 = max impropers/atom - orthogonal box = (-25 -25 -25) to (25 25 25) - 1 by 1 by 1 MPI processor grid - reading bonds ... - 42 bonds - reading angles ... - 74 angles - reading dihedrals ... - 100 dihedrals - reading impropers ... - 16 impropers -Finding 1-2 1-3 1-4 neighbors ... - special bond factors lj: 0 0 1 - special bond factors coul: 0 0 1 - 4 = max # of 1-2 neighbors - 6 = max # of 1-3 neighbors - 35 = max # of special neighbors - special bonds CPU = 0.000 seconds - read_data CPU = 0.005 seconds - -velocity all create 300.0 4928459 dist gaussian - -molecule mol1 rxn1_stp1_unreacted.json -Read molecule template mol1: -(no title) - 1 molecules - 0 fragments - 18 atoms with max type 0 - 16 bonds with max type 8 - 25 angles with max type 25 - 23 dihedrals with max type 33 - 2 impropers with max type 3 -molecule mol2 rxn1_stp1_reacted.json -Read molecule template mol2: -(no title) - 1 molecules - 0 fragments - 18 atoms with max type 0 - 17 bonds with max type 11 - 31 angles with max type 24 - 39 dihedrals with max type 30 - 0 impropers with max type 0 -molecule mol3 rxn1_stp2_unreacted.json -Read molecule template mol3: -(no title) - 1 molecules - 0 fragments - 15 atoms with max type 0 - 14 bonds with max type 11 - 25 angles with max type 24 - 30 dihedrals with max type 30 - 0 impropers with max type 0 -molecule mol4 rxn1_stp2_reacted.json -Read molecule template mol4: -(no title) - 1 molecules - 0 fragments - 15 atoms with max type 0 - 13 bonds with max type 13 - 19 angles with max type 26 - 16 dihedrals with max type 29 - 2 impropers with max type 5 - -thermo 50 - -# dump 1 all xyz 1 test_vis.xyz -# dump_modify 1 types labels - -fix myrxns all bond/react stabilization yes statted_grp .03 react rxn1 all 1 0.0 2.9 mol1 mol2 rxn1_stp1_map react rxn2 all 1 0.0 5.0 mol3 mol4 rxn1_stp2_map rescale_charges yes -WARNING: Fix bond/react: Atom affected by reaction rxn1 is too close to template edge (src/REACTION/fix_bond_react.cpp:2708) -WARNING: Fix bond/react: Atom affected by reaction rxn2 is too close to template edge (src/REACTION/fix_bond_react.cpp:2708) -dynamic group bond_react_MASTER_group defined -dynamic group statted_grp_REACT defined - -fix 1 statted_grp_REACT nvt temp 300 300 100 - -# optionally, you can customize behavior of reacting atoms, -# by using the internally-created 'bond_react_MASTER_group', like so: -fix 4 bond_react_MASTER_group temp/rescale 1 300 300 10 1 - -thermo_style custom step temp press density f_myrxns[*] - -# restart 100 restart1 restart2 - -run 10000 - -CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE - -Your simulation uses code contributions which should be cited: - -- Type Label Framework: https://doi.org/10.1021/acs.jpcb.3c08419 - -@Article{Gissinger24, - author = {Jacob R. Gissinger, Ilia Nikiforov, Yaser Afshar, Brendon Waters, Moon-ki Choi, Daniel S. Karls, Alexander Stukowski, Wonpil Im, Hendrik Heinz, Axel Kohlmeyer, and Ellad B. Tadmor}, - title = {Type Label Framework for Bonded Force Fields in LAMMPS}, - journal = {J. Phys. Chem. B}, - year = 2024, - volume = 128, - number = 13, - pages = {3282--3297} -} - -- fix bond/react: reacter.org doi:10.1016/j.polymer.2017.09.038, doi:10.1021/acs.macromol.0c02012, doi:10.1016/j.cpc.2024.109287 - -@Article{Gissinger17, - author = {J. R. Gissinger and B. D. Jensen and K. E. Wise}, - title = {Modeling Chemical Reactions in Classical Molecular Dynamics Simulations}, - journal = {Polymer}, - year = 2017, - volume = 128, - pages = {211--217} -} - -@Article{Gissinger20, - author = {J. R. Gissinger, B. D. Jensen, K. E. Wise}, - title = {{REACTER}: A Heuristic Method for Reactive Molecular Dynamics}, - journal = {Macromolecules}, - year = 2020, - volume = 53, - number = 22, - pages = {9953--9961} -} - -@Article{Gissinger24, - author = {J. R. Gissinger, B. D. Jensen, K. E. Wise}, - title = {Molecular Modeling of Reactive Systems with REACTER}, - journal = {Computer Physics Communications}, - year = 2024, - volume = 304, - number = 109287 -} - -CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE - -PPPM initialization ... - using 12-bit tables for long-range coulomb (src/kspace.cpp:342) - G vector (1/distance) = 0.23408048 - grid = 15 15 15 - stencil order = 5 - estimated absolute RMS force accuracy = 0.018627396 - estimated relative force accuracy = 5.6095851e-05 - using double precision FFTW3 - 3d grid and FFT values/proc = 8000 3375 -Generated 55 of 55 mixed pair_coeff terms from sixthpower/sixthpower mixing rule -Neighbor list info ... - update: every = 1 steps, delay = 0 steps, check = yes - max neighbors/atom: 2000, page size: 100000 - master list distance cutoff = 10.5 - ghost atom cutoff = 10.5 - binsize = 5.25, bins = 10 10 10 - 2 neighbor lists, perpetual/occasional/extra = 1 1 0 - (1) pair lj/class2/coul/long, perpetual - attributes: half, newton on - pair build: half/bin/newton - stencil: half/bin/3d - bin: standard - (2) fix bond/react, occasional, copy from (1) - attributes: half, newton on - pair build: copy - stencil: none - bin: none -Per MPI rank memory allocation (min/avg/max) = 34 | 34 | 34 Mbytes - Step Temp Press Density f_myrxns[1] f_myrxns[2] - 0 300 357.25588 0.0034851739 0 0 - 50 328.952 -39.291672 0.0034851739 1 0 - 100 311.59495 29.741131 0.0034851739 1 1 - 150 325.04965 -19.624049 0.0034851739 1 1 - 200 313.15254 15.730975 0.0034851739 1 1 - 250 307.88805 -22.944869 0.0034851739 1 1 - 300 287.9343 6.7916738 0.0034851739 1 1 - 350 314.40601 12.913246 0.0034851739 1 1 - 400 304.58587 6.9804459 0.0034851739 1 1 - 450 300.97668 14.68689 0.0034851739 1 1 - 500 345.19498 -29.961085 0.0034851739 1 1 - 550 229.37329 12.88087 0.0034851739 1 1 - 600 239.75504 -3.575567 0.0034851739 1 1 - 650 257.58951 -5.0844118 0.0034851739 1 1 - 700 249.84121 22.825491 0.0034851739 1 1 - 750 287.62022 28.059197 0.0034851739 1 1 - 800 352.31339 -50.233738 0.0034851739 1 1 - 850 316.12821 22.493396 0.0034851739 1 1 - 900 283.85252 26.129698 0.0034851739 1 1 - 950 290.30591 -25.743121 0.0034851739 1 1 - 1000 346.57856 -2.1188627 0.0034851739 1 1 - 1050 251.23391 20.636107 0.0034851739 1 1 - 1100 267.48303 -15.912571 0.0034851739 1 1 - 1150 282.66256 14.019753 0.0034851739 1 1 - 1200 227.56518 -27.076623 0.0034851739 1 1 - 1250 232.7204 -1.0387593 0.0034851739 1 1 - 1300 277.28783 32.449571 0.0034851739 1 1 - 1350 308.5732 -11.129035 0.0034851739 1 1 - 1400 264.96641 -20.93416 0.0034851739 1 1 - 1450 262.83931 30.82366 0.0034851739 1 1 - 1500 276.23182 -24.480049 0.0034851739 1 1 - 1550 319.00599 -9.8372065 0.0034851739 1 1 - 1600 316.48228 -15.940319 0.0034851739 1 1 - 1650 277.213 1.3856424 0.0034851739 1 1 - 1700 302.34736 -27.623644 0.0034851739 1 1 - 1750 312.06738 -52.786773 0.0034851739 1 1 - 1800 232.82457 -8.2208725 0.0034851739 1 1 - 1850 219.66312 0.0019676295 0.0034851739 1 1 - 1900 245.49515 -24.208901 0.0034851739 1 1 - 1950 262.40648 -1.8634047 0.0034851739 1 1 - 2000 307.5184 10.588572 0.0034851739 1 1 - 2050 316.54878 8.3925575 0.0034851739 1 1 - 2100 318.99324 29.042199 0.0034851739 1 1 - 2150 352.69886 18.443891 0.0034851739 1 1 - 2200 326.32556 -38.670826 0.0034851739 1 1 - 2250 333.73083 15.388091 0.0034851739 1 1 - 2300 258.51644 -42.524581 0.0034851739 1 1 - 2350 259.55019 -23.484535 0.0034851739 1 1 - 2400 289.75114 28.367986 0.0034851739 1 1 - 2450 312.34376 10.345659 0.0034851739 1 1 - 2500 298.65847 -14.077573 0.0034851739 1 1 - 2550 237.48617 -55.545493 0.0034851739 1 1 - 2600 266.79718 -17.165884 0.0034851739 1 1 - 2650 297.32794 -30.336059 0.0034851739 1 1 - 2700 258.77594 -1.3622741 0.0034851739 1 1 - 2750 240.05564 -0.4418629 0.0034851739 1 1 - 2800 189.88737 -13.20747 0.0034851739 1 1 - 2850 260.84014 -18.597276 0.0034851739 1 1 - 2900 299.99473 -7.3249394 0.0034851739 1 1 - 2950 377.90497 18.041664 0.0034851739 1 1 - 3000 263.92156 -54.260856 0.0034851739 1 1 - 3050 273.64003 26.973976 0.0034851739 1 1 - 3100 276.52232 -3.8583179 0.0034851739 1 1 - 3150 351.27802 84.899229 0.0034851739 1 1 - 3200 327.48822 -10.339189 0.0034851739 1 1 - 3250 356.11987 16.719201 0.0034851739 1 1 - 3300 263.01966 -18.033913 0.0034851739 1 1 - 3350 285.41196 -24.466282 0.0034851739 1 1 - 3400 233.65271 -39.293739 0.0034851739 1 1 - 3450 276.32895 44.300639 0.0034851739 1 1 - 3500 300.42687 28.489275 0.0034851739 1 1 - 3550 254.03142 -24.335427 0.0034851739 1 1 - 3600 304.6963 4.5827938 0.0034851739 1 1 - 3650 321.1785 -15.477109 0.0034851739 1 1 - 3700 256.00258 25.354176 0.0034851739 1 1 - 3750 356.60667 -5.4004451 0.0034851739 1 1 - 3800 361.31092 -1.481153 0.0034851739 1 1 - 3850 253.80196 -1.2120222 0.0034851739 1 1 - 3900 258.01895 19.280499 0.0034851739 1 1 - 3950 261.55352 -47.57161 0.0034851739 1 1 - 4000 254.54757 -8.6460339 0.0034851739 1 1 - 4050 301.56201 22.484551 0.0034851739 1 1 - 4100 304.73035 -31.321217 0.0034851739 1 1 - 4150 307.14343 0.5455717 0.0034851739 1 1 - 4200 291.05765 51.79974 0.0034851739 1 1 - 4250 333.73864 -24.668278 0.0034851739 1 1 - 4300 370.55562 -11.922425 0.0034851739 1 1 - 4350 408.03441 8.5963114 0.0034851739 1 1 - 4400 329.13138 -25.679871 0.0034851739 1 1 - 4450 366.98033 26.287047 0.0034851739 1 1 - 4500 311.80954 31.766893 0.0034851739 1 1 - 4550 292.28765 13.064974 0.0034851739 1 1 - 4600 320.72746 -49.078838 0.0034851739 1 1 - 4650 271.7173 -3.6846681 0.0034851739 1 1 - 4700 305.69502 37.947369 0.0034851739 1 1 - 4750 304.57521 52.411498 0.0034851739 1 1 - 4800 299.22173 12.555443 0.0034851739 1 1 - 4850 317.1756 -14.332118 0.0034851739 1 1 - 4900 330.62798 23.762097 0.0034851739 1 1 - 4950 342.34292 -21.428049 0.0034851739 1 1 - 5000 415.76656 10.136854 0.0034851739 1 1 - 5050 381.90086 18.17029 0.0034851739 1 1 - 5100 380.63709 28.042746 0.0034851739 1 1 - 5150 321.578 31.648896 0.0034851739 1 1 - 5200 301.22258 -29.246031 0.0034851739 1 1 - 5250 277.39891 -33.660526 0.0034851739 1 1 - 5300 259.34417 -47.78529 0.0034851739 1 1 - 5350 254.36079 10.616064 0.0034851739 1 1 - 5400 242.39213 29.468553 0.0034851739 1 1 - 5450 273.79403 -21.736668 0.0034851739 1 1 - 5500 367.30713 -6.0185517 0.0034851739 1 1 - 5550 309.52317 20.860119 0.0034851739 1 1 - 5600 316.82746 -10.339826 0.0034851739 1 1 - 5650 248.8707 33.659016 0.0034851739 1 1 - 5700 314.30152 19.05817 0.0034851739 1 1 - 5750 307.09966 14.458312 0.0034851739 1 1 - 5800 313.07936 15.825371 0.0034851739 1 1 - 5850 255.76382 23.890796 0.0034851739 1 1 - 5900 274.57947 -0.19520339 0.0034851739 1 1 - 5950 286.72486 -0.92397306 0.0034851739 1 1 - 6000 304.60873 -4.3983652 0.0034851739 1 1 - 6050 271.84784 -60.940602 0.0034851739 1 1 - 6100 283.48258 -8.2903551 0.0034851739 1 1 - 6150 336.07933 -8.2576526 0.0034851739 1 1 - 6200 363.09919 -17.309847 0.0034851739 1 1 - 6250 305.63822 14.475989 0.0034851739 1 1 - 6300 274.59195 49.13711 0.0034851739 1 1 - 6350 302.91015 -21.034604 0.0034851739 1 1 - 6400 293.87945 0.74647589 0.0034851739 1 1 - 6450 320.03843 47.624624 0.0034851739 1 1 - 6500 329.4551 -52.788127 0.0034851739 1 1 - 6550 320.74765 7.9598838 0.0034851739 1 1 - 6600 290.63144 -19.66089 0.0034851739 1 1 - 6650 266.9576 18.962642 0.0034851739 1 1 - 6700 274.61389 -9.823603 0.0034851739 1 1 - 6750 210.31417 -4.5767817 0.0034851739 1 1 - 6800 258.23732 44.233497 0.0034851739 1 1 - 6850 269.33119 -41.097429 0.0034851739 1 1 - 6900 318.88077 -21.601871 0.0034851739 1 1 - 6950 333.85796 26.067522 0.0034851739 1 1 - 7000 320.59631 -44.226656 0.0034851739 1 1 - 7050 348.15593 56.564077 0.0034851739 1 1 - 7100 291.30894 7.6597589 0.0034851739 1 1 - 7150 261.87574 -1.926724 0.0034851739 1 1 - 7200 318.17418 61.577301 0.0034851739 1 1 - 7250 269.73912 -41.921242 0.0034851739 1 1 - 7300 235.40776 -7.8606915 0.0034851739 1 1 - 7350 344.03017 73.910798 0.0034851739 1 1 - 7400 335.03212 13.288114 0.0034851739 1 1 - 7450 350.0822 -22.899498 0.0034851739 1 1 - 7500 360.69025 -78.556242 0.0034851739 1 1 - 7550 316.85895 -26.533434 0.0034851739 1 1 - 7600 271.65568 32.425371 0.0034851739 1 1 - 7650 264.7899 -40.230568 0.0034851739 1 1 - 7700 281.36612 8.9888402 0.0034851739 1 1 - 7750 276.96176 1.8256977 0.0034851739 1 1 - 7800 330.1516 -19.751957 0.0034851739 1 1 - 7850 325.80791 -12.52799 0.0034851739 1 1 - 7900 322.07086 35.21732 0.0034851739 1 1 - 7950 310.09493 -37.779071 0.0034851739 1 1 - 8000 309.87152 40.561377 0.0034851739 1 1 - 8050 252.91862 -27.545616 0.0034851739 1 1 - 8100 308.23471 -25.313089 0.0034851739 1 1 - 8150 278.69561 19.299388 0.0034851739 1 1 - 8200 270.81879 33.341696 0.0034851739 1 1 - 8250 312.58182 19.404863 0.0034851739 1 1 - 8300 302.20303 19.388391 0.0034851739 1 1 - 8350 299.55144 -12.952851 0.0034851739 1 1 - 8400 330.13129 -34.998178 0.0034851739 1 1 - 8450 281.66968 24.865214 0.0034851739 1 1 - 8500 262.4416 1.0196786 0.0034851739 1 1 - 8550 268.47784 44.761905 0.0034851739 1 1 - 8600 274.80898 8.6257741 0.0034851739 1 1 - 8650 264.82423 -3.9236534 0.0034851739 1 1 - 8700 268.88205 3.7102664 0.0034851739 1 1 - 8750 315.78315 -44.215318 0.0034851739 1 1 - 8800 280.19362 -4.2172962 0.0034851739 1 1 - 8850 331.88665 58.274571 0.0034851739 1 1 - 8900 314.70472 36.746006 0.0034851739 1 1 - 8950 395.82228 53.308443 0.0034851739 1 1 - 9000 351.95636 29.133084 0.0034851739 1 1 - 9050 369.74695 -37.487774 0.0034851739 1 1 - 9100 259.4453 -2.1826545 0.0034851739 1 1 - 9150 294.9952 -44.357151 0.0034851739 1 1 - 9200 273.94092 12.07438 0.0034851739 1 1 - 9250 257.18809 -29.792606 0.0034851739 1 1 - 9300 269.54343 -19.617554 0.0034851739 1 1 - 9350 301.09849 -26.979046 0.0034851739 1 1 - 9400 316.93675 -46.890327 0.0034851739 1 1 - 9450 304.52185 -8.8525101 0.0034851739 1 1 - 9500 371.73494 11.979311 0.0034851739 1 1 - 9550 291.23417 8.1900851 0.0034851739 1 1 - 9600 359.20912 38.693544 0.0034851739 1 1 - 9650 321.73443 33.448943 0.0034851739 1 1 - 9700 362.4237 36.54429 0.0034851739 1 1 - 9750 296.19875 -11.425255 0.0034851739 1 1 - 9800 329.9426 16.039783 0.0034851739 1 1 - 9850 296.79216 40.176303 0.0034851739 1 1 - 9900 345.63868 43.479483 0.0034851739 1 1 - 9950 282.27772 -49.08352 0.0034851739 1 1 - 10000 286.24393 -12.060687 0.0034851739 1 1 -Loop time of 1.29509 on 1 procs for 10000 steps with 44 atoms - -Performance: 667.133 ns/day, 0.036 hours/ns, 7721.451 timesteps/s, 339.744 katom-step/s -99.6% CPU use with 1 MPI tasks x 1 OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 0.065326 | 0.065326 | 0.065326 | 0.0 | 5.04 -Bond | 0.23111 | 0.23111 | 0.23111 | 0.0 | 17.84 -Kspace | 0.94073 | 0.94073 | 0.94073 | 0.0 | 72.64 -Neigh | 0.0032599 | 0.0032599 | 0.0032599 | 0.0 | 0.25 -Comm | 0.0013719 | 0.0013719 | 0.0013719 | 0.0 | 0.11 -Output | 0.00093869 | 0.00093869 | 0.00093869 | 0.0 | 0.07 -Modify | 0.049692 | 0.049692 | 0.049692 | 0.0 | 3.84 -Other | | 0.002667 | | | 0.21 - -Nlocal: 44 ave 44 max 44 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 14 ave 14 max 14 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Neighs: 869 ave 869 max 869 min -Histogram: 1 0 0 0 0 0 0 0 0 0 - -Total # of neighbors = 869 -Ave neighs/atom = 19.75 -Ave special neighs/atom = 6.4090909 -Neighbor list builds = 209 -Dangerous builds = 0 - -# write_restart restart_longrun -# write_data restart_longrun.data -Total wall time: 0:00:01 diff --git a/examples/PACKAGES/reaction/tiny_nylon_json/log.tiny_nylon.stabilized.12Jun2025.g++.4 b/examples/PACKAGES/reaction/tiny_nylon_json/log.tiny_nylon.stabilized.12Jun2025.g++.4 deleted file mode 100644 index 158d027156e..00000000000 --- a/examples/PACKAGES/reaction/tiny_nylon_json/log.tiny_nylon.stabilized.12Jun2025.g++.4 +++ /dev/null @@ -1,444 +0,0 @@ -LAMMPS (2 Apr 2025 - Development - patch_2Apr2025-583-g5868aa095d-modified) -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:99) - using 1 OpenMP thread(s) per MPI task -# two monomer nylon example -# reaction produces a condensed water molecule - -units real - -boundary p p p - -atom_style full - -kspace_style pppm 1.0e-4 - -pair_style lj/class2/coul/long 8.5 - -angle_style class2 - -bond_style class2 - -dihedral_style class2 - -improper_style class2 - -special_bonds lj/coul 0 0 1 -pair_modify tail yes mix sixthpower - -read_data tiny_nylon.data extra/bond/per/atom 5 extra/angle/per/atom 15 extra/dihedral/per/atom 15 extra/improper/per/atom 25 extra/special/per/atom 25 -Reading data file ... - orthogonal box = (-25 -25 -25) to (25 25 25) - 1 by 2 by 2 MPI processor grid - reading atom labelmap ... - reading bond labelmap ... - reading angle labelmap ... - reading dihedral labelmap ... - reading improper labelmap ... - reading atoms ... - 44 atoms - reading velocities ... - 44 velocities - scanning bonds ... - 9 = max bonds/atom - scanning angles ... - 21 = max angles/atom - scanning dihedrals ... - 29 = max dihedrals/atom - scanning impropers ... - 29 = max impropers/atom - orthogonal box = (-25 -25 -25) to (25 25 25) - 1 by 2 by 2 MPI processor grid - reading bonds ... - 42 bonds - reading angles ... - 74 angles - reading dihedrals ... - 100 dihedrals - reading impropers ... - 16 impropers -Finding 1-2 1-3 1-4 neighbors ... - special bond factors lj: 0 0 1 - special bond factors coul: 0 0 1 - 4 = max # of 1-2 neighbors - 6 = max # of 1-3 neighbors - 35 = max # of special neighbors - special bonds CPU = 0.000 seconds - read_data CPU = 0.006 seconds - -velocity all create 300.0 4928459 dist gaussian - -molecule mol1 rxn1_stp1_unreacted.json -Read molecule template mol1: -(no title) - 1 molecules - 0 fragments - 18 atoms with max type 0 - 16 bonds with max type 8 - 25 angles with max type 25 - 23 dihedrals with max type 33 - 2 impropers with max type 3 -molecule mol2 rxn1_stp1_reacted.json -Read molecule template mol2: -(no title) - 1 molecules - 0 fragments - 18 atoms with max type 0 - 17 bonds with max type 11 - 31 angles with max type 24 - 39 dihedrals with max type 30 - 0 impropers with max type 0 -molecule mol3 rxn1_stp2_unreacted.json -Read molecule template mol3: -(no title) - 1 molecules - 0 fragments - 15 atoms with max type 0 - 14 bonds with max type 11 - 25 angles with max type 24 - 30 dihedrals with max type 30 - 0 impropers with max type 0 -molecule mol4 rxn1_stp2_reacted.json -Read molecule template mol4: -(no title) - 1 molecules - 0 fragments - 15 atoms with max type 0 - 13 bonds with max type 13 - 19 angles with max type 26 - 16 dihedrals with max type 29 - 2 impropers with max type 5 - -thermo 50 - -# dump 1 all xyz 1 test_vis.xyz -# dump_modify 1 types labels - -fix myrxns all bond/react stabilization yes statted_grp .03 react rxn1 all 1 0.0 2.9 mol1 mol2 rxn1_stp1_map react rxn2 all 1 0.0 5.0 mol3 mol4 rxn1_stp2_map rescale_charges yes -WARNING: Fix bond/react: Atom affected by reaction rxn1 is too close to template edge (src/REACTION/fix_bond_react.cpp:2708) -WARNING: Fix bond/react: Atom affected by reaction rxn2 is too close to template edge (src/REACTION/fix_bond_react.cpp:2708) -dynamic group bond_react_MASTER_group defined -dynamic group statted_grp_REACT defined - -fix 1 statted_grp_REACT nvt temp 300 300 100 - -# optionally, you can customize behavior of reacting atoms, -# by using the internally-created 'bond_react_MASTER_group', like so: -fix 4 bond_react_MASTER_group temp/rescale 1 300 300 10 1 - -thermo_style custom step temp press density f_myrxns[*] - -# restart 100 restart1 restart2 - -run 10000 - -CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE - -Your simulation uses code contributions which should be cited: - -- Type Label Framework: https://doi.org/10.1021/acs.jpcb.3c08419 - -@Article{Gissinger24, - author = {Jacob R. Gissinger, Ilia Nikiforov, Yaser Afshar, Brendon Waters, Moon-ki Choi, Daniel S. Karls, Alexander Stukowski, Wonpil Im, Hendrik Heinz, Axel Kohlmeyer, and Ellad B. Tadmor}, - title = {Type Label Framework for Bonded Force Fields in LAMMPS}, - journal = {J. Phys. Chem. B}, - year = 2024, - volume = 128, - number = 13, - pages = {3282--3297} -} - -- fix bond/react: reacter.org doi:10.1016/j.polymer.2017.09.038, doi:10.1021/acs.macromol.0c02012, doi:10.1016/j.cpc.2024.109287 - -@Article{Gissinger17, - author = {J. R. Gissinger and B. D. Jensen and K. E. Wise}, - title = {Modeling Chemical Reactions in Classical Molecular Dynamics Simulations}, - journal = {Polymer}, - year = 2017, - volume = 128, - pages = {211--217} -} - -@Article{Gissinger20, - author = {J. R. Gissinger, B. D. Jensen, K. E. Wise}, - title = {{REACTER}: A Heuristic Method for Reactive Molecular Dynamics}, - journal = {Macromolecules}, - year = 2020, - volume = 53, - number = 22, - pages = {9953--9961} -} - -@Article{Gissinger24, - author = {J. R. Gissinger, B. D. Jensen, K. E. Wise}, - title = {Molecular Modeling of Reactive Systems with REACTER}, - journal = {Computer Physics Communications}, - year = 2024, - volume = 304, - number = 109287 -} - -CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE - -PPPM initialization ... - using 12-bit tables for long-range coulomb (src/kspace.cpp:342) - G vector (1/distance) = 0.23408048 - grid = 15 15 15 - stencil order = 5 - estimated absolute RMS force accuracy = 0.018627396 - estimated relative force accuracy = 5.6095851e-05 - using double precision FFTW3 - 3d grid and FFT values/proc = 3380 960 -Generated 55 of 55 mixed pair_coeff terms from sixthpower/sixthpower mixing rule -Neighbor list info ... - update: every = 1 steps, delay = 0 steps, check = yes - max neighbors/atom: 2000, page size: 100000 - master list distance cutoff = 10.5 - ghost atom cutoff = 10.5 - binsize = 5.25, bins = 10 10 10 - 2 neighbor lists, perpetual/occasional/extra = 1 1 0 - (1) pair lj/class2/coul/long, perpetual - attributes: half, newton on - pair build: half/bin/newton - stencil: half/bin/3d - bin: standard - (2) fix bond/react, occasional, copy from (1) - attributes: half, newton on - pair build: copy - stencil: none - bin: none -Per MPI rank memory allocation (min/avg/max) = 33.49 | 33.72 | 34.28 Mbytes - Step Temp Press Density f_myrxns[1] f_myrxns[2] - 0 300 357.25588 0.0034851739 0 0 - 50 328.952 -39.291672 0.0034851739 1 0 - 100 311.59495 29.741131 0.0034851739 1 1 - 150 325.04965 -19.624049 0.0034851739 1 1 - 200 313.15254 15.730975 0.0034851739 1 1 - 250 307.88805 -22.944869 0.0034851739 1 1 - 300 287.9343 6.7916738 0.0034851739 1 1 - 350 314.40601 12.913246 0.0034851739 1 1 - 400 304.58587 6.9804459 0.0034851739 1 1 - 450 300.97668 14.68689 0.0034851739 1 1 - 500 345.19498 -29.961085 0.0034851739 1 1 - 550 229.37329 12.88087 0.0034851739 1 1 - 600 239.75504 -3.575567 0.0034851739 1 1 - 650 257.58951 -5.0844118 0.0034851739 1 1 - 700 249.84121 22.825491 0.0034851739 1 1 - 750 287.62022 28.059197 0.0034851739 1 1 - 800 352.31339 -50.233738 0.0034851739 1 1 - 850 316.12821 22.493396 0.0034851739 1 1 - 900 283.85252 26.129698 0.0034851739 1 1 - 950 290.30591 -25.743121 0.0034851739 1 1 - 1000 346.57856 -2.1188627 0.0034851739 1 1 - 1050 251.23391 20.636107 0.0034851739 1 1 - 1100 267.48303 -15.912571 0.0034851739 1 1 - 1150 282.66256 14.019753 0.0034851739 1 1 - 1200 227.56518 -27.076623 0.0034851739 1 1 - 1250 232.7204 -1.0387593 0.0034851739 1 1 - 1300 277.28783 32.449571 0.0034851739 1 1 - 1350 308.5732 -11.129035 0.0034851739 1 1 - 1400 264.96641 -20.93416 0.0034851739 1 1 - 1450 262.83931 30.82366 0.0034851739 1 1 - 1500 276.23182 -24.480049 0.0034851739 1 1 - 1550 319.00599 -9.8372065 0.0034851739 1 1 - 1600 316.48228 -15.940319 0.0034851739 1 1 - 1650 277.213 1.3856424 0.0034851739 1 1 - 1700 302.34736 -27.623644 0.0034851739 1 1 - 1750 312.06738 -52.786773 0.0034851739 1 1 - 1800 232.82457 -8.2208725 0.0034851739 1 1 - 1850 219.66312 0.0019675712 0.0034851739 1 1 - 1900 245.49515 -24.2089 0.0034851739 1 1 - 1950 262.40648 -1.8634053 0.0034851739 1 1 - 2000 307.5184 10.588572 0.0034851739 1 1 - 2050 316.54878 8.3925573 0.0034851739 1 1 - 2100 318.99324 29.042199 0.0034851739 1 1 - 2150 352.69886 18.443891 0.0034851739 1 1 - 2200 326.32556 -38.670827 0.0034851739 1 1 - 2250 333.73083 15.388091 0.0034851739 1 1 - 2300 258.51644 -42.524579 0.0034851739 1 1 - 2350 259.55019 -23.484534 0.0034851739 1 1 - 2400 289.75114 28.367991 0.0034851739 1 1 - 2450 312.34376 10.34566 0.0034851739 1 1 - 2500 298.65847 -14.077574 0.0034851739 1 1 - 2550 237.48617 -55.545492 0.0034851739 1 1 - 2600 266.79719 -17.165888 0.0034851739 1 1 - 2650 297.32793 -30.336065 0.0034851739 1 1 - 2700 258.77594 -1.3622773 0.0034851739 1 1 - 2750 240.05564 -0.44186476 0.0034851739 1 1 - 2800 189.88736 -13.20747 0.0034851739 1 1 - 2850 260.84014 -18.597268 0.0034851739 1 1 - 2900 299.99469 -7.3249657 0.0034851739 1 1 - 2950 377.90515 18.041562 0.0034851739 1 1 - 3000 263.92164 -54.260872 0.0034851739 1 1 - 3050 273.63965 26.974167 0.0034851739 1 1 - 3100 276.52188 -3.8587984 0.0034851739 1 1 - 3150 351.27821 84.898762 0.0034851739 1 1 - 3200 327.48898 -10.338223 0.0034851739 1 1 - 3250 356.1212 16.719521 0.0034851739 1 1 - 3300 263.02135 -18.034405 0.0034851739 1 1 - 3350 285.4132 -24.466598 0.0034851739 1 1 - 3400 233.65385 -39.293822 0.0034851739 1 1 - 3450 276.32817 44.300742 0.0034851739 1 1 - 3500 300.43096 28.490491 0.0034851739 1 1 - 3550 254.03694 -24.336803 0.0034851739 1 1 - 3600 304.68561 4.5774591 0.0034851739 1 1 - 3650 321.19694 -15.472971 0.0034851739 1 1 - 3700 256.01801 25.355422 0.0034851739 1 1 - 3750 356.6048 -5.4033701 0.0034851739 1 1 - 3800 361.31685 -1.4920086 0.0034851739 1 1 - 3850 253.81335 -1.20491 0.0034851739 1 1 - 3900 257.99176 19.272863 0.0034851739 1 1 - 3950 261.56599 -47.578625 0.0034851739 1 1 - 4000 254.55501 -8.6462427 0.0034851739 1 1 - 4050 301.57465 22.466646 0.0034851739 1 1 - 4100 304.71812 -31.337506 0.0034851739 1 1 - 4150 307.05688 0.54710967 0.0034851739 1 1 - 4200 291.11678 51.789059 0.0034851739 1 1 - 4250 333.71702 -24.64525 0.0034851739 1 1 - 4300 370.53725 -11.852814 0.0034851739 1 1 - 4350 407.98596 8.5128018 0.0034851739 1 1 - 4400 329.43106 -25.637208 0.0034851739 1 1 - 4450 366.91557 26.250029 0.0034851739 1 1 - 4500 311.63134 31.61568 0.0034851739 1 1 - 4550 292.18008 13.020734 0.0034851739 1 1 - 4600 320.76549 -49.324846 0.0034851739 1 1 - 4650 271.72115 -3.6666938 0.0034851739 1 1 - 4700 305.52974 38.114013 0.0034851739 1 1 - 4750 304.37057 52.050863 0.0034851739 1 1 - 4800 300.50548 13.158616 0.0034851739 1 1 - 4850 317.66606 -14.951608 0.0034851739 1 1 - 4900 331.39591 23.823575 0.0034851739 1 1 - 4950 340.899 -19.557136 0.0034851739 1 1 - 5000 414.45112 8.7124515 0.0034851739 1 1 - 5050 382.95479 18.555744 0.0034851739 1 1 - 5100 381.26344 22.674486 0.0034851739 1 1 - 5150 309.88477 36.184971 0.0034851739 1 1 - 5200 312.4976 -31.403643 0.0034851739 1 1 - 5250 285.1896 -36.180241 0.0034851739 1 1 - 5300 249.68604 -55.078779 0.0034851739 1 1 - 5350 251.76542 12.156887 0.0034851739 1 1 - 5400 278.40908 15.846527 0.0034851739 1 1 - 5450 281.22116 -12.005198 0.0034851739 1 1 - 5500 362.38064 -14.608206 0.0034851739 1 1 - 5550 287.39255 38.446058 0.0034851739 1 1 - 5600 264.87699 -20.21112 0.0034851739 1 1 - 5650 300.31424 -15.899086 0.0034851739 1 1 - 5700 318.6444 18.688317 0.0034851739 1 1 - 5750 321.74224 -7.5355749 0.0034851739 1 1 - 5800 314.65871 33.512178 0.0034851739 1 1 - 5850 307.11597 -16.492491 0.0034851739 1 1 - 5900 259.10441 -49.668159 0.0034851739 1 1 - 5950 292.09045 -22.04962 0.0034851739 1 1 - 6000 243.99229 -15.110485 0.0034851739 1 1 - 6050 276.66494 -21.052012 0.0034851739 1 1 - 6100 328.39444 64.522811 0.0034851739 1 1 - 6150 289.49991 -18.518616 0.0034851739 1 1 - 6200 358.50076 -9.3115021 0.0034851739 1 1 - 6250 303.15143 -42.618735 0.0034851739 1 1 - 6300 297.17364 18.116143 0.0034851739 1 1 - 6350 254.2382 2.4963759 0.0034851739 1 1 - 6400 227.56255 23.535315 0.0034851739 1 1 - 6450 280.70805 13.243012 0.0034851739 1 1 - 6500 251.14485 -18.466759 0.0034851739 1 1 - 6550 284.32321 9.0351234 0.0034851739 1 1 - 6600 284.03779 -10.683306 0.0034851739 1 1 - 6650 315.1569 -39.736019 0.0034851739 1 1 - 6700 302.50424 5.9013011 0.0034851739 1 1 - 6750 368.279 44.343503 0.0034851739 1 1 - 6800 279.67266 -35.967233 0.0034851739 1 1 - 6850 298.98045 3.0539699 0.0034851739 1 1 - 6900 236.94852 0.55971293 0.0034851739 1 1 - 6950 303.38382 -9.1880246 0.0034851739 1 1 - 7000 264.56096 3.904024 0.0034851739 1 1 - 7050 272.26968 -44.608801 0.0034851739 1 1 - 7100 235.38132 13.141913 0.0034851739 1 1 - 7150 272.0985 26.601686 0.0034851739 1 1 - 7200 314.41177 -7.6236617 0.0034851739 1 1 - 7250 313.29915 -45.214663 0.0034851739 1 1 - 7300 309.20548 -11.691744 0.0034851739 1 1 - 7350 342.22769 18.805899 0.0034851739 1 1 - 7400 301.02701 32.830071 0.0034851739 1 1 - 7450 318.19524 48.620851 0.0034851739 1 1 - 7500 290.00663 -9.1444424 0.0034851739 1 1 - 7550 238.07666 32.654941 0.0034851739 1 1 - 7600 275.95317 -23.982336 0.0034851739 1 1 - 7650 274.54472 -29.183684 0.0034851739 1 1 - 7700 307.25317 11.981268 0.0034851739 1 1 - 7750 299.40271 -19.390542 0.0034851739 1 1 - 7800 314.18813 -6.0794802 0.0034851739 1 1 - 7850 271.14043 40.491364 0.0034851739 1 1 - 7900 266.43792 37.250574 0.0034851739 1 1 - 7950 330.21996 31.783381 0.0034851739 1 1 - 8000 313.80294 44.878972 0.0034851739 1 1 - 8050 331.1094 1.9597746 0.0034851739 1 1 - 8100 267.80448 26.159121 0.0034851739 1 1 - 8150 267.17305 16.135234 0.0034851739 1 1 - 8200 290.248 -13.058622 0.0034851739 1 1 - 8250 231.77635 -42.850795 0.0034851739 1 1 - 8300 233.58288 29.137765 0.0034851739 1 1 - 8350 270.2913 -11.177011 0.0034851739 1 1 - 8400 254.69873 3.1775639 0.0034851739 1 1 - 8450 334.88277 -27.336924 0.0034851739 1 1 - 8500 354.95137 -9.751911 0.0034851739 1 1 - 8550 327.78998 8.2348621 0.0034851739 1 1 - 8600 306.15772 1.3756734 0.0034851739 1 1 - 8650 325.68699 6.5939205 0.0034851739 1 1 - 8700 302.84804 13.912169 0.0034851739 1 1 - 8750 299.34988 10.311212 0.0034851739 1 1 - 8800 258.77684 -8.0783535 0.0034851739 1 1 - 8850 299.8835 -9.61362 0.0034851739 1 1 - 8900 350.28205 -34.897861 0.0034851739 1 1 - 8950 316.90133 -52.845562 0.0034851739 1 1 - 9000 337.50548 18.172556 0.0034851739 1 1 - 9050 306.67254 37.062973 0.0034851739 1 1 - 9100 310.74844 58.178538 0.0034851739 1 1 - 9150 301.53463 5.9650738 0.0034851739 1 1 - 9200 284.61384 10.677528 0.0034851739 1 1 - 9250 247.86475 -15.325203 0.0034851739 1 1 - 9300 309.74481 -60.070902 0.0034851739 1 1 - 9350 290.17111 5.6049467 0.0034851739 1 1 - 9400 268.79925 -9.2423032 0.0034851739 1 1 - 9450 315.80445 18.124612 0.0034851739 1 1 - 9500 351.58161 -14.465115 0.0034851739 1 1 - 9550 344.93028 43.161438 0.0034851739 1 1 - 9600 265.92273 0.3396608 0.0034851739 1 1 - 9650 261.1649 -20.46043 0.0034851739 1 1 - 9700 262.05627 27.187613 0.0034851739 1 1 - 9750 249.12463 15.911339 0.0034851739 1 1 - 9800 262.40626 -16.159153 0.0034851739 1 1 - 9850 267.48677 0.32143902 0.0034851739 1 1 - 9900 316.15674 40.664589 0.0034851739 1 1 - 9950 323.94181 20.356291 0.0034851739 1 1 - 10000 307.90841 4.8392456 0.0034851739 1 1 -Loop time of 0.937214 on 4 procs for 10000 steps with 44 atoms - -Performance: 921.881 ns/day, 0.026 hours/ns, 10669.916 timesteps/s, 469.476 katom-step/s -96.5% 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.00042896 | 0.01827 | 0.04944 | 14.9 | 1.95 -Bond | 0.00067626 | 0.061292 | 0.18867 | 31.0 | 6.54 -Kspace | 0.50738 | 0.64527 | 0.7136 | 10.4 | 68.85 -Neigh | 0.0031476 | 0.0031815 | 0.0032165 | 0.0 | 0.34 -Comm | 0.01335 | 0.020817 | 0.035424 | 6.1 | 2.22 -Output | 0.0010449 | 0.0012202 | 0.0016969 | 0.8 | 0.13 -Modify | 0.16314 | 0.18266 | 0.20201 | 4.3 | 19.49 -Other | | 0.004499 | | | 0.48 - -Nlocal: 11 ave 40 max 0 min -Histogram: 2 1 0 0 0 0 0 0 0 1 -Nghost: 22 ave 40 max 4 min -Histogram: 1 0 0 0 0 2 0 0 0 1 -Neighs: 216.5 ave 845 max 0 min -Histogram: 3 0 0 0 0 0 0 0 0 1 - -Total # of neighbors = 866 -Ave neighs/atom = 19.681818 -Ave special neighs/atom = 6.4090909 -Neighbor list builds = 212 -Dangerous builds = 0 - -# write_restart restart_longrun -# write_data restart_longrun.data -Total wall time: 0:00:00 diff --git a/examples/PACKAGES/reaction/tiny_nylon_wildcards/in.tiny_nylon.stabilized b/examples/PACKAGES/reaction/tiny_nylon_wildcards/in.tiny_nylon.stabilized new file mode 100644 index 00000000000..082f0085eaa --- /dev/null +++ b/examples/PACKAGES/reaction/tiny_nylon_wildcards/in.tiny_nylon.stabilized @@ -0,0 +1,62 @@ +# two monomer nylon example +# reaction produces a condensed water molecule + +units real + +boundary p p p + +atom_style full + +kspace_style pppm 1.0e-4 + +pair_style lj/class2/coul/long 8.5 + +angle_style class2 + +bond_style class2 + +dihedral_style class2 + +improper_style class2 + +special_bonds lj/coul 0 0 1 +pair_modify tail yes mix sixthpower + +read_data tiny_nylon.data & + extra/bond/per/atom 5 & + extra/angle/per/atom 15 & + extra/dihedral/per/atom 15 & + extra/improper/per/atom 25 & + extra/special/per/atom 25 + +velocity all create 300.0 4928459 dist gaussian + +molecule mol1 rxn1_stp1_unreacted.json +molecule mol2 rxn1_stp1_reacted.json +molecule mol3 rxn1_stp2_unreacted.json +molecule mol4 rxn1_stp2_reacted.json + +thermo 50 + +# dump 1 all xyz 1 test_vis.xyz +# dump_modify 1 types labels + +fix myrxns all bond/react stabilization yes statted_grp .03 & + react rxn1 all 1 0.0 2.9 mol1 mol2 rxn1_stp1_map & + react rxn2 all 1 0.0 5.0 mol3 mol4 rxn1_stp2_map rescale_charges yes + +fix 1 statted_grp_REACT nvt temp 300 300 100 + +# optionally, you can customize behavior of reacting atoms, +# by using the internally-created 'bond_react_MASTER_group', like so: +fix 4 bond_react_MASTER_group temp/rescale 1 300 300 10 1 + +thermo_style custom step temp press density f_myrxns[*] +thermo_modify colname auto + +# restart 100 restart1 restart2 + +run 10000 + +# write_restart restart_longrun +# write_data restart_longrun.data diff --git a/examples/PACKAGES/reaction/tiny_nylon_wildcards/log.10Dec2025.tiny_nylon.stabilized.g++.1 b/examples/PACKAGES/reaction/tiny_nylon_wildcards/log.10Dec2025.tiny_nylon.stabilized.g++.1 new file mode 100644 index 00000000000..d308bcd694c --- /dev/null +++ b/examples/PACKAGES/reaction/tiny_nylon_wildcards/log.10Dec2025.tiny_nylon.stabilized.g++.1 @@ -0,0 +1,449 @@ +LAMMPS (10 Dec 2025 - Development - patch_10Dec2025-120-ga51f9ba0e7-modified) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. + using 1 OpenMP thread(s) per MPI task +# two monomer nylon example +# reaction produces a condensed water molecule + +units real + +boundary p p p + +atom_style full + +kspace_style pppm 1.0e-4 + +pair_style lj/class2/coul/long 8.5 + +angle_style class2 + +bond_style class2 + +dihedral_style class2 + +improper_style class2 + +special_bonds lj/coul 0 0 1 +pair_modify tail yes mix sixthpower + +read_data tiny_nylon.data extra/bond/per/atom 5 extra/angle/per/atom 15 extra/dihedral/per/atom 15 extra/improper/per/atom 25 extra/special/per/atom 25 +Reading data file ... + orthogonal box = (-25 -25 -25) to (25 25 25) + 1 by 1 by 1 MPI processor grid + reading atom labelmap ... + reading bond labelmap ... + reading angle labelmap ... + reading dihedral labelmap ... + reading improper labelmap ... + reading atoms ... + 44 atoms + reading velocities ... + 44 velocities + scanning bonds ... + 9 = max bonds/atom + scanning angles ... + 21 = max angles/atom + scanning dihedrals ... + 29 = max dihedrals/atom + scanning impropers ... + 29 = max impropers/atom + orthogonal box = (-25 -25 -25) to (25 25 25) + 1 by 1 by 1 MPI processor grid + reading bonds ... + 42 bonds + reading angles ... + 74 angles + reading dihedrals ... + 100 dihedrals + reading impropers ... + 16 impropers +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 1 + special bond factors coul: 0 0 1 + 4 = max # of 1-2 neighbors + 6 = max # of 1-3 neighbors + 35 = max # of special neighbors + special bonds CPU = 0.001 seconds + read_data CPU = 0.011 seconds + +velocity all create 300.0 4928459 dist gaussian + +molecule mol1 rxn1_stp1_unreacted.json +Read molecule template mol1: +(no title) + 1 molecules + 0 fragments + 0 bodies + 18 atoms with max type 8 + 16 bonds with max type 8 + 25 angles with max type 25 + 23 dihedrals with max type 33 + 2 impropers with max type 3 +molecule mol2 rxn1_stp1_reacted.json +Read molecule template mol2: +(no title) + 1 molecules + 0 fragments + 0 bodies + 18 atoms with max type 9 + 17 bonds with max type 11 + 31 angles with max type 24 + 39 dihedrals with max type 30 + 0 impropers with max type 0 +molecule mol3 rxn1_stp2_unreacted.json +Read molecule template mol3: +(no title) + 1 molecules + 0 fragments + 0 bodies + 15 atoms with max type 9 + 14 bonds with max type 11 + 25 angles with max type 24 + 30 dihedrals with max type 30 + 0 impropers with max type 0 +molecule mol4 rxn1_stp2_reacted.json +Read molecule template mol4: +(no title) + 1 molecules + 0 fragments + 0 bodies + 15 atoms with max type 11 + 13 bonds with max type 13 + 19 angles with max type 26 + 16 dihedrals with max type 29 + 2 impropers with max type 5 + +thermo 50 + +# dump 1 all xyz 1 test_vis.xyz +# dump_modify 1 types labels + +fix myrxns all bond/react stabilization yes statted_grp .03 react rxn1 all 1 0.0 2.9 mol1 mol2 rxn1_stp1_map react rxn2 all 1 0.0 5.0 mol3 mol4 rxn1_stp2_map rescale_charges yes +WARNING: Fix bond/react: Atom affected by reaction rxn1 is too close to template edge (src/REACTION/fix_bond_react.cpp:2630) +WARNING: Fix bond/react: Atom affected by reaction rxn2 is too close to template edge (src/REACTION/fix_bond_react.cpp:2630) +dynamic group bond_react_MASTER_group defined +dynamic group statted_grp_REACT defined + +fix 1 statted_grp_REACT nvt temp 300 300 100 + +# optionally, you can customize behavior of reacting atoms, +# by using the internally-created 'bond_react_MASTER_group', like so: +fix 4 bond_react_MASTER_group temp/rescale 1 300 300 10 1 + +thermo_style custom step temp press density f_myrxns[*] +thermo_modify colname auto + +# restart 100 restart1 restart2 + +run 10000 + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Your simulation uses code contributions which should be cited: + +- Type Label Framework: https://doi.org/10.1021/acs.jpcb.3c08419 + +@Article{Gissinger24, + author = {Jacob R. Gissinger, Ilia Nikiforov, Yaser Afshar, Brendon Waters, Moon-ki Choi, Daniel S. Karls, Alexander Stukowski, Wonpil Im, Hendrik Heinz, Axel Kohlmeyer, and Ellad B. Tadmor}, + title = {Type Label Framework for Bonded Force Fields in LAMMPS}, + journal = {J. Phys. Chem. B}, + year = 2024, + volume = 128, + number = 13, + pages = {3282--3297} +} + +- fix bond/react: https://reacter.org, https://doi.org/10.1016/j.polymer.2017.09.038, https://doi.org/10.1021/acs.macromol.0c02012, https://doi.org/10.1016/j.cpc.2024.109287 + +@Article{Gissinger17, + author = {J. R. Gissinger and B. D. Jensen and K. E. Wise}, + title = {Modeling Chemical Reactions in Classical Molecular Dynamics Simulations}, + journal = {Polymer}, + year = 2017, + volume = 128, + pages = {211--217} +} + +@Article{Gissinger20, + author = {J. R. Gissinger, B. D. Jensen, K. E. Wise}, + title = {{REACTER}: A Heuristic Method for Reactive Molecular Dynamics}, + journal = {Macromolecules}, + year = 2020, + volume = 53, + number = 22, + pages = {9953--9961} +} + +@Article{Gissinger24, + author = {J. R. Gissinger, B. D. Jensen, K. E. Wise}, + title = {Molecular Modeling of Reactive Systems with REACTER}, + journal = {Computer Physics Communications}, + year = 2024, + volume = 304, + number = 109287 +} + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +PPPM initialization ... + using 12-bit tables for long-range coulomb + G vector (1/distance) = 0.23408048 + grid = 15 15 15 + stencil order = 5 + estimated absolute RMS force accuracy = 0.018627396 + estimated relative force accuracy = 5.6095851e-05 + using double precision KISS FFT + 3d grid and FFT values/proc = 8000 3375 +Generated 55 of 55 mixed pair_coeff terms from sixthpower/sixthpower mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 10.5 + ghost atom cutoff = 10.5 + binsize = 5.25, bins = 10 10 10 + 2 neighbor lists, perpetual/occasional/extra = 1 1 0 + (1) pair lj/class2/coul/long, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard + (2) fix bond/react, occasional, copy from (1) + attributes: half, newton on + pair build: copy + stencil: none + bin: none +Per MPI rank memory allocation (min/avg/max) = 34 | 34 | 34 Mbytes + Step Temp Press Density f_myrxns:rxn1 f_myrxns:rxn2 + 0 300 357.25587 0.0034851739 0 0 + 50 323.13357 -36.901145 0.0034851739 1 0 + 100 303.51 11.102115 0.0034851739 1 1 + 150 332.31667 -25.20854 0.0034851739 1 1 + 200 278.87792 25.724788 0.0034851739 1 1 + 250 306.00815 -9.2221074 0.0034851739 1 1 + 300 254.72154 -5.7953243 0.0034851739 1 1 + 350 267.62849 23.758906 0.0034851739 1 1 + 400 320.81812 3.3741667 0.0034851739 1 1 + 450 376.12912 -10.240072 0.0034851739 1 1 + 500 409.47719 17.579329 0.0034851739 1 1 + 550 251.53858 -1.8557267 0.0034851739 1 1 + 600 237.09927 19.34288 0.0034851739 1 1 + 650 325.85267 12.350177 0.0034851739 1 1 + 700 281.35713 2.4348132 0.0034851739 1 1 + 750 348.96295 10.699428 0.0034851739 1 1 + 800 285.14402 -34.310532 0.0034851739 1 1 + 850 272.05347 -29.232748 0.0034851739 1 1 + 900 233.75445 25.081058 0.0034851739 1 1 + 950 270.83374 36.530225 0.0034851739 1 1 + 1000 226.39852 -25.096611 0.0034851739 1 1 + 1050 252.97685 -38.37156 0.0034851739 1 1 + 1100 298.67428 53.002074 0.0034851739 1 1 + 1150 291.35413 -0.58731897 0.0034851739 1 1 + 1200 338.55035 -12.606111 0.0034851739 1 1 + 1250 273.47404 2.607543 0.0034851739 1 1 + 1300 238.32578 103.89008 0.0034851739 1 1 + 1350 289.72019 35.589762 0.0034851739 1 1 + 1400 308.55022 -14.264782 0.0034851739 1 1 + 1450 335.61808 -4.3227051 0.0034851739 1 1 + 1500 322.5053 17.455704 0.0034851739 1 1 + 1550 394.29493 9.2107081 0.0034851739 1 1 + 1600 381.1899 17.682818 0.0034851739 1 1 + 1650 335.99677 -48.364172 0.0034851739 1 1 + 1700 303.84175 -45.864487 0.0034851739 1 1 + 1750 320.31942 -11.504271 0.0034851739 1 1 + 1800 294.21365 -26.343709 0.0034851739 1 1 + 1850 279.81064 6.0658344 0.0034851739 1 1 + 1900 303.71918 -49.271788 0.0034851739 1 1 + 1950 291.23621 5.1869409 0.0034851739 1 1 + 2000 233.32832 2.109592 0.0034851739 1 1 + 2050 341.6919 48.003744 0.0034851739 1 1 + 2100 349.44789 -42.906017 0.0034851739 1 1 + 2150 329.88667 -4.1766291 0.0034851739 1 1 + 2200 337.70336 56.336888 0.0034851739 1 1 + 2250 318.31319 -12.164076 0.0034851739 1 1 + 2300 298.29507 -6.4401592 0.0034851739 1 1 + 2350 304.95999 16.417381 0.0034851739 1 1 + 2400 290.62449 3.8105734 0.0034851739 1 1 + 2450 346.62602 51.604346 0.0034851739 1 1 + 2500 259.10879 14.228307 0.0034851739 1 1 + 2550 335.33894 -16.037611 0.0034851739 1 1 + 2600 299.89407 -9.8662594 0.0034851739 1 1 + 2650 348.15539 -8.1996299 0.0034851739 1 1 + 2700 343.85656 -72.012595 0.0034851739 1 1 + 2750 378.24423 -7.2314213 0.0034851739 1 1 + 2800 329.78551 72.122685 0.0034851739 1 1 + 2850 336.43123 -26.141529 0.0034851739 1 1 + 2900 290.77205 21.589584 0.0034851739 1 1 + 2950 286.07747 31.455029 0.0034851739 1 1 + 3000 274.54408 18.865778 0.0034851739 1 1 + 3050 237.71503 21.195126 0.0034851739 1 1 + 3100 300.19233 46.381452 0.0034851739 1 1 + 3150 310.662 -48.41422 0.0034851739 1 1 + 3200 356.68406 3.4820791 0.0034851739 1 1 + 3250 345.18655 -14.929512 0.0034851739 1 1 + 3300 303.81384 -106.62742 0.0034851739 1 1 + 3350 363.1079 53.537967 0.0034851739 1 1 + 3400 344.77548 -0.32949356 0.0034851739 1 1 + 3450 285.60132 16.994506 0.0034851739 1 1 + 3500 292.34164 27.878366 0.0034851739 1 1 + 3550 313.51585 -65.418373 0.0034851739 1 1 + 3600 299.37996 7.1201351 0.0034851739 1 1 + 3650 293.80815 25.383956 0.0034851739 1 1 + 3700 318.55512 -31.086255 0.0034851739 1 1 + 3750 338.01158 4.3233345 0.0034851739 1 1 + 3800 335.62457 -21.672062 0.0034851739 1 1 + 3850 373.55792 -18.344518 0.0034851739 1 1 + 3900 299.00966 -52.411817 0.0034851739 1 1 + 3950 348.18017 16.762978 0.0034851739 1 1 + 4000 302.36814 20.412765 0.0034851739 1 1 + 4050 304.31703 -18.932636 0.0034851739 1 1 + 4100 322.3382 -12.205649 0.0034851739 1 1 + 4150 262.29776 -46.258119 0.0034851739 1 1 + 4200 265.29241 -15.879948 0.0034851739 1 1 + 4250 337.64589 -29.097853 0.0034851739 1 1 + 4300 394.67042 5.3180839 0.0034851739 1 1 + 4350 288.70522 -2.7038433 0.0034851739 1 1 + 4400 349.62275 55.384045 0.0034851739 1 1 + 4450 350.05246 -20.531148 0.0034851739 1 1 + 4500 263.12901 39.99287 0.0034851739 1 1 + 4550 245.82317 -11.107772 0.0034851739 1 1 + 4600 215.28781 -13.078366 0.0034851739 1 1 + 4650 213.62697 18.061273 0.0034851739 1 1 + 4700 283.00551 9.1457527 0.0034851739 1 1 + 4750 322.2234 -5.6773995 0.0034851739 1 1 + 4800 321.01027 24.636298 0.0034851739 1 1 + 4850 308.37924 8.0190603 0.0034851739 1 1 + 4900 313.29993 -21.926107 0.0034851739 1 1 + 4950 318.79709 -38.641178 0.0034851739 1 1 + 5000 332.5323 -10.994049 0.0034851739 1 1 + 5050 263.77853 -19.155804 0.0034851739 1 1 + 5100 249.43481 14.049613 0.0034851739 1 1 + 5150 272.43126 2.1161776 0.0034851739 1 1 + 5200 287.20643 14.651374 0.0034851739 1 1 + 5250 227.2215 14.436162 0.0034851739 1 1 + 5300 220.70331 -12.059096 0.0034851739 1 1 + 5350 294.48483 -13.056616 0.0034851739 1 1 + 5400 301.111 -13.25331 0.0034851739 1 1 + 5450 286.4577 7.6904099 0.0034851739 1 1 + 5500 307.72688 -32.456764 0.0034851739 1 1 + 5550 284.13917 -27.497649 0.0034851739 1 1 + 5600 270.02975 -16.954712 0.0034851739 1 1 + 5650 313.97465 -1.1028839 0.0034851739 1 1 + 5700 286.18167 14.125288 0.0034851739 1 1 + 5750 269.14352 27.19375 0.0034851739 1 1 + 5800 235.50295 12.547718 0.0034851739 1 1 + 5850 218.68087 48.894385 0.0034851739 1 1 + 5900 299.41286 6.9150462 0.0034851739 1 1 + 5950 283.91534 -41.435248 0.0034851739 1 1 + 6000 351.51818 -11.971798 0.0034851739 1 1 + 6050 370.17973 8.1936067 0.0034851739 1 1 + 6100 287.87457 23.844459 0.0034851739 1 1 + 6150 282.12003 14.196677 0.0034851739 1 1 + 6200 239.67426 31.389011 0.0034851739 1 1 + 6250 265.84426 -22.797645 0.0034851739 1 1 + 6300 320.48833 13.611918 0.0034851739 1 1 + 6350 354.54726 -8.6164904 0.0034851739 1 1 + 6400 351.91168 -45.632257 0.0034851739 1 1 + 6450 404.6967 8.7160731 0.0034851739 1 1 + 6500 273.77467 19.710654 0.0034851739 1 1 + 6550 283.46688 2.8728029 0.0034851739 1 1 + 6600 241.76828 -49.04184 0.0034851739 1 1 + 6650 289.50471 12.670232 0.0034851739 1 1 + 6700 261.57213 -13.663425 0.0034851739 1 1 + 6750 292.31184 18.675826 0.0034851739 1 1 + 6800 290.61615 17.153393 0.0034851739 1 1 + 6850 345.29773 -6.8794198 0.0034851739 1 1 + 6900 382.8504 0.086203475 0.0034851739 1 1 + 6950 330.68716 22.3792 0.0034851739 1 1 + 7000 351.2043 33.53224 0.0034851739 1 1 + 7050 260.75316 -3.0830773 0.0034851739 1 1 + 7100 238.61023 -25.377481 0.0034851739 1 1 + 7150 278.02381 29.708903 0.0034851739 1 1 + 7200 281.78581 -11.613886 0.0034851739 1 1 + 7250 299.19023 -40.148778 0.0034851739 1 1 + 7300 347.16566 1.6164218 0.0034851739 1 1 + 7350 334.98219 30.334651 0.0034851739 1 1 + 7400 280.26928 -31.933329 0.0034851739 1 1 + 7450 277.48917 -5.1849913 0.0034851739 1 1 + 7500 247.47699 7.6810611 0.0034851739 1 1 + 7550 223.03144 -29.416983 0.0034851739 1 1 + 7600 272.28929 8.5690923 0.0034851739 1 1 + 7650 278.73246 106.03104 0.0034851739 1 1 + 7700 262.96706 -31.491702 0.0034851739 1 1 + 7750 330.23917 21.757497 0.0034851739 1 1 + 7800 343.96783 36.898555 0.0034851739 1 1 + 7850 341.22049 -43.387928 0.0034851739 1 1 + 7900 277.06257 -71.348468 0.0034851739 1 1 + 7950 330.90733 17.613434 0.0034851739 1 1 + 8000 310.39669 -8.2136094 0.0034851739 1 1 + 8050 310.47524 -30.623829 0.0034851739 1 1 + 8100 290.2114 -24.485156 0.0034851739 1 1 + 8150 255.01637 60.297045 0.0034851739 1 1 + 8200 266.73273 2.3178283 0.0034851739 1 1 + 8250 325.75807 -36.58488 0.0034851739 1 1 + 8300 289.72733 30.040033 0.0034851739 1 1 + 8350 326.57575 -20.981666 0.0034851739 1 1 + 8400 379.29835 44.435283 0.0034851739 1 1 + 8450 333.38125 -0.05363945 0.0034851739 1 1 + 8500 305.08411 -26.538845 0.0034851739 1 1 + 8550 349.58907 66.193068 0.0034851739 1 1 + 8600 270.32146 5.1332354 0.0034851739 1 1 + 8650 248.67123 26.592957 0.0034851739 1 1 + 8700 288.11042 34.114624 0.0034851739 1 1 + 8750 252.34031 -32.966873 0.0034851739 1 1 + 8800 304.24822 6.8056503 0.0034851739 1 1 + 8850 306.08573 27.793193 0.0034851739 1 1 + 8900 341.1829 18.131124 0.0034851739 1 1 + 8950 360.96467 -49.295482 0.0034851739 1 1 + 9000 334.98737 10.524633 0.0034851739 1 1 + 9050 283.8927 -36.034176 0.0034851739 1 1 + 9100 342.99378 25.401513 0.0034851739 1 1 + 9150 275.94637 -8.2056556 0.0034851739 1 1 + 9200 329.51306 35.725721 0.0034851739 1 1 + 9250 260.20864 -1.0676031 0.0034851739 1 1 + 9300 266.63017 -35.836913 0.0034851739 1 1 + 9350 206.63311 1.9506084 0.0034851739 1 1 + 9400 275.17708 34.35797 0.0034851739 1 1 + 9450 231.6401 4.1075349 0.0034851739 1 1 + 9500 256.90247 2.0767575 0.0034851739 1 1 + 9550 234.64698 -16.583201 0.0034851739 1 1 + 9600 299.47817 24.526294 0.0034851739 1 1 + 9650 313.68135 -56.626926 0.0034851739 1 1 + 9700 315.35263 37.357037 0.0034851739 1 1 + 9750 329.98511 -37.326607 0.0034851739 1 1 + 9800 307.94446 -4.1409988 0.0034851739 1 1 + 9850 283.99269 20.593547 0.0034851739 1 1 + 9900 323.4633 42.61777 0.0034851739 1 1 + 9950 299.79118 -42.790286 0.0034851739 1 1 + 10000 290.40265 9.5959582 0.0034851739 1 1 +Loop time of 3.80414 on 1 procs for 10000 steps with 44 atoms + +Performance: 227.121 ns/day, 0.106 hours/ns, 2628.713 timesteps/s, 115.663 katom-step/s +99.4% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.11975 | 0.11975 | 0.11975 | 0.0 | 3.15 +Bond | 0.44934 | 0.44934 | 0.44934 | 0.0 | 11.81 +Kspace | 3.1574 | 3.1574 | 3.1574 | 0.0 | 83.00 +Neigh | 0.005484 | 0.005484 | 0.005484 | 0.0 | 0.14 +Comm | 0.0015713 | 0.0015713 | 0.0015713 | 0.0 | 0.04 +Output | 0.0014781 | 0.0014781 | 0.0014781 | 0.0 | 0.04 +Modify | 0.066315 | 0.066315 | 0.066315 | 0.0 | 1.74 +Other | | 0.002799 | | | 0.07 + +Nlocal: 44 ave 44 max 44 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 6 ave 6 max 6 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 876 ave 876 max 876 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 876 +Ave neighs/atom = 19.909091 +Ave special neighs/atom = 6.4090909 +Neighbor list builds = 242 +Dangerous builds = 0 + +# write_restart restart_longrun +# write_data restart_longrun.data +Total wall time: 0:00:03 diff --git a/examples/PACKAGES/reaction/tiny_nylon_wildcards/log.10Dec2025.tiny_nylon.stabilized.g++.4 b/examples/PACKAGES/reaction/tiny_nylon_wildcards/log.10Dec2025.tiny_nylon.stabilized.g++.4 new file mode 100644 index 00000000000..22afa27dd7a --- /dev/null +++ b/examples/PACKAGES/reaction/tiny_nylon_wildcards/log.10Dec2025.tiny_nylon.stabilized.g++.4 @@ -0,0 +1,449 @@ +LAMMPS (10 Dec 2025 - Development - patch_10Dec2025-120-ga51f9ba0e7-modified) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. + using 1 OpenMP thread(s) per MPI task +# two monomer nylon example +# reaction produces a condensed water molecule + +units real + +boundary p p p + +atom_style full + +kspace_style pppm 1.0e-4 + +pair_style lj/class2/coul/long 8.5 + +angle_style class2 + +bond_style class2 + +dihedral_style class2 + +improper_style class2 + +special_bonds lj/coul 0 0 1 +pair_modify tail yes mix sixthpower + +read_data tiny_nylon.data extra/bond/per/atom 5 extra/angle/per/atom 15 extra/dihedral/per/atom 15 extra/improper/per/atom 25 extra/special/per/atom 25 +Reading data file ... + orthogonal box = (-25 -25 -25) to (25 25 25) + 1 by 2 by 2 MPI processor grid + reading atom labelmap ... + reading bond labelmap ... + reading angle labelmap ... + reading dihedral labelmap ... + reading improper labelmap ... + reading atoms ... + 44 atoms + reading velocities ... + 44 velocities + scanning bonds ... + 9 = max bonds/atom + scanning angles ... + 21 = max angles/atom + scanning dihedrals ... + 29 = max dihedrals/atom + scanning impropers ... + 29 = max impropers/atom + orthogonal box = (-25 -25 -25) to (25 25 25) + 1 by 2 by 2 MPI processor grid + reading bonds ... + 42 bonds + reading angles ... + 74 angles + reading dihedrals ... + 100 dihedrals + reading impropers ... + 16 impropers +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 1 + special bond factors coul: 0 0 1 + 4 = max # of 1-2 neighbors + 6 = max # of 1-3 neighbors + 35 = max # of special neighbors + special bonds CPU = 0.000 seconds + read_data CPU = 0.007 seconds + +velocity all create 300.0 4928459 dist gaussian + +molecule mol1 rxn1_stp1_unreacted.json +Read molecule template mol1: +(no title) + 1 molecules + 0 fragments + 0 bodies + 18 atoms with max type 8 + 16 bonds with max type 8 + 25 angles with max type 25 + 23 dihedrals with max type 33 + 2 impropers with max type 3 +molecule mol2 rxn1_stp1_reacted.json +Read molecule template mol2: +(no title) + 1 molecules + 0 fragments + 0 bodies + 18 atoms with max type 9 + 17 bonds with max type 11 + 31 angles with max type 24 + 39 dihedrals with max type 30 + 0 impropers with max type 0 +molecule mol3 rxn1_stp2_unreacted.json +Read molecule template mol3: +(no title) + 1 molecules + 0 fragments + 0 bodies + 15 atoms with max type 9 + 14 bonds with max type 11 + 25 angles with max type 24 + 30 dihedrals with max type 30 + 0 impropers with max type 0 +molecule mol4 rxn1_stp2_reacted.json +Read molecule template mol4: +(no title) + 1 molecules + 0 fragments + 0 bodies + 15 atoms with max type 11 + 13 bonds with max type 13 + 19 angles with max type 26 + 16 dihedrals with max type 29 + 2 impropers with max type 5 + +thermo 50 + +# dump 1 all xyz 1 test_vis.xyz +# dump_modify 1 types labels + +fix myrxns all bond/react stabilization yes statted_grp .03 react rxn1 all 1 0.0 2.9 mol1 mol2 rxn1_stp1_map react rxn2 all 1 0.0 5.0 mol3 mol4 rxn1_stp2_map rescale_charges yes +WARNING: Fix bond/react: Atom affected by reaction rxn1 is too close to template edge (src/REACTION/fix_bond_react.cpp:2630) +WARNING: Fix bond/react: Atom affected by reaction rxn2 is too close to template edge (src/REACTION/fix_bond_react.cpp:2630) +dynamic group bond_react_MASTER_group defined +dynamic group statted_grp_REACT defined + +fix 1 statted_grp_REACT nvt temp 300 300 100 + +# optionally, you can customize behavior of reacting atoms, +# by using the internally-created 'bond_react_MASTER_group', like so: +fix 4 bond_react_MASTER_group temp/rescale 1 300 300 10 1 + +thermo_style custom step temp press density f_myrxns[*] +thermo_modify colname auto + +# restart 100 restart1 restart2 + +run 10000 + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Your simulation uses code contributions which should be cited: + +- Type Label Framework: https://doi.org/10.1021/acs.jpcb.3c08419 + +@Article{Gissinger24, + author = {Jacob R. Gissinger, Ilia Nikiforov, Yaser Afshar, Brendon Waters, Moon-ki Choi, Daniel S. Karls, Alexander Stukowski, Wonpil Im, Hendrik Heinz, Axel Kohlmeyer, and Ellad B. Tadmor}, + title = {Type Label Framework for Bonded Force Fields in LAMMPS}, + journal = {J. Phys. Chem. B}, + year = 2024, + volume = 128, + number = 13, + pages = {3282--3297} +} + +- fix bond/react: https://reacter.org, https://doi.org/10.1016/j.polymer.2017.09.038, https://doi.org/10.1021/acs.macromol.0c02012, https://doi.org/10.1016/j.cpc.2024.109287 + +@Article{Gissinger17, + author = {J. R. Gissinger and B. D. Jensen and K. E. Wise}, + title = {Modeling Chemical Reactions in Classical Molecular Dynamics Simulations}, + journal = {Polymer}, + year = 2017, + volume = 128, + pages = {211--217} +} + +@Article{Gissinger20, + author = {J. R. Gissinger, B. D. Jensen, K. E. Wise}, + title = {{REACTER}: A Heuristic Method for Reactive Molecular Dynamics}, + journal = {Macromolecules}, + year = 2020, + volume = 53, + number = 22, + pages = {9953--9961} +} + +@Article{Gissinger24, + author = {J. R. Gissinger, B. D. Jensen, K. E. Wise}, + title = {Molecular Modeling of Reactive Systems with REACTER}, + journal = {Computer Physics Communications}, + year = 2024, + volume = 304, + number = 109287 +} + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +PPPM initialization ... + using 12-bit tables for long-range coulomb + G vector (1/distance) = 0.23408048 + grid = 15 15 15 + stencil order = 5 + estimated absolute RMS force accuracy = 0.018627396 + estimated relative force accuracy = 5.6095851e-05 + using double precision KISS FFT + 3d grid and FFT values/proc = 3380 960 +Generated 55 of 55 mixed pair_coeff terms from sixthpower/sixthpower mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 10.5 + ghost atom cutoff = 10.5 + binsize = 5.25, bins = 10 10 10 + 2 neighbor lists, perpetual/occasional/extra = 1 1 0 + (1) pair lj/class2/coul/long, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard + (2) fix bond/react, occasional, copy from (1) + attributes: half, newton on + pair build: copy + stencil: none + bin: none +Per MPI rank memory allocation (min/avg/max) = 33.49 | 33.72 | 34.28 Mbytes + Step Temp Press Density f_myrxns:rxn1 f_myrxns:rxn2 + 0 300 357.25587 0.0034851739 0 0 + 50 323.13357 -36.901145 0.0034851739 1 0 + 100 303.51 11.102115 0.0034851739 1 1 + 150 332.31667 -25.20854 0.0034851739 1 1 + 200 278.87792 25.724788 0.0034851739 1 1 + 250 306.00815 -9.2221074 0.0034851739 1 1 + 300 254.72154 -5.7953243 0.0034851739 1 1 + 350 267.62849 23.758906 0.0034851739 1 1 + 400 320.81812 3.3741667 0.0034851739 1 1 + 450 376.12912 -10.240072 0.0034851739 1 1 + 500 409.47719 17.579329 0.0034851739 1 1 + 550 251.53858 -1.8557263 0.0034851739 1 1 + 600 237.09927 19.34288 0.0034851739 1 1 + 650 325.85267 12.350178 0.0034851739 1 1 + 700 281.35713 2.4348122 0.0034851739 1 1 + 750 348.96295 10.69943 0.0034851739 1 1 + 800 285.14402 -34.310534 0.0034851739 1 1 + 850 272.05347 -29.232749 0.0034851739 1 1 + 900 233.75445 25.081061 0.0034851739 1 1 + 950 270.83373 36.530225 0.0034851739 1 1 + 1000 226.39852 -25.096609 0.0034851739 1 1 + 1050 252.97684 -38.371559 0.0034851739 1 1 + 1100 298.6743 53.00207 0.0034851739 1 1 + 1150 291.35416 -0.58732762 0.0034851739 1 1 + 1200 338.55036 -12.606167 0.0034851739 1 1 + 1250 273.47409 2.6075067 0.0034851739 1 1 + 1300 238.32577 103.89005 0.0034851739 1 1 + 1350 289.72027 35.589704 0.0034851739 1 1 + 1400 308.55006 -14.264754 0.0034851739 1 1 + 1450 335.61777 -4.3227467 0.0034851739 1 1 + 1500 322.50612 17.455534 0.0034851739 1 1 + 1550 394.29818 9.2095587 0.0034851739 1 1 + 1600 381.18229 17.684515 0.0034851739 1 1 + 1650 335.99735 -48.364365 0.0034851739 1 1 + 1700 303.84569 -45.868295 0.0034851739 1 1 + 1750 320.31574 -11.511158 0.0034851739 1 1 + 1800 294.29633 -26.351136 0.0034851739 1 1 + 1850 279.75055 6.0763871 0.0034851739 1 1 + 1900 303.74279 -49.281254 0.0034851739 1 1 + 1950 290.97419 5.2283921 0.0034851739 1 1 + 2000 233.30717 2.14398 0.0034851739 1 1 + 2050 342.01536 48.425845 0.0034851739 1 1 + 2100 348.72835 -42.383834 0.0034851739 1 1 + 2150 336.02332 -6.2496255 0.0034851739 1 1 + 2200 334.42763 50.81371 0.0034851739 1 1 + 2250 317.27217 -8.1794166 0.0034851739 1 1 + 2300 316.88329 -6.5684312 0.0034851739 1 1 + 2350 314.09517 17.266892 0.0034851739 1 1 + 2400 302.40844 0.53558662 0.0034851739 1 1 + 2450 336.96229 35.681141 0.0034851739 1 1 + 2500 259.43054 8.8787634 0.0034851739 1 1 + 2550 348.89956 -9.2313871 0.0034851739 1 1 + 2600 327.77487 -5.8117921 0.0034851739 1 1 + 2650 341.94271 4.3187206 0.0034851739 1 1 + 2700 319.36614 -53.559459 0.0034851739 1 1 + 2750 300.45201 15.794909 0.0034851739 1 1 + 2800 310.18412 61.968091 0.0034851739 1 1 + 2850 356.66083 5.8473695 0.0034851739 1 1 + 2900 298.87875 17.062576 0.0034851739 1 1 + 2950 234.83827 0.011478315 0.0034851739 1 1 + 3000 255.72021 -24.955859 0.0034851739 1 1 + 3050 261.05671 6.732158 0.0034851739 1 1 + 3100 301.20955 24.53772 0.0034851739 1 1 + 3150 347.86946 -6.4628487 0.0034851739 1 1 + 3200 360.92312 -10.270019 0.0034851739 1 1 + 3250 314.90454 -67.580652 0.0034851739 1 1 + 3300 364.99912 32.617637 0.0034851739 1 1 + 3350 343.26776 -7.6851103 0.0034851739 1 1 + 3400 321.33638 -58.879645 0.0034851739 1 1 + 3450 279.51567 -9.7718499 0.0034851739 1 1 + 3500 227.74826 -31.715622 0.0034851739 1 1 + 3550 263.33395 40.827777 0.0034851739 1 1 + 3600 269.59956 -38.697214 0.0034851739 1 1 + 3650 291.96922 -29.580877 0.0034851739 1 1 + 3700 303.13102 -0.018201864 0.0034851739 1 1 + 3750 352.31481 -63.482684 0.0034851739 1 1 + 3800 295.03656 0.89582187 0.0034851739 1 1 + 3850 302.79362 8.7511608 0.0034851739 1 1 + 3900 272.75681 0.49698704 0.0034851739 1 1 + 3950 276.27495 7.6663447 0.0034851739 1 1 + 4000 233.8973 23.040335 0.0034851739 1 1 + 4050 281.12439 -42.01751 0.0034851739 1 1 + 4100 265.13059 16.155662 0.0034851739 1 1 + 4150 298.00657 29.721948 0.0034851739 1 1 + 4200 329.08689 -24.747356 0.0034851739 1 1 + 4250 321.90673 -5.221281 0.0034851739 1 1 + 4300 337.98416 8.5210055 0.0034851739 1 1 + 4350 300.85278 -27.200192 0.0034851739 1 1 + 4400 230.3635 -20.700954 0.0034851739 1 1 + 4450 275.54429 13.023287 0.0034851739 1 1 + 4500 306.13381 -21.191264 0.0034851739 1 1 + 4550 306.1504 -2.657042 0.0034851739 1 1 + 4600 341.25401 35.059044 0.0034851739 1 1 + 4650 359.22107 -27.61101 0.0034851739 1 1 + 4700 313.55036 -5.2086023 0.0034851739 1 1 + 4750 288.2812 49.909094 0.0034851739 1 1 + 4800 298.17232 5.7234038 0.0034851739 1 1 + 4850 256.1951 -79.42617 0.0034851739 1 1 + 4900 234.48084 69.62547 0.0034851739 1 1 + 4950 269.90503 -6.4165828 0.0034851739 1 1 + 5000 350.99397 40.598777 0.0034851739 1 1 + 5050 319.33612 -1.1883368 0.0034851739 1 1 + 5100 354.42383 0.73360221 0.0034851739 1 1 + 5150 326.20748 28.873951 0.0034851739 1 1 + 5200 338.81105 8.9061462 0.0034851739 1 1 + 5250 334.86171 3.4358714 0.0034851739 1 1 + 5300 298.76104 41.006518 0.0034851739 1 1 + 5350 251.28354 32.804747 0.0034851739 1 1 + 5400 297.96019 16.420226 0.0034851739 1 1 + 5450 257.69136 27.643858 0.0034851739 1 1 + 5500 281.53877 -19.802987 0.0034851739 1 1 + 5550 316.86241 29.360565 0.0034851739 1 1 + 5600 333.00265 8.3184564 0.0034851739 1 1 + 5650 331.66339 -9.2204992 0.0034851739 1 1 + 5700 344.72494 8.3825773 0.0034851739 1 1 + 5750 336.95916 -62.14119 0.0034851739 1 1 + 5800 349.2364 -6.2073021 0.0034851739 1 1 + 5850 286.19116 -24.769794 0.0034851739 1 1 + 5900 293.18267 -16.577457 0.0034851739 1 1 + 5950 303.66858 27.73992 0.0034851739 1 1 + 6000 306.18599 -45.264957 0.0034851739 1 1 + 6050 350.36539 -34.300224 0.0034851739 1 1 + 6100 293.08904 43.428974 0.0034851739 1 1 + 6150 338.78789 -1.6127526 0.0034851739 1 1 + 6200 266.81285 -6.9547907 0.0034851739 1 1 + 6250 302.09334 -2.7802802 0.0034851739 1 1 + 6300 295.03054 -12.331247 0.0034851739 1 1 + 6350 253.47153 14.246817 0.0034851739 1 1 + 6400 231.28789 0.32901119 0.0034851739 1 1 + 6450 271.27272 -54.235953 0.0034851739 1 1 + 6500 315.04645 -42.196648 0.0034851739 1 1 + 6550 330.60481 30.307025 0.0034851739 1 1 + 6600 320.98992 -28.743816 0.0034851739 1 1 + 6650 311.66421 -16.648914 0.0034851739 1 1 + 6700 300.60892 -22.572672 0.0034851739 1 1 + 6750 324.32174 -19.310172 0.0034851739 1 1 + 6800 297.68989 -16.093886 0.0034851739 1 1 + 6850 225.0828 29.29338 0.0034851739 1 1 + 6900 267.90034 -12.372584 0.0034851739 1 1 + 6950 245.79261 -42.881342 0.0034851739 1 1 + 7000 267.62549 58.922777 0.0034851739 1 1 + 7050 323.577 -18.38004 0.0034851739 1 1 + 7100 309.68104 -95.377822 0.0034851739 1 1 + 7150 332.28546 48.537101 0.0034851739 1 1 + 7200 349.83139 15.219649 0.0034851739 1 1 + 7250 325.55181 -41.249495 0.0034851739 1 1 + 7300 335.59076 17.706127 0.0034851739 1 1 + 7350 250.05804 32.22358 0.0034851739 1 1 + 7400 243.53926 24.755601 0.0034851739 1 1 + 7450 257.25541 -8.4391308 0.0034851739 1 1 + 7500 286.82596 -23.013062 0.0034851739 1 1 + 7550 264.88657 26.041569 0.0034851739 1 1 + 7600 285.33992 56.915984 0.0034851739 1 1 + 7650 317.10869 -53.762929 0.0034851739 1 1 + 7700 274.03399 -19.368253 0.0034851739 1 1 + 7750 278.77732 9.0740867 0.0034851739 1 1 + 7800 251.09437 23.963052 0.0034851739 1 1 + 7850 312.96586 0.68606531 0.0034851739 1 1 + 7900 272.57586 -16.82951 0.0034851739 1 1 + 7950 284.09348 2.0393754 0.0034851739 1 1 + 8000 297.93713 2.9073607 0.0034851739 1 1 + 8050 232.14368 -5.8999336 0.0034851739 1 1 + 8100 239.17712 -48.143457 0.0034851739 1 1 + 8150 281.52221 18.509439 0.0034851739 1 1 + 8200 293.08621 17.448713 0.0034851739 1 1 + 8250 294.74715 -34.751866 0.0034851739 1 1 + 8300 375.10348 -12.616628 0.0034851739 1 1 + 8350 296.77171 -28.951003 0.0034851739 1 1 + 8400 328.74999 -15.981702 0.0034851739 1 1 + 8450 347.02027 5.1750774 0.0034851739 1 1 + 8500 236.88904 59.341387 0.0034851739 1 1 + 8550 296.86734 -7.9510325 0.0034851739 1 1 + 8600 286.27144 54.121588 0.0034851739 1 1 + 8650 261.56411 27.022605 0.0034851739 1 1 + 8700 225.62856 -73.329643 0.0034851739 1 1 + 8750 268.25581 -30.45963 0.0034851739 1 1 + 8800 210.13484 49.847057 0.0034851739 1 1 + 8850 293.60544 47.320396 0.0034851739 1 1 + 8900 324.86781 -53.367836 0.0034851739 1 1 + 8950 386.26415 10.666845 0.0034851739 1 1 + 9000 320.21521 -40.989701 0.0034851739 1 1 + 9050 327.04554 -4.727706 0.0034851739 1 1 + 9100 279.63775 75.132034 0.0034851739 1 1 + 9150 299.20962 30.916634 0.0034851739 1 1 + 9200 249.44089 -4.8675917 0.0034851739 1 1 + 9250 325.92179 -8.7644595 0.0034851739 1 1 + 9300 228.532 -18.595612 0.0034851739 1 1 + 9350 296.48345 23.397966 0.0034851739 1 1 + 9400 246.75044 -39.651194 0.0034851739 1 1 + 9450 261.86878 5.8508137 0.0034851739 1 1 + 9500 341.58406 19.801719 0.0034851739 1 1 + 9550 350.96696 -16.243021 0.0034851739 1 1 + 9600 366.30949 3.3855035 0.0034851739 1 1 + 9650 321.26751 30.515937 0.0034851739 1 1 + 9700 351.86405 -21.004306 0.0034851739 1 1 + 9750 286.96073 -46.078369 0.0034851739 1 1 + 9800 247.41785 9.7089291 0.0034851739 1 1 + 9850 248.92427 -19.059663 0.0034851739 1 1 + 9900 240.6546 19.699102 0.0034851739 1 1 + 9950 251.56896 -59.269143 0.0034851739 1 1 + 10000 315.94702 -34.596575 0.0034851739 1 1 +Loop time of 1.93577 on 4 procs for 10000 steps with 44 atoms + +Performance: 446.333 ns/day, 0.054 hours/ns, 5165.891 timesteps/s, 227.299 katom-step/s +99.6% 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.00076683 | 0.036537 | 0.11533 | 24.6 | 1.89 +Bond | 0.0015764 | 0.11501 | 0.40108 | 49.1 | 5.94 +Kspace | 1.199 | 1.5232 | 1.655 | 15.3 | 78.69 +Neigh | 0.0050085 | 0.0050238 | 0.0050385 | 0.0 | 0.26 +Comm | 0.012915 | 0.021003 | 0.039155 | 7.4 | 1.08 +Output | 0.0011574 | 0.0014466 | 0.002267 | 1.2 | 0.07 +Modify | 0.18935 | 0.22754 | 0.25398 | 5.7 | 11.75 +Other | | 0.005981 | | | 0.31 + +Nlocal: 11 ave 44 max 0 min +Histogram: 3 0 0 0 0 0 0 0 0 1 +Nghost: 18 ave 44 max 0 min +Histogram: 1 0 0 2 0 0 0 0 0 1 +Neighs: 226.75 ave 907 max 0 min +Histogram: 3 0 0 0 0 0 0 0 0 1 + +Total # of neighbors = 907 +Ave neighs/atom = 20.613636 +Ave special neighs/atom = 6.4090909 +Neighbor list builds = 249 +Dangerous builds = 0 + +# write_restart restart_longrun +# write_data restart_longrun.data +Total wall time: 0:00:01 diff --git a/examples/PACKAGES/reaction/tiny_nylon_wildcards/rxn1_stp1_map b/examples/PACKAGES/reaction/tiny_nylon_wildcards/rxn1_stp1_map new file mode 100644 index 00000000000..292cf4f9a29 --- /dev/null +++ b/examples/PACKAGES/reaction/tiny_nylon_wildcards/rxn1_stp1_map @@ -0,0 +1,55 @@ +this is a nominal superimpose file + +2 edgeIDs +18 equivalences +16 wildcards + +InitiatorIDs + +10 +1 + +EdgeIDs + +16 +8 + +Wildcards + +2 +3 +4 +5 +6 +7 +8 +9 +11 +12 +13 +14 +15 +16 +17 +18 + +Equivalences + +1 1 +2 2 +3 3 +4 4 +5 5 +6 6 +7 7 +8 8 +9 9 +10 10 +11 11 +12 12 +13 13 +14 14 +15 15 +16 16 +17 17 +18 18 diff --git a/examples/PACKAGES/reaction/tiny_nylon_wildcards/rxn1_stp1_reacted.json b/examples/PACKAGES/reaction/tiny_nylon_wildcards/rxn1_stp1_reacted.json new file mode 100644 index 00000000000..f8b1ed0ef18 --- /dev/null +++ b/examples/PACKAGES/reaction/tiny_nylon_wildcards/rxn1_stp1_reacted.json @@ -0,0 +1,177 @@ +{ + "application": "LAMMPS", + "format": "molecule", + "revision": 1, + "schema": "https://download.lammps.org/json/molecule-schema.json", + "coords": { + "format": ["atom-id", "x", "y", "z"], + "data": [ + [1, -5.522237178, -0.752722499, 1.631158408], + [2, -5.170398325, -0.545733378, 0.178129978], + [3, -6.469694974, -0.553071841, -0.648889109], + [4, -6.052075697, -1.721152483, 1.744647858], + [5, -6.183058842, 0.071386755, 1.971497329], + [6, -4.489339595, -1.389196844, -0.173156276], + [7, -4.637590712, 0.453703382, 0.051251954], + [8, -5.618657658, 0.13891881, 4.386106928], + [9, -4.669491736, -0.989818781, 3.943591338], + [10, -4.270193542, -0.766405234, 2.474102239], + [11, -3.348470373, -1.875393291, 2.024289246], + [12, -3.569793683, 0.564183226, 2.345995471], + [13, -5.201078949, -1.993301389, 4.044218837], + [14, -3.736681607, -0.984819193, 4.598304847], + [15, -4.255401979, 1.370923174, 2.679069013], + [16, -6.136393628, -0.339866195, -2.13677499], + [17, -6.996331494, -1.555519161, -0.517408063], + [18, -7.153308038, 0.284949373, -0.289930394] + ] + }, + "types": { + "format": ["atom-id", "type"], + "data": [ + [1, "n"], + [2, "c2"], + [3, "c2"], + [4, "hn"], + [5, "hn"], + [6, "hc"], + [7, "hc"], + [8, "c2"], + [9, "c2"], + [10, "c_1"], + [11, "o_1"], + [12, "o"], + [13, "hc"], + [14, "hc"], + [15, "ho"], + [16, "c2"], + [17, "hc"], + [18, "hc"] + ] + }, + "molecules": { + "format": ["atom-id", "molecule-id"], + "data": [ + [1, 1], + [2, 1], + [3, 1], + [4, 1], + [5, 1], + [6, 1], + [7, 1], + [8, 1], + [9, 1], + [10, 1], + [11, 1], + [12, 1], + [13, 1], + [14, 1], + [15, 1], + [16, 1], + [17, 1], + [18, 1] + ] + }, + "bonds": { + "format": ["bond-type", "atom1", "atom2"], + "data": [ + ["n-c2", 1, 2], + ["n-hn", 1, 4], + ["n-hn", 1, 5], + ["n-c_1", 1, 10], + ["c2-c2", 2, 3], + ["c2-hc", 2, 6], + ["c2-hc", 2, 7], + ["c2-c2", 3, 16], + ["c2-hc", 3, 17], + [ "c2-hc", 3, 18], + [ "c2-c2", 8, 9], + [ "c2-c_1", 9, 10], + [ "c2-hc", 9, 13], + [ "c2-hc", 9, 14], + [ "c_1-o_1", 10, 11], + [ "c_1-o", 10, 12], + [ "o-ho", 12, 15] + ] + }, + "angles": { + "format": ["angle-type", "atom1", "atom2", "atom3"], + "data": [ + ["c2-n-hn", 2, 1, 4], + ["c2-n-hn", 2, 1, 5], + ["c2-n-c_1", 2, 1, 10], + ["hn-n-hn", 4, 1, 5], + ["hn-n-c_1", 4, 1, 10], + ["hn-n-c_1", 5, 1, 10], + ["n-c2-c2", 1, 2, 3], + ["n-c2-hc", 1, 2, 6], + ["n-c2-hc", 1, 2, 7], + [ "c2-c2-hc", 3, 2, 6], + [ "c2-c2-hc", 3, 2, 7], + [ "hc-c2-hc", 6, 2, 7], + [ "c2-c2-c2", 2, 3, 16], + [ "c2-c2-hc", 2, 3, 17], + [ "c2-c2-hc", 2, 3, 18], + [ "c2-c2-hc", 16, 3, 17], + [ "c2-c2-hc", 16, 3, 18], + [ "hc-c2-hc", 17, 3, 18], + [ "c2-c2-c_1", 8, 9, 10], + [ "c2-c2-hc", 8, 9, 13], + [ "c2-c2-hc", 8, 9, 14], + [ "hc-c2-c_1", 13, 9, 10], + [ "hc-c2-c_1", 14, 9, 10], + [ "hc-c2-hc", 13, 9, 14], + [ "c2-c_1-o_1", 9, 10, 11], + [ "c2-c_1-o", 9, 10, 12], + [ "n-c_1-c2", 1, 10, 9], + [ "o_1-c_1-o", 11, 10, 12], + [ "n-c_1-o_1", 1, 10, 11], + [ "n-c_1-o", 1, 10, 12], + [ "c_1-o-ho", 10, 12, 15] + ] + }, + "dihedrals": { + "format": ["dihedral-type", "atom1", "atom2", "atom3", "atom4"], + "data": [ + ["hn-n-c2-c2", 4, 1, 2, 3], + ["hn-n-c2-hc", 4, 1, 2, 6], + ["hn-n-c2-hc", 4, 1, 2, 7], + ["hn-n-c2-c2", 5, 1, 2, 3], + ["hn-n-c2-hc", 5, 1, 2, 6], + ["hn-n-c2-hc", 5, 1, 2, 7], + ["c_1-n-c2-c2", 10, 1, 2, 3], + ["c_1-n-c2-hc", 10, 1, 2, 6], + ["c_1-n-c2-hc", 10, 1, 2, 7], + [ "c2-n-c_1-c2", 2, 1, 10, 9], + [ "c2-n-c_1-o_1", 2, 1, 10, 11], + [ "c2-n-c_1-o", 2, 1, 10, 12], + [ "hn-n-c_1-c2", 4, 1, 10, 9], + [ "hn-n-c_1-o_1", 4, 1, 10, 11], + [ "hn-n-c_1-o", 4, 1, 10, 12], + [ "hn-n-c_1-c2", 5, 1, 10, 9], + [ "hn-n-c_1-o_1", 5, 1, 10, 11], + [ "hn-n-c_1-o", 5, 1, 10, 12], + [ "n-c2-c2-c2", 1, 2, 3, 16], + [ "n-c2-c2-hc", 1, 2, 3, 17], + [ "n-c2-c2-hc", 1, 2, 3, 18], + [ "c2-c2-c2-hc", 16, 3, 2, 6], + [ "hc-c2-c2-hc", 6, 2, 3, 17], + [ "hc-c2-c2-hc", 6, 2, 3, 18], + [ "c2-c2-c2-hc", 16, 3, 2, 7], + [ "hc-c2-c2-hc", 7, 2, 3, 17], + [ "hc-c2-c2-hc", 7, 2, 3, 18], + [ "c2-c2-c_1-o_1", 8, 9, 10, 11], + [ "c2-c2-c_1-o", 8, 9, 10, 12], + [ "c2-c2-c_1-n", 8, 9, 10, 1], + [ "hc-c2-c_1-o_1", 13, 9, 10, 11], + [ "hc-c2-c_1-o", 13, 9, 10, 12], + [ "hc-c2-c_1-n", 13, 9, 10, 1], + [ "hc-c2-c_1-o_1", 14, 9, 10, 11], + [ "hc-c2-c_1-o", 14, 9, 10, 12], + [ "hc-c2-c_1-n", 14, 9, 10, 1], + [ "c2-c_1-o-ho", 9, 10, 12, 15], + [ "o_1-c_1-o-ho", 11, 10, 12, 15], + [ "n-c_1-o-ho", 1, 10, 12, 15] + ] + } +} diff --git a/examples/PACKAGES/reaction/tiny_nylon_wildcards/rxn1_stp1_unreacted.json b/examples/PACKAGES/reaction/tiny_nylon_wildcards/rxn1_stp1_unreacted.json new file mode 100644 index 00000000000..be909ee2174 --- /dev/null +++ b/examples/PACKAGES/reaction/tiny_nylon_wildcards/rxn1_stp1_unreacted.json @@ -0,0 +1,184 @@ +{ + "application": "LAMMPS", + "format": "molecule", + "revision": 1, + "schema": "https://download.lammps.org/json/molecule-schema.json", + "coords": { + "format": ["atom-id", "x", "y", "z"], + "data": [ + [1, -4.922858499, -0.946981747, 1.146055346], + [2, -5.047194816, -0.935266843, -0.358172771], + [3, -6.526281447, -0.755365854, -0.743523227], + [4, -5.282604074, 0.020446894, 1.552710361], + [5, -3.860696509, -1.09585019, 1.428304925], + [6, -4.662381862, -1.920899862, -0.781524026], + [7, -4.43397654, -0.072765142, -0.784070641], + [8, -5.506279186, 0.202610302, 4.825815562], + [9, -4.449176624, -0.844592213, 4.423366146], + [10, -4.103915981, -0.749628655, 2.925195217], + [11, -3.376248536, -1.886171498, 2.245643443], + [12, -4.49323543, 0.477213651, 2.137199034], + [13, -4.849052953, -1.888876753, 4.66399375], + [14, -3.49182295, -0.66291331, 5.018510248], + [15, -5.020776528, 1.189745133, 2.805427194], + [16, -3.964987378, 2.900602044, -1.55134117], + [17, -4.460693773, 2.836101897, 0.668881952], + [18, -4.828494, 3.219655862, -0.122111278] + ] + }, + "types": { + "format": ["atom-id", "type"], + "data": [ + [1, "na"], + [2, "c2"], + [3, "c2"], + [4, "hn"], + [5, "hn"], + [6, "hc"], + [7, "hc"], + [8, "c2"], + [9, "c2"], + [10, "c_1"], + [11, "o_1"], + [12, "o"], + [13, "hc"], + [14, "hc"], + [15, "ho"], + [16, "c2"], + [17, "hc"], + [18, "hc"] + ] + }, + "molecules": { + "format": ["atom-id", "molecule-id"], + "data": [ + [1, 1], + [2, 1], + [3, 1], + [4, 1], + [5, 1], + [6, 1], + [7, 1], + [8, 1], + [9, 1], + [10, 1], + [11, 1], + [12, 1], + [13, 1], + [14, 1], + [15, 1], + [16, 1], + [17, 1], + [18, 1] + ] + }, + "bonds": { + "format": ["bond-type", "atom1", "atom2"], + "data": [ + ["na-c2", 1, 2], + ["na-hn", 1, 4], + ["na-hn", 1, 5], + ["c2-c2", 2, 3], + ["c2-hc", 2, 6], + ["c2-hc", 2, 7], + ["c2-c2", 3, 16], + ["c2-hc", 3, 17], + ["c2-hc", 3, 18], + [ "c2-c2", 8, 9], + [ "c2-c_1", 9, 10], + [ "c2-hc", 9, 13], + [ "c2-hc", 9, 14], + [ "c_1-o_1", 10, 11], + [ "c_1-o", 10, 12], + [ "o-ho", 12, 15] + ] + }, + "angles": { + "format": ["angle-type", "atom1", "atom2", "atom3"], + "data": [ + ["c2-na-hn", 2, 1, 4], + ["c2-na-hn", 2, 1, 5], + ["hn-na-hn", 4, 1, 5], + ["na-c2-c2", 1, 2, 3], + ["na-c2-hc", 1, 2, 6], + ["na-c2-hc", 1, 2, 7], + ["c2-c2-hc", 3, 2, 6], + ["c2-c2-hc", 3, 2, 7], + ["hc-c2-hc", 6, 2, 7], + [ "c2-c2-c2", 2, 3, 16], + [ "c2-c2-hc", 2, 3, 17], + [ "c2-c2-hc", 2, 3, 18], + [ "c2-c2-hc", 16, 3, 17], + [ "c2-c2-hc", 16, 3, 18], + [ "hc-c2-hc", 17, 3, 18], + [ "c2-c2-c_1", 8, 9, 10], + [ "c2-c2-hc", 8, 9, 13], + [ "c2-c2-hc", 8, 9, 14], + [ "hc-c2-c_1", 13, 9, 10], + [ "hc-c2-c_1", 14, 9, 10], + [ "hc-c2-hc", 13, 9, 14], + [ "c2-c_1-o_1", 9, 10, 11], + [ "c2-c_1-o", 9, 10, 12], + [ "o_1-c_1-o", 11, 10, 12], + [ "c_1-o-ho", 10, 12, 15] + ] + }, + "dihedrals": { + "format": ["dihedral-type", "atom1", "atom2", "atom3", "atom4"], + "data": [ + ["hn-na-c2-c2", 4, 1, 2, 3], + ["hn-na-c2-hc", 4, 1, 2, 6], + ["hn-na-c2-hc", 4, 1, 2, 7], + ["hn-na-c2-c2", 5, 1, 2, 3], + ["hn-na-c2-hc", 5, 1, 2, 6], + ["hn-na-c2-hc", 5, 1, 2, 7], + ["na-c2-c2-c2", 1, 2, 3, 16], + ["na-c2-c2-hc", 1, 2, 3, 17], + ["na-c2-c2-hc", 1, 2, 3, 18], + [ "c2-c2-c2-hc", 16, 3, 2, 6], + [ "hc-c2-c2-hc", 6, 2, 3, 17], + [ "hc-c2-c2-hc", 6, 2, 3, 18], + [ "c2-c2-c2-hc", 16, 3, 2, 7], + [ "hc-c2-c2-hc", 7, 2, 3, 17], + [ "hc-c2-c2-hc", 7, 2, 3, 18], + [ "c2-c2-c_1-o_1", 8, 9, 10, 11], + [ "c2-c2-c_1-o", 8, 9, 10, 12], + [ "hc-c2-c_1-o_1", 13, 9, 10, 11], + [ "hc-c2-c_1-o", 13, 9, 10, 12], + [ "hc-c2-c_1-o_1", 14, 9, 10, 11], + [ "hc-c2-c_1-o", 14, 9, 10, 12], + [ "c2-c_1-o-ho", 9, 10, 12, 15], + [ "o_1-c_1-o-ho", 11, 10, 12, 15] + ] + }, + "charges": { + "format": ["atom-id", "charge"], + "data": [ + [1, -0.3], + [2, 0.0], + [3, 0.0], + [4, 0.0], + [5, 0.0], + [6, 0.0], + [7, 0.0], + [8, 0.0], + [9, 0.0], + [10, 0.3], + [11, 0.0], + [12, 0.0], + [13, 0.0], + [14, 0.0], + [15, 0.0], + [16, 0.0], + [17, 0.0], + [18, 0.0] + ] + }, + "impropers": { + "format": [ "improper-type", "atom1", "atom2", "atom3", "atom4"], + "data": [ + [ "c2-na-hn-hn", 2, 1, 4, 5], + [ "c2-c_1-o_1-o", 9, 10, 11, 12] + ] + } +} diff --git a/examples/PACKAGES/reaction/tiny_nylon_wildcards/rxn1_stp2_map b/examples/PACKAGES/reaction/tiny_nylon_wildcards/rxn1_stp2_map new file mode 100644 index 00000000000..b965785069f --- /dev/null +++ b/examples/PACKAGES/reaction/tiny_nylon_wildcards/rxn1_stp2_map @@ -0,0 +1,48 @@ +this is a nominal superimpose file + +2 edgeIDs +15 equivalences +12 wildcards + +InitiatorIDs + +4 +12 + +EdgeIDs + +8 +3 + +Wildcards + +1 +2 +3 +5 +6 +7 +8 +9 +10 +11 +13 +14 + +Equivalences + +1 1 +2 2 +3 3 +4 4 +5 5 +6 6 +7 7 +8 8 +9 9 +10 10 +11 11 +12 12 +13 13 +14 14 +15 15 diff --git a/examples/PACKAGES/reaction/tiny_nylon_wildcards/rxn1_stp2_reacted.json b/examples/PACKAGES/reaction/tiny_nylon_wildcards/rxn1_stp2_reacted.json new file mode 100644 index 00000000000..8d8979675ac --- /dev/null +++ b/examples/PACKAGES/reaction/tiny_nylon_wildcards/rxn1_stp2_reacted.json @@ -0,0 +1,156 @@ +{ + "application": "LAMMPS", + "format": "molecule", + "revision": 1, + "schema": "https://download.lammps.org/json/molecule-schema.json", + "coords": { + "format": ["atom-id", "x", "y", "z"], + "data": [ + [1, -4.856280281, -1.050467974, 1.432625159], + [2, -5.047194816, -0.935266843, -0.358172771], + [3, -6.526281447, -0.755365854, -0.743523227], + [4, -5.282604074, 0.020446894, 1.552710361], + [5, -3.860696509, -1.09585019, 1.428304925], + [6, -4.662381862, -1.920899862, -0.781524026], + [7, -4.43397654, -0.072765142, -0.784070641], + [8, -5.506279186, 0.202610302, 4.825815562], + [9, -4.449176624, -0.844592213, 4.423366146], + [10, -4.103915981, -0.749628655, 2.925195217], + [11, -3.376248536, -1.886171498, 2.245643443], + [12, -4.49323543, 0.477213651, 2.137199034], + [13, -4.849052953, -1.888876753, 4.66399375], + [14, -3.49182295, -0.66291331, 5.018510248], + [15, -5.020776528, 1.189745133, 2.805427194] + ] + }, + "types": { + "format": ["atom-id", "type"], + "data": [ + [1, "n"], + [2, "c2"], + [3, "c2"], + [4, "hw"], + [5, "hn"], + [6, "hc"], + [7, "hc"], + [8, "c2"], + [9, "c2"], + [10, "c_1"], + [11, "o_1"], + [12, "o*"], + [13, "hc"], + [14, "hc"], + [15, "hw"] + ] + }, + "molecules": { + "format": ["atom-id", "molecule-id"], + "data": [ + [1, 1], + [2, 1], + [3, 1], + [4, 1], + [5, 1], + [6, 1], + [7, 1], + [8, 1], + [9, 1], + [10, 1], + [11, 1], + [12, 1], + [13, 1], + [14, 1], + [15, 1] + ] + }, + "bonds": { + "format": ["bond-type", "atom1", "atom2"], + "data": [ + ["n-c2", 1, 2], + ["n-hn", 1, 5], + ["n-c_1", 1, 10], + ["c2-c2", 2, 3], + ["c2-hc", 2, 6], + ["c2-hc", 2, 7], + ["hw-o*", 4, 12], + ["c2-c2", 8, 9], + ["c2-c_1", 9, 10], + [ "c2-hc", 9, 13], + [ "c2-hc", 9, 14], + [ "c_1-o_1", 10, 11], + [ "hw-o*", 15, 12] + ] + }, + "angles": { + "format": ["angle-type", "atom1", "atom2", "atom3"], + "data": [ + ["c2-n-hn", 2, 1, 5], + ["c2-n-c_1", 2, 1, 10], + ["hn-n-c_1", 5, 1, 10], + ["n-c2-c2", 1, 2, 3], + ["n-c2-hc", 1, 2, 6], + ["n-c2-hc", 1, 2, 7], + ["c2-c2-hc", 3, 2, 6], + ["c2-c2-hc", 3, 2, 7], + ["hc-c2-hc", 6, 2, 7], + [ "c2-c2-c_1", 8, 9, 10], + [ "c2-c2-hc", 8, 9, 13], + [ "c2-c2-hc", 8, 9, 14], + [ "hc-c2-c_1", 13, 9, 10], + [ "hc-c2-c_1", 14, 9, 10], + [ "hc-c2-hc", 13, 9, 14], + [ "c2-c_1-o_1", 9, 10, 11], + [ "n-c_1-c2", 1, 10, 9], + [ "n-c_1-o_1", 1, 10, 11], + [ "hw-o*-hw", 15, 12, 4] + ] + }, + "dihedrals": { + "format": ["dihedral-type", "atom1", "atom2", "atom3", "atom4"], + "data": [ + ["hn-n-c2-c2", 5, 1, 2, 3], + ["hn-n-c2-hc", 5, 1, 2, 6], + ["hn-n-c2-hc", 5, 1, 2, 7], + ["c_1-n-c2-c2", 10, 1, 2, 3], + ["c_1-n-c2-hc", 10, 1, 2, 6], + ["c_1-n-c2-hc", 10, 1, 2, 7], + ["c2-n-c_1-c2", 2, 1, 10, 9], + ["c2-n-c_1-o_1", 2, 1, 10, 11], + ["hn-n-c_1-c2", 5, 1, 10, 9], + [ "hn-n-c_1-o_1", 5, 1, 10, 11], + [ "c2-c2-c_1-o_1", 8, 9, 10, 11], + [ "c2-c2-c_1-n", 8, 9, 10, 1], + [ "hc-c2-c_1-o_1", 13, 9, 10, 11], + [ "hc-c2-c_1-n", 13, 9, 10, 1], + [ "hc-c2-c_1-o_1", 14, 9, 10, 11], + [ "hc-c2-c_1-n", 14, 9, 10, 1] + ] + }, + "charges": { + "format": ["atom-id", "charge"], + "data": [ + [1, -0.60533], + [2, -0.01149], + [3, -0.76306], + [4, 0.38], + [5, 0.29346], + [6, 0.1836], + [7, 0.15396], + [8, -0.72636], + [9, -0.27437], + [10, 0.40603], + [11, -0.6553], + [12, -0.76], + [13, 0.21423], + [14, 0.18949], + [15, 0.38] + ] + }, + "impropers": { + "format": ["improper-type", "atom1", "atom2", "atom3", "atom4"], + "data": [ + ["c2-n-hn-c_1", 2, 1, 5, 10], + ["n-c_1-c2-o_1", 1, 10, 9, 11] + ] + } +} diff --git a/examples/PACKAGES/reaction/tiny_nylon_wildcards/rxn1_stp2_unreacted.json b/examples/PACKAGES/reaction/tiny_nylon_wildcards/rxn1_stp2_unreacted.json new file mode 100644 index 00000000000..1d7acaaedf4 --- /dev/null +++ b/examples/PACKAGES/reaction/tiny_nylon_wildcards/rxn1_stp2_unreacted.json @@ -0,0 +1,170 @@ +{ + "application": "LAMMPS", + "format": "molecule", + "revision": 1, + "schema": "https://download.lammps.org/json/molecule-schema.json", + "coords": { + "format": ["atom-id", "x", "y", "z"], + "data": [ + [1, -4.922858499, -0.946981747, 1.146055346], + [2, -5.047194816, -0.935266843, -0.358172771], + [3, -6.526281447, -0.755365854, -0.743523227], + [4, -5.282604074, 0.020446894, 1.552710361], + [5, -3.860696509, -1.09585019, 1.428304925], + [6, -4.662381862, -1.920899862, -0.781524026], + [7, -4.43397654, -0.072765142, -0.784070641], + [8, -5.506279186, 0.202610302, 4.825815562], + [9, -4.449176624, -0.844592213, 4.423366146], + [10, -4.103915981, -0.749628655, 2.925195217], + [11, -3.376248536, -1.886171498, 2.245643443], + [12, -4.49323543, 0.477213651, 2.137199034], + [13, -4.849052953, -1.888876753, 4.66399375], + [14, -3.49182295, -0.66291331, 5.018510248], + [15, -5.020776528, 1.189745133, 2.805427194] + ] + }, + "types": { + "format": ["atom-id", "type"], + "data": [ + [1, "n"], + [2, "c2"], + [3, "c2"], + [4, "hn"], + [5, "hn"], + [6, "hc"], + [7, "hc"], + [8, "c2"], + [9, "c2"], + [10, "c_1"], + [11, "o_1"], + [12, "o"], + [13, "hc"], + [14, "hc"], + [15, "ho"] + ] + }, + "molecules": { + "format": ["atom-id", "molecule-id"], + "data": [ + [1, 1], + [2, 1], + [3, 1], + [4, 1], + [5, 1], + [6, 1], + [7, 1], + [8, 1], + [9, 1], + [10, 1], + [11, 1], + [12, 1], + [13, 1], + [14, 1], + [15, 1] + ] + }, + "bonds": { + "format": ["bond-type", "atom1", "atom2"], + "data": [ + ["n-c2", 1, 2], + ["n-hn", 1, 4], + ["n-hn", 1, 5], + ["n-c_1", 1, 10], + ["c2-c2", 2, 3], + ["c2-hc", 2, 6], + ["c2-hc", 2, 7], + ["c2-c2", 8, 9], + ["c2-c_1", 9, 10], + ["c2-hc", 9, 13], + ["c2-hc", 9, 14], + ["c_1-o_1", 10, 11], + ["c_1-o", 10, 12], + ["o-ho", 12, 15] + ] + }, + "angles": { + "format": ["angle-type", "atom1", "atom2", "atom3"], + "data": [ + ["c2-n-hn", 2, 1, 4], + ["c2-n-hn", 2, 1, 5], + ["c2-n-c_1", 2, 1, 10], + ["hn-n-hn", 4, 1, 5], + ["hn-n-c_1", 4, 1, 10], + ["hn-n-c_1", 5, 1, 10], + ["n-c2-c2", 1, 2, 3], + ["n-c2-hc", 1, 2, 6], + ["n-c2-hc", 1, 2, 7], + ["c2-c2-hc", 3, 2, 6], + ["c2-c2-hc", 3, 2, 7], + ["hc-c2-hc", 6, 2, 7], + ["c2-c2-c_1", 8, 9, 10], + ["c2-c2-hc", 8, 9, 13], + ["c2-c2-hc", 8, 9, 14], + ["hc-c2-c_1", 13, 9, 10], + ["hc-c2-c_1", 14, 9, 10], + ["hc-c2-hc", 13, 9, 14], + ["c2-c_1-o_1", 9, 10, 11], + ["c2-c_1-o", 9, 10, 12], + ["n-c_1-c2", 1, 10, 9], + ["o_1-c_1-o", 11, 10, 12], + ["n-c_1-o_1", 1, 10, 11], + ["n-c_1-o", 1, 10, 12], + ["c_1-o-ho", 10, 12, 15] + ] + }, + "dihedrals": { + "format": ["dihedral-type", "atom1", "atom2", "atom3", "atom4"], + "data": [ + ["hn-n-c2-c2", 4, 1, 2, 3], + ["hn-n-c2-hc", 4, 1, 2, 6], + ["hn-n-c2-hc", 4, 1, 2, 7], + ["hn-n-c2-c2", 5, 1, 2, 3], + ["hn-n-c2-hc", 5, 1, 2, 6], + ["hn-n-c2-hc", 5, 1, 2, 7], + ["c_1-n-c2-c2", 10, 1, 2, 3], + ["c_1-n-c2-hc", 10, 1, 2, 6], + ["c_1-n-c2-hc", 10, 1, 2, 7], + ["c2-n-c_1-c2", 2, 1, 10, 9], + ["c2-n-c_1-o_1", 2, 1, 10, 11], + ["c2-n-c_1-o", 2, 1, 10, 12], + ["hn-n-c_1-c2", 4, 1, 10, 9], + ["hn-n-c_1-o_1", 4, 1, 10, 11], + ["hn-n-c_1-o", 4, 1, 10, 12], + ["hn-n-c_1-c2", 5, 1, 10, 9], + ["hn-n-c_1-o_1", 5, 1, 10, 11], + ["hn-n-c_1-o", 5, 1, 10, 12], + ["c2-c2-c_1-o_1", 8, 9, 10, 11], + ["c2-c2-c_1-o", 8, 9, 10, 12], + ["c2-c2-c_1-n", 8, 9, 10, 1], + ["hc-c2-c_1-o_1", 13, 9, 10, 11], + ["hc-c2-c_1-o", 13, 9, 10, 12], + ["hc-c2-c_1-n", 13, 9, 10, 1], + ["hc-c2-c_1-o_1", 14, 9, 10, 11], + ["hc-c2-c_1-o", 14, 9, 10, 12], + ["hc-c2-c_1-n", 14, 9, 10, 1], + ["c2-c_1-o-ho", 9, 10, 12, 15], + ["o_1-c_1-o-ho", 11, 10, 12, 15], + ["n-c_1-o-ho", 1, 10, 12, 15] + ] + }, + "charges": { + "format": ["atom-id", "charge"], + "data": [ + [1, -0.3], + [2, 0.0], + [3, 0.0], + [4, 0.0], + [5, 0.0], + [6, 0.0], + [7, 0.0], + [8, 0.0], + [9, 0.0], + [10, 0.3], + [11, 0.0], + [12, 0.0], + [13, 0.0], + [14, 0.0], + [15, 0.0] + ] + } +} diff --git a/examples/PACKAGES/reaction/tiny_nylon_wildcards/tiny_nylon.data b/examples/PACKAGES/reaction/tiny_nylon_wildcards/tiny_nylon.data new file mode 100644 index 00000000000..73c776c4302 --- /dev/null +++ b/examples/PACKAGES/reaction/tiny_nylon_wildcards/tiny_nylon.data @@ -0,0 +1,820 @@ +LAMMPS data file via write_data, version 27 Jun 2024, timestep = 0, units = real + +44 atoms +11 atom types +42 bonds +13 bond types +74 angles +26 angle types +100 dihedrals +33 dihedral types +16 impropers +5 improper types + +-25 25 xlo xhi +-25 25 ylo yhi +-25 25 zlo zhi + +Atom Type Labels + +1 c2 +2 c_1 +3 o +4 hc +5 ho +6 o_1 +7 na +8 hn +9 n +10 hw +11 o* + +Bond Type Labels + +1 c2-hc +2 c2-c2 +3 c_1-o +4 c2-c_1 +5 c_1-o_1 +6 o-ho +7 na-c2 +8 na-hn +9 n-c2 +10 n-hn +11 n-c_1 +12 c2-na +13 hw-o* + +Angle Type Labels + +1 hc-c2-hc +2 c2-c2-hc +3 c2-c2-c2 +4 c2-c_1-o_1 +5 o-c_1-o_1 +6 c2-c_1-o +7 c_1-o-ho +8 c2-c2-c_1 +9 c_1-c2-hc +10 c2-c2-na +11 na-c2-hc +12 c2-na-hn +13 hn-na-hn +14 c2-n-hn +15 c2-n-c_1 +16 hn-n-hn +17 hn-n-c_1 +18 n-c2-c2 +19 n-c2-hc +20 hc-c2-c_1 +21 n-c_1-c2 +22 o_1-c_1-o +23 n-c_1-o_1 +24 n-c_1-o +25 na-c2-c2 +26 hw-o*-hw + +Dihedral Type Labels + +1 c_1-c2-c2-hc +2 hc-c2-c2-hc +3 c2-c2-c2-c_1 +4 c2-c2-c2-hc +5 c2-c2-c2-c2 +6 c2-c_1-o-ho +7 o_1-c_1-o-ho +8 c2-c2-c_1-o +9 hc-c2-c_1-o +10 c2-c2-c_1-o_1 +11 hc-c2-c_1-o_1 +12 na-c2-c2-hc +13 c2-c2-c2-na +14 c2-c2-na-hn +15 hn-na-c2-hc +16 hn-n-c2-c2 +17 hn-n-c2-hc +18 c_1-n-c2-c2 +19 c_1-n-c2-hc +20 c2-n-c_1-c2 +21 c2-n-c_1-o_1 +22 c2-n-c_1-o +23 hn-n-c_1-c2 +24 hn-n-c_1-o_1 +25 hn-n-c_1-o +26 n-c2-c2-c2 +27 n-c2-c2-hc +28 c2-c2-c_1-n +29 hc-c2-c_1-n +30 n-c_1-o-ho +31 hn-na-c2-c2 +32 hc-c2-na-hn +33 na-c2-c2-c2 + +Improper Type Labels + +1 c2-c_1-o-o_1 +2 c2-na-hn-hn +3 c2-c_1-o_1-o +4 c2-n-hn-c_1 +5 n-c_1-c2-o_1 + +Masses + +1 12.0112 +2 12.0112 +3 15.9994 +4 1.00797 +5 1.00797 +6 15.9994 +7 14.0067 +8 1.00797 +9 14.0067 +10 1.00797 +11 15.9994 + +Pair Coeffs # lj/class2/coul/long + +1 0.054 4.01 +2 0.12 3.81 +3 0.24 3.535 +4 0.02 2.7 +5 0.013 1.098 +6 0.267 3.3 +7 0.065 4.07 +8 0.013 1.098 +9 0.106 4.07 +10 0.013 1.098 +11 0.26 3.61 + +Bond Coeffs # class2 + +1 1.101 345 -691.89 844.6 +2 1.53 299.67 -501.77 679.81 +3 1.3649 368.731 -832.478 1274.02 +4 1.5202 253.707 -423.037 396.9 +5 1.202 851.14 -1918.49 2160.77 +6 0.965 532.506 -1282.9 2004.77 +7 1.457 365.805 -699.637 998.484 +8 1.006 466.74 -1073.6 1251.11 +9 1.452 327.166 -547.899 526.5 +10 1.01 462.75 -1053.63 1545.76 +11 1.416 359.159 -558.473 1146.38 +12 1.457 365.805 -699.637 998.484 +13 0.97 563.28 -1428.22 1902.12 + +Angle Coeffs # class2 + +1 107.66 39.641 -12.921 -2.4318 +2 110.77 41.453 -10.604 5.129 +3 112.67 39.516 -7.443 -9.5583 +4 123.145 55.5431 -17.2123 0.1348 +5 118.986 98.6813 -22.2485 10.3673 +6 123.145 55.5431 -17.2123 0.1348 +7 111.254 53.5303 -11.8454 -11.5405 +8 108.53 51.9747 -9.4851 -10.9985 +9 107.734 40.6099 -28.8121 0 +10 111.91 60.7147 -13.3366 -13.0785 +11 110.62 51.3137 -6.7198 -2.6003 +12 110.954 50.8652 -4.4522 -10.0298 +13 107.067 45.252 -7.5558 -9.512 +14 113.868 45.9271 -20.0824 0 +15 111.037 31.8958 -6.6942 -6.837 +16 116.94 37.5749 -8.6676 0 +17 117.961 37.4964 -8.1837 0 +18 114.302 42.6589 -10.5464 -9.3243 +19 108.937 57.401 2.9374 0 +20 107.734 40.6099 -28.8121 0 +21 116.926 39.4193 -10.9945 -8.7733 +22 118.986 98.6813 -22.2485 10.3673 +23 125.542 92.572 -34.48 -11.1871 +24 125.542 92.572 -34.48 -11.1871 +25 111.91 60.7147 -13.3366 -13.0785 +26 103.7 49.84 -11.6 -8 + +BondBond Coeffs + +1 5.3316 1.101 1.101 +2 3.3872 1.53 1.101 +3 0 1.53 1.53 +4 0 1.5202 1.3649 +5 0 1.3649 1.202 +6 46.0685 1.5202 1.202 +7 0 1.3649 0.965 +8 5.4199 1.53 1.5202 +9 0.7115 1.5202 1.101 +10 4.6217 1.53 1.457 +11 12.426 1.457 1.101 +12 -6.4168 1.457 1.006 +13 -1.8749 1.006 1.006 +14 -3.471 1.452 1.01 +15 12.1186 1.452 1.416 +16 -0.5655 1.01 1.01 +17 -4.3126 1.01 1.416 +18 3.5446 1.452 1.53 +19 15.2994 1.452 1.101 +20 0.7115 1.101 1.5202 +21 0 1.416 1.5202 +22 0 1.202 1.3649 +23 138.495 1.416 1.202 +24 0 1.416 1.3649 +25 4.6217 1.457 1.53 +26 -9.5 0.97 0.97 + +BondAngle Coeffs + +1 18.103 18.103 1.101 1.101 +2 20.754 11.421 1.53 1.101 +3 8.016 8.016 1.53 1.53 +4 0 0 1.5202 1.3649 +5 0 0 1.3649 1.202 +6 34.9982 37.1298 1.5202 1.202 +7 0 0 1.3649 0.965 +8 18.1678 15.8758 1.53 1.5202 +9 12.4632 9.1765 1.5202 1.101 +10 6.0876 16.5702 1.53 1.457 +11 42.4332 13.4582 1.457 1.101 +12 31.8096 20.5799 1.457 1.006 +13 28.0322 28.0322 1.006 1.006 +14 11.8828 5.9339 1.452 1.01 +15 3.7812 14.8633 1.452 1.416 +16 19.8125 19.8125 1.01 1.01 +17 10.8422 29.5743 1.01 1.416 +18 4.6031 -5.479 1.452 1.53 +19 34.8907 10.6917 1.452 1.101 +20 9.1765 12.4632 1.101 1.5202 +21 0 0 1.416 1.5202 +22 0 0 1.202 1.3649 +23 62.7124 52.4045 1.416 1.202 +24 0 0 1.416 1.3649 +25 16.5702 6.0876 1.457 1.53 +26 22.35 22.35 0.97 0.97 + +Dihedral Coeffs # class2 + +1 -0.0228 0 0.028 0 -0.1863 0 +2 -0.1432 0 0.0617 0 -0.1083 0 +3 0.0972 0 0.0722 0 -0.2581 0 +4 0 0 0.0316 0 -0.1681 0 +5 0 0 0.0514 0 -0.143 0 +6 0 0 0 0 0 0 +7 -2.7332 0 2.9646 0 -0.0155 0 +8 0 0 0 0 0 0 +9 0 0 0 0 0 0 +10 0.0442 0 0.0292 0 0.0562 0 +11 -0.1804 0 0.0012 0 0.0371 0 +12 -0.2428 0 0.4065 0 -0.3079 0 +13 0.1764 0 0.1766 0 -0.5206 0 +14 -1.1506 0 -0.6344 0 -0.1845 0 +15 -0.5187 0 -0.4837 0 -0.1692 0 +16 -0.0483 0 -0.0077 0 -0.0014 0 +17 -0.0148 0 -0.0791 0 -0.0148 0 +18 0.0143 0 -0.0132 0 0.0091 0 +19 0.0219 0 -0.026 0 0.0714 0 +20 -0.7532 0 2.7392 0 0.0907 0 +21 0.8297 0 3.7234 0 -0.0495 0 +22 0 0 0 0 0 0 +23 0 0 0 0 0 0 +24 -1.6938 0 2.7386 0 -0.336 0 +25 0 0 0 0 0 0 +26 0.0972 0 0.0722 0 -0.2581 0 +27 -0.0228 0 0.028 0 -0.1863 0 +28 0.1693 0 -0.009 0 -0.0687 0 +29 0.1693 0 -0.009 0 -0.0687 0 +30 0 0 0 0 0 0 +31 -1.1506 0 -0.6344 0 -0.1845 0 +32 -0.5187 0 -0.4837 0 -0.1692 0 +33 0.1764 0 0.1766 0 -0.5206 0 + +AngleAngleTorsion Coeffs + +1 -5.3624 108.53 110.77 +2 -12.564 110.77 110.77 +3 -0.3801 112.67 108.53 +4 -16.164 112.67 110.77 +5 -22.045 112.67 112.67 +6 0 0 111.254 +7 0 118.985 111.254 +8 0 108.53 0 +9 0 107.734 0 +10 -8.019 108.53 123.145 +11 -15.3496 107.734 123.145 +12 -15.7572 111.91 110.77 +13 -27.3953 112.67 111.91 +14 -7.5499 111.91 110.954 +15 -10.4258 110.62 110.954 +16 -4.6337 113.868 114.302 +17 -6.659 113.868 108.937 +18 -7.4314 111.037 114.302 +19 -8.1335 111.037 108.937 +20 -6.5335 111.037 116.926 +21 -15.5547 111.037 125.542 +22 0 111.037 0 +23 -1.3234 117.961 116.926 +24 -7.3186 117.961 125.542 +25 0 117.961 0 +26 -1.0631 114.302 112.67 +27 -12.7974 114.302 110.77 +28 -5.4514 108.53 116.926 +29 -12.2417 107.734 116.926 +30 0 0 111.254 +31 -7.5499 110.954 111.91 +32 -10.4258 110.954 110.62 +33 -27.3953 111.91 112.67 + +EndBondTorsion Coeffs + +1 -0.0204 0.3628 -0.4426 -0.0097 -0.0315 -0.0755 1.5202 1.101 +2 0.213 0.312 0.0777 0.213 0.312 0.0777 1.101 1.101 +3 0.0062 -0.0002 0.0036 0.0055 0.006 -0.0009 1.53 1.5202 +4 0.2486 0.2422 -0.0925 0.0814 0.0591 0.2219 1.53 1.101 +5 -0.0732 0 0 -0.0732 0 0 1.53 1.53 +6 0 0 0 0 0 0 1.5202 0.965 +7 0 0 0 0 0 0 1.202 0.965 +8 0 0 0 0 0 0 1.53 1.3649 +9 0 0 0 0 0 0 1.101 1.3649 +10 0.2654 0.0503 0.1046 -0.281 0.0816 -0.1522 1.53 1.202 +11 1.2143 0.2831 0.3916 -0.2298 0.0354 0.3853 1.101 1.202 +12 0.1022 0.209 0.6433 0.196 0.7056 0.112 1.457 1.101 +13 0.1032 0.5896 -0.4836 0.0579 -0.0043 -0.1906 1.53 1.457 +14 -0.9466 0.9356 -0.5542 0.057 0.0625 0.4112 1.53 1.006 +15 -1.1685 0.9266 -0.0993 0.085 0.3061 0.2104 1.101 1.006 +16 -0.0992 -0.0727 -0.4139 0.132 0.0015 0.1324 1.01 1.53 +17 -0.4894 0.1644 0.3105 -0.8983 0.2826 0.0881 1.01 1.101 +18 -0.1245 -0.9369 0.7781 -0.2033 0.0035 0.056 1.416 1.53 +19 0.2292 1.1732 -0.058 -0.3667 0.8197 0.1335 1.416 1.101 +20 0.2299 -0.1141 -0.1424 0.0933 -0.4631 0.2883 1.452 1.5202 +21 0.1598 0.7253 -0.1007 0.1226 -2.1326 0.5581 1.452 1.202 +22 0 0 0 0 0 0 1.452 1.3649 +23 0.6413 0.1676 0.144 -0.6979 0.5619 0.4212 1.01 1.5202 +24 0.1214 0.1936 0.0816 -0.7604 -2.6431 1.2467 1.01 1.202 +25 0 0 0 0 0 0 1.01 1.3649 +26 -0.0797 -0.0406 0.0255 0.0742 0.0105 0.0518 1.452 1.53 +27 0.3022 0.2513 0.4641 -0.0601 -0.3763 -0.1876 1.452 1.101 +28 -0.2631 -0.0076 -0.1145 -0.2751 -0.3058 -0.1767 1.53 1.416 +29 -0.0268 0.7836 0.0035 0.3552 -0.2685 0.5834 1.101 1.416 +30 0 0 0 0 0 0 1.416 0.965 +31 0.057 0.0625 0.4112 -0.9466 0.9356 -0.5542 1.006 1.53 +32 0.085 0.3061 0.2104 -1.1685 0.9266 -0.0993 1.006 1.101 +33 0.0579 -0.0043 -0.1906 0.1032 0.5896 -0.4836 1.457 1.53 + +MiddleBondTorsion Coeffs + +1 -3.5039 1.2458 -0.761 1.53 +2 -14.261 -0.5322 -0.4864 1.53 +3 -1.5945 0.2267 -0.6911 1.53 +4 -14.879 -3.6581 -0.3138 1.53 +5 -17.787 -7.1877 0 1.53 +6 0 0 0 1.3649 +7 0 0 0 1.3649 +8 0 0 0 1.5202 +9 0 0 0 1.5202 +10 0.3388 -0.1096 0.1219 1.5202 +11 0.2359 0.9139 0.9594 1.5202 +12 -10.4959 -0.7647 -0.0545 1.53 +13 -15.4174 -7.3055 -1.0749 1.53 +14 -2.2208 0.5479 -0.3527 1.457 +15 -3.4611 1.6996 -0.6007 1.457 +16 -3.5406 -3.3866 0.0352 1.452 +17 -1.1752 2.8058 0.8083 1.452 +18 -3.9501 -0.4002 -0.6798 1.452 +19 -0.6899 -2.2646 1.1579 1.452 +20 0 0 0 1.416 +21 -8.8301 14.3079 -1.7716 1.416 +22 0 0 0 1.416 +23 0 0 0 1.416 +24 -0.9084 6.1447 -0.4852 1.416 +25 0 0 0 1.416 +26 -4.2324 -3.3023 -1.3244 1.53 +27 -4.1028 -0.5941 -0.047 1.53 +28 0 0 0 1.5202 +29 0 0 0 1.5202 +30 0 0 0 1.3649 +31 -2.2208 0.5479 -0.3527 1.457 +32 -3.4611 1.6996 -0.6007 1.457 +33 -15.4174 -7.3055 -1.0749 1.53 + +BondBond13 Coeffs + +1 0 1.5202 1.101 +2 0 1.101 1.101 +3 0 1.53 1.5202 +4 0 1.53 1.101 +5 0 1.53 1.53 +6 0 1.5202 0.965 +7 0 1.202 0.965 +8 0 1.53 1.3649 +9 0 1.101 1.3649 +10 0 1.53 1.202 +11 0 1.101 1.202 +12 0 1.457 1.101 +13 0 1.53 1.457 +14 0 1.53 1.006 +15 0 1.101 1.006 +16 0 1.01 1.53 +17 0 1.01 1.101 +18 0 1.416 1.53 +19 0 1.416 1.101 +20 0 1.452 1.5202 +21 0 1.452 1.202 +22 0 1.452 1.3649 +23 0 1.01 1.5202 +24 0 1.01 1.202 +25 0 1.01 1.3649 +26 0 1.452 1.53 +27 0 1.452 1.101 +28 0 1.53 1.416 +29 0 1.101 1.416 +30 0 1.416 0.965 +31 0 1.006 1.53 +32 0 1.006 1.101 +33 0 1.457 1.53 + +AngleTorsion Coeffs + +1 -0.7466 -0.9448 -0.6321 0.0162 1.4211 -1.4092 108.53 110.77 +2 -0.8085 0.5569 -0.2466 -0.8085 0.5569 -0.2466 110.77 110.77 +3 -0.2607 0.3203 -0.2283 0.0515 -0.0674 -0.0474 112.67 108.53 +4 -0.2454 0 -0.1136 0.3113 0.4516 -0.1988 112.67 110.77 +5 0.3886 -0.3139 0.1389 0.3886 -0.3139 0.1389 112.67 112.67 +6 0 0 0 0 0 0 0 111.254 +7 0 0 0 0 0 0 118.985 111.254 +8 0 0 0 0 0 0 108.53 0 +9 0 0 0 0 0 0 107.734 0 +10 0.0885 -1.3703 -0.5452 0.675 0.5965 0.6725 108.53 123.145 +11 9.1299 -0.4847 0.3582 -1.4946 0.7308 -0.2083 107.734 123.145 +12 -1.1075 0.282 0.8318 0.5111 1.6328 -1.0155 111.91 110.77 +13 -1.9225 -1.345 0.221 2.0125 0.944 -2.7612 112.67 111.91 +14 -3.343 4.4558 -0.0346 0.2873 -0.8072 -0.096 111.91 110.954 +15 -3.9582 2.0063 0.3213 -0.4294 -0.4442 -0.6141 110.62 110.954 +16 -0.5807 0.2041 -0.1384 -2.8967 2.7084 -0.0375 113.868 114.302 +17 -0.3868 0.2041 0.0445 -3.7022 1.3876 0.2393 113.868 108.937 +18 -1.523 1.1296 0.7167 -0.7555 0.0564 1.2177 111.037 114.302 +19 0.0372 -0.3418 -0.0775 -1.5157 2.0781 0.5364 111.037 108.937 +20 5.916 1.7856 0.4052 4.2133 2.9302 3.2903 111.037 116.926 +21 7.4427 2.1505 -0.2206 4.4466 4.0317 1.7129 111.037 125.542 +22 0 0 0 0 0 0 111.037 0 +23 1.9306 0.2105 0.0557 -2.2134 1.2909 0.9726 117.961 116.926 +24 2.3848 0.703 0.1399 -2.6238 0.3606 0.5474 117.961 125.542 +25 0 0 0 0 0 0 117.961 0 +26 0.2039 0.1602 -0.7946 -0.5501 -1.6982 0.2485 114.302 112.67 +27 -1.982 0.2325 -0.3928 -1.2469 1.6933 -1.2081 114.302 110.77 +28 2.1802 -0.0335 -1.3816 2.1221 0.5032 -0.0767 108.53 116.926 +29 7.095 0.0075 0.691 2.0013 0.5068 0.8406 107.734 116.926 +30 0 0 0 0 0 0 0 111.254 +31 0.2873 -0.8072 -0.096 -3.343 4.4558 -0.0346 110.954 111.91 +32 -0.4294 -0.4442 -0.6141 -3.9582 2.0063 0.3213 110.954 110.62 +33 2.0125 0.944 -2.7612 -1.9225 -1.345 0.221 111.91 112.67 + +Improper Coeffs # class2 + +1 0 0 +2 0 0 +3 0 0 +4 0 0 +5 24.3329 0 + +AngleAngle Coeffs + +1 0 0 0 0 118.985 123.145 +2 0.2738 -0.4825 0.2738 110.77 107.66 110.77 +3 -1.3199 -1.3199 0.1184 112.67 110.77 110.77 +4 2.0403 -1.8202 1.0827 108.53 107.734 110.77 +5 0 0 0 116.926 123.145 125.542 + +Atoms # full + +1 1 c2 -0.37128 12.288168 0.738732 4.37428 +2 1 c_1 0.77363 13.959928 -0.883144 5.090597 +3 1 o -0.68333 14.411288 -1.994419 5.68216 +4 1 hc 0.20049 12.881083 0.872503 3.506176 +5 1 hc 0.19609 11.232775 0.801641 3.998777 +6 1 ho 0.48328 13.704366 -2.470396 6.130105 +7 1 c2 -0.46692 12.489752 -0.793693 4.710639 +8 1 c2 -0.38182 12.455071 1.866388 5.38587 +9 1 c2 -0.47583 11.248961 1.901849 6.347664 +10 1 c_1 0.78608 10.005971 2.46671 5.77284 +11 1 o_1 -0.56991 14.79536 -0.034436 4.807367 +12 1 o_1 -0.58244 9.115239 1.654547 5.617002 +13 1 o -0.68598 9.745096 3.807654 5.573585 +14 1 hc 0.20664 12.248215 -1.371492 3.808598 +15 1 hc 0.21572 11.715755 -1.036825 5.500449 +16 1 hc 0.18182 12.559724 2.807687 4.858452 +17 1 hc 0.21541 13.299968 1.61657 6.123781 +18 1 hc 0.20587 11.650505 2.330454 7.28241 +19 1 hc 0.22795 10.88842 0.913219 6.637162 +20 1 ho 0.48600 10.550073 4.294209 5.758192 +21 2 c2 -0.38667 5.851425 1.929552 6.038335 +22 2 c2 -0.17544 6.741509 3.160751 6.233074 +23 2 na -0.79903 7.957761 3.12178 5.252257 +24 2 na -0.79111 2.599653 -2.25894 5.985863 +25 2 c2 -0.17576 3.834337 -1.907078 5.441528 +26 2 c2 -0.38091 4.810793 -1.083699 6.310184 +27 2 hc 0.19062 6.505912 1.182799 5.449104 +28 2 hc 0.18951 5.156429 2.256468 5.348423 +29 2 hc 0.17321 7.232782 3.178785 7.181911 +30 2 hc 0.16772 6.251671 4.103621 6.222913 +31 2 hn 0.33245 8.249909 4.070668 4.881297 +32 2 hn 0.34480 7.813025 2.623184 4.400744 +33 2 hn 0.33793 2.626695 -2.857547 6.817247 +34 2 hn 0.33306 1.955281 -2.684319 5.32846 +35 2 hc 0.17708 3.637708 -1.322842 4.469265 +36 2 hc 0.15806 4.41557 -2.739689 4.997336 +37 2 hc 0.18117 5.710714 -1.010014 5.642798 +38 2 hc 0.18224 5.103831 -1.696423 7.160345 +39 2 c2 -0.38394 5.270763 1.286629 7.308822 +40 2 hc 0.17720 4.834381 2.168531 7.931687 +41 2 hc 0.18425 6.118354 0.786724 7.794709 +42 2 c2 -0.37058 4.273849 0.167695 6.957862 +43 2 hc 0.18777 3.792544 -0.081782 7.904418 +44 2 hc 0.18490 3.527495 0.674238 6.348869 + +Velocities + +1 -0.002462698962621882 -0.0015920230003311222 -0.003062192778611524 +2 0.009508241670438584 -0.006990316616750725 0.013702671335945608 +3 0.0023431518493187576 -0.0029261683108242173 0.0014269399726982105 +4 -0.018184451408256214 0.03110380369168796 -0.013358827768357973 +5 0.026084132471017967 -0.010819576493517332 0.03040338445479488 +6 -0.004731211595821874 -0.01911146239947834 -0.03679335415649756 +7 -0.007506879759594987 0.006566142205596249 0.0013226575122695422 +8 0.003380788138016128 0.003045873266355709 0.0022368826795446284 +9 -0.0031113905793879316 0.008290886772075477 -0.001756123803949653 +10 0.0024685206571693056 0.001319477620984103 -0.002804187703280044 +11 -0.0034945605770565296 0.0032323777135621814 0.0016223017668450866 +12 -0.006115348361284778 -0.0051534857074262185 0.0017735747357354274 +13 0.0002138429678185901 -0.004539890294272967 0.006164976989441376 +14 0.00250046198643734 -0.0015709184283264888 0.020837548254667757 +15 0.006054793920564353 -0.012650704436910937 -0.005443075326696219 +16 -0.010374605775698001 0.009140865846388924 -0.011306875858287088 +17 -0.01273649912898741 -0.00917268118525065 0.005113650268546125 +18 0.007674177860704811 0.01862985663545928 -0.011300096447670932 +19 -0.01861613877528112 0.0010848388547730185 -0.005711843368779858 +20 0.005413757224147906 -0.014564578166395727 -0.01261842044190954 +21 0.005847352145231226 -0.004059528600033209 -0.0062517801580146415 +22 0.0036402033824753104 -0.0014629540504663154 -0.004003071231889805 +23 0.009026630501910769 -0.0027511425384659687 0.004557640256543714 +24 -0.013102302415548614 -0.004728670396530579 -0.0018966887841189517 +25 0.007862168262110317 -0.004204631354094957 0.000968879573747513 +26 -0.004738017643833797 0.009609044194077583 -0.008759243138703934 +27 0.005431165881163252 0.02003222466349599 -0.00949520764898085 +28 -0.0029056381493904374 0.0033317109723156875 0.016650350064426677 +29 -0.006456994403348912 0.002842398354195954 -0.026066912906505167 +30 -0.022173867823429387 0.014628839880961319 -0.02333083396140238 +31 0.009192571338198311 -0.0025697556639281928 -0.012822203161488303 +32 -0.00832069750519279 -0.0022538429924858707 0.007762024411858031 +33 0.019920685674825727 0.00503177648484941 -0.021106672824976403 +34 0.014118463330250982 0.017455545466840316 -0.012482101375598437 +35 -0.006111650564043797 0.013353021777303568 -0.025492434283827668 +36 0.009100152156585965 0.00557377745052224 0.014573768978939985 +37 0.0016523593470528035 -0.022107518020000917 0.020311423445130115 +38 -0.01034627539347186 0.01605585658635179 0.005548912701926242 +39 -0.0032054811383248638 0.0016779208962376315 0.002939050953753566 +40 0.019649219364916443 0.004081577652322286 -0.009842244116604127 +41 0.0005696169758816036 0.0007136113223474148 0.004633576422025626 +42 0.0022221300208006252 0.0036217319632558197 -0.006329939850345515 +43 0.002571017273484117 0.008002917981448292 0.01999298692846819 +44 -0.006082758182267466 -0.011834273655641976 0.020526923045885208 + +Bonds + +1 c2-hc 1 5 +2 c2-hc 1 4 +3 c2-c2 1 7 +4 c2-c2 1 8 +5 c_1-o 2 3 +6 c_1-o_1 2 11 +7 o-ho 3 6 +8 c2-c_1 7 2 +9 c2-hc 7 14 +10 c2-hc 7 15 +11 c2-c2 8 9 +12 c2-hc 8 16 +13 c2-hc 8 17 +14 c2-c_1 9 10 +15 c2-hc 9 18 +16 c2-hc 9 19 +17 c_1-o_1 10 12 +18 c_1-o 10 13 +19 o-ho 13 20 +20 c2-c2 21 22 +21 c2-hc 21 27 +22 c2-hc 21 28 +23 c2-c2 21 39 +24 na-c2 22 23 +25 c2-hc 22 29 +26 c2-hc 22 30 +27 na-hn 23 31 +28 na-hn 23 32 +29 na-hn 24 33 +30 na-hn 24 34 +31 na-c2 25 24 +32 c2-c2 25 26 +33 c2-hc 25 35 +34 c2-hc 25 36 +35 c2-hc 26 37 +36 c2-hc 26 38 +37 c2-c2 26 42 +38 c2-hc 39 40 +39 c2-hc 39 41 +40 c2-c2 39 42 +41 c2-hc 42 43 +42 c2-hc 42 44 + +Angles + +1 hc-c2-hc 5 1 4 +2 c2-c2-hc 7 1 5 +3 c2-c2-hc 8 1 5 +4 c2-c2-hc 7 1 4 +5 c2-c2-hc 8 1 4 +6 c2-c2-c2 7 1 8 +7 c2-c_1-o_1 7 2 3 +8 o-c_1-o_1 3 2 11 +9 c2-c_1-o 7 2 11 +10 c_1-o-ho 2 3 6 +11 c2-c2-c_1 1 7 2 +12 c2-c2-hc 1 7 14 +13 c2-c2-hc 1 7 15 +14 c_1-c2-hc 2 7 14 +15 c_1-c2-hc 2 7 15 +16 hc-c2-hc 14 7 15 +17 c2-c2-c2 1 8 9 +18 c2-c2-hc 1 8 16 +19 c2-c2-hc 1 8 17 +20 c2-c2-hc 9 8 16 +21 c2-c2-hc 9 8 17 +22 hc-c2-hc 16 8 17 +23 c2-c2-c_1 8 9 10 +24 c2-c2-hc 8 9 18 +25 c2-c2-hc 8 9 19 +26 c_1-c2-hc 10 9 18 +27 c_1-c2-hc 10 9 19 +28 hc-c2-hc 18 9 19 +29 c2-c_1-o 9 10 12 +30 c2-c_1-o_1 9 10 13 +31 o-c_1-o_1 13 10 12 +32 c_1-o-ho 10 13 20 +33 c2-c2-hc 22 21 27 +34 c2-c2-hc 22 21 28 +35 c2-c2-c2 22 21 39 +36 hc-c2-hc 27 21 28 +37 c2-c2-hc 39 21 27 +38 c2-c2-hc 39 21 28 +39 c2-c2-na 21 22 23 +40 c2-c2-hc 21 22 29 +41 c2-c2-hc 21 22 30 +42 na-c2-hc 23 22 29 +43 na-c2-hc 23 22 30 +44 hc-c2-hc 29 22 30 +45 c2-na-hn 22 23 31 +46 c2-na-hn 22 23 32 +47 hn-na-hn 31 23 32 +48 c2-na-hn 25 24 33 +49 c2-na-hn 25 24 34 +50 hn-na-hn 33 24 34 +51 c2-c2-na 26 25 24 +52 na-c2-hc 24 25 35 +53 na-c2-hc 24 25 36 +54 c2-c2-hc 26 25 35 +55 c2-c2-hc 26 25 36 +56 hc-c2-hc 35 25 36 +57 c2-c2-hc 25 26 37 +58 c2-c2-hc 25 26 38 +59 c2-c2-c2 25 26 42 +60 hc-c2-hc 37 26 38 +61 c2-c2-hc 42 26 37 +62 c2-c2-hc 42 26 38 +63 c2-c2-hc 21 39 40 +64 c2-c2-hc 21 39 41 +65 c2-c2-c2 21 39 42 +66 hc-c2-hc 40 39 41 +67 c2-c2-hc 42 39 40 +68 c2-c2-hc 42 39 41 +69 c2-c2-c2 26 42 39 +70 c2-c2-hc 26 42 43 +71 c2-c2-hc 26 42 44 +72 c2-c2-hc 39 42 43 +73 c2-c2-hc 39 42 44 +74 hc-c2-hc 43 42 44 + +Dihedrals + +1 hc-c2-c2-hc 5 1 7 14 +2 hc-c2-c2-hc 5 1 7 15 +3 hc-c2-c2-hc 4 1 7 14 +4 hc-c2-c2-hc 4 1 7 15 +5 c2-c2-c2-c_1 8 1 7 2 +6 c2-c2-c2-hc 8 1 7 14 +7 c2-c2-c2-hc 8 1 7 15 +8 hc-c2-c2-hc 5 1 8 16 +9 hc-c2-c2-hc 5 1 8 17 +10 hc-c2-c2-hc 4 1 8 16 +11 hc-c2-c2-hc 4 1 8 17 +12 c2-c2-c2-c2 7 1 8 9 +13 c2-c2-c2-hc 7 1 8 16 +14 c2-c2-c2-hc 7 1 8 17 +15 c2-c_1-o-ho 7 2 3 6 +16 o_1-c_1-o-ho 11 2 3 6 +17 c_1-c2-c2-hc 2 7 1 5 +18 c_1-c2-c2-hc 2 7 1 4 +19 c2-c2-c_1-o 1 7 2 3 +20 hc-c2-c_1-o 14 7 2 3 +21 hc-c2-c_1-o 15 7 2 3 +22 c2-c2-c_1-o_1 1 7 2 11 +23 hc-c2-c_1-o_1 14 7 2 11 +24 hc-c2-c_1-o_1 15 7 2 11 +25 c2-c2-c2-hc 9 8 1 5 +26 c2-c2-c2-hc 9 8 1 4 +27 c2-c2-c2-c_1 1 8 9 10 +28 c2-c2-c2-hc 1 8 9 18 +29 c2-c2-c2-hc 1 8 9 19 +30 hc-c2-c2-hc 16 8 9 18 +31 hc-c2-c2-hc 16 8 9 19 +32 hc-c2-c2-hc 17 8 9 18 +33 hc-c2-c2-hc 17 8 9 19 +34 c_1-c2-c2-hc 10 9 8 16 +35 c_1-c2-c2-hc 10 9 8 17 +36 c2-c2-c_1-o_1 8 9 10 12 +37 c2-c2-c_1-o 8 9 10 13 +38 hc-c2-c_1-o_1 18 9 10 12 +39 hc-c2-c_1-o 18 9 10 13 +40 hc-c2-c_1-o_1 19 9 10 12 +41 hc-c2-c_1-o 19 9 10 13 +42 c2-c_1-o-ho 9 10 13 20 +43 o_1-c_1-o-ho 12 10 13 20 +44 hc-c2-c2-hc 27 21 22 29 +45 hc-c2-c2-hc 27 21 22 30 +46 hc-c2-c2-hc 28 21 22 29 +47 hc-c2-c2-hc 28 21 22 30 +48 c2-c2-c2-na 39 21 22 23 +49 c2-c2-c2-hc 39 21 22 29 +50 c2-c2-c2-hc 39 21 22 30 +51 c2-c2-c2-hc 22 21 39 40 +52 c2-c2-c2-hc 22 21 39 41 +53 c2-c2-c2-c2 22 21 39 42 +54 hc-c2-c2-hc 27 21 39 40 +55 hc-c2-c2-hc 27 21 39 41 +56 hc-c2-c2-hc 28 21 39 40 +57 hc-c2-c2-hc 28 21 39 41 +58 na-c2-c2-hc 23 22 21 27 +59 na-c2-c2-hc 23 22 21 28 +60 c2-c2-na-hn 21 22 23 31 +61 c2-c2-na-hn 21 22 23 32 +62 hn-na-c2-hc 29 22 23 31 +63 hn-na-c2-hc 29 22 23 32 +64 hn-na-c2-hc 30 22 23 31 +65 hn-na-c2-hc 30 22 23 32 +66 c2-c2-na-hn 26 25 24 33 +67 hn-na-c2-hc 35 25 24 33 +68 hn-na-c2-hc 36 25 24 33 +69 c2-c2-na-hn 26 25 24 34 +70 hn-na-c2-hc 35 25 24 34 +71 hn-na-c2-hc 36 25 24 34 +72 na-c2-c2-hc 24 25 26 37 +73 na-c2-c2-hc 24 25 26 38 +74 hc-c2-c2-hc 35 25 26 37 +75 hc-c2-c2-hc 35 25 26 38 +76 hc-c2-c2-hc 36 25 26 37 +77 hc-c2-c2-hc 36 25 26 38 +78 c2-c2-c2-na 42 26 25 24 +79 c2-c2-c2-hc 42 26 25 35 +80 c2-c2-c2-hc 42 26 25 36 +81 c2-c2-c2-c2 25 26 42 39 +82 c2-c2-c2-hc 25 26 42 43 +83 c2-c2-c2-hc 25 26 42 44 +84 hc-c2-c2-hc 37 26 42 43 +85 hc-c2-c2-hc 37 26 42 44 +86 hc-c2-c2-hc 38 26 42 43 +87 hc-c2-c2-hc 38 26 42 44 +88 c2-c2-c2-hc 42 39 21 27 +89 c2-c2-c2-hc 42 39 21 28 +90 c2-c2-c2-c2 21 39 42 26 +91 c2-c2-c2-hc 21 39 42 43 +92 c2-c2-c2-hc 21 39 42 44 +93 hc-c2-c2-hc 40 39 42 43 +94 hc-c2-c2-hc 40 39 42 44 +95 hc-c2-c2-hc 41 39 42 43 +96 hc-c2-c2-hc 41 39 42 44 +97 c2-c2-c2-hc 39 42 26 37 +98 c2-c2-c2-hc 39 42 26 38 +99 c2-c2-c2-hc 26 42 39 40 +100 c2-c2-c2-hc 26 42 39 41 + +Impropers + +1 c2-na-hn-hn 7 1 4 5 +2 c2-na-hn-hn 8 1 4 5 +3 c2-c_1-o_1-o 7 1 8 5 +4 c2-c_1-o_1-o 7 1 8 4 +5 c2-c_1-o-o_1 7 2 3 11 +6 c2-n-hn-c_1 1 7 2 14 +7 c2-n-hn-c_1 1 7 2 15 +8 c2-na-hn-hn 1 7 14 15 +9 c2-c_1-o_1-o 1 8 9 16 +10 c2-c_1-o_1-o 1 8 9 17 +11 c2-na-hn-hn 1 8 16 17 +12 c2-na-hn-hn 9 8 16 17 +13 c2-n-hn-c_1 8 9 10 18 +14 c2-n-hn-c_1 8 9 10 19 +15 c2-na-hn-hn 8 9 18 19 +16 c2-c_1-o-o_1 9 10 13 12 diff --git a/examples/PACKAGES/reaction/tiny_polystyrene/2styrene_map b/examples/PACKAGES/reaction/tiny_polystyrene/M-M.rxnmap similarity index 100% rename from examples/PACKAGES/reaction/tiny_polystyrene/2styrene_map rename to examples/PACKAGES/reaction/tiny_polystyrene/M-M.rxnmap diff --git a/examples/PACKAGES/reaction/tiny_polystyrene/2styrene_reacted.molecule_template b/examples/PACKAGES/reaction/tiny_polystyrene/M-M_post.mol similarity index 100% rename from examples/PACKAGES/reaction/tiny_polystyrene/2styrene_reacted.molecule_template rename to examples/PACKAGES/reaction/tiny_polystyrene/M-M_post.mol diff --git a/examples/PACKAGES/reaction/tiny_polystyrene/2styrene_unreacted.molecule_template b/examples/PACKAGES/reaction/tiny_polystyrene/M-M_pre.mol similarity index 100% rename from examples/PACKAGES/reaction/tiny_polystyrene/2styrene_unreacted.molecule_template rename to examples/PACKAGES/reaction/tiny_polystyrene/M-M_pre.mol diff --git a/examples/PACKAGES/reaction/tiny_polystyrene/chain_plus_styrene_map b/examples/PACKAGES/reaction/tiny_polystyrene/M-P.rxnmap similarity index 100% rename from examples/PACKAGES/reaction/tiny_polystyrene/chain_plus_styrene_map rename to examples/PACKAGES/reaction/tiny_polystyrene/M-P.rxnmap diff --git a/examples/PACKAGES/reaction/tiny_polystyrene/chain_plus_styrene_reacted.molecule_template b/examples/PACKAGES/reaction/tiny_polystyrene/M-P_post.mol similarity index 100% rename from examples/PACKAGES/reaction/tiny_polystyrene/chain_plus_styrene_reacted.molecule_template rename to examples/PACKAGES/reaction/tiny_polystyrene/M-P_post.mol diff --git a/examples/PACKAGES/reaction/tiny_polystyrene/chain_plus_styrene_unreacted.molecule_template b/examples/PACKAGES/reaction/tiny_polystyrene/M-P_pre.mol similarity index 100% rename from examples/PACKAGES/reaction/tiny_polystyrene/chain_plus_styrene_unreacted.molecule_template rename to examples/PACKAGES/reaction/tiny_polystyrene/M-P_pre.mol diff --git a/examples/PACKAGES/reaction/tiny_polystyrene/chain_chain_map b/examples/PACKAGES/reaction/tiny_polystyrene/P-P.rxnmap similarity index 100% rename from examples/PACKAGES/reaction/tiny_polystyrene/chain_chain_map rename to examples/PACKAGES/reaction/tiny_polystyrene/P-P.rxnmap diff --git a/examples/PACKAGES/reaction/tiny_polystyrene/chain_chain_reacted.molecule_template b/examples/PACKAGES/reaction/tiny_polystyrene/P-P_post.mol similarity index 100% rename from examples/PACKAGES/reaction/tiny_polystyrene/chain_chain_reacted.molecule_template rename to examples/PACKAGES/reaction/tiny_polystyrene/P-P_post.mol diff --git a/examples/PACKAGES/reaction/tiny_polystyrene/chain_chain_unreacted.molecule_template b/examples/PACKAGES/reaction/tiny_polystyrene/P-P_pre.mol similarity index 100% rename from examples/PACKAGES/reaction/tiny_polystyrene/chain_chain_unreacted.molecule_template rename to examples/PACKAGES/reaction/tiny_polystyrene/P-P_pre.mol diff --git a/examples/PACKAGES/reaction/tiny_polystyrene/in.tiny_polystyrene.stabilized b/examples/PACKAGES/reaction/tiny_polystyrene/in.tiny_polystyrene.stabilized index f181b24ee5a..a4f4b2b473d 100644 --- a/examples/PACKAGES/reaction/tiny_polystyrene/in.tiny_polystyrene.stabilized +++ b/examples/PACKAGES/reaction/tiny_polystyrene/in.tiny_polystyrene.stabilized @@ -31,28 +31,30 @@ read_data tiny_polystyrene.data & extra/improper/per/atom 25 & extra/special/per/atom 25 -molecule mol1 2styrene_unreacted.molecule_template -molecule mol2 2styrene_reacted.molecule_template -molecule mol3 chain_plus_styrene_unreacted.molecule_template -molecule mol4 chain_plus_styrene_reacted.molecule_template -molecule mol5 chain_chain_unreacted.molecule_template -molecule mol6 chain_chain_reacted.molecule_template - -thermo 100 +molecule mol1 M-M_pre.mol +molecule mol2 M-M_post.mol +molecule mol3 M-P_pre.mol +molecule mol4 M-P_post.mol +molecule mol5 P-P_pre.mol +molecule mol6 P-P_post.mol # dump 1 all xyz 5 test_vis.xyz # dump_modify 1 types labels +# M-M: two styrene monomers dimerizing +# M-P: a styrene monomer extending a polymer chain +# P-P: two polymer chains undergoing step-growth polymerization fix rxn1 all bond/react stabilization yes statted_grp .03 & - react rxn1 all 1 0 3.0 mol1 mol2 2styrene_map stabilize_steps 100 & - react rxn2 all 1 0 3.0 mol3 mol4 chain_plus_styrene_map stabilize_steps 100 & - react rxn3 all 1 0 5.0 mol5 mol6 chain_chain_map stabilize_steps 100 + react M-M all 1 0 3.0 mol1 mol2 M-M.rxnmap stabilize_steps 100 & + react M-P all 1 0 3.0 mol3 mol4 M-P.rxnmap stabilize_steps 100 & + react P-P all 1 0 5.0 mol5 mol6 P-P.rxnmap stabilize_steps 100 fix 1 statted_grp_REACT nvt temp $T $T 100 fix 4 bond_react_MASTER_group temp/rescale 1 $T $T 1 1 thermo_style custom step temp press density f_rxn1[*] +thermo_modify colname auto run 10000 diff --git a/examples/PACKAGES/reaction/tiny_polystyrene/log.10Dec2025.tiny_polystyrene.stabilized.g++.1 b/examples/PACKAGES/reaction/tiny_polystyrene/log.10Dec2025.tiny_polystyrene.stabilized.g++.1 new file mode 100644 index 00000000000..130eda4f038 --- /dev/null +++ b/examples/PACKAGES/reaction/tiny_polystyrene/log.10Dec2025.tiny_polystyrene.stabilized.g++.1 @@ -0,0 +1,270 @@ +LAMMPS (10 Dec 2025 - Development - patch_10Dec2025-120-ga51f9ba0e7-modified) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. + using 1 OpenMP thread(s) per MPI task +# 20 styrene molecules +# three reactions defined + +units real + +boundary p p p + +atom_style full + +kspace_style pppm 1.0e-4 + +pair_style lj/class2/coul/long 8.5 + +angle_style class2 + +bond_style class2 + +dihedral_style class2 + +improper_style class2 + +special_bonds lj/coul 0 0 1 +pair_modify tail yes mix sixthpower + +variable T equal 530 + +read_data tiny_polystyrene.data extra/bond/per/atom 5 extra/angle/per/atom 15 extra/dihedral/per/atom 15 extra/improper/per/atom 25 extra/special/per/atom 25 +Reading data file ... + orthogonal box = (1.7426663 1.7426663 1.7426663) to (18.257334 18.257334 18.257334) + 1 by 1 by 1 MPI processor grid + reading atom labelmap ... + reading bond labelmap ... + reading angle labelmap ... + reading dihedral labelmap ... + reading improper labelmap ... + reading atoms ... + 320 atoms + reading velocities ... + 320 velocities + scanning bonds ... + 8 = max bonds/atom + scanning angles ... + 18 = max angles/atom + scanning dihedrals ... + 22 = max dihedrals/atom + scanning impropers ... + 26 = max impropers/atom + orthogonal box = (1.7426663 1.7426663 1.7426663) to (18.257334 18.257334 18.257334) + 1 by 1 by 1 MPI processor grid + reading bonds ... + 320 bonds + reading angles ... + 480 angles + reading dihedrals ... + 640 dihedrals + reading impropers ... + 160 impropers +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 1 + special bond factors coul: 0 0 1 + 3 = max # of 1-2 neighbors + 6 = max # of 1-3 neighbors + 34 = max # of special neighbors + special bonds CPU = 0.001 seconds + read_data CPU = 0.018 seconds + +molecule mol1 M-M_pre.mol +Read molecule template mol1: +2styrene_unreacted + 1 molecules + 0 fragments + 0 bodies + 32 atoms with max type 4 + 32 bonds with max type 11 + 48 angles with max type 19 + 64 dihedrals with max type 21 + 16 impropers with max type 8 +molecule mol2 M-M_post.mol +Read molecule template mol2: +2styrene_reacted + 1 molecules + 0 fragments + 0 bodies + 32 atoms with max type 6 + 33 bonds with max type 13 + 54 angles with max type 22 + 79 dihedrals with max type 19 + 14 impropers with max type 7 +molecule mol3 M-P_pre.mol +Read molecule template mol3: +chain_plus_styrene_unreacted + 1 molecules + 0 fragments + 0 bodies + 46 atoms with max type 6 + 47 bonds with max type 13 + 75 angles with max type 22 + 105 dihedrals with max type 21 + 21 impropers with max type 8 +molecule mol4 M-P_post.mol +Read molecule template mol4: +chain_plus_styrene_reacted + 1 molecules + 0 fragments + 0 bodies + 46 atoms with max type 6 + 48 bonds with max type 13 + 81 angles with max type 22 + 121 dihedrals with max type 19 + 19 impropers with max type 7 +molecule mol5 P-P_pre.mol +Read molecule template mol5: +chain_chain_unreacted + 1 molecules + 0 fragments + 0 bodies + 50 atoms with max type 6 + 51 bonds with max type 13 + 84 angles with max type 22 + 118 dihedrals with max type 19 + 20 impropers with max type 7 +molecule mol6 P-P_post.mol +Read molecule template mol6: +chain_chain_reacted + 1 molecules + 0 fragments + 0 bodies + 50 atoms with max type 6 + 52 bonds with max type 13 + 90 angles with max type 22 + 135 dihedrals with max type 19 + 18 impropers with max type 2 + +# dump 1 all xyz 5 test_vis.xyz +# dump_modify 1 types labels + +fix rxn1 all bond/react stabilization yes statted_grp .03 react M-M all 1 0 3.0 mol1 mol2 M-M.rxnmap stabilize_steps 100 react M-P all 1 0 3.0 mol3 mol4 M-P.rxnmap stabilize_steps 100 react P-P all 1 0 5.0 mol5 mol6 P-P.rxnmap stabilize_steps 100 +dynamic group bond_react_MASTER_group defined +dynamic group statted_grp_REACT defined + +fix 1 statted_grp_REACT nvt temp $T $T 100 +fix 1 statted_grp_REACT nvt temp 530 $T 100 +fix 1 statted_grp_REACT nvt temp 530 530 100 + +fix 4 bond_react_MASTER_group temp/rescale 1 $T $T 1 1 +fix 4 bond_react_MASTER_group temp/rescale 1 530 $T 1 1 +fix 4 bond_react_MASTER_group temp/rescale 1 530 530 1 1 + +thermo_style custom step temp press density f_rxn1[*] +thermo_modify colname auto + +run 10000 + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Your simulation uses code contributions which should be cited: + +- Type Label Framework: https://doi.org/10.1021/acs.jpcb.3c08419 + +@Article{Gissinger24, + author = {Jacob R. Gissinger, Ilia Nikiforov, Yaser Afshar, Brendon Waters, Moon-ki Choi, Daniel S. Karls, Alexander Stukowski, Wonpil Im, Hendrik Heinz, Axel Kohlmeyer, and Ellad B. Tadmor}, + title = {Type Label Framework for Bonded Force Fields in LAMMPS}, + journal = {J. Phys. Chem. B}, + year = 2024, + volume = 128, + number = 13, + pages = {3282--3297} +} + +- fix bond/react: https://reacter.org, https://doi.org/10.1016/j.polymer.2017.09.038, https://doi.org/10.1021/acs.macromol.0c02012, https://doi.org/10.1016/j.cpc.2024.109287 + +@Article{Gissinger17, + author = {J. R. Gissinger and B. D. Jensen and K. E. Wise}, + title = {Modeling Chemical Reactions in Classical Molecular Dynamics Simulations}, + journal = {Polymer}, + year = 2017, + volume = 128, + pages = {211--217} +} + +@Article{Gissinger20, + author = {J. R. Gissinger, B. D. Jensen, K. E. Wise}, + title = {{REACTER}: A Heuristic Method for Reactive Molecular Dynamics}, + journal = {Macromolecules}, + year = 2020, + volume = 53, + number = 22, + pages = {9953--9961} +} + +@Article{Gissinger24, + author = {J. R. Gissinger, B. D. Jensen, K. E. Wise}, + title = {Molecular Modeling of Reactive Systems with REACTER}, + journal = {Computer Physics Communications}, + year = 2024, + volume = 304, + number = 109287 +} + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +PPPM initialization ... +WARNING: System is not charge neutral, net charge = -0.004 +For more information see https://docs.lammps.org/err0029 (src/kspace.cpp:329) + using 12-bit tables for long-range coulomb + G vector (1/distance) = 0.25561147 + grid = 6 6 6 + stencil order = 5 + estimated absolute RMS force accuracy = 0.0097469157 + estimated relative force accuracy = 2.9352547e-05 + using double precision KISS FFT + 3d grid and FFT values/proc = 1331 216 +Generated 21 of 21 mixed pair_coeff terms from sixthpower/sixthpower mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 10.5 + ghost atom cutoff = 10.5 + binsize = 5.25, bins = 4 4 4 + 2 neighbor lists, perpetual/occasional/extra = 1 1 0 + (1) pair lj/class2/coul/long, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard + (2) fix bond/react, occasional, copy from (1) + attributes: half, newton on + pair build: copy + stencil: none + bin: none +Per MPI rank memory allocation (min/avg/max) = 31.07 | 31.07 | 31.07 Mbytes + Step Temp Press Density f_rxn1:M-M f_rxn1:M-P f_rxn1:P-P + 0 320.13638 8863.4109 0.76796752 0 0 0 + 10000 529.74892 7400.5017 0.76796752 7 1 3 +Loop time of 16.4177 on 1 procs for 10000 steps with 320 atoms + +Performance: 52.626 ns/day, 0.456 hours/ns, 609.097 timesteps/s, 194.911 katom-step/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 | 6.778 | 6.778 | 6.778 | 0.0 | 41.28 +Bond | 4.0389 | 4.0389 | 4.0389 | 0.0 | 24.60 +Kspace | 1.045 | 1.045 | 1.045 | 0.0 | 6.36 +Neigh | 0.65857 | 0.65857 | 0.65857 | 0.0 | 4.01 +Comm | 0.11532 | 0.11532 | 0.11532 | 0.0 | 0.70 +Output | 0.00046322 | 0.00046322 | 0.00046322 | 0.0 | 0.00 +Modify | 3.7598 | 3.7598 | 3.7598 | 0.0 | 22.90 +Other | | 0.02174 | | | 0.13 + +Nlocal: 320 ave 320 max 320 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 3401 ave 3401 max 3401 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 54998 ave 54998 max 54998 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 54998 +Ave neighs/atom = 171.86875 +Ave special neighs/atom = 9.275 +Neighbor list builds = 457 +Dangerous builds = 0 + +# write_restart restart_longrun +# write_data restart_longrun.data nofix +Total wall time: 0:00:16 diff --git a/examples/PACKAGES/reaction/tiny_polystyrene/log.10Dec2025.tiny_polystyrene.stabilized.g++.4 b/examples/PACKAGES/reaction/tiny_polystyrene/log.10Dec2025.tiny_polystyrene.stabilized.g++.4 new file mode 100644 index 00000000000..3f10cbabc7f --- /dev/null +++ b/examples/PACKAGES/reaction/tiny_polystyrene/log.10Dec2025.tiny_polystyrene.stabilized.g++.4 @@ -0,0 +1,270 @@ +LAMMPS (10 Dec 2025 - Development - patch_10Dec2025-120-ga51f9ba0e7-modified) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. + using 1 OpenMP thread(s) per MPI task +# 20 styrene molecules +# three reactions defined + +units real + +boundary p p p + +atom_style full + +kspace_style pppm 1.0e-4 + +pair_style lj/class2/coul/long 8.5 + +angle_style class2 + +bond_style class2 + +dihedral_style class2 + +improper_style class2 + +special_bonds lj/coul 0 0 1 +pair_modify tail yes mix sixthpower + +variable T equal 530 + +read_data tiny_polystyrene.data extra/bond/per/atom 5 extra/angle/per/atom 15 extra/dihedral/per/atom 15 extra/improper/per/atom 25 extra/special/per/atom 25 +Reading data file ... + orthogonal box = (1.7426663 1.7426663 1.7426663) to (18.257334 18.257334 18.257334) + 1 by 2 by 2 MPI processor grid + reading atom labelmap ... + reading bond labelmap ... + reading angle labelmap ... + reading dihedral labelmap ... + reading improper labelmap ... + reading atoms ... + 320 atoms + reading velocities ... + 320 velocities + scanning bonds ... + 8 = max bonds/atom + scanning angles ... + 18 = max angles/atom + scanning dihedrals ... + 22 = max dihedrals/atom + scanning impropers ... + 26 = max impropers/atom + orthogonal box = (1.7426663 1.7426663 1.7426663) to (18.257334 18.257334 18.257334) + 1 by 2 by 2 MPI processor grid + reading bonds ... + 320 bonds + reading angles ... + 480 angles + reading dihedrals ... + 640 dihedrals + reading impropers ... + 160 impropers +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 1 + special bond factors coul: 0 0 1 + 3 = max # of 1-2 neighbors + 6 = max # of 1-3 neighbors + 34 = max # of special neighbors + special bonds CPU = 0.001 seconds + read_data CPU = 0.016 seconds + +molecule mol1 M-M_pre.mol +Read molecule template mol1: +2styrene_unreacted + 1 molecules + 0 fragments + 0 bodies + 32 atoms with max type 4 + 32 bonds with max type 11 + 48 angles with max type 19 + 64 dihedrals with max type 21 + 16 impropers with max type 8 +molecule mol2 M-M_post.mol +Read molecule template mol2: +2styrene_reacted + 1 molecules + 0 fragments + 0 bodies + 32 atoms with max type 6 + 33 bonds with max type 13 + 54 angles with max type 22 + 79 dihedrals with max type 19 + 14 impropers with max type 7 +molecule mol3 M-P_pre.mol +Read molecule template mol3: +chain_plus_styrene_unreacted + 1 molecules + 0 fragments + 0 bodies + 46 atoms with max type 6 + 47 bonds with max type 13 + 75 angles with max type 22 + 105 dihedrals with max type 21 + 21 impropers with max type 8 +molecule mol4 M-P_post.mol +Read molecule template mol4: +chain_plus_styrene_reacted + 1 molecules + 0 fragments + 0 bodies + 46 atoms with max type 6 + 48 bonds with max type 13 + 81 angles with max type 22 + 121 dihedrals with max type 19 + 19 impropers with max type 7 +molecule mol5 P-P_pre.mol +Read molecule template mol5: +chain_chain_unreacted + 1 molecules + 0 fragments + 0 bodies + 50 atoms with max type 6 + 51 bonds with max type 13 + 84 angles with max type 22 + 118 dihedrals with max type 19 + 20 impropers with max type 7 +molecule mol6 P-P_post.mol +Read molecule template mol6: +chain_chain_reacted + 1 molecules + 0 fragments + 0 bodies + 50 atoms with max type 6 + 52 bonds with max type 13 + 90 angles with max type 22 + 135 dihedrals with max type 19 + 18 impropers with max type 2 + +# dump 1 all xyz 5 test_vis.xyz +# dump_modify 1 types labels + +fix rxn1 all bond/react stabilization yes statted_grp .03 react M-M all 1 0 3.0 mol1 mol2 M-M.rxnmap stabilize_steps 100 react M-P all 1 0 3.0 mol3 mol4 M-P.rxnmap stabilize_steps 100 react P-P all 1 0 5.0 mol5 mol6 P-P.rxnmap stabilize_steps 100 +dynamic group bond_react_MASTER_group defined +dynamic group statted_grp_REACT defined + +fix 1 statted_grp_REACT nvt temp $T $T 100 +fix 1 statted_grp_REACT nvt temp 530 $T 100 +fix 1 statted_grp_REACT nvt temp 530 530 100 + +fix 4 bond_react_MASTER_group temp/rescale 1 $T $T 1 1 +fix 4 bond_react_MASTER_group temp/rescale 1 530 $T 1 1 +fix 4 bond_react_MASTER_group temp/rescale 1 530 530 1 1 + +thermo_style custom step temp press density f_rxn1[*] +thermo_modify colname auto + +run 10000 + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Your simulation uses code contributions which should be cited: + +- Type Label Framework: https://doi.org/10.1021/acs.jpcb.3c08419 + +@Article{Gissinger24, + author = {Jacob R. Gissinger, Ilia Nikiforov, Yaser Afshar, Brendon Waters, Moon-ki Choi, Daniel S. Karls, Alexander Stukowski, Wonpil Im, Hendrik Heinz, Axel Kohlmeyer, and Ellad B. Tadmor}, + title = {Type Label Framework for Bonded Force Fields in LAMMPS}, + journal = {J. Phys. Chem. B}, + year = 2024, + volume = 128, + number = 13, + pages = {3282--3297} +} + +- fix bond/react: https://reacter.org, https://doi.org/10.1016/j.polymer.2017.09.038, https://doi.org/10.1021/acs.macromol.0c02012, https://doi.org/10.1016/j.cpc.2024.109287 + +@Article{Gissinger17, + author = {J. R. Gissinger and B. D. Jensen and K. E. Wise}, + title = {Modeling Chemical Reactions in Classical Molecular Dynamics Simulations}, + journal = {Polymer}, + year = 2017, + volume = 128, + pages = {211--217} +} + +@Article{Gissinger20, + author = {J. R. Gissinger, B. D. Jensen, K. E. Wise}, + title = {{REACTER}: A Heuristic Method for Reactive Molecular Dynamics}, + journal = {Macromolecules}, + year = 2020, + volume = 53, + number = 22, + pages = {9953--9961} +} + +@Article{Gissinger24, + author = {J. R. Gissinger, B. D. Jensen, K. E. Wise}, + title = {Molecular Modeling of Reactive Systems with REACTER}, + journal = {Computer Physics Communications}, + year = 2024, + volume = 304, + number = 109287 +} + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +PPPM initialization ... +WARNING: System is not charge neutral, net charge = -0.004 +For more information see https://docs.lammps.org/err0029 (src/kspace.cpp:329) + using 12-bit tables for long-range coulomb + G vector (1/distance) = 0.25561147 + grid = 6 6 6 + stencil order = 5 + estimated absolute RMS force accuracy = 0.0097469157 + estimated relative force accuracy = 2.9352547e-05 + using double precision KISS FFT + 3d grid and FFT values/proc = 704 54 +Generated 21 of 21 mixed pair_coeff terms from sixthpower/sixthpower mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 10.5 + ghost atom cutoff = 10.5 + binsize = 5.25, bins = 4 4 4 + 2 neighbor lists, perpetual/occasional/extra = 1 1 0 + (1) pair lj/class2/coul/long, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard + (2) fix bond/react, occasional, copy from (1) + attributes: half, newton on + pair build: copy + stencil: none + bin: none +Per MPI rank memory allocation (min/avg/max) = 30.65 | 30.66 | 30.68 Mbytes + Step Temp Press Density f_rxn1:M-M f_rxn1:M-P f_rxn1:P-P + 0 320.13638 8863.4109 0.76796752 0 0 0 + 10000 528.57227 1027.4287 0.76796752 7 0 4 +Loop time of 6.31825 on 4 procs for 10000 steps with 320 atoms + +Performance: 136.747 ns/day, 0.176 hours/ns, 1582.716 timesteps/s, 506.469 katom-step/s +97.0% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 1.5624 | 1.6993 | 1.8521 | 9.2 | 26.90 +Bond | 1.0072 | 1.0535 | 1.1143 | 4.1 | 16.67 +Kspace | 0.6254 | 0.79407 | 0.97393 | 14.2 | 12.57 +Neigh | 0.18939 | 0.18941 | 0.18944 | 0.0 | 3.00 +Comm | 0.28804 | 0.29089 | 0.29442 | 0.4 | 4.60 +Output | 8.8907e-05 | 9.3901e-05 | 0.00010602 | 0.0 | 0.00 +Modify | 2.2063 | 2.2064 | 2.2065 | 0.0 | 34.92 +Other | | 0.08454 | | | 1.34 + +Nlocal: 80 ave 81 max 79 min +Histogram: 1 0 0 0 0 2 0 0 0 1 +Nghost: 2195 ave 2214 max 2184 min +Histogram: 1 1 0 1 0 0 0 0 0 1 +Neighs: 13754 ave 14503 max 12741 min +Histogram: 1 0 0 1 0 0 0 0 0 2 + +Total # of neighbors = 55016 +Ave neighs/atom = 171.925 +Ave special neighs/atom = 9.1 +Neighbor list builds = 456 +Dangerous builds = 0 + +# write_restart restart_longrun +# write_data restart_longrun.data nofix +Total wall time: 0:00:06 diff --git a/examples/PACKAGES/reaction/tiny_polystyrene/log.4Nov19.tiny_polystyrene.stabilized.g++.4 b/examples/PACKAGES/reaction/tiny_polystyrene/log.4Nov19.tiny_polystyrene.stabilized.g++.4 deleted file mode 100644 index aaa8b2f190e..00000000000 --- a/examples/PACKAGES/reaction/tiny_polystyrene/log.4Nov19.tiny_polystyrene.stabilized.g++.4 +++ /dev/null @@ -1,329 +0,0 @@ -LAMMPS (4 Nov 2022) -# 20 styrene molecules -# three reactions defined - -units real - -boundary p p p - -atom_style full - -kspace_style pppm 1.0e-4 - -pair_style lj/class2/coul/long 8.5 - -angle_style class2 - -bond_style class2 - -dihedral_style class2 - -improper_style class2 - -variable T equal 530 - -read_data tiny_polystyrene.data extra/bond/per/atom 5 extra/angle/per/atom 15 extra/dihedral/per/atom 15 extra/improper/per/atom 25 extra/special/per/atom 25 -Reading data file ... - orthogonal box = (1.7426663 1.7426663 1.7426663) to (18.257334 18.257334 18.257334) - 1 by 2 by 2 MPI processor grid - reading atom labelmap ... - reading bond labelmap ... - reading angle labelmap ... - reading dihedral labelmap ... - reading improper labelmap ... - reading atoms ... - 320 atoms - reading velocities ... - 320 velocities - scanning bonds ... - 8 = max bonds/atom - scanning angles ... - 18 = max angles/atom - scanning dihedrals ... - 22 = max dihedrals/atom - scanning impropers ... - 26 = max impropers/atom - reading bonds ... - 320 bonds - reading angles ... - 480 angles - reading dihedrals ... - 640 dihedrals - reading impropers ... - 160 impropers -Finding 1-2 1-3 1-4 neighbors ... - special bond factors lj: 0 0 0 - special bond factors coul: 0 0 0 - 3 = max # of 1-2 neighbors - 6 = max # of 1-3 neighbors - 12 = max # of 1-4 neighbors - 39 = max # of special neighbors - special bonds CPU = 0.001 seconds - read_data CPU = 0.018 seconds - -molecule mol1 2styrene_unreacted.molecule_template -Read molecule template mol1: - 1 molecules - 0 fragments - 32 atoms with max type 4 - 32 bonds with max type 11 - 48 angles with max type 19 - 64 dihedrals with max type 21 - 16 impropers with max type 8 -molecule mol2 2styrene_reacted.molecule_template -Read molecule template mol2: - 1 molecules - 0 fragments - 32 atoms with max type 6 - 33 bonds with max type 13 - 54 angles with max type 22 - 79 dihedrals with max type 19 - 14 impropers with max type 7 -molecule mol3 chain_plus_styrene_unreacted.molecule_template -Read molecule template mol3: - 1 molecules - 0 fragments - 46 atoms with max type 6 - 47 bonds with max type 13 - 75 angles with max type 22 - 105 dihedrals with max type 21 - 21 impropers with max type 8 -molecule mol4 chain_plus_styrene_reacted.molecule_template -Read molecule template mol4: - 1 molecules - 0 fragments - 46 atoms with max type 6 - 48 bonds with max type 13 - 81 angles with max type 22 - 121 dihedrals with max type 19 - 19 impropers with max type 7 -molecule mol5 chain_chain_unreacted.molecule_template -Read molecule template mol5: - 1 molecules - 0 fragments - 50 atoms with max type 6 - 51 bonds with max type 13 - 84 angles with max type 22 - 118 dihedrals with max type 19 - 20 impropers with max type 7 -molecule mol6 chain_chain_reacted.molecule_template -Read molecule template mol6: - 1 molecules - 0 fragments - 50 atoms with max type 6 - 52 bonds with max type 13 - 90 angles with max type 22 - 135 dihedrals with max type 19 - 18 impropers with max type 2 - -thermo 100 - -# dump 1 all xyz 5 test_vis.xyz - -fix rxn1 all bond/react stabilization yes statted_grp .03 react rxn1 all 1 0 3.0 mol1 mol2 2styrene_map stabilize_steps 100 react rxn2 all 1 0 3.0 mol3 mol4 chain_plus_styrene_map stabilize_steps 100 react rxn3 all 1 0 5.0 mol5 mol6 chain_chain_map stabilize_steps 100 -dynamic group bond_react_MASTER_group defined -dynamic group statted_grp_REACT defined - -fix 1 statted_grp_REACT nvt temp $T $T 100 -fix 1 statted_grp_REACT nvt temp 530 $T 100 -fix 1 statted_grp_REACT nvt temp 530 530 100 - -fix 4 bond_react_MASTER_group temp/rescale 1 $T $T 1 1 -fix 4 bond_react_MASTER_group temp/rescale 1 530 $T 1 1 -fix 4 bond_react_MASTER_group temp/rescale 1 530 530 1 1 - -thermo_style custom step temp press density f_rxn1[1] f_rxn1[2] f_rxn1[3] - -run 10000 - -CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE - -Your simulation uses code contributions which should be cited: - -- fix bond/react: reacter.org doi:10.1016/j.polymer.2017.09.038, doi:10.1021/acs.macromol.0c02012 - -@Article{Gissinger17, - author = {J. R. Gissinger and B. D. Jensen and K. E. Wise}, - title = {Modeling Chemical Reactions in Classical Molecular Dynamics Simulations}, - journal = {Polymer}, - year = 2017, - volume = 128, - pages = {211--217} -} - -@Article{Gissinger20, - author = {J. R. Gissinger, B. D. Jensen, K. E. Wise}, - title = {{REACTER}: A Heuristic Method for Reactive Molecular Dynamics}, - journal = {Macromolecules}, - year = 2020, - volume = 53, - number = 22, - pages = {9953--9961} -} - -CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE - -PPPM initialization ... -WARNING: System is not charge neutral, net charge = -0.004 (../kspace.cpp:327) - using 12-bit tables for long-range coulomb (../kspace.cpp:342) - G vector (1/distance) = 0.25561147 - grid = 6 6 6 - stencil order = 5 - estimated absolute RMS force accuracy = 0.0097469157 - estimated relative force accuracy = 2.9352547e-05 - using double precision KISS FFT - 3d grid and FFT values/proc = 704 72 -Generated 21 of 21 mixed pair_coeff terms from sixthpower/geometric mixing rule -Neighbor list info ... - update: every = 1 steps, delay = 0 steps, check = yes - max neighbors/atom: 2000, page size: 100000 - master list distance cutoff = 10.5 - ghost atom cutoff = 10.5 - binsize = 5.25, bins = 4 4 4 - 2 neighbor lists, perpetual/occasional/extra = 1 1 0 - (1) pair lj/class2/coul/long, perpetual - attributes: half, newton on - pair build: half/bin/newton - stencil: half/bin/3d - bin: standard - (2) fix bond/react, occasional, copy from (1) - attributes: half, newton on - pair build: copy - stencil: none - bin: none -Per MPI rank memory allocation (min/avg/max) = 31.03 | 31.05 | 31.06 Mbytes - Step Temp Press Density f_rxn1[1] f_rxn1[2] f_rxn1[3] - 0 320.13638 -376.0844 0.76796752 0 0 0 - 100 342.22237 -3489.4495 0.76796752 0 0 0 - 200 412.23828 -1367.104 0.76796752 0 0 0 - 300 467.98145 4841.002 0.76796752 0 0 0 - 400 505.39864 2213.0509 0.76796752 1 0 0 - 500 519.63371 -28223.513 0.76796752 2 0 0 - 600 526.40655 8701.2728 0.76796752 2 0 0 - 700 579.91953 2507.5868 0.76796752 2 0 0 - 800 517.29593 5558.2895 0.76796752 2 0 0 - 900 503.38392 -5027.1154 0.76796752 2 0 0 - 1000 509.30767 3979.0529 0.76796752 2 0 0 - 1100 551.34763 5119.0848 0.76796752 2 0 0 - 1200 562.5176 -2867.8688 0.76796752 2 0 0 - 1300 552.90918 2090.7508 0.76796752 2 0 0 - 1400 516.10716 3374.2169 0.76796752 2 0 0 - 1500 518.70418 471.99711 0.76796752 2 0 0 - 1600 559.49915 5450.8774 0.76796752 2 0 0 - 1700 531.50638 4525.5892 0.76796752 2 0 0 - 1800 529.18331 -3566.9245 0.76796752 2 0 0 - 1900 517.79846 -2364.8287 0.76796752 2 0 0 - 2000 495.0983 -488.99696 0.76796752 2 0 0 - 2100 567.80521 2050.9596 0.76796752 3 0 0 - 2200 553.24434 5665.0753 0.76796752 3 0 0 - 2300 561.08278 2879.1572 0.76796752 3 0 0 - 2400 461.3712 3185.6091 0.76796752 3 0 0 - 2500 500.95595 565.81792 0.76796752 4 0 0 - 2600 538.3865 463.58228 0.76796752 4 0 0 - 2700 525.95739 2011.1914 0.76796752 4 0 0 - 2800 533.4197 157.38106 0.76796752 4 0 0 - 2900 526.27036 1331.5115 0.76796752 5 1 0 - 3000 502.65015 -93.915921 0.76796752 5 1 0 - 3100 505.4224 -1314.224 0.76796752 5 1 0 - 3200 538.52692 10420.644 0.76796752 5 1 0 - 3300 518.32801 5933.553 0.76796752 5 2 0 - 3400 540.04815 741.54438 0.76796752 6 2 1 - 3500 554.07567 5778.8913 0.76796752 6 2 1 - 3600 546.90828 4751.5437 0.76796752 6 2 1 - 3700 529.75739 432.20829 0.76796752 6 2 1 - 3800 542.806 -380.00399 0.76796752 6 2 1 - 3900 521.55789 -1224.1912 0.76796752 6 2 2 - 4000 519.73935 2792.996 0.76796752 6 2 2 - 4100 535.06314 -1926.8692 0.76796752 6 2 2 - 4200 549.75482 2852.5521 0.76796752 6 2 2 - 4300 510.71949 6581.1729 0.76796752 7 2 2 - 4400 485.93403 -695.24007 0.76796752 7 2 2 - 4500 535.3677 2519.2711 0.76796752 7 2 2 - 4600 504.87216 533.16619 0.76796752 7 2 2 - 4700 495.68939 5502.1672 0.76796752 7 2 2 - 4800 534.13893 -1187.1228 0.76796752 7 2 2 - 4900 512.56394 1731.3856 0.76796752 7 2 2 - 5000 508.63054 2467.0387 0.76796752 7 2 2 - 5100 501.65027 3403.8111 0.76796752 7 2 2 - 5200 556.68281 4310.0492 0.76796752 7 2 2 - 5300 506.86652 -773630.77 0.76796752 7 2 3 - 5400 570.01783 11663.867 0.76796752 7 2 3 - 5500 538.08785 6391.6546 0.76796752 7 2 3 - 5600 502.48456 44.409604 0.76796752 7 2 3 - 5700 545.75445 1558.6373 0.76796752 7 2 3 - 5800 517.5076 -166.52488 0.76796752 7 2 3 - 5900 558.64383 1528.1198 0.76796752 7 2 3 - 6000 557.8358 442.21273 0.76796752 7 2 3 - 6100 483.13771 5201.4489 0.76796752 8 2 3 - 6200 533.42675 5112.0828 0.76796752 8 2 3 - 6300 576.32772 269.77058 0.76796752 8 2 3 - 6400 492.79331 565.35222 0.76796752 8 2 4 - 6500 514.5727 6233.7568 0.76796752 8 2 4 - 6600 509.86906 -943.58621 0.76796752 8 2 4 - 6700 546.62752 -323284.04 0.76796752 8 2 5 - 6800 541.19749 1306.3182 0.76796752 8 2 5 - 6900 497.72333 -1792.483 0.76796752 8 2 5 - 7000 516.02636 2028.3813 0.76796752 8 2 5 - 7100 486.54013 6153.9142 0.76796752 8 2 5 - 7200 553.33698 4352.3987 0.76796752 8 2 5 - 7300 519.23896 6536.766 0.76796752 8 2 5 - 7400 486.74787 -1744.8351 0.76796752 8 2 5 - 7500 516.71935 -315.43649 0.76796752 8 2 5 - 7600 513.62572 -1100.1363 0.76796752 8 2 5 - 7700 531.11296 1727.7113 0.76796752 8 2 5 - 7800 530.82809 9566.2386 0.76796752 8 2 5 - 7900 513.09884 8545.6728 0.76796752 8 2 5 - 8000 511.38714 2995.8438 0.76796752 8 2 5 - 8100 527.76731 709.63649 0.76796752 8 2 5 - 8200 514.09092 2103.8591 0.76796752 8 2 5 - 8300 534.90612 7707.3378 0.76796752 8 2 5 - 8400 547.40716 660.54641 0.76796752 8 2 5 - 8500 518.75522 -872.69754 0.76796752 8 2 5 - 8600 511.70922 6645.6264 0.76796752 8 2 5 - 8700 480.70739 -640.57939 0.76796752 8 2 5 - 8800 527.35475 6944.8472 0.76796752 8 2 5 - 8900 554.26477 -2311.6153 0.76796752 8 2 5 - 9000 520.48502 1469.4805 0.76796752 8 2 5 - 9100 522.0619 -4159.697 0.76796752 8 2 5 - 9200 501.34664 7486.8266 0.76796752 8 2 5 - 9300 524.96422 6158.2524 0.76796752 8 2 5 - 9400 564.30456 -2964.7187 0.76796752 8 2 6 - 9500 569.02736 5765.8856 0.76796752 8 2 6 - 9600 554.31532 2805.5671 0.76796752 8 2 6 - 9700 521.3957 -924.74562 0.76796752 8 2 6 - 9800 518.45356 -2440.5266 0.76796752 8 2 6 - 9900 512.03787 -834.07647 0.76796752 8 2 6 - 10000 573.10576 4372.5769 0.76796752 8 2 6 -Loop time of 11.2088 on 4 procs for 10000 steps with 320 atoms - -Performance: 77.082 ns/day, 0.311 hours/ns, 892.155 timesteps/s, 285.490 katom-step/s -100.0% CPU use with 4 MPI tasks x no OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 2.6217 | 2.8126 | 3.0128 | 9.5 | 25.09 -Bond | 2.0439 | 2.1734 | 2.3326 | 7.0 | 19.39 -Kspace | 1.4277 | 1.7772 | 2.0148 | 17.9 | 15.86 -Neigh | 0.32002 | 0.3201 | 0.3202 | 0.0 | 2.86 -Comm | 0.42382 | 0.43347 | 0.4412 | 1.1 | 3.87 -Output | 0.0013461 | 0.0015202 | 0.0020328 | 0.8 | 0.01 -Modify | 3.6386 | 3.6396 | 3.6408 | 0.0 | 32.47 -Other | | 0.05092 | | | 0.45 - -Nlocal: 80 ave 93 max 71 min -Histogram: 1 1 0 0 1 0 0 0 0 1 -Nghost: 2184.75 ave 2276 max 2092 min -Histogram: 1 0 1 0 0 0 0 1 0 1 -Neighs: 13678.5 ave 15576 max 11682 min -Histogram: 1 0 0 1 0 0 0 1 0 1 - -Total # of neighbors = 54714 -Ave neighs/atom = 170.98125 -Ave special neighs/atom = 10.9125 -Neighbor list builds = 471 -Dangerous builds = 0 - -# write_restart restart_longrun nofix -# write_data restart_longrun.data -Total wall time: 0:00:11 diff --git a/examples/PACKAGES/reaction/tiny_polystyrene/log.4Nov2020.tiny_polystyrene.stabilized.g++.1 b/examples/PACKAGES/reaction/tiny_polystyrene/log.4Nov2020.tiny_polystyrene.stabilized.g++.1 deleted file mode 100644 index be40e6b0de4..00000000000 --- a/examples/PACKAGES/reaction/tiny_polystyrene/log.4Nov2020.tiny_polystyrene.stabilized.g++.1 +++ /dev/null @@ -1,329 +0,0 @@ -LAMMPS (4 Nov 2022) -# 20 styrene molecules -# three reactions defined - -units real - -boundary p p p - -atom_style full - -kspace_style pppm 1.0e-4 - -pair_style lj/class2/coul/long 8.5 - -angle_style class2 - -bond_style class2 - -dihedral_style class2 - -improper_style class2 - -variable T equal 530 - -read_data tiny_polystyrene.data extra/bond/per/atom 5 extra/angle/per/atom 15 extra/dihedral/per/atom 15 extra/improper/per/atom 25 extra/special/per/atom 25 -Reading data file ... - orthogonal box = (1.7426663 1.7426663 1.7426663) to (18.257334 18.257334 18.257334) - 1 by 1 by 1 MPI processor grid - reading atom labelmap ... - reading bond labelmap ... - reading angle labelmap ... - reading dihedral labelmap ... - reading improper labelmap ... - reading atoms ... - 320 atoms - reading velocities ... - 320 velocities - scanning bonds ... - 8 = max bonds/atom - scanning angles ... - 18 = max angles/atom - scanning dihedrals ... - 22 = max dihedrals/atom - scanning impropers ... - 26 = max impropers/atom - reading bonds ... - 320 bonds - reading angles ... - 480 angles - reading dihedrals ... - 640 dihedrals - reading impropers ... - 160 impropers -Finding 1-2 1-3 1-4 neighbors ... - special bond factors lj: 0 0 0 - special bond factors coul: 0 0 0 - 3 = max # of 1-2 neighbors - 6 = max # of 1-3 neighbors - 12 = max # of 1-4 neighbors - 39 = max # of special neighbors - special bonds CPU = 0.001 seconds - read_data CPU = 0.015 seconds - -molecule mol1 2styrene_unreacted.molecule_template -Read molecule template mol1: - 1 molecules - 0 fragments - 32 atoms with max type 4 - 32 bonds with max type 11 - 48 angles with max type 19 - 64 dihedrals with max type 21 - 16 impropers with max type 8 -molecule mol2 2styrene_reacted.molecule_template -Read molecule template mol2: - 1 molecules - 0 fragments - 32 atoms with max type 6 - 33 bonds with max type 13 - 54 angles with max type 22 - 79 dihedrals with max type 19 - 14 impropers with max type 7 -molecule mol3 chain_plus_styrene_unreacted.molecule_template -Read molecule template mol3: - 1 molecules - 0 fragments - 46 atoms with max type 6 - 47 bonds with max type 13 - 75 angles with max type 22 - 105 dihedrals with max type 21 - 21 impropers with max type 8 -molecule mol4 chain_plus_styrene_reacted.molecule_template -Read molecule template mol4: - 1 molecules - 0 fragments - 46 atoms with max type 6 - 48 bonds with max type 13 - 81 angles with max type 22 - 121 dihedrals with max type 19 - 19 impropers with max type 7 -molecule mol5 chain_chain_unreacted.molecule_template -Read molecule template mol5: - 1 molecules - 0 fragments - 50 atoms with max type 6 - 51 bonds with max type 13 - 84 angles with max type 22 - 118 dihedrals with max type 19 - 20 impropers with max type 7 -molecule mol6 chain_chain_reacted.molecule_template -Read molecule template mol6: - 1 molecules - 0 fragments - 50 atoms with max type 6 - 52 bonds with max type 13 - 90 angles with max type 22 - 135 dihedrals with max type 19 - 18 impropers with max type 2 - -thermo 100 - -# dump 1 all xyz 5 test_vis.xyz - -fix rxn1 all bond/react stabilization yes statted_grp .03 react rxn1 all 1 0 3.0 mol1 mol2 2styrene_map stabilize_steps 100 react rxn2 all 1 0 3.0 mol3 mol4 chain_plus_styrene_map stabilize_steps 100 react rxn3 all 1 0 5.0 mol5 mol6 chain_chain_map stabilize_steps 100 -dynamic group bond_react_MASTER_group defined -dynamic group statted_grp_REACT defined - -fix 1 statted_grp_REACT nvt temp $T $T 100 -fix 1 statted_grp_REACT nvt temp 530 $T 100 -fix 1 statted_grp_REACT nvt temp 530 530 100 - -fix 4 bond_react_MASTER_group temp/rescale 1 $T $T 1 1 -fix 4 bond_react_MASTER_group temp/rescale 1 530 $T 1 1 -fix 4 bond_react_MASTER_group temp/rescale 1 530 530 1 1 - -thermo_style custom step temp press density f_rxn1[1] f_rxn1[2] f_rxn1[3] - -run 10000 - -CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE - -Your simulation uses code contributions which should be cited: - -- fix bond/react: reacter.org doi:10.1016/j.polymer.2017.09.038, doi:10.1021/acs.macromol.0c02012 - -@Article{Gissinger17, - author = {J. R. Gissinger and B. D. Jensen and K. E. Wise}, - title = {Modeling Chemical Reactions in Classical Molecular Dynamics Simulations}, - journal = {Polymer}, - year = 2017, - volume = 128, - pages = {211--217} -} - -@Article{Gissinger20, - author = {J. R. Gissinger, B. D. Jensen, K. E. Wise}, - title = {{REACTER}: A Heuristic Method for Reactive Molecular Dynamics}, - journal = {Macromolecules}, - year = 2020, - volume = 53, - number = 22, - pages = {9953--9961} -} - -CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE - -PPPM initialization ... -WARNING: System is not charge neutral, net charge = -0.004 (../kspace.cpp:327) - using 12-bit tables for long-range coulomb (../kspace.cpp:342) - G vector (1/distance) = 0.25561147 - grid = 6 6 6 - stencil order = 5 - estimated absolute RMS force accuracy = 0.0097469157 - estimated relative force accuracy = 2.9352547e-05 - using double precision KISS FFT - 3d grid and FFT values/proc = 1331 216 -Generated 21 of 21 mixed pair_coeff terms from sixthpower/geometric mixing rule -Neighbor list info ... - update: every = 1 steps, delay = 0 steps, check = yes - max neighbors/atom: 2000, page size: 100000 - master list distance cutoff = 10.5 - ghost atom cutoff = 10.5 - binsize = 5.25, bins = 4 4 4 - 2 neighbor lists, perpetual/occasional/extra = 1 1 0 - (1) pair lj/class2/coul/long, perpetual - attributes: half, newton on - pair build: half/bin/newton - stencil: half/bin/3d - bin: standard - (2) fix bond/react, occasional, copy from (1) - attributes: half, newton on - pair build: copy - stencil: none - bin: none -Per MPI rank memory allocation (min/avg/max) = 31.51 | 31.51 | 31.51 Mbytes - Step Temp Press Density f_rxn1[1] f_rxn1[2] f_rxn1[3] - 0 320.13638 -376.0844 0.76796752 0 0 0 - 100 342.22237 -3489.4495 0.76796752 0 0 0 - 200 412.23828 -1367.104 0.76796752 0 0 0 - 300 467.98145 4841.002 0.76796752 0 0 0 - 400 505.39864 2213.0509 0.76796752 1 0 0 - 500 519.63371 -28223.513 0.76796752 2 0 0 - 600 526.40655 8701.2728 0.76796752 2 0 0 - 700 579.91953 2507.5868 0.76796752 2 0 0 - 800 517.29593 5558.2894 0.76796752 2 0 0 - 900 503.38392 -5027.1155 0.76796752 2 0 0 - 1000 509.30766 3979.0526 0.76796752 2 0 0 - 1100 551.34763 5119.0854 0.76796752 2 0 0 - 1200 562.51766 -2867.8721 0.76796752 2 0 0 - 1300 552.90947 2090.7196 0.76796752 2 0 0 - 1400 516.10667 3374.3471 0.76796752 2 0 0 - 1500 518.70363 472.0237 0.76796752 2 0 0 - 1600 559.50145 5451.1908 0.76796752 2 0 0 - 1700 531.49515 4526.9547 0.76796752 2 0 0 - 1800 529.18545 -3566.8838 0.76796752 2 0 0 - 1900 517.52577 -2390.6662 0.76796752 2 0 0 - 2000 495.24246 -485.62368 0.76796752 2 0 0 - 2100 567.90338 2009.3507 0.76796752 3 0 0 - 2200 553.05006 5694.0307 0.76796752 3 0 0 - 2300 561.22521 2944.2766 0.76796752 3 0 0 - 2400 460.05535 3058.3944 0.76796752 3 0 0 - 2500 501.01426 365.04418 0.76796752 4 0 0 - 2600 543.94728 267.33298 0.76796752 4 0 0 - 2700 539.40536 4258.9345 0.76796752 4 0 0 - 2800 557.67853 -2732.3135 0.76796752 4 0 0 - 2900 539.85456 3987.7331 0.76796752 4 1 0 - 3000 501.3125 3280.3821 0.76796752 4 1 0 - 3100 537.77092 -5290.371 0.76796752 4 1 0 - 3200 528.20744 11690.902 0.76796752 4 1 0 - 3300 548.56721 2464.6039 0.76796752 4 1 0 - 3400 542.73725 -27951.173 0.76796752 4 1 1 - 3500 547.63988 7925.1202 0.76796752 4 1 1 - 3600 502.69726 7875.8308 0.76796752 4 1 1 - 3700 495.26614 -1907.7215 0.76796752 4 1 1 - 3800 526.91826 -4267.1784 0.76796752 4 1 1 - 3900 538.8248 6811.7446 0.76796752 4 1 1 - 4000 531.42158 5031.2992 0.76796752 4 1 1 - 4100 539.69772 6278.9861 0.76796752 4 1 1 - 4200 519.11497 9206.6513 0.76796752 4 1 1 - 4300 518.08237 -63.769046 0.76796752 4 1 1 - 4400 582.43352 4189.0234 0.76796752 4 1 1 - 4500 541.87979 -2072.4133 0.76796752 4 1 1 - 4600 514.7508 7502.1057 0.76796752 4 1 1 - 4700 530.22173 51.50674 0.76796752 4 1 1 - 4800 507.14885 5148.7797 0.76796752 4 1 1 - 4900 516.05055 9110.3072 0.76796752 4 1 1 - 5000 552.55865 7310.0399 0.76796752 4 1 1 - 5100 581.79588 3282.8939 0.76796752 4 1 1 - 5200 523.07607 -1312.6111 0.76796752 4 1 1 - 5300 528.44235 -2242.0268 0.76796752 4 1 1 - 5400 537.63408 4599.5474 0.76796752 4 1 1 - 5500 526.75093 5551.7841 0.76796752 4 1 1 - 5600 562.74766 2764.4556 0.76796752 4 1 1 - 5700 545.12259 -3139.3468 0.76796752 4 1 1 - 5800 563.77404 4261.7786 0.76796752 4 1 1 - 5900 514.07804 4057.43 0.76796752 4 1 1 - 6000 548.42605 -2814.3308 0.76796752 4 1 1 - 6100 525.16391 -2902.5409 0.76796752 4 1 1 - 6200 504.92542 -706.19923 0.76796752 4 1 2 - 6300 531.55271 1217.7795 0.76796752 4 1 2 - 6400 537.29797 264.24006 0.76796752 4 1 2 - 6500 581.8752 2228.1037 0.76796752 4 1 2 - 6600 536.95487 -10318.365 0.76796752 4 2 2 - 6700 498.26961 5005.4587 0.76796752 5 2 2 - 6800 526.00873 -2678.0327 0.76796752 5 2 2 - 6900 542.74619 -1567.8558 0.76796752 5 2 2 - 7000 549.02037 8321.4935 0.76796752 5 2 2 - 7100 542.28295 -1513.6114 0.76796752 5 2 2 - 7200 474.70347 2120.9699 0.76796752 5 2 2 - 7300 506.58637 2588.8837 0.76796752 5 2 2 - 7400 512.45393 -2101371.7 0.76796752 5 2 3 - 7500 546.20285 -2458.3002 0.76796752 5 2 3 - 7600 551.57132 3148.9131 0.76796752 5 2 3 - 7700 544.3684 -775.59686 0.76796752 5 2 3 - 7800 511.32529 2353.0343 0.76796752 5 2 3 - 7900 520.30502 10726.007 0.76796752 5 2 3 - 8000 561.81009 12476.296 0.76796752 5 2 3 - 8100 588.85859 5905.4979 0.76796752 5 2 3 - 8200 490.1071 1132.5027 0.76796752 5 2 3 - 8300 537.65085 -1445.0979 0.76796752 5 2 3 - 8400 523.60343 -589.18012 0.76796752 5 2 3 - 8500 538.90848 -300.32152 0.76796752 5 2 3 - 8600 573.63835 5912.9027 0.76796752 5 2 3 - 8700 557.82593 2585.6634 0.76796752 5 2 3 - 8800 562.5277 -1843272.8 0.76796752 5 2 4 - 8900 564.26894 -1396.8521 0.76796752 5 2 4 - 9000 576.4382 5029.6995 0.76796752 5 2 4 - 9100 514.83258 -935.9015 0.76796752 5 2 4 - 9200 536.33755 -1671.9254 0.76796752 5 2 4 - 9300 494.49553 582.08687 0.76796752 5 2 4 - 9400 532.12156 -6991.3223 0.76796752 6 2 4 - 9500 528.87489 4587.7048 0.76796752 6 2 4 - 9600 555.92299 -3688.5966 0.76796752 6 2 4 - 9700 510.09341 1545.1276 0.76796752 6 2 4 - 9800 505.94984 -4677.2879 0.76796752 6 2 4 - 9900 531.38104 4891.0352 0.76796752 6 2 4 - 10000 517.59995 4299.0553 0.76796752 6 2 4 -Loop time of 29.4182 on 1 procs for 10000 steps with 320 atoms - -Performance: 29.370 ns/day, 0.817 hours/ns, 339.926 timesteps/s, 108.776 katom-step/s -100.0% CPU use with 1 MPI tasks x no OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 10.883 | 10.883 | 10.883 | 0.0 | 36.99 -Bond | 8.0953 | 8.0953 | 8.0953 | 0.0 | 27.52 -Kspace | 2.6136 | 2.6136 | 2.6136 | 0.0 | 8.88 -Neigh | 1.0863 | 1.0863 | 1.0863 | 0.0 | 3.69 -Comm | 0.2095 | 0.2095 | 0.2095 | 0.0 | 0.71 -Output | 0.0019263 | 0.0019263 | 0.0019263 | 0.0 | 0.01 -Modify | 6.4695 | 6.4695 | 6.4695 | 0.0 | 21.99 -Other | | 0.05924 | | | 0.20 - -Nlocal: 320 ave 320 max 320 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 3425 ave 3425 max 3425 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Neighs: 54783 ave 54783 max 54783 min -Histogram: 1 0 0 0 0 0 0 0 0 0 - -Total # of neighbors = 54783 -Ave neighs/atom = 171.19688 -Ave special neighs/atom = 10.3375 -Neighbor list builds = 460 -Dangerous builds = 0 - -# write_restart restart_longrun nofix -# write_data restart_longrun.data -Total wall time: 0:00:29 diff --git a/src/AMOEBA/amoeba_file.cpp b/src/AMOEBA/amoeba_file.cpp index a4f0e4493e0..b059e5b395b 100644 --- a/src/AMOEBA/amoeba_file.cpp +++ b/src/AMOEBA/amoeba_file.cpp @@ -105,43 +105,43 @@ void PairAmoeba::read_prmfile(char *filename) section = END_OF_FILE; while (fgets(line, MAXLINE, fptr)) { ++nline; - if (utils::strmatch(line, "^\\s*##\\s+\\S+.*##\\s*$")) { + if (utils::strmatch(line, R"(^\s*##\s+\S+.*##\s*$)")) { auto trimmed = utils::trim(line); - if (utils::strmatch(trimmed, "^##\\s*Force Field")) + if (utils::strmatch(trimmed, R"(^##\s*Force Field)")) section = FFIELD; - else if (utils::strmatch(trimmed, "^##\\s*Literature")) + else if (utils::strmatch(trimmed, R"(^##\s*Literature)")) section = LITERATURE; - else if (utils::strmatch(trimmed, "^##\\s*Atom Type")) + else if (utils::strmatch(trimmed, R"(^##\s*Atom Type)")) section = ATOMTYPE; - else if (utils::strmatch(trimmed, "^##\\s*Van der Waals Param")) + else if (utils::strmatch(trimmed, R"(^##\s*Van der Waals Param)")) section = VDWL; - else if (utils::strmatch(trimmed, "^##\\s*Van der Waals Pair")) + else if (utils::strmatch(trimmed, R"(^##\s*Van der Waals Pair)")) section = VDWLPAIR; - else if (utils::strmatch(trimmed, "^##\\s*Bond Stretching")) + else if (utils::strmatch(trimmed, R"(^##\s*Bond Stretching)")) section = BSTRETCH; - else if (utils::strmatch(trimmed, "^##\\s*Stretch-Bend")) + else if (utils::strmatch(trimmed, R"(^##\s*Stretch-Bend)")) section = SBEND; - else if (utils::strmatch(trimmed, "^##\\s*Angle Bending")) + else if (utils::strmatch(trimmed, R"(^##\s*Angle Bending)")) section = ABEND; - else if (utils::strmatch(trimmed, "^##\\s*Pauli Repulsion")) + else if (utils::strmatch(trimmed, R"(^##\s*Pauli Repulsion)")) section = PAULI; - else if (utils::strmatch(trimmed, "^##\\s*Dispersion Param")) + else if (utils::strmatch(trimmed, R"(^##\s*Dispersion Param)")) section = DISPERSION; - else if (utils::strmatch(trimmed, "^##\\s*Urey-Bradley")) + else if (utils::strmatch(trimmed, R"(^##\s*Urey-Bradley)")) section = UB; - else if (utils::strmatch(trimmed, "^##\\s*Out-of-Plane")) + else if (utils::strmatch(trimmed, R"(^##\s*Out-of-Plane)")) section = OUTPLANE; - else if (utils::strmatch(trimmed, "^##\\s*Torsional")) + else if (utils::strmatch(trimmed, R"(^##\s*Torsional)")) section = TORSION; - else if (utils::strmatch(trimmed, "^##\\s*Pi-Torsion")) + else if (utils::strmatch(trimmed, R"(^##\s*Pi-Torsion)")) section = PITORSION; - else if (utils::strmatch(trimmed, "^##\\s*Atomic Multipole")) + else if (utils::strmatch(trimmed, R"(^##\s*Atomic Multipole)")) section = ATOMMULT; - else if (utils::strmatch(trimmed, "^##\\s*Charge Penetration")) + else if (utils::strmatch(trimmed, R"(^##\s*Charge Penetration)")) section = QPENETRATION; - else if (utils::strmatch(trimmed, "^##\\s*Dipole Polarizability")) + else if (utils::strmatch(trimmed, R"(^##\s*Dipole Polarizability)")) section = DIPPOLAR; - else if (utils::strmatch(trimmed, "^##\\s*Charge Transfer")) + else if (utils::strmatch(trimmed, R"(^##\s*Charge Transfer)")) section = QTRANSFER; else { section = UNKNOWN; @@ -198,7 +198,7 @@ void PairAmoeba::read_prmfile(char *filename) if (pos != std::string::npos) trimmed = trimmed.substr(0, pos); // append to line if next line starts with a number - if (utils::is_double(utils::strfind(trimmed, "^\\S+"))) { + if (utils::is_double(utils::strfind(trimmed, R"(^\S+)"))) { strcat(line, " "); strcat(line, trimmed.c_str()); has_next = false; @@ -221,7 +221,7 @@ void PairAmoeba::read_prmfile(char *filename) } // skip concatenated line with commented out keyword - if (utils::strmatch(trimmed, "^#\\w+")) continue; + if (utils::strmatch(trimmed, R"(^#\w+)")) continue; // exit loop if line is not empty if (!trimmed.empty()) { diff --git a/src/AMOEBA/pair_amoeba.h b/src/AMOEBA/pair_amoeba.h index fd694a80374..3ad28d545be 100644 --- a/src/AMOEBA/pair_amoeba.h +++ b/src/AMOEBA/pair_amoeba.h @@ -494,7 +494,7 @@ class PairAmoeba : public Pair { // inline function for neighbor list unmasking - inline int sbmask15(int j) const { return j >> SBBITS15 & 7; } + [[nodiscard]] int sbmask15(int j) const { return j >> SBBITS15 & 7; } }; } // namespace LAMMPS_NS #endif diff --git a/src/BODY/fix_wall_body_polyhedron.cpp b/src/BODY/fix_wall_body_polyhedron.cpp index c9710817574..d80d8736598 100644 --- a/src/BODY/fix_wall_body_polyhedron.cpp +++ b/src/BODY/fix_wall_body_polyhedron.cpp @@ -556,7 +556,7 @@ int FixWallBodyPolyhedron::sphere_against_wall(int i, double wall_pos,double* vw hi[0] = x[i][0]; hi[1] = wall_pos; hi[2] = x[i][2]; - } else if (wallstyle == ZPLANE) { + } else { // if (wallstyle == ZPLANE) { hi[0] = x[i][0]; hi[1] = x[i][1]; hi[2] = wall_pos; @@ -673,7 +673,7 @@ int FixWallBodyPolyhedron::compute_distance_to_wall(int ibody, int edge_index, d hi[0] = xpi1[0]; hi[1] = wall_pos; hi[2] = xpi1[2]; - } else if (wallstyle == ZPLANE) { + } else { // if (wallstyle == ZPLANE) { hi[0] = xpi1[0]; hi[1] = xpi1[1]; hi[2] = wall_pos; diff --git a/src/CG-SPICA/lj_spica_common.h b/src/CG-SPICA/lj_spica_common.h index 0967782d580..68d9668b042 100644 --- a/src/CG-SPICA/lj_spica_common.h +++ b/src/CG-SPICA/lj_spica_common.h @@ -22,28 +22,26 @@ #include -namespace LAMMPS_NS { -namespace LJSPICAParms { +namespace LAMMPS_NS::LJSPICAParms { - // LJ type flags. list of supported LJ exponent combinations - enum { LJ_NOT_SET = 0, LJ9_6, LJ12_4, LJ12_6, LJ12_5, NUM_LJ_TYPES }; +// LJ type flags. list of supported LJ exponent combinations +enum { LJ_NOT_SET = 0, LJ9_6, LJ12_4, LJ12_6, LJ12_5, NUM_LJ_TYPES }; #if defined(LMP_NEED_SPICA_FIND_LJ_TYPE) - static int find_lj_type(const char *label, const char *const *const list) - { - for (int i = 0; i < NUM_LJ_TYPES; ++i) - if (strcmp(label, list[i]) == 0) return i; +static int find_lj_type(const char *label, const char *const *const list) +{ + for (int i = 0; i < NUM_LJ_TYPES; ++i) + if (strcmp(label, list[i]) == 0) return i; - return LJ_NOT_SET; - } + return LJ_NOT_SET; +} #endif - // clang-format off +// clang-format off static const char *const lj_type_list[] = {"none", "lj9_6", "lj12_4", "lj12_6", "lj12_5"}; static constexpr double lj_prefact[] = {0.0, 6.75, 2.59807621135332, 4.0, 3.20377984125109}; static constexpr double lj_pow1[] = {0.0, 9.00, 12.0, 12.0, 12.0}; static constexpr double lj_pow2[] = {0.0, 6.00, 4.0, 6.0, 5.0}; - // clang-format on -} // namespace LJSPICAParms -} // namespace LAMMPS_NS +// clang-format on +} // namespace LAMMPS_NS::LJSPICAParms #endif diff --git a/src/COLVARS/colvarproxy_lammps.h b/src/COLVARS/colvarproxy_lammps.h index 714397528d0..e3485211010 100644 --- a/src/COLVARS/colvarproxy_lammps.h +++ b/src/COLVARS/colvarproxy_lammps.h @@ -58,10 +58,10 @@ class colvarproxy_lammps : public colvarproxy { // methods for lammps to move data or trigger actions in the proxy public: - bool total_forces_enabled() const override { return total_force_requested; }; + [[nodiscard]] bool total_forces_enabled() const override { return total_force_requested; }; // Total forces are saved at end of step, only processed at the next step - bool total_forces_same_step() const override { return false; }; - bool want_exit() const { return do_exit; }; + [[nodiscard]] bool total_forces_same_step() const override { return false; }; + [[nodiscard]] bool want_exit() const { return do_exit; }; // perform colvars computation. returns biasing energy double compute(); @@ -81,7 +81,7 @@ class colvarproxy_lammps : public colvarproxy { void log(std::string const &message) override; void error(std::string const &message) override; - cvm::rvector position_distance(cvm::atom_pos const &pos1, + [[nodiscard]] cvm::rvector position_distance(cvm::atom_pos const &pos1, cvm::atom_pos const &pos2) const override; cvm::real rand_gaussian() override; diff --git a/src/COMPRESS/gz_file_writer.h b/src/COMPRESS/gz_file_writer.h index b43b3a9487c..9d5972fe802 100644 --- a/src/COMPRESS/gz_file_writer.h +++ b/src/COMPRESS/gz_file_writer.h @@ -36,7 +36,7 @@ class GzFileWriter : public FileWriter { void close() override; void flush() override; size_t write(const void *buffer, size_t length) override; - bool isopen() const override; + [[nodiscard]] bool isopen() const override; void setCompressionLevel(int level); }; diff --git a/src/COMPRESS/zstd_file_writer.h b/src/COMPRESS/zstd_file_writer.h index 90437a25740..42186762615 100644 --- a/src/COMPRESS/zstd_file_writer.h +++ b/src/COMPRESS/zstd_file_writer.h @@ -47,7 +47,7 @@ class ZstdFileWriter : public FileWriter { void close() override; void flush() override; size_t write(const void *buffer, size_t length) override; - bool isopen() const override; + [[nodiscard]] bool isopen() const override; void setCompressionLevel(int level); void setChecksum(bool enabled); diff --git a/src/DPD-REACT/pair_exp6_rx.h b/src/DPD-REACT/pair_exp6_rx.h index 72350bc3a83..742bd9dec0d 100644 --- a/src/DPD-REACT/pair_exp6_rx.h +++ b/src/DPD-REACT/pair_exp6_rx.h @@ -76,8 +76,8 @@ class PairExp6rx : public Pair { double *coeffAlpha, *coeffEps, *coeffRm; bool fractionalWeighting; - inline double func_rin(const double &) const; - inline double expValue(const double) const; + [[nodiscard]] double func_rin(const double &) const; + [[nodiscard]] double expValue(const double) const; }; } // namespace LAMMPS_NS diff --git a/src/ELECTRODE/fix_electrode_conp.cpp b/src/ELECTRODE/fix_electrode_conp.cpp index a4e7c7bb8f6..aa22e44b716 100644 --- a/src/ELECTRODE/fix_electrode_conp.cpp +++ b/src/ELECTRODE/fix_electrode_conp.cpp @@ -572,7 +572,7 @@ void FixElectrodeConp::setup_post_neighbor() read_from_file(input_file_mat, elastance, "elastance"); else if (!read_inv) { if (etypes_neighlists) neighbor->build_one(mat_neighlist); - auto array_compute = std::unique_ptr(new ElectrodeMatrix(lmp, igroup, eta)); + auto array_compute = std::make_unique(lmp, igroup, eta); array_compute->setup(tag_to_iele, pair, mat_neighlist); if (etaflag) array_compute->setup_eta(eta_index); if (tfflag) array_compute->setup_tf(tf_types); diff --git a/src/ELECTRODE/pppm_electrode.h b/src/ELECTRODE/pppm_electrode.h index 42606efcd2c..eed4010f7ab 100644 --- a/src/ELECTRODE/pppm_electrode.h +++ b/src/ELECTRODE/pppm_electrode.h @@ -73,7 +73,7 @@ class PPPMElectrode : public PPPM, public ElectrodeKSpace { gf_b = denominator expansion coeffs ------------------------------------------------------------------------- */ - inline double gf_denom(const double &x, const double &y, const double &z) const + [[nodiscard]] double gf_denom(const double &x, const double &y, const double &z) const { double sx, sy, sz; sz = sy = sx = 0.0; diff --git a/src/EXTRA-COMMAND/ndx2group.cpp b/src/EXTRA-COMMAND/ndx2group.cpp index 20b7a0bbef7..c668735083c 100644 --- a/src/EXTRA-COMMAND/ndx2group.cpp +++ b/src/EXTRA-COMMAND/ndx2group.cpp @@ -35,7 +35,7 @@ static std::string find_section(FILE *fp, const std::string &name) if (!fgets(linebuf, BUFLEN, fp)) throw TokenizerException("Read error", utils::getsyserror()); while (!feof(fp)) { - if (utils::strmatch(linebuf, "^\\s*\\[.*\\]\\s*$")) { + if (utils::strmatch(linebuf, R"(^\s*\[.*\]\s*$)")) { auto words = Tokenizer(linebuf).as_vector(); if (words.size() != 3) throw TokenizerException("Invalid group name in index file", @@ -54,7 +54,7 @@ static std::vector read_section(FILE *fp, std::string &name) while (fgets(linebuf, BUFLEN, fp)) { // start of new section. we are done, update "name" - if (utils::strmatch(linebuf, "^\\s*\\[.*\\]\\s*$")) { + if (utils::strmatch(linebuf, R"(^\s*\[.*\]\s*$)")) { auto words = Tokenizer(linebuf).as_vector(); if (words.size() != 3) throw TokenizerException("Invalid group name in index file", diff --git a/src/EXTRA-FIX/fix_tmd.cpp b/src/EXTRA-FIX/fix_tmd.cpp index 6d218951410..114b62490e2 100644 --- a/src/EXTRA-FIX/fix_tmd.cpp +++ b/src/EXTRA-FIX/fix_tmd.cpp @@ -434,19 +434,19 @@ void FixTMD::readfile(char *file) try { ValueTokenizer values(bufptr); - if (utils::strmatch(bufptr,"^\\s*\\f+\\s+\\f+\\s+xlo\\s+xhi")) { + if (utils::strmatch(bufptr,R"(^\s*\f+\s+\f+\s+xlo\s+xhi)")) { auto lo = values.next_double(); auto hi = values.next_double(); xprd = hi - lo; bufptr = next + 1; continue; - } else if (utils::strmatch(bufptr,"^\\s*\\f+\\s+\\f+\\s+ylo\\s+yhi")) { + } else if (utils::strmatch(bufptr,R"(^\s*\f+\s+\f+\s+ylo\s+yhi)")) { auto lo = values.next_double(); auto hi = values.next_double(); yprd = hi - lo; bufptr = next + 1; continue; - } else if (utils::strmatch(bufptr,"^\\s*\\f+\\s+\\f+\\s+zlo\\s+zhi")) { + } else if (utils::strmatch(bufptr,R"(^\s*\f+\s+\f+\s+zlo\s+zhi)")) { auto lo = values.next_double(); auto hi = values.next_double(); zprd = hi - lo; diff --git a/src/EXTRA-FIX/fix_wall_flow.h b/src/EXTRA-FIX/fix_wall_flow.h index 6a662f3d947..bcc31671ee1 100644 --- a/src/EXTRA-FIX/fix_wall_flow.h +++ b/src/EXTRA-FIX/fix_wall_flow.h @@ -51,7 +51,7 @@ class FixWallFlow : public Fix { class RanMars *random; int *current_segment; - int compute_current_segment(double pos) const; + [[nodiscard]] int compute_current_segment(double pos) const; void generate_velocity(int i); }; diff --git a/src/EXTRA-PAIR/pair_lj_cubic_const.h b/src/EXTRA-PAIR/pair_lj_cubic_const.h index 869fc84116f..4c6516e884d 100644 --- a/src/EXTRA-PAIR/pair_lj_cubic_const.h +++ b/src/EXTRA-PAIR/pair_lj_cubic_const.h @@ -14,8 +14,8 @@ #ifndef LMP_PAIR_LJ_CUBIC_CONST_H #define LMP_PAIR_LJ_CUBIC_CONST_H -namespace LAMMPS_NS { -namespace PairLJCubicConstants { + +namespace LAMMPS_NS::PairLJCubicConstants { // LJ quantities scaled by epsilon and rmin = sigma*2^1/6 @@ -25,8 +25,8 @@ namespace PairLJCubicConstants { static constexpr double DPHIDS = 2.6899008972047196; // gradient at s static constexpr double A3 = 27.9335700460986445; // cubic coefficient static constexpr double SM = 1.5475372709146737; // cubic cutoff = s*67/48} -} // namespace PairLJCubicConstants -} // namespace LAMMPS_NS +} // namespace LAMMPS_NS::PairLJCubicConstants + #endif // python script to compute the constants diff --git a/src/GRANULAR/gran_sub_mod.h b/src/GRANULAR/gran_sub_mod.h index 993356bf7b0..3af0af16940 100644 --- a/src/GRANULAR/gran_sub_mod.h +++ b/src/GRANULAR/gran_sub_mod.h @@ -16,8 +16,8 @@ #include "pointers.h" // IWYU pragma: export -namespace LAMMPS_NS { -namespace Granular_NS { + +namespace LAMMPS_NS::Granular_NS { class GranularModel; class GranSubMod : protected Pointers { @@ -61,7 +61,7 @@ namespace Granular_NS { double mix_mean(double, double); }; -} // namespace Granular_NS -} // namespace LAMMPS_NS +} // namespace LAMMPS_NS::Granular_NS + #endif /* GRAN_SUB_MOD_H */ diff --git a/src/GRANULAR/gran_sub_mod_damping.h b/src/GRANULAR/gran_sub_mod_damping.h index 95f2f17344d..d4ebf8f3e23 100644 --- a/src/GRANULAR/gran_sub_mod_damping.h +++ b/src/GRANULAR/gran_sub_mod_damping.h @@ -28,15 +28,15 @@ GranSubModStyle(mdr,GranSubModDampingMDR,DAMPING); #include "gran_sub_mod.h" -namespace LAMMPS_NS { -namespace Granular_NS { + +namespace LAMMPS_NS::Granular_NS { class GranSubModDamping : public GranSubMod { public: GranSubModDamping(class GranularModel *, class LAMMPS *); void init() override; virtual double calculate_forces() = 0; - double get_damp_prefactor() const { return damp_prefactor; } + [[nodiscard]] double get_damp_prefactor() const { return damp_prefactor; } protected: double damp_prefactor; @@ -107,8 +107,8 @@ namespace Granular_NS { /* ---------------------------------------------------------------------- */ -} // namespace Granular_NS -} // namespace LAMMPS_NS +} // namespace LAMMPS_NS::Granular_NS + #endif /*GRAN_SUB_MOD_DAMPING_H */ #endif /*GRAN_SUB_MOD_CLASS_H */ diff --git a/src/GRANULAR/gran_sub_mod_heat.h b/src/GRANULAR/gran_sub_mod_heat.h index 5f264cb913a..ed1e2abc82c 100644 --- a/src/GRANULAR/gran_sub_mod_heat.h +++ b/src/GRANULAR/gran_sub_mod_heat.h @@ -24,8 +24,8 @@ GranSubModStyle(area,GranSubModHeatArea,HEAT); #include "gran_sub_mod.h" -namespace LAMMPS_NS { -namespace Granular_NS { + +namespace LAMMPS_NS::Granular_NS { class GranSubModHeat : public GranSubMod { public: @@ -65,8 +65,8 @@ namespace Granular_NS { double heat_transfer_coeff; }; -} // namespace Granular_NS -} // namespace LAMMPS_NS +} // namespace LAMMPS_NS::Granular_NS + #endif /*GRAN_SUB_MOD_HEAT_H */ #endif /*GRAN_SUB_MOD_CLASS_H */ diff --git a/src/GRANULAR/gran_sub_mod_normal.h b/src/GRANULAR/gran_sub_mod_normal.h index 9805bd81c07..6aef2f6edc2 100644 --- a/src/GRANULAR/gran_sub_mod_normal.h +++ b/src/GRANULAR/gran_sub_mod_normal.h @@ -28,8 +28,8 @@ GranSubModStyle(mdr,GranSubModNormalMDR,NORMAL); #include "gran_sub_mod.h" -namespace LAMMPS_NS { -namespace Granular_NS { + +namespace LAMMPS_NS::Granular_NS { class GranSubModNormal : public GranSubMod { public: @@ -39,12 +39,12 @@ namespace Granular_NS { virtual double calculate_contact_radius(); virtual double calculate_forces() = 0; - int get_cohesive_flag() const { return cohesive_flag; } - double get_damp() const { return damp; } - double get_emod() const { return Emod; } - double get_fncrit() const { return Fncrit; } - int get_material_properties() const { return material_properties; } - double get_poiss() const { return poiss; } + [[nodiscard]] int get_cohesive_flag() const { return cohesive_flag; } + [[nodiscard]] double get_damp() const { return damp; } + [[nodiscard]] double get_emod() const { return Emod; } + [[nodiscard]] double get_fncrit() const { return Fncrit; } + [[nodiscard]] int get_material_properties() const { return material_properties; } + [[nodiscard]] double get_poiss() const { return poiss; } virtual void set_fncrit(); @@ -164,8 +164,8 @@ namespace Granular_NS { inline double round_up_negative_epsilon(double); }; -} // namespace Granular_NS -} // namespace LAMMPS_NS +} // namespace LAMMPS_NS::Granular_NS + #endif /*GRAN_SUB_MOD_NORMAL_H */ #endif /*GRAN_SUB_MOD_CLASS_H */ diff --git a/src/GRANULAR/gran_sub_mod_rolling.h b/src/GRANULAR/gran_sub_mod_rolling.h index 97fa98b3508..f9934c59b99 100644 --- a/src/GRANULAR/gran_sub_mod_rolling.h +++ b/src/GRANULAR/gran_sub_mod_rolling.h @@ -23,8 +23,8 @@ GranSubModStyle(sds,GranSubModRollingSDS,ROLLING); #include "gran_sub_mod.h" -namespace LAMMPS_NS { -namespace Granular_NS { + +namespace LAMMPS_NS::Granular_NS { class GranSubModRolling : public GranSubMod { public: @@ -52,8 +52,8 @@ namespace Granular_NS { double k, mu, gamma; }; -} // namespace Granular_NS -} // namespace LAMMPS_NS +} // namespace LAMMPS_NS::Granular_NS + #endif /*GRAN_SUB_MOD_ROLLING_H */ #endif /*GRAN_SUB_MOD_CLASS_H */ diff --git a/src/GRANULAR/gran_sub_mod_tangential.h b/src/GRANULAR/gran_sub_mod_tangential.h index 7878dc2ffee..abaeaa37fcf 100644 --- a/src/GRANULAR/gran_sub_mod_tangential.h +++ b/src/GRANULAR/gran_sub_mod_tangential.h @@ -30,17 +30,17 @@ GranSubModStyle(mindlin_rescale/force,GranSubModTangentialMindlinRescaleForce,TA #include "gran_sub_mod.h" -namespace LAMMPS_NS { -namespace Granular_NS { + +namespace LAMMPS_NS::Granular_NS { class GranSubModTangential : public GranSubMod { public: GranSubModTangential(class GranularModel *, class LAMMPS *); virtual void calculate_forces() = 0; - double get_k() const { return k; } - double get_damp() const { return damp; } - double get_mu() const { return mu; } + [[nodiscard]] double get_k() const { return k; } + [[nodiscard]] double get_damp() const { return damp; } + [[nodiscard]] double get_mu() const { return mu; } protected: double k, damp, mu; // Used by Marshall twisting model @@ -128,8 +128,8 @@ namespace Granular_NS { GranSubModTangentialMindlinRescaleForce(class GranularModel *, class LAMMPS *); }; -} // namespace Granular_NS -} // namespace LAMMPS_NS +} // namespace LAMMPS_NS::Granular_NS + #endif /*GRAN_SUB_MOD_TANGENTIAL_H */ #endif /*GRAN_SUB_MOD_CLASS_H */ diff --git a/src/GRANULAR/gran_sub_mod_twisting.h b/src/GRANULAR/gran_sub_mod_twisting.h index 77092a9e9a6..1d971d7a30b 100644 --- a/src/GRANULAR/gran_sub_mod_twisting.h +++ b/src/GRANULAR/gran_sub_mod_twisting.h @@ -24,8 +24,8 @@ GranSubModStyle(sds,GranSubModTwistingSDS,TWISTING); #include "gran_sub_mod.h" -namespace LAMMPS_NS { -namespace Granular_NS { + +namespace LAMMPS_NS::Granular_NS { class GranSubModTwisting : public GranSubMod { public: @@ -65,8 +65,8 @@ namespace Granular_NS { double k, mu, damp; }; -} // namespace Granular_NS -} // namespace LAMMPS_NS +} // namespace LAMMPS_NS::Granular_NS + #endif /*GRAN_SUB_MOD_TWISTING_H */ #endif /*GRAN_SUB_MOD_CLASS_H */ diff --git a/src/GRANULAR/granular_model.h b/src/GRANULAR/granular_model.h index 629c8c7bb2b..b6a75ab45de 100644 --- a/src/GRANULAR/granular_model.h +++ b/src/GRANULAR/granular_model.h @@ -16,8 +16,8 @@ #include "pointers.h" // IWYU pragma: export -namespace LAMMPS_NS { -namespace Granular_NS { + +namespace LAMMPS_NS::Granular_NS { enum SubModelType { NORMAL = 0, @@ -113,7 +113,7 @@ class GranularModel : protected Pointers { int *gran_sub_mod_types; }; -} // namespace Granular_NS -} // namespace LAMMPS_NS +} // namespace LAMMPS_NS::Granular_NS + #endif diff --git a/src/GRANULAR/pair_granular.h b/src/GRANULAR/pair_granular.h index 24408de810b..0be649a7b51 100644 --- a/src/GRANULAR/pair_granular.h +++ b/src/GRANULAR/pair_granular.h @@ -44,7 +44,7 @@ class PairGranular : public Pair { int pack_forward_comm(int, int *, double *, int, int *) override; void unpack_forward_comm(int, int, double *) override; double memory_usage() override; - int get_size_history() const { return size_history; } + [[nodiscard]] int get_size_history() const { return size_history; } // granular models class Granular_NS::GranularModel** models_list; diff --git a/src/GRAPHICS/dump_image.cpp b/src/GRAPHICS/dump_image.cpp index f714f5278e3..7f1870eb820 100644 --- a/src/GRAPHICS/dump_image.cpp +++ b/src/GRAPHICS/dump_image.cpp @@ -104,8 +104,21 @@ DumpImage::DumpImage(LAMMPS *lmp, int narg, char **arg) : if (utils::strmatch(filename, "\\.jpg$") || utils::strmatch(filename, "\\.JPG$") || utils::strmatch(filename, "\\.jpeg$") || utils::strmatch(filename, "\\.JPEG$")) filetype = JPG; - else if (utils::strmatch(filename, "\\.png$") || utils::strmatch(filename, "\\.PNG$")) + else if (utils::strmatch(filename, "\\.png$") || utils::strmatch(filename, "\\.PNG$")) filetype = PNG; + else if (utils::strmatch(filename, "\\.tga$") || utils::strmatch(filename, "\\.TGA$")) + filetype = TGA; + else if (compressed && (utils::strmatch(filename, "\\.jpg\\.\\w+$") || + utils::strmatch(filename, "\\.JPG\\.\\w+$") || + utils::strmatch(filename, "\\.jpeg\\.\\w+$") || + utils::strmatch(filename, "\\.JPEG\\.\\w+$"))) + error->all(FLERR, Error::NOLASTLINE, "Cannot use compression with JPEG images"); + else if (compressed && (utils::strmatch(filename, "\\.png\\.\\w+$") || + utils::strmatch(filename, "\\.PNG\\.\\w+$"))) + error->all(FLERR, Error::NOLASTLINE, "Cannot use compression with PNG images"); + else if (compressed && (utils::strmatch(filename, "\\.tga\\.\\w+$") || + utils::strmatch(filename, "\\.TGA\\.\\w+$"))) + error->all(FLERR, Error::NOLASTLINE, "Cannot use compression with TGA images"); else filetype = PPM; #ifndef LAMMPS_JPEG @@ -942,6 +955,7 @@ void DumpImage::write() if (me == 0) { if (filetype == JPG) image->write_JPG(fp); else if (filetype == PNG) image->write_PNG(fp); + else if (filetype == TGA) image->write_TGA(fp); else image->write_PPM(fp); if (multifile) { fclose(fp); diff --git a/src/GRAPHICS/dump_image.h b/src/GRAPHICS/dump_image.h index 7da765af7e1..82e5477207b 100644 --- a/src/GRAPHICS/dump_image.h +++ b/src/GRAPHICS/dump_image.h @@ -48,7 +48,7 @@ class DumpImage : public DumpCustom { protected: int filetype; - enum { PPM, JPG, PNG }; // file type constants + enum { PPM, JPG, PNG, TGA }; // file type constants int atomflag; // 0/1 for draw atoms int acolor, adiam; // what determines color/diam of atoms diff --git a/src/GRAPHICS/fix_graphics_arrows.cpp b/src/GRAPHICS/fix_graphics_arrows.cpp index 5f5c5936360..dd7ab2a6fcb 100644 --- a/src/GRAPHICS/fix_graphics_arrows.cpp +++ b/src/GRAPHICS/fix_graphics_arrows.cpp @@ -58,6 +58,7 @@ FixGraphicsArrows::FixGraphicsArrows(LAMMPS *lmp, int narg, char **arg) : scale = 1.0; autoscale = false; autovalue = 1.0; + xvar = yvar = zvar = -1; int iarg = 7; if (strcmp(arg[4], "dipole") == 0) { diff --git a/src/GRAPHICS/fix_graphics_isosurface.cpp b/src/GRAPHICS/fix_graphics_isosurface.cpp index 2fe92df34d7..b57eda59f6b 100644 --- a/src/GRAPHICS/fix_graphics_isosurface.cpp +++ b/src/GRAPHICS/fix_graphics_isosurface.cpp @@ -438,6 +438,8 @@ FixGraphicsIsosurface::FixGraphicsIsosurface(LAMMPS *lmp, int narg, char **arg) pflag = NUMBER; binary = 0; pad = 0; + pvar = -1; + pindex = -1; // parse mandatory args @@ -998,11 +1000,12 @@ void FixGraphicsIsosurface::end_of_step() } } if (!binary) fprintf(fp, "endsolid %s\n", title.c_str()); - fclose(fp); + fclose(fp); // NOLINT delete[] filecurrent; } else { MPI_Send(stldata, 12 * numobjs, MPI_FLOAT, 0, 0, world); } + delete[] stldata; } } diff --git a/src/GRAPHICS/fix_graphics_labels.cpp b/src/GRAPHICS/fix_graphics_labels.cpp index fd46f79a0cf..61344730258 100644 --- a/src/GRAPHICS/fix_graphics_labels.cpp +++ b/src/GRAPHICS/fix_graphics_labels.cpp @@ -137,8 +137,7 @@ unsigned char *read_image(FILE *fp, int &width, int &height, const std::string & unsigned char sig[8]; // read and check PNG file signature - fread(sig, sizeof(unsigned char), 8, fp); - if (!png_check_sig(sig, 8)) return nullptr; + if ((fread(sig, sizeof(unsigned char), 8, fp) != 8) || !png_check_sig(sig, 8)) return nullptr; // set up reading from file png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, nullptr, nullptr, nullptr); @@ -227,7 +226,8 @@ unsigned char *read_image(FILE *fp, int &width, int &height, const std::string & } while (buffer[0] == '#'); int rv = sscanf(buffer, "%d%d", &width, &height); - if (rv != 2) return nullptr; + // don't read invalid or oversize images + if ((rv != 2) || (width < 1) || (height < 1) || ((width * height) > (1 << 30))) return nullptr; int tmp = 0; ptr = fgets(buffer, 128, fp); @@ -277,8 +277,6 @@ unsigned char *read_image(FILE *fp, int &width, int &height, const std::string & return pixmap; } - info = "Unknown image file format."; - return nullptr; } } // namespace @@ -287,6 +285,7 @@ unsigned char *read_image(FILE *fp, int &width, int &height, const std::string & #define PARSE_VARIABLE(value, name, index) \ if (strstr(arg[index], "v_") == arg[index]) { \ varflag = 1; \ + delete[] name; \ name = utils::strdup(arg[index] + 2); \ } else \ value = utils::numeric(FLERR, arg[index], false, lmp) @@ -719,9 +718,9 @@ void FixGraphicsLabels::end_of_step() if (txt.notrans) { imgparms[n][7] = imgparms[n][8] = imgparms[n][9] = -1.0; } else { - imgparms[n][7] = (double)txt.transcolor[0] / 255.0; - imgparms[n][8] = (double)txt.transcolor[1] / 255.0; - imgparms[n][9] = (double)txt.transcolor[2] / 255.0; + imgparms[n][7] = (double) txt.transcolor[0] / 255.0; + imgparms[n][8] = (double) txt.transcolor[1] / 255.0; + imgparms[n][9] = (double) txt.transcolor[2] / 255.0; } imgparms[n][10] = txt.scale; diff --git a/src/GRAPHICS/fix_graphics_objects.cpp b/src/GRAPHICS/fix_graphics_objects.cpp index b560c48ef85..2fd35ead48b 100644 --- a/src/GRAPHICS/fix_graphics_objects.cpp +++ b/src/GRAPHICS/fix_graphics_objects.cpp @@ -39,6 +39,7 @@ enum { X = 0, Y, Z }; #define PARSE_VARIABLE(value, name, index) \ if (strstr(arg[index], "v_") == arg[index]) { \ varflag = 1; \ + delete[] name; \ name = utils::strdup(arg[index] + 2); \ } else \ value = utils::numeric(FLERR, arg[index], false, lmp) diff --git a/src/GRAPHICS/image.cpp b/src/GRAPHICS/image.cpp index 7695e63a711..4455cbcd941 100644 --- a/src/GRAPHICS/image.cpp +++ b/src/GRAPHICS/image.cpp @@ -57,6 +57,27 @@ enum { CONTINUOUS, DISCRETE, SEQUENTIAL }; enum { ABSOLUTE, FRACTIONAL }; enum { NO, YES }; +struct TGAHeader { + unsigned char idlength; + unsigned char colormaptype; + unsigned char datatypecode; + unsigned char colormaporigin[2]; + unsigned char colormaplength[2]; + unsigned char colormapdepth; + unsigned char x_origin[2]; + unsigned char y_origin[2]; + unsigned char width[2]; + unsigned char height[2]; + unsigned char bitsperpixel; + unsigned char imagedescriptor; +}; + +struct TGAFooter { + unsigned int extoffset; + unsigned int devoffset; + char signature[18]; +}; + //////////////////////////////////////////////////////////////////////// // the following regular Bayer threshold matrix can be created for any // power of 2 ranks with the following python code. @@ -1498,6 +1519,8 @@ void Image::compute_SSAO() void Image::write_JPG(FILE *fp) { #ifdef LAMMPS_JPEG + if (!fp) return; + const int aafactor = fsaa ? 2 : 1; struct jpeg_compress_struct cinfo; struct jpeg_error_mgr jerr; @@ -1533,6 +1556,8 @@ void Image::write_JPG(FILE *fp) void Image::write_PNG(FILE *fp) { #ifdef LAMMPS_PNG + if (!fp) return; + const int aafactor = fsaa ? 2 : 1; const int pngwidth = width/aafactor; const int pngheight = height/aafactor; @@ -1592,8 +1617,79 @@ void Image::write_PNG(FILE *fp) /* ---------------------------------------------------------------------- */ +void Image::write_TGA(FILE *fp, bool compressed) +{ + if (!fp) return; + + const int aafactor = fsaa ? 2 : 1; + const int tgaheight = height/aafactor; + const int tgawidth = width/aafactor; + + TGAHeader header; + memset(&header, 0, sizeof(header)); + header.width[0] = static_cast(tgawidth & 0xFF); + header.width[1] = static_cast((tgawidth & 0xFF00) >> 8); + header.height[0] = static_cast(tgaheight & 0xFF); + header.height[1] = static_cast((tgaheight & 0xFF00) >> 8); + header.bitsperpixel = 3 * 8 * sizeof(unsigned char); + + if (compressed) { + header.datatypecode = 10; // RLE compressed RGB + fwrite(&header, sizeof(header), 1, fp); + + unsigned char *pix; + unsigned char old[3]; + unsigned char len; + for (int i=0; i < tgaheight; ++i) { + len = 0; + for (int j = 0; j < tgawidth; ++j) { + pix = &writeBuffer[i*3*tgawidth + 3*j]; + if (len == 0) { + old[0] = pix[0]; + old[1] = pix[1]; + old[2] = pix[2]; + } + + if (memcmp(old, pix, 3) || (len == 127) || (j == tgawidth - 1)) { + if (j != tgawidth - 1) --len; + len |= 0x80U; + fputc(len, fp); + // TGA stores RGB as BGR + fputc(old[2], fp); + fputc(old[1], fp); + fputc(old[0], fp); + old[0] = pix[0]; + old[1] = pix[1]; + old[2] = pix[2]; + len = 1; + } else ++len; + } + } + } else { + header.datatypecode = 2; // uncompressed RGB + fwrite(&header, sizeof(header), 1, fp); + + unsigned char *pix; + for (int i=0; i < tgaheight; ++i) { + for (int j = 0; j < tgawidth; ++j) { + pix = &writeBuffer[i*3*tgawidth + 3*j]; + // TGA stores RGB as BGR + fputc(pix[2], fp); + fputc(pix[1], fp); + fputc(pix[0], fp); + } + } + } + TGAFooter footer{0, 0, "TRUEVISION-XFILE."}; + fwrite(&footer, sizeof(footer), 1, fp); +} + +/* ---------------------------------------------------------------------- */ + void Image::write_PPM(FILE *fp) { + if (!fp) return; + const int aafactor = fsaa ? 2 : 1; const int ppmheight = height/aafactor; const int ppmwidth = width/aafactor; @@ -2260,7 +2356,6 @@ int ColorMap::reset(int narg, char **arg) delete [] mentry; mentry = new MapEntry[nentry]; - int expandflag = 0; int n = 5; for (int i = 0; i < nentry; i++) { if (mstyle == CONTINUOUS) { diff --git a/src/GRAPHICS/image.h b/src/GRAPHICS/image.h index a619a70c1e2..02b3382d7f5 100644 --- a/src/GRAPHICS/image.h +++ b/src/GRAPHICS/image.h @@ -47,6 +47,7 @@ class Image : protected Pointers { void merge(); void write_JPG(FILE *); void write_PNG(FILE *); + void write_TGA(FILE *, bool compressed = true); void write_PPM(FILE *); void view_params(double, double, double, double, double, double); diff --git a/src/GRAPHICS/image_objects.cpp b/src/GRAPHICS/image_objects.cpp index fac25f1effb..a80c858bca9 100644 --- a/src/GRAPHICS/image_objects.cpp +++ b/src/GRAPHICS/image_objects.cpp @@ -112,20 +112,14 @@ std::vector transform(const std::vector &triangles, const ve // ^ ^ ^ // bot mid tip -ArrowObj::ArrowObj(double _tipl, double _tipw, double radius, int res) +ArrowObj::ArrowObj(double _tipl, double _tipw, double radius, int res) : + tiplength(_tipl), tipwidth(_tipw), diameter(2.0 * radius), resolution(res) { triangles.clear(); // we want at least 2 iterations. if (res < 2) return; - // store settings for arrow template - - tiplength = _tipl; - tipwidth = _tipw; - diameter = 2.0 * radius; - resolution = res; - vec3 tip{0.5, 0.0, 0.0}; vec3 mid{0.5 - tiplength, 0.0, 0.0}; vec3 bot{-0.5, 0.0, 0.0}; diff --git a/src/INTEL/fix_intel.h b/src/INTEL/fix_intel.h index 08d0a534d92..ce4c1e4d8df 100644 --- a/src/INTEL/fix_intel.h +++ b/src/INTEL/fix_intel.h @@ -74,7 +74,7 @@ class FixIntel : public Fix { inline IntelBuffers *get_mixed_buffers() { return _mixed_buffers; } inline IntelBuffers *get_double_buffers() { return _double_buffers; } - inline int nbor_pack_width() const { return _nbor_pack_width; } + [[nodiscard]] int nbor_pack_width() const { return _nbor_pack_width; } inline void nbor_pack_width(const int w) { _nbor_pack_width = w; } inline int three_body_neighbor() { return _three_body_neighbor; } inline void three_body_neighbor(const int i) { _three_body_neighbor = i; } diff --git a/src/INTEL/pair_eam_intel.h b/src/INTEL/pair_eam_intel.h index 517dfdbb847..f3f452a256c 100644 --- a/src/INTEL/pair_eam_intel.h +++ b/src/INTEL/pair_eam_intel.h @@ -76,9 +76,9 @@ class PairEAMIntel : public PairEAM { ~ForceConst() noexcept(false) { set_ntypes(0, 0, 0, nullptr, _cop); } void set_ntypes(const int ntypes, const int nr, const int nrho, Memory *memory, const int cop); - inline int rhor_jstride() const { return _nr; } - inline int rhor_istride() const { return _nr * _ntypes; } - inline int frho_stride() const { return _nrho; } + [[nodiscard]] int rhor_jstride() const { return _nr; } + [[nodiscard]] int rhor_istride() const { return _nr * _ntypes; } + [[nodiscard]] int frho_stride() const { return _nrho; } private: int _ntypes, _nr, _nrho, _cop; diff --git a/src/INTERLAYER/interlayer_taper.h b/src/INTERLAYER/interlayer_taper.h index abf898fb005..ad04e30d1b7 100644 --- a/src/INTERLAYER/interlayer_taper.h +++ b/src/INTERLAYER/interlayer_taper.h @@ -16,8 +16,8 @@ #ifndef LMP_INTERLAYER_TAPER_H #define LMP_INTERLAYER_TAPER_H -namespace LAMMPS_NS { -namespace InterLayer { + +namespace LAMMPS_NS::InterLayer { static constexpr double Tap_coeff[8] = {1.0, 0.0, 0.0, 0.0, -35.0, 84.0, -70.0, 20.0}; @@ -62,6 +62,6 @@ namespace InterLayer { return (dTap); } -} // namespace InterLayer -} // namespace LAMMPS_NS +} // namespace LAMMPS_NS::InterLayer + #endif diff --git a/src/KIM/kim_init.cpp b/src/KIM/kim_init.cpp index 9a62ea257bd..f3409d0fe85 100644 --- a/src/KIM/kim_init.cpp +++ b/src/KIM/kim_init.cpp @@ -439,7 +439,7 @@ void KimInit::write_log_cite(class LAMMPS *lmp, KimInit::model_type_enum model_t if (!lmp->citeme) return; std::string model_name_str(model_name); - std::string re = "[MS][OM]_\\d\\d\\d\\d\\d\\d\\d\\d\\d\\d\\d\\d_\\d\\d\\d"; + std::string re = R"([MS][OM]_\d\d\d\d\d\d\d\d\d\d\d\d_\d\d\d)"; std::string kim_id = utils::strfind(model_name_str, re); std::string cite_id; diff --git a/src/KIM/kim_interactions.h b/src/KIM/kim_interactions.h index dc70f7aac06..2dee3d0f49a 100644 --- a/src/KIM/kim_interactions.h +++ b/src/KIM/kim_interactions.h @@ -70,7 +70,7 @@ class KimInteractions : protected Pointers { private: void do_setup(int, char **); - int species_to_atomic_no(const std::string &species) const; + [[nodiscard]] int species_to_atomic_no(const std::string &species) const; void KIM_SET_TYPE_PARAMETERS(const std::string &input_line) const; }; diff --git a/src/KIM/kim_units.cpp b/src/KIM/kim_units.cpp index 9977af73756..41991faa082 100644 --- a/src/KIM/kim_units.cpp +++ b/src/KIM/kim_units.cpp @@ -269,8 +269,8 @@ static double constexpr volt_per_micrometer_si = static double constexpr volt_per_nanometer_si = 1.0/nanometer_si; // [V/m] volt/nanometer -namespace LAMMPS_NS { -namespace kim_units { + +namespace LAMMPS_NS::kim_units { // Define enumerations enum sys_type { @@ -412,7 +412,6 @@ double get_unit_conversion_factor(unit_type &unit_type_enum, sys_type from_syste sys_type to_system_enum); } -} // Define dictionaries static map system_dic; diff --git a/src/KOKKOS/angle_charmm_kokkos.cpp b/src/KOKKOS/angle_charmm_kokkos.cpp index de88fd976eb..43a360a5078 100644 --- a/src/KOKKOS/angle_charmm_kokkos.cpp +++ b/src/KOKKOS/angle_charmm_kokkos.cpp @@ -139,6 +139,7 @@ void AngleCharmmKokkos::compute(int eflag_in, int vflag_in) template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void AngleCharmmKokkos::operator()(TagAngleCharmmCompute, const int &n, EV_FLOAT& ev) const { @@ -244,6 +245,7 @@ void AngleCharmmKokkos::operator()(TagAngleCharmmCompute template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void AngleCharmmKokkos::operator()(TagAngleCharmmCompute, const int &n) const { EV_FLOAT ev; @@ -344,6 +346,7 @@ void AngleCharmmKokkos::read_restart(FILE *fp) template //template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void AngleCharmmKokkos::ev_tally(EV_FLOAT &ev, const int i, const int j, const int k, KK_FLOAT &eangle, KK_FLOAT *f1, KK_FLOAT *f3, diff --git a/src/KOKKOS/angle_charmm_kokkos.h b/src/KOKKOS/angle_charmm_kokkos.h index 6b445e23fef..77cc9e02725 100644 --- a/src/KOKKOS/angle_charmm_kokkos.h +++ b/src/KOKKOS/angle_charmm_kokkos.h @@ -45,14 +45,17 @@ class AngleCharmmKokkos : public AngleCharmm { void read_restart(FILE *) override; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagAngleCharmmCompute, const int&, EV_FLOAT&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagAngleCharmmCompute, const int&) const; //template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ev_tally(EV_FLOAT &ev, const int i, const int j, const int k, KK_FLOAT &eangle, KK_FLOAT *f1, KK_FLOAT *f3, diff --git a/src/KOKKOS/angle_class2_kokkos.cpp b/src/KOKKOS/angle_class2_kokkos.cpp index 1c558be292f..14cd8dcff35 100644 --- a/src/KOKKOS/angle_class2_kokkos.cpp +++ b/src/KOKKOS/angle_class2_kokkos.cpp @@ -157,6 +157,7 @@ void AngleClass2Kokkos::compute(int eflag_in, int vflag_in) template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void AngleClass2Kokkos::operator()(TagAngleClass2Compute, const int &n, EV_FLOAT& ev) const { @@ -310,6 +311,7 @@ void AngleClass2Kokkos::operator()(TagAngleClass2Compute template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void AngleClass2Kokkos::operator()(TagAngleClass2Compute, const int &n) const { EV_FLOAT ev; @@ -491,6 +493,7 @@ void AngleClass2Kokkos::read_restart(FILE *fp) template //template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void AngleClass2Kokkos::ev_tally(EV_FLOAT &ev, const int i, const int j, const int k, KK_FLOAT &eangle, KK_FLOAT *f1, KK_FLOAT *f3, diff --git a/src/KOKKOS/angle_class2_kokkos.h b/src/KOKKOS/angle_class2_kokkos.h index b3281182608..b3c4e53d1fc 100644 --- a/src/KOKKOS/angle_class2_kokkos.h +++ b/src/KOKKOS/angle_class2_kokkos.h @@ -46,14 +46,17 @@ class AngleClass2Kokkos : public AngleClass2 { void read_restart(FILE *) override; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagAngleClass2Compute, const int&, EV_FLOAT&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagAngleClass2Compute, const int&) const; //template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ev_tally(EV_FLOAT &ev, const int i, const int j, const int k, KK_FLOAT &eangle, KK_FLOAT *f1, KK_FLOAT *f3, diff --git a/src/KOKKOS/angle_cosine_kokkos.cpp b/src/KOKKOS/angle_cosine_kokkos.cpp index f2e2f338c75..fdd71d088d1 100644 --- a/src/KOKKOS/angle_cosine_kokkos.cpp +++ b/src/KOKKOS/angle_cosine_kokkos.cpp @@ -138,6 +138,7 @@ void AngleCosineKokkos::compute(int eflag_in, int vflag_in) template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void AngleCosineKokkos::operator()(TagAngleCosineCompute, const int &n, EV_FLOAT& ev) const { @@ -224,6 +225,7 @@ void AngleCosineKokkos::operator()(TagAngleCosineCompute template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void AngleCosineKokkos::operator()(TagAngleCosineCompute, const int &n) const { EV_FLOAT ev; @@ -283,6 +285,7 @@ void AngleCosineKokkos::read_restart(FILE *fp) template //template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void AngleCosineKokkos::ev_tally(EV_FLOAT &ev, const int i, const int j, const int k, KK_FLOAT &eangle, KK_FLOAT *f1, KK_FLOAT *f3, diff --git a/src/KOKKOS/angle_cosine_kokkos.h b/src/KOKKOS/angle_cosine_kokkos.h index 773361702e8..cec927042ad 100644 --- a/src/KOKKOS/angle_cosine_kokkos.h +++ b/src/KOKKOS/angle_cosine_kokkos.h @@ -46,14 +46,17 @@ class AngleCosineKokkos : public AngleCosine { void read_restart(FILE *) override; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagAngleCosineCompute, const int&, EV_FLOAT&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagAngleCosineCompute, const int&) const; //template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ev_tally(EV_FLOAT &ev, const int i, const int j, const int k, KK_FLOAT &eangle, KK_FLOAT *f1, KK_FLOAT *f3, diff --git a/src/KOKKOS/angle_harmonic_kokkos.cpp b/src/KOKKOS/angle_harmonic_kokkos.cpp index 67973cfe1cc..07c158d4f50 100644 --- a/src/KOKKOS/angle_harmonic_kokkos.cpp +++ b/src/KOKKOS/angle_harmonic_kokkos.cpp @@ -145,6 +145,7 @@ void AngleHarmonicKokkos::compute(int eflag_in, int vflag_in) template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void AngleHarmonicKokkos::operator()(TagAngleHarmonicCompute, const int &n, EV_FLOAT& ev) const { @@ -233,6 +234,7 @@ void AngleHarmonicKokkos::operator()(TagAngleHarmonicCompute template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void AngleHarmonicKokkos::operator()(TagAngleHarmonicCompute, const int &n) const { EV_FLOAT ev; @@ -301,6 +303,7 @@ void AngleHarmonicKokkos::read_restart(FILE *fp) template //template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void AngleHarmonicKokkos::ev_tally(EV_FLOAT &ev, const int i, const int j, const int k, KK_FLOAT &eangle, KK_FLOAT *f1, KK_FLOAT *f3, diff --git a/src/KOKKOS/angle_harmonic_kokkos.h b/src/KOKKOS/angle_harmonic_kokkos.h index ca50a182143..3fc767cdf01 100644 --- a/src/KOKKOS/angle_harmonic_kokkos.h +++ b/src/KOKKOS/angle_harmonic_kokkos.h @@ -46,14 +46,17 @@ class AngleHarmonicKokkos : public AngleHarmonic { void read_restart(FILE *) override; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagAngleHarmonicCompute, const int&, EV_FLOAT&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagAngleHarmonicCompute, const int&) const; //template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ev_tally(EV_FLOAT &ev, const int i, const int j, const int k, KK_FLOAT &eangle, KK_FLOAT *f1, KK_FLOAT *f3, diff --git a/src/KOKKOS/angle_spica_kokkos.cpp b/src/KOKKOS/angle_spica_kokkos.cpp index d059f708ae8..95c92ba5ac3 100644 --- a/src/KOKKOS/angle_spica_kokkos.cpp +++ b/src/KOKKOS/angle_spica_kokkos.cpp @@ -161,6 +161,7 @@ void AngleSPICAKokkos::compute(int eflag_in, int vflag_in) template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void AngleSPICAKokkos::operator()(TagAngleSPICACompute, const int &n, EV_FLOAT& ev) const { @@ -313,6 +314,7 @@ void AngleSPICAKokkos::operator()(TagAngleSPICACompute template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void AngleSPICAKokkos::operator()(TagAngleSPICACompute, const int &n) const { EV_FLOAT ev; @@ -451,6 +453,7 @@ void AngleSPICAKokkos::read_restart(FILE *fp) template //template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void AngleSPICAKokkos::ev_tally(EV_FLOAT &ev, const int i, const int j, const int k, KK_FLOAT &eangle, KK_FLOAT *f1, KK_FLOAT *f3, @@ -562,6 +565,7 @@ void AngleSPICAKokkos::ev_tally(EV_FLOAT &ev, const int i, const int /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void AngleSPICAKokkos::ev_tally13(EV_FLOAT &ev, const int i, const int j, const KK_FLOAT &evdwl, const KK_FLOAT &fpair, diff --git a/src/KOKKOS/angle_spica_kokkos.h b/src/KOKKOS/angle_spica_kokkos.h index ac038756b83..df89be67b50 100644 --- a/src/KOKKOS/angle_spica_kokkos.h +++ b/src/KOKKOS/angle_spica_kokkos.h @@ -50,20 +50,24 @@ class AngleSPICAKokkos : public AngleSPICA { void read_restart(FILE *) override; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagAngleSPICACompute, const int&, EV_FLOAT&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagAngleSPICACompute, const int&) const; //template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ev_tally(EV_FLOAT &ev, const int i, const int j, const int k, KK_FLOAT &eangle, KK_FLOAT *f1, KK_FLOAT *f3, const KK_FLOAT &delx1, const KK_FLOAT &dely1, const KK_FLOAT &delz1, const KK_FLOAT &delx2, const KK_FLOAT &dely2, const KK_FLOAT &delz2) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ev_tally13(EV_FLOAT &ev, const int i, const int j, const KK_FLOAT &evdwl, const KK_FLOAT &fpair, diff --git a/src/KOKKOS/atom_kokkos.h b/src/KOKKOS/atom_kokkos.h index 319992ec176..07aa1df57e4 100644 --- a/src/KOKKOS/atom_kokkos.h +++ b/src/KOKKOS/atom_kokkos.h @@ -135,6 +135,7 @@ class AtomKokkos : public Atom { }; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION static int map_kokkos(tagint global, int map_style, const DAT::tdual_int_1d &k_map_array, const dual_hash_type &k_map_hash) { @@ -147,6 +148,7 @@ class AtomKokkos : public Atom { } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION static int map_find_hash_kokkos(tagint global, const dual_hash_type &k_map_hash) { @@ -195,6 +197,7 @@ struct SortFunctor { SortFunctor(ViewType src, std::enable_if_t ind):source(src),index(ind) { dest = Kokkos::View("",src.extent(0),src.extent(1),src.extent(2),src.extent(3)); } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(const std::enable_if_t& i) { dest(i) = source(index(i)); diff --git a/src/KOKKOS/atom_vec_kokkos.cpp b/src/KOKKOS/atom_vec_kokkos.cpp index 819fb554916..276a4ca5e50 100644 --- a/src/KOKKOS/atom_vec_kokkos.cpp +++ b/src/KOKKOS/atom_vec_kokkos.cpp @@ -93,6 +93,7 @@ struct AtomVecKokkos_PackComm { _pbc[3] = pbc[3]; _pbc[4] = pbc[4]; _pbc[5] = pbc[5]; }; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (const int& i) const { const int j = _list(i); @@ -308,6 +309,7 @@ struct AtomVecKokkos_PackCommSelf { _pbc[3] = pbc[3]; _pbc[4] = pbc[4]; _pbc[5] = pbc[5]; }; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (const int& i) const { const int j = _list(i); @@ -529,6 +531,7 @@ struct AtomVecKokkos_PackCommSelfFused { _xprd(xprd),_yprd(yprd),_zprd(zprd), _xy(xy),_xz(xz),_yz(yz),_datamask(datamask) {}; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (const int& ii) const { @@ -691,6 +694,7 @@ struct AtomVecKokkos_UnpackComm { buffer_view(_buf,buf,maxsend,elements); }; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (const int& i) const { int m = 0; @@ -810,6 +814,7 @@ struct AtomVecKokkos_PackCommVel { _h_rate[3] = h_rate[3]; _h_rate[4] = h_rate[4]; _h_rate[5] = h_rate[5]; } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (const int& i) const { int m = 0; @@ -1054,6 +1059,7 @@ struct AtomVecKokkos_UnpackCommVel { buffer_view(_buf,buf,maxsend,elements); }; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (const int& i) const { int m = 0; @@ -1158,6 +1164,7 @@ struct AtomVecKokkos_PackReverse { buffer_view(_buf,buf,maxsend,elements); }; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (const int& i) const { int m = 0; @@ -1242,6 +1249,7 @@ struct AtomVecKokkos_UnPackReverseSelf { _nfirst(nfirst),_list(list.view()), _datamask(datamask) {}; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (const int& i) const { const int j = _list(i); @@ -1332,6 +1340,7 @@ struct AtomVecKokkos_UnPackReverse { buffer_view(_buf,buf,maxsend,elements); }; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (const int& i) const { int m = 0; @@ -1444,6 +1453,7 @@ struct AtomVecKokkos_PackBorder { _uCGnew(atomKK->k_uCGnew.view()), _dx(dx),_dy(dy),_dz(dz),_datamask(datamask) {} +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (const int& i) const { const int j = _list(i); @@ -1625,6 +1635,7 @@ struct AtomVecKokkos_UnpackBorder { _first(first),_datamask(datamask) { }; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (const int& i) const { int m = 0; @@ -1771,6 +1782,7 @@ struct AtomVecKokkos_PackBorderVel { _buf = typename AT::t_double_2d_lr_um(buf.data(),maxsend,elements); } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (const int& i) const { int m = 0; @@ -1978,6 +1990,7 @@ struct AtomVecKokkos_UnpackBorderVel { _buf = typename AT::t_double_2d_lr_const_um(buf.data(),maxsend,elements); }; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (const int& i) const { int m = 0; @@ -2182,6 +2195,7 @@ struct AtomVecKokkos_PackExchangeFunctor { buffer_view(_buf,buf,maxsendlist,_size_exchange); } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (const int &mysend) const { const int i = _sendlist(mysend); @@ -2550,6 +2564,7 @@ struct AtomVecKokkos_UnpackExchangeFunctor { buffer_view(_buf,buf,maxsendlist,_size_exchange); } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (const int &myrecv) const { double x = _buf(myrecv,_dim+1); diff --git a/src/KOKKOS/bond_class2_kokkos.cpp b/src/KOKKOS/bond_class2_kokkos.cpp index 4abb175a6b3..2e41b698ce3 100644 --- a/src/KOKKOS/bond_class2_kokkos.cpp +++ b/src/KOKKOS/bond_class2_kokkos.cpp @@ -139,6 +139,7 @@ void BondClass2Kokkos::compute(int eflag_in, int vflag_in) template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void BondClass2Kokkos::operator()(TagBondClass2Compute, const int &n, EV_FLOAT& ev) const { @@ -188,6 +189,7 @@ void BondClass2Kokkos::operator()(TagBondClass2Compute template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void BondClass2Kokkos::operator()(TagBondClass2Compute, const int &n) const { EV_FLOAT ev; @@ -285,6 +287,7 @@ void BondClass2Kokkos::read_restart(FILE *fp) template //template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void BondClass2Kokkos::ev_tally(EV_FLOAT &ev, const int &i, const int &j, const KK_FLOAT &ebond, const KK_FLOAT &fbond, const KK_FLOAT &delx, diff --git a/src/KOKKOS/bond_class2_kokkos.h b/src/KOKKOS/bond_class2_kokkos.h index f746e70513c..20898255791 100644 --- a/src/KOKKOS/bond_class2_kokkos.h +++ b/src/KOKKOS/bond_class2_kokkos.h @@ -46,14 +46,17 @@ class BondClass2Kokkos : public BondClass2 { void read_restart(FILE *) override; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagBondClass2Compute, const int&, EV_FLOAT&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagBondClass2Compute, const int&) const; //template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ev_tally(EV_FLOAT &ev, const int &i, const int &j, const KK_FLOAT &ebond, const KK_FLOAT &fbond, const KK_FLOAT &delx, diff --git a/src/KOKKOS/bond_fene_kokkos.cpp b/src/KOKKOS/bond_fene_kokkos.cpp index 53481fa5220..cb249daa60b 100644 --- a/src/KOKKOS/bond_fene_kokkos.cpp +++ b/src/KOKKOS/bond_fene_kokkos.cpp @@ -161,6 +161,7 @@ void BondFENEKokkos::compute(int eflag_in, int vflag_in) template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void BondFENEKokkos::operator()(TagBondFENECompute, const int &n, EV_FLOAT& ev) const { @@ -238,6 +239,7 @@ void BondFENEKokkos::operator()(TagBondFENECompute template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void BondFENEKokkos::operator()(TagBondFENECompute, const int &n) const { EV_FLOAT ev; @@ -318,6 +320,7 @@ void BondFENEKokkos::read_restart(FILE *fp) template //template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void BondFENEKokkos::ev_tally(EV_FLOAT &ev, const int &i, const int &j, const KK_FLOAT &ebond, const KK_FLOAT &fbond, const KK_FLOAT &delx, diff --git a/src/KOKKOS/bond_fene_kokkos.h b/src/KOKKOS/bond_fene_kokkos.h index 474124113a7..401b27f1f6e 100644 --- a/src/KOKKOS/bond_fene_kokkos.h +++ b/src/KOKKOS/bond_fene_kokkos.h @@ -45,14 +45,17 @@ class BondFENEKokkos : public BondFENE { void read_restart(FILE *) override; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagBondFENECompute, const int&, EV_FLOAT&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagBondFENECompute, const int&) const; //template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ev_tally(EV_FLOAT &ev, const int &i, const int &j, const KK_FLOAT &ebond, const KK_FLOAT &fbond, const KK_FLOAT &delx, diff --git a/src/KOKKOS/bond_harmonic_kokkos.cpp b/src/KOKKOS/bond_harmonic_kokkos.cpp index fa10912ab57..c532fd4c47a 100644 --- a/src/KOKKOS/bond_harmonic_kokkos.cpp +++ b/src/KOKKOS/bond_harmonic_kokkos.cpp @@ -134,6 +134,7 @@ void BondHarmonicKokkos::compute(int eflag_in, int vflag_in) template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void BondHarmonicKokkos::operator()(TagBondHarmonicCompute, const int &n, EV_FLOAT& ev) const { @@ -178,6 +179,7 @@ void BondHarmonicKokkos::operator()(TagBondHarmonicCompute template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void BondHarmonicKokkos::operator()(TagBondHarmonicCompute, const int &n) const { EV_FLOAT ev; @@ -255,6 +257,7 @@ void BondHarmonicKokkos::read_restart(FILE *fp) template //template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void BondHarmonicKokkos::ev_tally(EV_FLOAT &ev, const int &i, const int &j, const KK_FLOAT &ebond, const KK_FLOAT &fbond, const KK_FLOAT &delx, diff --git a/src/KOKKOS/bond_harmonic_kokkos.h b/src/KOKKOS/bond_harmonic_kokkos.h index 4af651768e1..a765dbf0f94 100644 --- a/src/KOKKOS/bond_harmonic_kokkos.h +++ b/src/KOKKOS/bond_harmonic_kokkos.h @@ -46,14 +46,17 @@ class BondHarmonicKokkos : public BondHarmonic { void read_restart(FILE *) override; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagBondHarmonicCompute, const int&, EV_FLOAT&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagBondHarmonicCompute, const int&) const; //template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ev_tally(EV_FLOAT &ev, const int &i, const int &j, const KK_FLOAT &ebond, const KK_FLOAT &fbond, const KK_FLOAT &delx, diff --git a/src/KOKKOS/comm_kokkos.cpp b/src/KOKKOS/comm_kokkos.cpp index bdad384218c..5163283fa88 100644 --- a/src/KOKKOS/comm_kokkos.cpp +++ b/src/KOKKOS/comm_kokkos.cpp @@ -797,6 +797,7 @@ struct BuildExchangeListFunctor { _nsend(nsend.template view()), _sendlist(sendlist.template view()) { } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (int i) const { if (_x(i,_dim) < _lo || _x(i,_dim) >= _hi) { @@ -1118,6 +1119,7 @@ struct BuildBorderListFunctor { nsend(_nsend.template view()) {} +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (typename Kokkos::TeamPolicy::member_type dev) const { const int chunk = ((nlast - nfirst + dev.league_size() - 1 ) / @@ -1140,7 +1142,7 @@ struct BuildBorderListFunctor { } } - size_t shmem_size(const int team_size) const { (void) team_size; return 1000u;} + [[nodiscard]] size_t shmem_size(const int team_size) const { (void) team_size; return 1000u;} }; /* ---------------------------------------------------------------------- */ diff --git a/src/KOKKOS/compute_ave_sphere_atom_kokkos.cpp b/src/KOKKOS/compute_ave_sphere_atom_kokkos.cpp index d5f012cb192..85d5b419958 100644 --- a/src/KOKKOS/compute_ave_sphere_atom_kokkos.cpp +++ b/src/KOKKOS/compute_ave_sphere_atom_kokkos.cpp @@ -128,6 +128,7 @@ void ComputeAveSphereAtomKokkos::compute_peratom() } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ComputeAveSphereAtomKokkos::operator()(TagComputeAveSphereAtom, const int &ii) const { diff --git a/src/KOKKOS/compute_ave_sphere_atom_kokkos.h b/src/KOKKOS/compute_ave_sphere_atom_kokkos.h index 79c59bb19f5..049e93e66c3 100644 --- a/src/KOKKOS/compute_ave_sphere_atom_kokkos.h +++ b/src/KOKKOS/compute_ave_sphere_atom_kokkos.h @@ -42,6 +42,7 @@ template class ComputeAveSphereAtomKokkos : public ComputeAve void init() override; void compute_peratom() override; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagComputeAveSphereAtom, const int &) const; diff --git a/src/KOKKOS/compute_composition_atom_kokkos.cpp b/src/KOKKOS/compute_composition_atom_kokkos.cpp index bbc836dc9cf..c23429b6f01 100644 --- a/src/KOKKOS/compute_composition_atom_kokkos.cpp +++ b/src/KOKKOS/compute_composition_atom_kokkos.cpp @@ -113,6 +113,7 @@ void ComputeCompositionAtomKokkos::compute_peratom() } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ComputeCompositionAtomKokkos::operator()(TagComputeCompositionAtom, const int &ii) const { diff --git a/src/KOKKOS/compute_composition_atom_kokkos.h b/src/KOKKOS/compute_composition_atom_kokkos.h index aeb5d9790b6..d4dbfb1a113 100644 --- a/src/KOKKOS/compute_composition_atom_kokkos.h +++ b/src/KOKKOS/compute_composition_atom_kokkos.h @@ -42,6 +42,7 @@ template class ComputeCompositionAtomKokkos : public ComputeC void init() override; void compute_peratom() override; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagComputeCompositionAtom, const int &) const; diff --git a/src/KOKKOS/compute_coord_atom_kokkos.cpp b/src/KOKKOS/compute_coord_atom_kokkos.cpp index f21e61b17db..7119f8dec65 100644 --- a/src/KOKKOS/compute_coord_atom_kokkos.cpp +++ b/src/KOKKOS/compute_coord_atom_kokkos.cpp @@ -177,6 +177,7 @@ void ComputeCoordAtomKokkos::compute_peratom() template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ComputeCoordAtomKokkos::operator()(TagComputeCoordAtom, const int &ii) const { diff --git a/src/KOKKOS/compute_coord_atom_kokkos.h b/src/KOKKOS/compute_coord_atom_kokkos.h index 3ab2a8c8093..4283ea71feb 100644 --- a/src/KOKKOS/compute_coord_atom_kokkos.h +++ b/src/KOKKOS/compute_coord_atom_kokkos.h @@ -44,6 +44,7 @@ class ComputeCoordAtomKokkos : public ComputeCoordAtom { enum {NONE,CUTOFF,ORIENT}; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagComputeCoordAtom, const int&) const; diff --git a/src/KOKKOS/compute_gaussian_grid_local_kokkos.cpp b/src/KOKKOS/compute_gaussian_grid_local_kokkos.cpp index cc0d4b791b1..e2bc1084e7d 100644 --- a/src/KOKKOS/compute_gaussian_grid_local_kokkos.cpp +++ b/src/KOKKOS/compute_gaussian_grid_local_kokkos.cpp @@ -206,6 +206,7 @@ void ComputeGaussianGridLocalKokkos::compute_local() /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ComputeGaussianGridLocalKokkos::operator() (TagComputeGaussianGridLocalNeigh,const typename Kokkos::TeamPolicy::member_type& team) const { diff --git a/src/KOKKOS/compute_gaussian_grid_local_kokkos.h b/src/KOKKOS/compute_gaussian_grid_local_kokkos.h index 2b6f933ecd1..7c8e8c2e27d 100644 --- a/src/KOKKOS/compute_gaussian_grid_local_kokkos.h +++ b/src/KOKKOS/compute_gaussian_grid_local_kokkos.h @@ -54,6 +54,7 @@ template class ComputeGaussianGridLocalKokkos : public Comput template void check_team_size_for(int, int&, int); +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (TagComputeGaussianGridLocalNeigh, const typename Kokkos::TeamPolicy::member_type& team) const; diff --git a/src/KOKKOS/compute_orientorder_atom_kokkos.cpp b/src/KOKKOS/compute_orientorder_atom_kokkos.cpp index 527faad290a..6d9315ef7cd 100644 --- a/src/KOKKOS/compute_orientorder_atom_kokkos.cpp +++ b/src/KOKKOS/compute_orientorder_atom_kokkos.cpp @@ -116,6 +116,7 @@ struct FindMaxNumNeighs { FindMaxNumNeighs(NeighListKokkos* nl): k_list(*nl) {} ~FindMaxNumNeighs() {k_list.copymode = 1;} +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (const int& ii, int& maxneigh) const { const int i = k_list.d_ilist[ii]; @@ -233,6 +234,7 @@ void ComputeOrientOrderAtomKokkos::compute_peratom() /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ComputeOrientOrderAtomKokkos::operator() (TagComputeOrientOrderAtomNeigh,const typename Kokkos::TeamPolicy::member_type& team) const { @@ -290,6 +292,7 @@ void ComputeOrientOrderAtomKokkos::operator() (TagComputeOrientOrder } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ComputeOrientOrderAtomKokkos::operator() (TagComputeOrientOrderAtomSelect3,const int& ii) const { @@ -313,6 +316,7 @@ void ComputeOrientOrderAtomKokkos::operator() (TagComputeOrientOrder } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ComputeOrientOrderAtomKokkos::operator() (TagComputeOrientOrderAtomBOOP1,const typename Kokkos::TeamPolicy::member_type& team) const { @@ -335,6 +339,7 @@ void ComputeOrientOrderAtomKokkos::operator() (TagComputeOrientOrder } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ComputeOrientOrderAtomKokkos::operator() (TagComputeOrientOrderAtomBOOP2,const int& ii) const { const int ncount = d_ncount(ii); @@ -372,6 +377,7 @@ void ComputeOrientOrderAtomKokkos::operator() (TagComputeOrientOrder /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ComputeOrientOrderAtomKokkos::select3(int k, int n, int ii) const { @@ -448,6 +454,7 @@ void ComputeOrientOrderAtomKokkos::select3(int k, int n, int ii) con ------------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ComputeOrientOrderAtomKokkos::calc_boop1(int /*ncount*/, int ii, int ineigh) const { @@ -502,6 +509,7 @@ void ComputeOrientOrderAtomKokkos::calc_boop1(int /*ncount*/, int ii ------------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ComputeOrientOrderAtomKokkos::calc_boop2(int ncount, int ii) const { @@ -613,6 +621,7 @@ void ComputeOrientOrderAtomKokkos::calc_boop2(int ncount, int ii) co ------------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT ComputeOrientOrderAtomKokkos::polar_prefactor(int l, int m, KK_FLOAT costheta) const { @@ -636,6 +645,7 @@ KK_FLOAT ComputeOrientOrderAtomKokkos::polar_prefactor(int l, int m, ------------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT ComputeOrientOrderAtomKokkos::associated_legendre(int l, int m, KK_FLOAT x) const { diff --git a/src/KOKKOS/compute_orientorder_atom_kokkos.h b/src/KOKKOS/compute_orientorder_atom_kokkos.h index 61ce8c4ac69..687690eb971 100644 --- a/src/KOKKOS/compute_orientorder_atom_kokkos.h +++ b/src/KOKKOS/compute_orientorder_atom_kokkos.h @@ -76,15 +76,19 @@ class ComputeOrientOrderAtomKokkos : public ComputeOrientOrderAtom { template void check_team_size_for(int, int&, int); +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (TagComputeOrientOrderAtomNeigh, const typename Kokkos::TeamPolicy::member_type& team) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (TagComputeOrientOrderAtomSelect3, const int& ii) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (TagComputeOrientOrderAtomBOOP1, const typename Kokkos::TeamPolicy::member_type& team) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (TagComputeOrientOrderAtomBOOP2, const int& ii) const; @@ -113,18 +117,23 @@ class ComputeOrientOrderAtomKokkos : public ComputeOrientOrderAtom { t_sna_3c d_qnm; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void select3(int, int, int) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void calc_boop1(int, int, int) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void calc_boop2(int, int) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT polar_prefactor(int, int, KK_FLOAT) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT associated_legendre(int, int, KK_FLOAT) const; diff --git a/src/KOKKOS/compute_sna_grid_kokkos.h b/src/KOKKOS/compute_sna_grid_kokkos.h index 6b594e1a0b2..555cbe6fa16 100644 --- a/src/KOKKOS/compute_sna_grid_kokkos.h +++ b/src/KOKKOS/compute_sna_grid_kokkos.h @@ -146,66 +146,87 @@ class ComputeSNAGridKokkos : public ComputeSNAGrid { void check_team_size_reduce(int, int&); // operator function for example team policy +// NOLINTNEXTLINE //KOKKOS_INLINE_FUNCTION +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (TagComputeSNAGridLoop, const int& ) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (TagComputeSNAGridLoopCPU, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (TagCSNAGridComputeNeigh,const typename Kokkos::TeamPolicy::member_type& team) const; // 3D case - used by parallel_for +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagComputeSNAGrid3D, const int& iz, const int& iy, const int& ix) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (TagCSNAGridComputeCayleyKlein, const int iatom_mod, const int jnbor, const int iatom_div) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (TagCSNAGridPreUi, const int& iatom_mod, const int& j, const int& iatom_div) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (TagCSNAGridPreUi, const int& iatom, const int& j) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (TagCSNAGridPreUi, const int& iatom) const; +// NOLINTNEXTLINE template KOKKOS_INLINE_FUNCTION void operator() (TagCSNAGridComputeUiSmall,const typename Kokkos::TeamPolicy>::member_type& team) const; +// NOLINTNEXTLINE template KOKKOS_INLINE_FUNCTION void operator() (TagCSNAGridComputeUiLarge,const typename Kokkos::TeamPolicy>::member_type& team) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (TagCSNAGridTransformUi, const int& iatom_mod, const int& idxu, const int& iatom_div) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (TagCSNAGridTransformUi, const int& iatom, const int& idxu) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (TagCSNAGridTransformUi, const int& iatom) const; +// NOLINTNEXTLINE template KOKKOS_INLINE_FUNCTION void operator() (TagCSNAGridComputeZi, const int& iatom_mod, const int& idxz, const int& iatom_div) const; +// NOLINTNEXTLINE template KOKKOS_INLINE_FUNCTION void operator() (TagCSNAGridComputeZi, const int& iatom, const int& idxz) const; +// NOLINTNEXTLINE template KOKKOS_INLINE_FUNCTION void operator() (TagCSNAGridComputeZi, const int& iatom) const; +// NOLINTNEXTLINE template KOKKOS_INLINE_FUNCTION void operator() (TagCSNAGridComputeBi, const int& iatom_mod, const int& idxb, const int& iatom_div) const; +// NOLINTNEXTLINE template KOKKOS_INLINE_FUNCTION void operator() (TagCSNAGridComputeBi, const int& iatom, const int& idxb) const; +// NOLINTNEXTLINE template KOKKOS_INLINE_FUNCTION void operator() (TagCSNAGridComputeBi, const int& iatom) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (TagCSNAGridLocalFill,const int& ii) const; diff --git a/src/KOKKOS/compute_sna_grid_kokkos_impl.h b/src/KOKKOS/compute_sna_grid_kokkos_impl.h index ece3ae12617..5c3e047cb4d 100644 --- a/src/KOKKOS/compute_sna_grid_kokkos_impl.h +++ b/src/KOKKOS/compute_sna_grid_kokkos_impl.h @@ -355,6 +355,7 @@ void ComputeSNAGridKokkos::com Simple team policy functor seeing how many layers deep we can go with the parallelism. */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ComputeSNAGridKokkos::operator() (TagCSNAGridComputeNeigh,const typename Kokkos::TeamPolicy::member_type& team) const { @@ -491,6 +492,7 @@ void ComputeSNAGridKokkos::ope ------------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ComputeSNAGridKokkos::operator() (TagCSNAGridComputeCayleyKlein,const int iatom_mod, const int jnbor, const int iatom_div) const { @@ -509,6 +511,7 @@ void ComputeSNAGridKokkos::ope ------------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ComputeSNAGridKokkos::operator() (TagCSNAGridPreUi, const int& iatom_mod, const int& j, const int& iatom_div) const { const int iatom = iatom_mod + iatom_div * vector_length; @@ -521,6 +524,7 @@ void ComputeSNAGridKokkos::ope } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ComputeSNAGridKokkos::operator() (TagCSNAGridPreUi, const int& iatom, const int& j) const { if (iatom >= chunk_size) return; @@ -532,6 +536,7 @@ void ComputeSNAGridKokkos::ope } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ComputeSNAGridKokkos::operator() (TagCSNAGridPreUi, const int& iatom) const { if (iatom >= chunk_size) return; @@ -544,6 +549,7 @@ void ComputeSNAGridKokkos::ope } template +// NOLINTNEXTLINE template KOKKOS_INLINE_FUNCTION void ComputeSNAGridKokkos::operator() (TagCSNAGridComputeUiSmall, const typename Kokkos::TeamPolicy>::member_type& team) const { @@ -571,6 +577,7 @@ void ComputeSNAGridKokkos::ope } template +// NOLINTNEXTLINE template KOKKOS_INLINE_FUNCTION void ComputeSNAGridKokkos::operator() (TagCSNAGridComputeUiLarge, const typename Kokkos::TeamPolicy>::member_type& team) const { @@ -600,6 +607,7 @@ void ComputeSNAGridKokkos::ope ------------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ComputeSNAGridKokkos::operator() (TagCSNAGridTransformUi, const int& iatom_mod, const int& idxu, const int& iatom_div) const { const int iatom = iatom_mod + iatom_div * vector_length; @@ -609,6 +617,7 @@ void ComputeSNAGridKokkos::ope } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ComputeSNAGridKokkos::operator() (TagCSNAGridTransformUi, const int& iatom, const int& idxu) const { if (iatom >= chunk_size) return; @@ -616,6 +625,7 @@ void ComputeSNAGridKokkos::ope } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ComputeSNAGridKokkos::operator() (TagCSNAGridTransformUi, const int& iatom) const { if (iatom >= chunk_size) return; @@ -629,6 +639,7 @@ void ComputeSNAGridKokkos::ope ------------------------------------------------------------------------- */ template +// NOLINTNEXTLINE template KOKKOS_INLINE_FUNCTION void ComputeSNAGridKokkos::operator() (TagCSNAGridComputeZi, const int& iatom_mod, const int& jjz, const int& iatom_div) const { const int iatom = iatom_mod + iatom_div * vector_length; @@ -638,6 +649,7 @@ void ComputeSNAGridKokkos::ope } template +// NOLINTNEXTLINE template KOKKOS_INLINE_FUNCTION void ComputeSNAGridKokkos::operator() (TagCSNAGridComputeZi, const int& iatom, const int& jjz) const { if (iatom >= chunk_size) return; @@ -645,6 +657,7 @@ void ComputeSNAGridKokkos::ope } template +// NOLINTNEXTLINE template KOKKOS_INLINE_FUNCTION void ComputeSNAGridKokkos::operator() (TagCSNAGridComputeZi, const int& iatom) const { if (iatom >= chunk_size) return; @@ -657,6 +670,7 @@ void ComputeSNAGridKokkos::ope ------------------------------------------------------------------------- */ template +// NOLINTNEXTLINE template KOKKOS_INLINE_FUNCTION void ComputeSNAGridKokkos::operator() (TagCSNAGridComputeBi, const int& iatom_mod, const int& jjb, const int& iatom_div) const { const int iatom = iatom_mod + iatom_div * vector_length; @@ -666,6 +680,7 @@ void ComputeSNAGridKokkos::ope } template +// NOLINTNEXTLINE template KOKKOS_INLINE_FUNCTION void ComputeSNAGridKokkos::operator() (TagCSNAGridComputeBi, const int& iatom, const int& jjb) const { if (iatom >= chunk_size) return; @@ -673,6 +688,7 @@ void ComputeSNAGridKokkos::ope } template +// NOLINTNEXTLINE template KOKKOS_INLINE_FUNCTION void ComputeSNAGridKokkos::operator() (TagCSNAGridComputeBi, const int& iatom) const { if (iatom >= chunk_size) return; @@ -681,6 +697,7 @@ void ComputeSNAGridKokkos::ope } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ComputeSNAGridKokkos::operator() (TagCSNAGridLocalFill, const int& ii) const { diff --git a/src/KOKKOS/compute_sna_grid_local_kokkos.h b/src/KOKKOS/compute_sna_grid_local_kokkos.h index 5e8033857ae..43c295d70a3 100644 --- a/src/KOKKOS/compute_sna_grid_local_kokkos.h +++ b/src/KOKKOS/compute_sna_grid_local_kokkos.h @@ -143,66 +143,86 @@ class ComputeSNAGridLocalKokkos : public ComputeSNAGridLocal { template void check_team_size_reduce(int, int&); +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (TagComputeSNAGridLocalLoop, const int& ) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (TagComputeSNAGridLocalLoopCPU, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (TagCSNAGridLocalComputeNeigh,const typename Kokkos::TeamPolicy::member_type& team) const; // 3D case - used by parallel_for +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagComputeSNAGridLocal3D, const int& iz, const int& iy, const int& ix) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (TagCSNAGridLocalComputeCayleyKlein, const int iatom_mod, const int jnbor, const int iatom_div) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (TagCSNAGridLocalPreUi, const int& iatom_mod, const int& j, const int& iatom_div) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (TagCSNAGridLocalPreUi, const int& iatom, const int& j) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (TagCSNAGridLocalPreUi, const int& iatom) const; +// NOLINTNEXTLINE template KOKKOS_INLINE_FUNCTION void operator() (TagCSNAGridLocalComputeUiSmall, const typename Kokkos::TeamPolicy>::member_type& team) const; +// NOLINTNEXTLINE template KOKKOS_INLINE_FUNCTION void operator() (TagCSNAGridLocalComputeUiLarge, const typename Kokkos::TeamPolicy>::member_type& team) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (TagCSNAGridLocalTransformUi, const int& iatom_mod, const int& idxu, const int& iatom_div) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (TagCSNAGridLocalTransformUi, const int& iatom, const int& idxu) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (TagCSNAGridLocalTransformUi, const int& iatom) const; +// NOLINTNEXTLINE template KOKKOS_INLINE_FUNCTION void operator() (TagCSNAGridLocalComputeZi, const int& iatom_mod, const int& idxz, const int& iatom_div) const; +// NOLINTNEXTLINE template KOKKOS_INLINE_FUNCTION void operator() (TagCSNAGridLocalComputeZi, const int& iatom, const int& idxz) const; +// NOLINTNEXTLINE template KOKKOS_INLINE_FUNCTION void operator() (TagCSNAGridLocalComputeZi, const int& iatom) const; +// NOLINTNEXTLINE template KOKKOS_INLINE_FUNCTION void operator() (TagCSNAGridLocalComputeBi, const int& iatom_mod, const int& idxb, const int& iatom_div) const; +// NOLINTNEXTLINE template KOKKOS_INLINE_FUNCTION void operator() (TagCSNAGridLocalComputeBi, const int& iatom, const int& idxb) const; +// NOLINTNEXTLINE template KOKKOS_INLINE_FUNCTION void operator() (TagCSNAGridLocalComputeBi, const int& iatom) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (TagCSNAGridLocal2Fill,const int& ii) const; diff --git a/src/KOKKOS/compute_sna_grid_local_kokkos_impl.h b/src/KOKKOS/compute_sna_grid_local_kokkos_impl.h index 49a315a9b98..34f613b9a08 100644 --- a/src/KOKKOS/compute_sna_grid_local_kokkos_impl.h +++ b/src/KOKKOS/compute_sna_grid_local_kokkos_impl.h @@ -336,6 +336,7 @@ void ComputeSNAGridLocalKokkos Simple team policy functor seeing how many layers deep we can go with the parallelism. */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ComputeSNAGridLocalKokkos::operator() (TagCSNAGridLocalComputeNeigh,const typename Kokkos::TeamPolicy::member_type& team) const { @@ -491,6 +492,7 @@ void ComputeSNAGridLocalKokkos ------------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ComputeSNAGridLocalKokkos::operator() (TagCSNAGridLocalComputeCayleyKlein,const int iatom_mod, const int jnbor, const int iatom_div) const { @@ -509,6 +511,7 @@ void ComputeSNAGridLocalKokkos ------------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ComputeSNAGridLocalKokkos::operator() (TagCSNAGridLocalPreUi, const int& iatom_mod, const int& j, const int& iatom_div) const { const int iatom = iatom_mod + iatom_div * vector_length; @@ -521,6 +524,7 @@ void ComputeSNAGridLocalKokkos } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ComputeSNAGridLocalKokkos::operator() (TagCSNAGridLocalPreUi, const int& iatom, const int& j) const { if (iatom >= chunk_size) return; @@ -532,6 +536,7 @@ void ComputeSNAGridLocalKokkos } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ComputeSNAGridLocalKokkos::operator() (TagCSNAGridLocalPreUi, const int& iatom) const { if (iatom >= chunk_size) return; @@ -545,6 +550,7 @@ void ComputeSNAGridLocalKokkos template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ComputeSNAGridLocalKokkos::operator() (TagCSNAGridLocalComputeUiSmall, const typename Kokkos::TeamPolicy>::member_type& team) const { @@ -573,6 +579,7 @@ void ComputeSNAGridLocalKokkos template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ComputeSNAGridLocalKokkos::operator() (TagCSNAGridLocalComputeUiLarge, const typename Kokkos::TeamPolicy>::member_type& team) const { @@ -602,6 +609,7 @@ void ComputeSNAGridLocalKokkos ------------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ComputeSNAGridLocalKokkos::operator() (TagCSNAGridLocalTransformUi, const int& iatom_mod, const int& idxu, const int& iatom_div) const { const int iatom = iatom_mod + iatom_div * vector_length; @@ -611,6 +619,7 @@ void ComputeSNAGridLocalKokkos } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ComputeSNAGridLocalKokkos::operator() (TagCSNAGridLocalTransformUi, const int& iatom, const int& idxu) const { if (iatom >= chunk_size) return; @@ -618,6 +627,7 @@ void ComputeSNAGridLocalKokkos } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ComputeSNAGridLocalKokkos::operator() (TagCSNAGridLocalTransformUi, const int& iatom) const { if (iatom >= chunk_size) return; @@ -631,6 +641,7 @@ void ComputeSNAGridLocalKokkos ------------------------------------------------------------------------- */ template +// NOLINTNEXTLINE template KOKKOS_INLINE_FUNCTION void ComputeSNAGridLocalKokkos::operator() (TagCSNAGridLocalComputeZi, const int& iatom_mod, const int& jjz, const int& iatom_div) const { const int iatom = iatom_mod + iatom_div * vector_length; @@ -640,6 +651,7 @@ void ComputeSNAGridLocalKokkos } template +// NOLINTNEXTLINE template KOKKOS_INLINE_FUNCTION void ComputeSNAGridLocalKokkos::operator() (TagCSNAGridLocalComputeZi, const int& iatom, const int& jjz) const { if (iatom >= chunk_size) return; @@ -647,6 +659,7 @@ void ComputeSNAGridLocalKokkos } template +// NOLINTNEXTLINE template KOKKOS_INLINE_FUNCTION void ComputeSNAGridLocalKokkos::operator() (TagCSNAGridLocalComputeZi, const int& iatom) const { if (iatom >= chunk_size) return; @@ -659,6 +672,7 @@ void ComputeSNAGridLocalKokkos ------------------------------------------------------------------------- */ template +// NOLINTNEXTLINE template KOKKOS_INLINE_FUNCTION void ComputeSNAGridLocalKokkos::operator() (TagCSNAGridLocalComputeBi, const int& iatom_mod, const int& jjb, const int& iatom_div) const { const int iatom = iatom_mod + iatom_div * vector_length; @@ -668,6 +682,7 @@ void ComputeSNAGridLocalKokkos } template +// NOLINTNEXTLINE template KOKKOS_INLINE_FUNCTION void ComputeSNAGridLocalKokkos::operator() (TagCSNAGridLocalComputeBi, const int& iatom, const int& jjb) const { if (iatom >= chunk_size) return; @@ -675,6 +690,7 @@ void ComputeSNAGridLocalKokkos } template +// NOLINTNEXTLINE template KOKKOS_INLINE_FUNCTION void ComputeSNAGridLocalKokkos::operator() (TagCSNAGridLocalComputeBi, const int& iatom) const { if (iatom >= chunk_size) return; @@ -683,6 +699,7 @@ void ComputeSNAGridLocalKokkos } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ComputeSNAGridLocalKokkos::operator() (TagCSNAGridLocal2Fill, const int& ii) const { diff --git a/src/KOKKOS/compute_temp_com_kokkos.cpp b/src/KOKKOS/compute_temp_com_kokkos.cpp index 78857b3fada..59c10507391 100644 --- a/src/KOKKOS/compute_temp_com_kokkos.cpp +++ b/src/KOKKOS/compute_temp_com_kokkos.cpp @@ -88,6 +88,7 @@ double ComputeTempCOMKokkos::compute_scalar() template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ComputeTempCOMKokkos::operator()(TagComputeTempCOMScalar, const int &i, CTEMP& t_kk) const { @@ -153,6 +154,7 @@ void ComputeTempCOMKokkos::compute_vector() template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ComputeTempCOMKokkos::operator()(TagComputeTempCOMVector, const int &i, CTEMP& t_kk) const { @@ -202,6 +204,7 @@ void ComputeTempCOMKokkos::remove_bias_all_kk() } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ComputeTempCOMKokkos::operator()(TagComputeTempCOMRemoveBias, const int &i) const { if (mask[i] & groupbit) { @@ -229,6 +232,7 @@ void ComputeTempCOMKokkos::restore_bias_all() } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ComputeTempCOMKokkos::operator()(TagComputeTempCOMRestoreBias, const int &i) const { if (mask[i] & groupbit) { diff --git a/src/KOKKOS/compute_temp_com_kokkos.h b/src/KOKKOS/compute_temp_com_kokkos.h index 1c4e03ddcef..15b86144059 100644 --- a/src/KOKKOS/compute_temp_com_kokkos.h +++ b/src/KOKKOS/compute_temp_com_kokkos.h @@ -43,10 +43,12 @@ class ComputeTempCOMKokkos : public ComputeTempCOM { struct s_CTEMP { double t0, t1, t2, t3, t4, t5; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION s_CTEMP() { t0 = t1 = t2 = t3 = t4 = t5 = 0.0; } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION s_CTEMP& operator+=(const s_CTEMP &rhs) { t0 += rhs.t0; @@ -72,16 +74,20 @@ class ComputeTempCOMKokkos : public ComputeTempCOM { void restore_bias_all() override; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagComputeTempCOMScalar, const int&, CTEMP&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagComputeTempCOMVector, const int&, CTEMP&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagComputeTempCOMRemoveBias, const int &i) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagComputeTempCOMRestoreBias, const int &i) const; diff --git a/src/KOKKOS/compute_temp_deform_kokkos.cpp b/src/KOKKOS/compute_temp_deform_kokkos.cpp index d6698dc43e9..f762546de88 100644 --- a/src/KOKKOS/compute_temp_deform_kokkos.cpp +++ b/src/KOKKOS/compute_temp_deform_kokkos.cpp @@ -94,6 +94,7 @@ double ComputeTempDeformKokkos::compute_scalar() template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ComputeTempDeformKokkos::operator()(TagComputeTempDeformScalar, const int &i, CTEMP& t_kk) const { @@ -165,6 +166,7 @@ void ComputeTempDeformKokkos::compute_vector() template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ComputeTempDeformKokkos::operator()(TagComputeTempDeformVector, const int &i, CTEMP& t_kk) const { @@ -230,6 +232,7 @@ void ComputeTempDeformKokkos::remove_bias_all_kk() } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ComputeTempDeformKokkos::operator()(TagComputeTempDeformRemoveBias, const int &i) const { if (mask[i] & groupbit) { @@ -260,6 +263,7 @@ void ComputeTempDeformKokkos::restore_bias_all() } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ComputeTempDeformKokkos::operator()(TagComputeTempDeformRestoreBias, const int &i) const { if (mask[i] & groupbit) { diff --git a/src/KOKKOS/compute_temp_deform_kokkos.h b/src/KOKKOS/compute_temp_deform_kokkos.h index f70df8ba944..ca2803c4571 100644 --- a/src/KOKKOS/compute_temp_deform_kokkos.h +++ b/src/KOKKOS/compute_temp_deform_kokkos.h @@ -45,10 +45,12 @@ class ComputeTempDeformKokkos: public ComputeTempDeform { struct s_CTEMP { double t0, t1, t2, t3, t4, t5; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION s_CTEMP() { t0 = t1 = t2 = t3 = t4 = t5 = 0.0; } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION s_CTEMP& operator+=(const s_CTEMP &rhs) { t0 += rhs.t0; @@ -74,16 +76,20 @@ class ComputeTempDeformKokkos: public ComputeTempDeform { void restore_bias_all() override; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagComputeTempDeformScalar, const int&, CTEMP&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagComputeTempDeformVector, const int&, CTEMP&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagComputeTempDeformRemoveBias, const int &i) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagComputeTempDeformRestoreBias, const int &i) const; diff --git a/src/KOKKOS/compute_temp_kokkos.cpp b/src/KOKKOS/compute_temp_kokkos.cpp index 9ca77b65649..f2e59027b5c 100644 --- a/src/KOKKOS/compute_temp_kokkos.cpp +++ b/src/KOKKOS/compute_temp_kokkos.cpp @@ -79,6 +79,7 @@ double ComputeTempKokkos::compute_scalar() template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ComputeTempKokkos::operator()(TagComputeTempScalar, const int &i, CTEMP& t_kk) const { if (RMASS) { @@ -136,6 +137,7 @@ void ComputeTempKokkos::compute_vector() template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ComputeTempKokkos::operator()(TagComputeTempVector, const int &i, CTEMP& t_kk) const { if (mask[i] & groupbit) { diff --git a/src/KOKKOS/compute_temp_kokkos.h b/src/KOKKOS/compute_temp_kokkos.h index f7699bb23c9..0d601c79a00 100644 --- a/src/KOKKOS/compute_temp_kokkos.h +++ b/src/KOKKOS/compute_temp_kokkos.h @@ -40,10 +40,12 @@ class ComputeTempKokkos : public ComputeTemp { struct s_CTEMP { double t0, t1, t2, t3, t4, t5; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION s_CTEMP() { t0 = t1 = t2 = t3 = t4 = t5 = 0.0; } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION s_CTEMP& operator+=(const s_CTEMP &rhs) { t0 += rhs.t0; @@ -66,10 +68,12 @@ class ComputeTempKokkos : public ComputeTemp { void compute_vector() override; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagComputeTempScalar, const int&, CTEMP&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagComputeTempVector, const int&, CTEMP&) const; diff --git a/src/KOKKOS/dihedral_charmm_kokkos.cpp b/src/KOKKOS/dihedral_charmm_kokkos.cpp index d00091fb593..cfa918f1669 100644 --- a/src/KOKKOS/dihedral_charmm_kokkos.cpp +++ b/src/KOKKOS/dihedral_charmm_kokkos.cpp @@ -204,6 +204,7 @@ void DihedralCharmmKokkos::compute(int eflag_in, int vflag_in) template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void DihedralCharmmKokkos::operator()(TagDihedralCharmmCompute, const int &n, EVM_FLOAT& evm) const { @@ -407,6 +408,7 @@ void DihedralCharmmKokkos::operator()(TagDihedralCharmmCompute template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void DihedralCharmmKokkos::operator()(TagDihedralCharmmCompute, const int &n) const { EVM_FLOAT evm; @@ -576,6 +578,7 @@ void DihedralCharmmKokkos::read_restart(FILE *fp) template //template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void DihedralCharmmKokkos::ev_tally(EVM_FLOAT &evm, const int i1, const int i2, const int i3, const int i4, KK_FLOAT &edihedral, KK_FLOAT *f1, KK_FLOAT *f3, KK_FLOAT *f4, @@ -663,6 +666,7 @@ void DihedralCharmmKokkos::ev_tally(EVM_FLOAT &evm, const int i1, co ------------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void DihedralCharmmKokkos::ev_tally(EVM_FLOAT &evm, const int i, const int j, const KK_FLOAT &evdwl, const KK_FLOAT &ecoul, const KK_FLOAT &fpair, const KK_FLOAT &delx, diff --git a/src/KOKKOS/dihedral_charmm_kokkos.h b/src/KOKKOS/dihedral_charmm_kokkos.h index ff38f682a41..368818e2bde 100644 --- a/src/KOKKOS/dihedral_charmm_kokkos.h +++ b/src/KOKKOS/dihedral_charmm_kokkos.h @@ -34,6 +34,7 @@ struct s_EVM_FLOAT { KK_ACC_FLOAT emol; KK_ACC_FLOAT v[6]; KK_ACC_FLOAT vp[6]; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION s_EVM_FLOAT() { evdwl = 0; @@ -45,6 +46,7 @@ struct s_EVM_FLOAT { vp[3] = 0; vp[4] = 0; vp[5] = 0; } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator+=(const s_EVM_FLOAT &rhs) { evdwl += rhs.evdwl; @@ -84,14 +86,17 @@ class DihedralCharmmKokkos : public DihedralCharmm { void read_restart(FILE *) override; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagDihedralCharmmCompute, const int&, EVM_FLOAT&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagDihedralCharmmCompute, const int&) const; //template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ev_tally(EVM_FLOAT &evm, const int i1, const int i2, const int i3, const int i4, KK_FLOAT &edihedral, KK_FLOAT *f1, KK_FLOAT *f3, KK_FLOAT *f4, @@ -99,6 +104,7 @@ class DihedralCharmmKokkos : public DihedralCharmm { const KK_FLOAT &vb2x, const KK_FLOAT &vb2y, const KK_FLOAT &vb2z, const KK_FLOAT &vb3x, const KK_FLOAT &vb3y, const KK_FLOAT &vb3z) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ev_tally(EVM_FLOAT &evm, const int i, const int j, const KK_FLOAT &evdwl, const KK_FLOAT &ecoul, const KK_FLOAT &fpair, const KK_FLOAT &delx, diff --git a/src/KOKKOS/dihedral_charmmfsw_kokkos.cpp b/src/KOKKOS/dihedral_charmmfsw_kokkos.cpp index 8217ca8d50c..0fe20a89092 100644 --- a/src/KOKKOS/dihedral_charmmfsw_kokkos.cpp +++ b/src/KOKKOS/dihedral_charmmfsw_kokkos.cpp @@ -211,6 +211,7 @@ void DihedralCharmmfswKokkos::compute(int eflag_in, int vflag_in) template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void DihedralCharmmfswKokkos::operator()(TagDihedralCharmmfswCompute, const int &n, EVM_FLOAT& evm) const { @@ -425,6 +426,7 @@ void DihedralCharmmfswKokkos::operator()(TagDihedralCharmmfswCompute template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void DihedralCharmmfswKokkos::operator()(TagDihedralCharmmfswCompute, const int &n) const { EVM_FLOAT evm; @@ -594,6 +596,7 @@ void DihedralCharmmfswKokkos::read_restart(FILE *fp) template //template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void DihedralCharmmfswKokkos::ev_tally(EVM_FLOAT &evm, const int i1, const int i2, const int i3, const int i4, KK_FLOAT &edihedral, KK_FLOAT *f1, KK_FLOAT *f3, KK_FLOAT *f4, @@ -719,6 +722,7 @@ void DihedralCharmmfswKokkos::ev_tally(EVM_FLOAT &evm, const int i1, ------------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void DihedralCharmmfswKokkos::ev_tally(EVM_FLOAT &evm, const int i, const int j, const KK_FLOAT &evdwl, const KK_FLOAT &ecoul, const KK_FLOAT &fpair, const KK_FLOAT &delx, diff --git a/src/KOKKOS/dihedral_charmmfsw_kokkos.h b/src/KOKKOS/dihedral_charmmfsw_kokkos.h index e9bf9bbcd30..4e54e101b01 100644 --- a/src/KOKKOS/dihedral_charmmfsw_kokkos.h +++ b/src/KOKKOS/dihedral_charmmfsw_kokkos.h @@ -47,14 +47,17 @@ class DihedralCharmmfswKokkos : public DihedralCharmmfsw { void read_restart(FILE *) override; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagDihedralCharmmfswCompute, const int&, EVM_FLOAT&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagDihedralCharmmfswCompute, const int&) const; //template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ev_tally(EVM_FLOAT &evm, const int i1, const int i2, const int i3, const int i4, KK_FLOAT &edihedral, KK_FLOAT *f1, KK_FLOAT *f3, KK_FLOAT *f4, @@ -62,6 +65,7 @@ class DihedralCharmmfswKokkos : public DihedralCharmmfsw { const KK_FLOAT &vb2x, const KK_FLOAT &vb2y, const KK_FLOAT &vb2z, const KK_FLOAT &vb3x, const KK_FLOAT &vb3y, const KK_FLOAT &vb3z) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ev_tally(EVM_FLOAT &evm, const int i, const int j, const KK_FLOAT &evdwl, const KK_FLOAT &ecoul, const KK_FLOAT &fpair, const KK_FLOAT &delx, diff --git a/src/KOKKOS/dihedral_class2_kokkos.cpp b/src/KOKKOS/dihedral_class2_kokkos.cpp index a6a5afd6210..cf8f8806592 100644 --- a/src/KOKKOS/dihedral_class2_kokkos.cpp +++ b/src/KOKKOS/dihedral_class2_kokkos.cpp @@ -195,6 +195,7 @@ void DihedralClass2Kokkos::compute(int eflag_in, int vflag_in) template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void DihedralClass2Kokkos::operator()(TagDihedralClass2Compute, const int &n, EV_FLOAT& ev) const { @@ -644,6 +645,7 @@ void DihedralClass2Kokkos::operator()(TagDihedralClass2Compute template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void DihedralClass2Kokkos::operator()(TagDihedralClass2Compute, const int &n) const { EV_FLOAT ev; @@ -1009,6 +1011,7 @@ void DihedralClass2Kokkos::read_restart(FILE *fp) template //template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void DihedralClass2Kokkos::ev_tally(EV_FLOAT &ev, const int i1, const int i2, const int i3, const int i4, KK_FLOAT &edihedral, KK_FLOAT *f1, KK_FLOAT *f3, KK_FLOAT *f4, diff --git a/src/KOKKOS/dihedral_class2_kokkos.h b/src/KOKKOS/dihedral_class2_kokkos.h index 014997c46b9..91bbe273b02 100644 --- a/src/KOKKOS/dihedral_class2_kokkos.h +++ b/src/KOKKOS/dihedral_class2_kokkos.h @@ -45,14 +45,17 @@ class DihedralClass2Kokkos : public DihedralClass2 { void read_restart(FILE *) override; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagDihedralClass2Compute, const int&, EV_FLOAT&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagDihedralClass2Compute, const int&) const; //template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ev_tally(EV_FLOAT &ev, const int i1, const int i2, const int i3, const int i4, KK_FLOAT &edihedral, KK_FLOAT *f1, KK_FLOAT *f3, KK_FLOAT *f4, diff --git a/src/KOKKOS/dihedral_fourier_kokkos.cpp b/src/KOKKOS/dihedral_fourier_kokkos.cpp index d3cd67929fd..32e0ff55ea8 100644 --- a/src/KOKKOS/dihedral_fourier_kokkos.cpp +++ b/src/KOKKOS/dihedral_fourier_kokkos.cpp @@ -163,6 +163,7 @@ void DihedralFourierKokkos::compute(int eflag_in, int vflag_in) template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void DihedralFourierKokkos::operator()(TagDihedralFourierCompute, const int &n, EV_FLOAT& ev) const { @@ -332,6 +333,7 @@ void DihedralFourierKokkos::operator()(TagDihedralFourierCompute template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void DihedralFourierKokkos::operator()(TagDihedralFourierCompute, const int &n) const { EV_FLOAT ev; @@ -435,6 +437,7 @@ void DihedralFourierKokkos::read_restart(FILE *fp) template //template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void DihedralFourierKokkos::ev_tally(EV_FLOAT &ev, const int i1, const int i2, const int i3, const int i4, KK_FLOAT &edihedral, KK_FLOAT *f1, KK_FLOAT *f3, KK_FLOAT *f4, diff --git a/src/KOKKOS/dihedral_fourier_kokkos.h b/src/KOKKOS/dihedral_fourier_kokkos.h index 1ed9ee4823a..c48f727f72a 100644 --- a/src/KOKKOS/dihedral_fourier_kokkos.h +++ b/src/KOKKOS/dihedral_fourier_kokkos.h @@ -45,14 +45,17 @@ class DihedralFourierKokkos : public DihedralFourier { void read_restart(FILE *) override; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagDihedralFourierCompute, const int&, EV_FLOAT&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagDihedralFourierCompute, const int&) const; //template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ev_tally(EV_FLOAT &ev, const int i1, const int i2, const int i3, const int i4, KK_FLOAT &edihedral, KK_FLOAT *f1, KK_FLOAT *f3, KK_FLOAT *f4, diff --git a/src/KOKKOS/dihedral_harmonic_kokkos.cpp b/src/KOKKOS/dihedral_harmonic_kokkos.cpp index d818c50edd7..e670e69fbf2 100644 --- a/src/KOKKOS/dihedral_harmonic_kokkos.cpp +++ b/src/KOKKOS/dihedral_harmonic_kokkos.cpp @@ -159,6 +159,7 @@ void DihedralHarmonicKokkos::compute(int eflag_in, int vflag_in) template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void DihedralHarmonicKokkos::operator()(TagDihedralHarmonicCompute, const int &n, EV_FLOAT& ev) const { @@ -322,6 +323,7 @@ void DihedralHarmonicKokkos::operator()(TagDihedralHarmonicCompute template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void DihedralHarmonicKokkos::operator()(TagDihedralHarmonicCompute, const int &n) const { EV_FLOAT ev; @@ -410,6 +412,7 @@ void DihedralHarmonicKokkos::read_restart(FILE *fp) template //template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void DihedralHarmonicKokkos::ev_tally(EV_FLOAT &ev, const int i1, const int i2, const int i3, const int i4, KK_FLOAT &edihedral, KK_FLOAT *f1, KK_FLOAT *f3, KK_FLOAT *f4, diff --git a/src/KOKKOS/dihedral_harmonic_kokkos.h b/src/KOKKOS/dihedral_harmonic_kokkos.h index f24dff93cb6..27150d9f8ee 100644 --- a/src/KOKKOS/dihedral_harmonic_kokkos.h +++ b/src/KOKKOS/dihedral_harmonic_kokkos.h @@ -45,14 +45,17 @@ class DihedralHarmonicKokkos : public DihedralHarmonic { void read_restart(FILE *) override; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagDihedralHarmonicCompute, const int&, EV_FLOAT&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagDihedralHarmonicCompute, const int&) const; //template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ev_tally(EV_FLOAT &ev, const int i1, const int i2, const int i3, const int i4, KK_FLOAT &edihedral, KK_FLOAT *f1, KK_FLOAT *f3, KK_FLOAT *f4, diff --git a/src/KOKKOS/dihedral_multi_harmonic_kokkos.cpp b/src/KOKKOS/dihedral_multi_harmonic_kokkos.cpp index f2c3ea0f768..904f5f67af8 100644 --- a/src/KOKKOS/dihedral_multi_harmonic_kokkos.cpp +++ b/src/KOKKOS/dihedral_multi_harmonic_kokkos.cpp @@ -160,6 +160,7 @@ void DihedralMultiHarmonicKokkos::compute(int eflag_in, int vflag_in template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void DihedralMultiHarmonicKokkos::operator()(TagDihedralMultiHarmonicCompute, const int &n, EV_FLOAT& ev) const { @@ -321,6 +322,7 @@ void DihedralMultiHarmonicKokkos::operator()(TagDihedralMultiHarmoni template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void DihedralMultiHarmonicKokkos::operator()(TagDihedralMultiHarmonicCompute, const int &n) const { EV_FLOAT ev; @@ -409,6 +411,7 @@ void DihedralMultiHarmonicKokkos::read_restart(FILE *fp) template //template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void DihedralMultiHarmonicKokkos::ev_tally(EV_FLOAT &ev, const int i1, const int i2, const int i3, const int i4, KK_FLOAT &edihedral, KK_FLOAT *f1, KK_FLOAT *f3, KK_FLOAT *f4, diff --git a/src/KOKKOS/dihedral_multi_harmonic_kokkos.h b/src/KOKKOS/dihedral_multi_harmonic_kokkos.h index 8f4a3de91d5..f460235b4b4 100644 --- a/src/KOKKOS/dihedral_multi_harmonic_kokkos.h +++ b/src/KOKKOS/dihedral_multi_harmonic_kokkos.h @@ -45,14 +45,17 @@ class DihedralMultiHarmonicKokkos : public DihedralMultiHarmonic { void read_restart(FILE *) override; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagDihedralMultiHarmonicCompute, const int&, EV_FLOAT&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagDihedralMultiHarmonicCompute, const int&) const; //template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ev_tally(EV_FLOAT &ev, const int i1, const int i2, const int i3, const int i4, KK_FLOAT &edihedral, KK_FLOAT *f1, KK_FLOAT *f3, KK_FLOAT *f4, diff --git a/src/KOKKOS/dihedral_opls_kokkos.cpp b/src/KOKKOS/dihedral_opls_kokkos.cpp index 5d0c1bf0f1e..58d0f0c33c5 100644 --- a/src/KOKKOS/dihedral_opls_kokkos.cpp +++ b/src/KOKKOS/dihedral_opls_kokkos.cpp @@ -156,6 +156,7 @@ void DihedralOPLSKokkos::compute(int eflag_in, int vflag_in) template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void DihedralOPLSKokkos::operator()(TagDihedralOPLSCompute, const int &n, EV_FLOAT& ev) const { @@ -331,6 +332,7 @@ void DihedralOPLSKokkos::operator()(TagDihedralOPLSCompute template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void DihedralOPLSKokkos::operator()(TagDihedralOPLSCompute, const int &n) const { EV_FLOAT ev; @@ -413,6 +415,7 @@ void DihedralOPLSKokkos::read_restart(FILE *fp) template //template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void DihedralOPLSKokkos::ev_tally(EV_FLOAT &ev, const int i1, const int i2, const int i3, const int i4, KK_FLOAT &edihedral, KK_FLOAT *f1, KK_FLOAT *f3, KK_FLOAT *f4, diff --git a/src/KOKKOS/dihedral_opls_kokkos.h b/src/KOKKOS/dihedral_opls_kokkos.h index b80d3b6fedc..88470f43dda 100644 --- a/src/KOKKOS/dihedral_opls_kokkos.h +++ b/src/KOKKOS/dihedral_opls_kokkos.h @@ -45,14 +45,17 @@ class DihedralOPLSKokkos : public DihedralOPLS { void read_restart(FILE *) override; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagDihedralOPLSCompute, const int&, EV_FLOAT&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagDihedralOPLSCompute, const int&) const; //template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ev_tally(EV_FLOAT &ev, const int i1, const int i2, const int i3, const int i4, KK_FLOAT &edihedral, KK_FLOAT *f1, KK_FLOAT *f3, KK_FLOAT *f4, diff --git a/src/KOKKOS/domain_kokkos.cpp b/src/KOKKOS/domain_kokkos.cpp index d0b4336e8db..79bcb58ce1e 100644 --- a/src/KOKKOS/domain_kokkos.cpp +++ b/src/KOKKOS/domain_kokkos.cpp @@ -50,12 +50,14 @@ struct DomainResetBoxFunctor{ DomainResetBoxFunctor(DAT::ttransform_kkfloat_1d_3_lr _x): x(_x.view()) {} +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void init(value_type &dst) const { dst.value[2][0] = dst.value[1][0] = dst.value[0][0] = BIG; dst.value[2][1] = dst.value[1][1] = dst.value[0][1] = -BIG; } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void join(value_type &dst, const value_type &src) const { @@ -67,6 +69,7 @@ struct DomainResetBoxFunctor{ dst.value[2][1] = MAX(dst.value[2][1],src.value[2][1]); } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (const int &i, value_type &dst) const { dst.value[0][0] = MIN(dst.value[0][0],x(i,0)); @@ -244,6 +247,7 @@ struct DomainPBCFunctor { h_rate[3]=_h_rate[3]; h_rate[4]=_h_rate[4]; h_rate[5]=_h_rate[5]; } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (const int &i) const { if (PERIODIC && xperiodic) { @@ -442,6 +446,7 @@ void DomainKokkos::remap_all() if (triclinic) lamda2x(nlocal); } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void DomainKokkos::operator()(TagDomain_remap_all, const int &i) const { imageint idim,otherdims; @@ -543,6 +548,7 @@ void DomainKokkos::image_flip(int m_in, int n_in, int p_in) atomKK->modified(Device,IMAGE_MASK); } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void DomainKokkos::operator()(TagDomain_image_flip, const int &i) const { int xbox = (image[i] & IMGMASK) - IMGMAX; @@ -589,6 +595,7 @@ void DomainKokkos::lamda2x(int n, int groupbit_in) atomKK->modified(Device,X_MASK); } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void DomainKokkos::operator()(TagDomain_lamda2x, const int &i) const { const KK_FLOAT xi1 = x(i,1); @@ -598,6 +605,7 @@ void DomainKokkos::operator()(TagDomain_lamda2x, const int &i) const { x(i,2) = h[2]*xi2 + boxlo[2]; } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void DomainKokkos::operator()(TagDomain_lamda2x_group, const int &i) const { if (mask[i] & groupbit) { @@ -640,6 +648,7 @@ void DomainKokkos::x2lamda(int n, int groupbit_in) atomKK->modified(Device,X_MASK); } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void DomainKokkos::operator()(TagDomain_x2lamda, const int &i) const { KK_FLOAT delta[3]; @@ -652,6 +661,7 @@ void DomainKokkos::operator()(TagDomain_x2lamda, const int &i) const { x(i,2) = h_inv[2]*delta[2]; } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void DomainKokkos::operator()(TagDomain_x2lamda_group, const int &i) const { if (mask[i] & groupbit) { diff --git a/src/KOKKOS/domain_kokkos.h b/src/KOKKOS/domain_kokkos.h index 86150a57bda..ad98acbcab0 100644 --- a/src/KOKKOS/domain_kokkos.h +++ b/src/KOKKOS/domain_kokkos.h @@ -49,24 +49,31 @@ class DomainKokkos : public Domain { int closest_image(const int, int) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagDomain_remap_all, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagDomain_image_flip, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagDomain_lamda2x, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagDomain_lamda2x_group, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagDomain_x2lamda, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagDomain_x2lamda_group, const int&) const; +// NOLINTNEXTLINE static KOKKOS_INLINE_FUNCTION Few unmap(Few prd, Few h, int triclinic, Few x, imageint image); @@ -80,6 +87,7 @@ class DomainKokkos : public Domain { ArrayTypes::t_int_1d mask; }; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION Few DomainKokkos::unmap(Few prd, Few h, int triclinic, Few x, imageint image) diff --git a/src/KOKKOS/dynamical_matrix_kokkos.cpp b/src/KOKKOS/dynamical_matrix_kokkos.cpp index 83a5015dd82..9a263ac7787 100644 --- a/src/KOKKOS/dynamical_matrix_kokkos.cpp +++ b/src/KOKKOS/dynamical_matrix_kokkos.cpp @@ -43,6 +43,7 @@ struct ForceAdder { ViewA a; ViewB b; ForceAdder(const ViewA& a_, const ViewB& b_):a(a_),b(b_) {} +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (const int& i) const { a(i,0) += b(i,0); @@ -57,6 +58,7 @@ template struct Zero { View v; Zero(const View &v_):v(v_) {} +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(const int &i) const { v(i,0) = 0; diff --git a/src/KOKKOS/dynamical_matrix_kokkos.h b/src/KOKKOS/dynamical_matrix_kokkos.h index bf30d58074b..9cf3719d7c7 100644 --- a/src/KOKKOS/dynamical_matrix_kokkos.h +++ b/src/KOKKOS/dynamical_matrix_kokkos.h @@ -34,6 +34,7 @@ class DynamicalMatrixKokkos : public DynamicalMatrix { void command(int, char **) override; void setup(); +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(const int &i) const { diff --git a/src/KOKKOS/fft3d_kokkos.cpp b/src/KOKKOS/fft3d_kokkos.cpp index df1380c8853..9ef4b44b889 100644 --- a/src/KOKKOS/fft3d_kokkos.cpp +++ b/src/KOKKOS/fft3d_kokkos.cpp @@ -156,6 +156,7 @@ struct norm_functor { norm_functor(typename FFT_AT::t_FFT_DATA_1d &d_out_, int norm_): d_out(d_out_),norm(norm_) {} +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (const int &i) const { #if defined(FFT_KOKKOS_FFTW3) || defined(FFT_KOKKOS_CUFFT) || defined(FFT_KOKKOS_HIPFFT) || defined(FFT_KOKKOS_MKL_GPU) || defined(FFT_KOKKOS_NVPL) @@ -192,6 +193,7 @@ struct kiss_fft_functor { length = length_; } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (const int &i) const { const int offset = i*length; diff --git a/src/KOKKOS/fix_acks2_reaxff_kokkos.cpp b/src/KOKKOS/fix_acks2_reaxff_kokkos.cpp index 2b2f4c8efb4..6370aac966b 100644 --- a/src/KOKKOS/fix_acks2_reaxff_kokkos.cpp +++ b/src/KOKKOS/fix_acks2_reaxff_kokkos.cpp @@ -427,6 +427,7 @@ void FixACKS2ReaxFFKokkos::pre_force(int /*vflag*/) /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixACKS2ReaxFFKokkos::num_neigh_item(int ii, bigint &totneigh) const { @@ -552,6 +553,7 @@ void FixACKS2ReaxFFKokkos::deallocate_array() /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixACKS2ReaxFFKokkos::operator() (TagACKS2Zero, const int &ii) const { @@ -573,6 +575,7 @@ void FixACKS2ReaxFFKokkos::operator() (TagACKS2Zero, const int &ii) template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixACKS2ReaxFFKokkos::compute_h_item(int ii, bigint &m_fill, const bool &final) const { @@ -641,6 +644,7 @@ void FixACKS2ReaxFFKokkos::compute_h_item(int ii, bigint &m_fill, co template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixACKS2ReaxFFKokkos::compute_h_team( const typename Kokkos::TeamPolicy::member_type &team, @@ -846,6 +850,7 @@ void FixACKS2ReaxFFKokkos::compute_h_team( /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT FixACKS2ReaxFFKokkos::calculate_H_k(const KK_FLOAT &r, const KK_FLOAT &shld) const { @@ -869,6 +874,7 @@ KK_FLOAT FixACKS2ReaxFFKokkos::calculate_H_k(const KK_FLOAT &r, cons template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixACKS2ReaxFFKokkos::compute_x_item(int ii, bigint &m_fill, const bool &final) const { @@ -945,6 +951,7 @@ void FixACKS2ReaxFFKokkos::compute_x_item(int ii, bigint &m_fill, co template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixACKS2ReaxFFKokkos::compute_x_team( const typename Kokkos::TeamPolicy::member_type &team, @@ -1163,6 +1170,7 @@ void FixACKS2ReaxFFKokkos::compute_x_team( /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT FixACKS2ReaxFFKokkos::calculate_X_k( const KK_FLOAT &r, const KK_FLOAT &bcut) const { @@ -1178,6 +1186,7 @@ KK_FLOAT FixACKS2ReaxFFKokkos::calculate_X_k( const KK_FLOAT &r, con /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixACKS2ReaxFFKokkos::operator() (TagACKS2InitMatvec, const int &ii) const { @@ -1433,6 +1442,7 @@ void FixACKS2ReaxFFKokkos::sparse_matvec_acks2(typename AT::t_kkfloa /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixACKS2ReaxFFKokkos::operator() (TagACKS2SparseMatvec1, const int &ii) const { @@ -1447,6 +1457,7 @@ void FixACKS2ReaxFFKokkos::operator() (TagACKS2SparseMatvec1, const /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixACKS2ReaxFFKokkos::operator() (TagACKS2SparseMatvec2, const int &ii) const { @@ -1461,6 +1472,7 @@ void FixACKS2ReaxFFKokkos::operator() (TagACKS2SparseMatvec2, const template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixACKS2ReaxFFKokkos::operator() (TagACKS2SparseMatvec3_Half, const int &ii) const { @@ -1506,6 +1518,7 @@ void FixACKS2ReaxFFKokkos::operator() (TagACKS2SparseMatvec3_Half +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixACKS2ReaxFFKokkos::operator() (TagACKS2SparseMatvec3_Full, const membertype &team) const { @@ -1547,6 +1560,7 @@ void FixACKS2ReaxFFKokkos::operator() (TagACKS2SparseMatvec3_Full, c /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixACKS2ReaxFFKokkos::operator() (TagACKS2Norm1, const int &ii, double &lsum) const { @@ -1572,6 +1586,7 @@ void FixACKS2ReaxFFKokkos::operator() (TagACKS2Norm1, const int &ii, /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixACKS2ReaxFFKokkos::operator() (TagACKS2Norm2, const int &ii, double &lsum) const { @@ -1591,6 +1606,7 @@ void FixACKS2ReaxFFKokkos::operator() (TagACKS2Norm2, const int &ii, /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixACKS2ReaxFFKokkos::operator() (TagACKS2Dot1, const int &ii, double &lsum) const { @@ -1610,6 +1626,7 @@ void FixACKS2ReaxFFKokkos::operator() (TagACKS2Dot1, const int &ii, /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixACKS2ReaxFFKokkos::operator() (TagACKS2Precon1A, const int &ii) const { @@ -1641,6 +1658,7 @@ void FixACKS2ReaxFFKokkos::operator() (TagACKS2Precon1A, const int & /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixACKS2ReaxFFKokkos::operator() (TagACKS2Precon1B, const int &ii) const { @@ -1666,6 +1684,7 @@ void FixACKS2ReaxFFKokkos::operator() (TagACKS2Precon1B, const int & /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixACKS2ReaxFFKokkos::operator() (TagACKS2Dot2, const int &ii, double &lsum) const { @@ -1685,6 +1704,7 @@ void FixACKS2ReaxFFKokkos::operator() (TagACKS2Dot2, const int &ii, /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixACKS2ReaxFFKokkos::operator() (TagACKS2Dot3, const int &ii, double &lsum) const { @@ -1710,6 +1730,7 @@ void FixACKS2ReaxFFKokkos::operator() (TagACKS2Dot3, const int &ii, /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixACKS2ReaxFFKokkos::operator() (TagACKS2Dot4, const int &ii, double &lsum) const { @@ -1729,6 +1750,7 @@ void FixACKS2ReaxFFKokkos::operator() (TagACKS2Dot4, const int &ii, /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixACKS2ReaxFFKokkos::operator() (TagACKS2Dot5, const int &ii, double &lsum) const { @@ -1748,6 +1770,7 @@ void FixACKS2ReaxFFKokkos::operator() (TagACKS2Dot5, const int &ii, /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixACKS2ReaxFFKokkos::operator() (TagACKS2Add, const int &ii) const { @@ -1767,6 +1790,7 @@ void FixACKS2ReaxFFKokkos::operator() (TagACKS2Add, const int &ii) c /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixACKS2ReaxFFKokkos::operator() (TagACKS2Precon2, const int &ii) const { @@ -1786,6 +1810,7 @@ void FixACKS2ReaxFFKokkos::operator() (TagACKS2Precon2, const int &i /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixACKS2ReaxFFKokkos::operator() (TagACKS2Norm3, const int &ii, double &lsum) const { @@ -1823,6 +1848,7 @@ void FixACKS2ReaxFFKokkos::operator() (TagACKS2Norm3, const int &ii, /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixACKS2ReaxFFKokkos::operator() (TagACKS2CalculateQ, const int &i) const { diff --git a/src/KOKKOS/fix_acks2_reaxff_kokkos.h b/src/KOKKOS/fix_acks2_reaxff_kokkos.h index 9a7e19767a0..c7240d00264 100644 --- a/src/KOKKOS/fix_acks2_reaxff_kokkos.h +++ b/src/KOKKOS/fix_acks2_reaxff_kokkos.h @@ -74,96 +74,125 @@ class FixACKS2ReaxFFKokkos : public FixACKS2ReaxFF, public KokkosBase { DAT::ttransform_kkfloat_1d get_s() {return k_s;} +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void num_neigh_item(int, bigint&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagACKS2Zero, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagACKS2InitMatvec, const int&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void compute_h_item(int, bigint &, const bool &) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void compute_h_team(const typename Kokkos::TeamPolicy ::member_type &team, int, int) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void compute_x_item(int, bigint &, const bool &) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void compute_x_team(const typename Kokkos::TeamPolicy ::member_type &team, int, int) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagACKS2SparseMatvec1, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagACKS2SparseMatvec2, const int&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagACKS2SparseMatvec3_Half, const int&) const; typedef typename Kokkos::TeamPolicy::member_type membertype; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (TagACKS2SparseMatvec3_Full, const membertype &team) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagACKS2Norm1, const int&, double&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagACKS2Norm2, const int&, double&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagACKS2Norm3, const int&, double&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagACKS2Dot1, const int&, double&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagACKS2Dot2, const int&, double&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagACKS2Dot3, const int&, double&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagACKS2Dot4, const int&, double&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagACKS2Dot5, const int&, double&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagACKS2Precon1A, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagACKS2Precon1B, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagACKS2Precon2, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagACKS2Add, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagACKS2ZeroQGhosts, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagACKS2CalculateQ, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT calculate_H_k(const KK_FLOAT &r, const KK_FLOAT &shld) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT calculate_X_k(const KK_FLOAT &r, const KK_FLOAT &bcut) const; struct params_acks2 { +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION params_acks2(){chi=0;eta=0;gamma=0;bcut_acks2=0;}; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION params_acks2(int){chi=0;eta=0;gamma=0;bcut_acks2=0;}; KK_FLOAT chi, eta, gamma, bcut_acks2; @@ -272,6 +301,7 @@ struct FixACKS2ReaxFFKokkosNumNeighFunctor { FixACKS2ReaxFFKokkosNumNeighFunctor(FixACKS2ReaxFFKokkos* c_ptr):c(*c_ptr) { c.cleanup_copy(); }; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(const int ii, bigint &totneigh) const { c.num_neigh_item(ii, totneigh); @@ -295,18 +325,20 @@ struct FixACKS2ReaxFFKokkosComputeHFunctor { c.cleanup_copy(); }; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(const int ii, bigint &m_fill, const bool &final) const { c.template compute_h_item(ii,m_fill,final); } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()( const typename Kokkos::TeamPolicy::member_type &team) const { c.template compute_h_team(team, atoms_per_team, vector_length); } - size_t team_shmem_size(int /*team_size*/) const { + [[nodiscard]] size_t team_shmem_size(int /*team_size*/) const { size_t shmem_size = Kokkos::View::shmem_size( atoms_per_team) + // s_ilist @@ -342,18 +374,20 @@ struct FixACKS2ReaxFFKokkosComputeXFunctor { c.cleanup_copy(); }; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(const int ii, bigint &m_fill, const bool &final) const { c.template compute_x_item(ii,m_fill,final); } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()( const typename Kokkos::TeamPolicy::member_type &team) const { c.template compute_x_team(team, atoms_per_team, vector_length); } - size_t team_shmem_size(int /*team_size*/) const { + [[nodiscard]] size_t team_shmem_size(int /*team_size*/) const { size_t shmem_size = Kokkos::View::shmem_size( atoms_per_team) + // s_ilist diff --git a/src/KOKKOS/fix_addforce_kokkos.cpp b/src/KOKKOS/fix_addforce_kokkos.cpp index a4d85205fc2..d5f5dbb5c1e 100644 --- a/src/KOKKOS/fix_addforce_kokkos.cpp +++ b/src/KOKKOS/fix_addforce_kokkos.cpp @@ -182,6 +182,7 @@ void FixAddForceKokkos::post_force(int vflag) } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixAddForceKokkos::operator()(TagFixAddForceConstant, const int &i, value_type result) const { if (mask[i] & groupbit) { @@ -204,6 +205,7 @@ void FixAddForceKokkos::operator()(TagFixAddForceConstant, const int } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixAddForceKokkos::operator()(TagFixAddForceNonConstant, const int &i, value_type result) const { if (mask[i] & groupbit) { @@ -249,6 +251,7 @@ void FixAddForceKokkos::operator()(TagFixAddForceNonConstant, const ------------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixAddForceKokkos::v_tally(value_type result, int i, KK_FLOAT *v) const { diff --git a/src/KOKKOS/fix_addforce_kokkos.h b/src/KOKKOS/fix_addforce_kokkos.h index 92202eaa772..4a4beb9c970 100644 --- a/src/KOKKOS/fix_addforce_kokkos.h +++ b/src/KOKKOS/fix_addforce_kokkos.h @@ -45,9 +45,11 @@ class FixAddForceKokkos : public FixAddForce { void init() override; void post_force(int) override; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagFixAddForceConstant, const int&, value_type) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagFixAddForceNonConstant, const int&, value_type) const; @@ -68,6 +70,7 @@ class FixAddForceKokkos : public FixAddForce { DAT::ttransform_kkacc_1d_6 k_vatom; typename AT::t_kkacc_1d_6 d_vatom; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void v_tally(value_type, int, KK_FLOAT*) const; }; diff --git a/src/KOKKOS/fix_cmap_kokkos.cpp b/src/KOKKOS/fix_cmap_kokkos.cpp index 722c85a016a..8d8e57d3252 100644 --- a/src/KOKKOS/fix_cmap_kokkos.cpp +++ b/src/KOKKOS/fix_cmap_kokkos.cpp @@ -184,6 +184,7 @@ void FixCMAPKokkos::pre_neighbor() } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixCMAPKokkos::operator()(TagFixCmapPreNeighbor, const int i, int &l_ncrosstermlist, const bool is_final ) const { @@ -243,6 +244,7 @@ void FixCMAPKokkos::post_force(int vflag) /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixCMAPKokkos::operator()(TagFixCmapPostForce, const int n, double &ecmapKK) const { @@ -805,6 +807,7 @@ void FixCMAPKokkos::unpack_exchange_kokkos( /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT FixCMAPKokkos::dihedral_angle_atan2(KK_FLOAT fx, KK_FLOAT fy, KK_FLOAT fz, KK_FLOAT ax, KK_FLOAT ay, KK_FLOAT az, @@ -831,6 +834,7 @@ KK_FLOAT FixCMAPKokkos::dihedral_angle_atan2(KK_FLOAT fx, KK_FLOAT f /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixCMAPKokkos::bc_interpol(KK_FLOAT x1, KK_FLOAT x2, int low1, int low2, KK_FLOAT *gs, KK_FLOAT *d1gs, KK_FLOAT *d2gs, KK_FLOAT *d12gs, @@ -915,6 +919,7 @@ void FixCMAPKokkos::bc_interpol(KK_FLOAT x1, KK_FLOAT x2, int low1, ------------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION int FixCMAPKokkos::closest_image(const int i, int j) const { diff --git a/src/KOKKOS/fix_cmap_kokkos.h b/src/KOKKOS/fix_cmap_kokkos.h index 2b942eb04b3..fa274ffb81d 100644 --- a/src/KOKKOS/fix_cmap_kokkos.h +++ b/src/KOKKOS/fix_cmap_kokkos.h @@ -46,9 +46,11 @@ class FixCMAPKokkos : public FixCMAP, public KokkosBase { void pre_neighbor() override; void post_force(int) override; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagFixCmapPreNeighbor, const int, int&, const bool) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagFixCmapPostForce, const int, double&) const; @@ -103,16 +105,19 @@ class FixCMAPKokkos : public FixCMAP, public KokkosBase { typename AT::t_kkfloat_3d d_cmapgrid, d_d1cmapgrid, d_d2cmapgrid, d_d12cmapgrid; // calculate dihedral angles +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT dihedral_angle_atan2(KK_FLOAT, KK_FLOAT, KK_FLOAT, KK_FLOAT, KK_FLOAT, KK_FLOAT, KK_FLOAT, KK_FLOAT, KK_FLOAT, KK_FLOAT) const; // perform bicubic interpolation at point of interest +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void bc_interpol(KK_FLOAT, KK_FLOAT, int, int, KK_FLOAT *, KK_FLOAT *, KK_FLOAT *, KK_FLOAT *, KK_FLOAT &, KK_FLOAT &, KK_FLOAT &) const; // copied from Domain +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION int closest_image(const int, int) const; diff --git a/src/KOKKOS/fix_dt_reset_kokkos.cpp b/src/KOKKOS/fix_dt_reset_kokkos.cpp index 356601b967b..65a7eb42a6d 100644 --- a/src/KOKKOS/fix_dt_reset_kokkos.cpp +++ b/src/KOKKOS/fix_dt_reset_kokkos.cpp @@ -108,6 +108,7 @@ void FixDtResetKokkos::end_of_step() /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixDtResetKokkos::operator()(TagFixDtResetMass, const int &i, double &dt_min) const { @@ -141,6 +142,7 @@ void FixDtResetKokkos::operator()(TagFixDtResetMass, const int &i, d /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixDtResetKokkos::operator()(TagFixDtResetRMass, const int &i, double &dt_min) const { diff --git a/src/KOKKOS/fix_dt_reset_kokkos.h b/src/KOKKOS/fix_dt_reset_kokkos.h index adc85c9d1e8..06e25ee985c 100644 --- a/src/KOKKOS/fix_dt_reset_kokkos.h +++ b/src/KOKKOS/fix_dt_reset_kokkos.h @@ -42,8 +42,10 @@ class FixDtResetKokkos : public FixDtReset { void init() override; void end_of_step() override; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagFixDtResetMass, const int&, double&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagFixDtResetRMass, const int&, double&) const; diff --git a/src/KOKKOS/fix_efield_kokkos.cpp b/src/KOKKOS/fix_efield_kokkos.cpp index ba0a5f69386..90b5ea72b0a 100644 --- a/src/KOKKOS/fix_efield_kokkos.cpp +++ b/src/KOKKOS/fix_efield_kokkos.cpp @@ -198,6 +198,7 @@ void FixEfieldKokkos::post_force(int vflag) template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixEfieldKokkos::operator()(TagFixEfieldConstant, const int &i, value_type result) const { if ( QFLAG && (d_mask(i) & groupbit)) { @@ -243,6 +244,7 @@ void FixEfieldKokkos::operator()(TagFixEfieldConstant, template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixEfieldKokkos::operator()(TagFixEfieldNonConstant, const int &i, value_type result) const { if ( QFLAG && (d_mask(i) & groupbit)) { @@ -289,6 +291,7 @@ void FixEfieldKokkos::operator()(TagFixEfieldNonConstant +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixEfieldKokkos::v_tally(value_type result, int i, KK_FLOAT *v) const { diff --git a/src/KOKKOS/fix_efield_kokkos.h b/src/KOKKOS/fix_efield_kokkos.h index a596b450758..dbdf652a889 100644 --- a/src/KOKKOS/fix_efield_kokkos.h +++ b/src/KOKKOS/fix_efield_kokkos.h @@ -49,10 +49,12 @@ class FixEfieldKokkos : public FixEfield { void post_force(int) override; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagFixEfieldConstant, const int&, value_type) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagFixEfieldNonConstant, const int&, value_type) const; @@ -77,6 +79,7 @@ class FixEfieldKokkos : public FixEfield { DAT::ttransform_kkacc_1d_6 k_vatom; typename AT::t_kkacc_1d_6 d_vatom; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void v_tally(value_type, int, KK_FLOAT*) const; }; diff --git a/src/KOKKOS/fix_electron_stopping_kokkos.cpp b/src/KOKKOS/fix_electron_stopping_kokkos.cpp index daa777dbcf7..f67718d7dda 100644 --- a/src/KOKKOS/fix_electron_stopping_kokkos.cpp +++ b/src/KOKKOS/fix_electron_stopping_kokkos.cpp @@ -129,6 +129,7 @@ template void FixElectronStoppingKokkos::post_for /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixElectronStoppingKokkos::operator()(TagFixElectronStopping, const int &i, double &seloss, diff --git a/src/KOKKOS/fix_electron_stopping_kokkos.h b/src/KOKKOS/fix_electron_stopping_kokkos.h index 911ac06c329..42c9cbb0809 100644 --- a/src/KOKKOS/fix_electron_stopping_kokkos.h +++ b/src/KOKKOS/fix_electron_stopping_kokkos.h @@ -35,6 +35,7 @@ struct FixElectronStoppingErrorValue { double energy; }; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION bool operator<(const FixElectronStoppingErrorValue &lhs, const FixElectronStoppingErrorValue &rhs) { return lhs.i < rhs.i; @@ -51,6 +52,7 @@ class FixElectronStoppingKokkos : public FixElectronStopping { void init() override; void post_force(int) override; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagFixElectronStopping, const int&, double&, FixElectronStoppingErrorValue&) const; @@ -59,7 +61,7 @@ class FixElectronStoppingKokkos : public FixElectronStopping { typename AT::t_kkacc_1d_3 f; typename AT::t_kkfloat_1d_3 v; typename AT::t_int_1d_randomread type; - typename AT::t_int_1d_randomread tag; + typename AT::t_tagint_1d_const tag; typename AT::t_int_1d_const d_mask; typename AT::t_kkfloat_1d_randomread d_mass; typename AT::t_kkfloat_1d_const d_rmass; @@ -78,6 +80,7 @@ class FixElectronStoppingKokkos : public FixElectronStopping { namespace Kokkos { //reduction identity must be defined in Kokkos namespace template<> struct reduction_identity { +// NOLINTNEXTLINE KOKKOS_FORCEINLINE_FUNCTION static LAMMPS_NS::FixElectronStoppingErrorValue min() { return {INT_MAX, 0}; } diff --git a/src/KOKKOS/fix_enforce2d_kokkos.cpp b/src/KOKKOS/fix_enforce2d_kokkos.cpp index 567c6ad1600..83c84cea64b 100644 --- a/src/KOKKOS/fix_enforce2d_kokkos.cpp +++ b/src/KOKKOS/fix_enforce2d_kokkos.cpp @@ -123,6 +123,7 @@ void FixEnforce2DKokkos::post_force(int /*vflag*/) template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixEnforce2DKokkos::post_force_item( int i ) const { diff --git a/src/KOKKOS/fix_enforce2d_kokkos.h b/src/KOKKOS/fix_enforce2d_kokkos.h index e6b2d1afc63..495bc7eb4ac 100644 --- a/src/KOKKOS/fix_enforce2d_kokkos.h +++ b/src/KOKKOS/fix_enforce2d_kokkos.h @@ -39,6 +39,7 @@ class FixEnforce2DKokkos : public FixEnforce2D { void post_force(int) override; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void post_force_item(const int i) const; @@ -67,6 +68,7 @@ struct FixEnforce2DKokkosPostForceFunctor { FixEnforce2DKokkosPostForceFunctor(FixEnforce2DKokkos* c_ptr): c(*c_ptr) {}; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(const int i) const { c.template post_force_item (i); diff --git a/src/KOKKOS/fix_eos_table_rx_kokkos.cpp b/src/KOKKOS/fix_eos_table_rx_kokkos.cpp index 811d9a13e75..002f084930f 100644 --- a/src/KOKKOS/fix_eos_table_rx_kokkos.cpp +++ b/src/KOKKOS/fix_eos_table_rx_kokkos.cpp @@ -136,6 +136,7 @@ void FixEOStableRXKokkos::setup(int /*vflag*/) } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixEOStableRXKokkos::operator()(TagFixEOStableRXSetup, const int &i) const { if (mask[i] & groupbit) { @@ -147,6 +148,7 @@ void FixEOStableRXKokkos::operator()(TagFixEOStableRXSetup, const in } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixEOStableRXKokkos::operator()(TagFixEOStableRXTemperatureLookup, const int &i) const { if (mask[i] & groupbit) @@ -188,6 +190,7 @@ void FixEOStableRXKokkos::init() } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixEOStableRXKokkos::operator()(TagFixEOStableRXInit, const int &i) const { KK_FLOAT tmp; @@ -230,6 +233,7 @@ void FixEOStableRXKokkos::post_integrate() } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixEOStableRXKokkos::operator()(TagFixEOStableRXTemperatureLookup2, const int &i) const { if (mask[i] & groupbit) { @@ -289,6 +293,7 @@ void FixEOStableRXKokkos::end_of_step() ------------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixEOStableRXKokkos::energy_lookup(int id, KK_FLOAT thetai, KK_FLOAT &ui) const { @@ -346,6 +351,7 @@ void FixEOStableRXKokkos::energy_lookup(int id, KK_FLOAT thetai, KK_ ------------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixEOStableRXKokkos::temperature_lookup(int id, KK_FLOAT ui, KK_FLOAT &thetai) const { diff --git a/src/KOKKOS/fix_eos_table_rx_kokkos.h b/src/KOKKOS/fix_eos_table_rx_kokkos.h index 551b0f7f37f..2192e61805c 100644 --- a/src/KOKKOS/fix_eos_table_rx_kokkos.h +++ b/src/KOKKOS/fix_eos_table_rx_kokkos.h @@ -47,21 +47,27 @@ class FixEOStableRXKokkos : public FixEOStableRX { void post_integrate() override; void end_of_step() override; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagFixEOStableRXInit, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagFixEOStableRXSetup, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagFixEOStableRXTemperatureLookup, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagFixEOStableRXTemperatureLookup2, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void energy_lookup(int, KK_FLOAT, KK_FLOAT &) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void temperature_lookup(int, KK_FLOAT, KK_FLOAT &) const; diff --git a/src/KOKKOS/fix_external_kokkos.cpp b/src/KOKKOS/fix_external_kokkos.cpp index 0bf736e90fd..1d6cc92c502 100644 --- a/src/KOKKOS/fix_external_kokkos.cpp +++ b/src/KOKKOS/fix_external_kokkos.cpp @@ -113,6 +113,7 @@ void FixExternalKokkos::post_force(int vflag) } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixExternalKokkos::operator()(TagFixExternal, const int &i) const { if (mask[i] & groupbit) { diff --git a/src/KOKKOS/fix_external_kokkos.h b/src/KOKKOS/fix_external_kokkos.h index 268318e6ac2..cec2d5e4a31 100644 --- a/src/KOKKOS/fix_external_kokkos.h +++ b/src/KOKKOS/fix_external_kokkos.h @@ -42,6 +42,7 @@ class FixExternalKokkos : public FixExternal { void post_force(int) override; void grow_arrays(int) override; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagFixExternal, const int&) const; diff --git a/src/KOKKOS/fix_freeze_kokkos.cpp b/src/KOKKOS/fix_freeze_kokkos.cpp index 76030105d14..87ef0f4e6df 100644 --- a/src/KOKKOS/fix_freeze_kokkos.cpp +++ b/src/KOKKOS/fix_freeze_kokkos.cpp @@ -60,6 +60,7 @@ void FixFreezeKokkos::post_force(int /*vflag*/) } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixFreezeKokkos::operator()(const int i, OriginalForce &original) const { if (mask[i] & groupbit) { diff --git a/src/KOKKOS/fix_freeze_kokkos.h b/src/KOKKOS/fix_freeze_kokkos.h index 59a4abc162b..8f7afffd206 100644 --- a/src/KOKKOS/fix_freeze_kokkos.h +++ b/src/KOKKOS/fix_freeze_kokkos.h @@ -36,6 +36,7 @@ class FixFreezeKokkos : public FixFreeze { struct OriginalForce { double values[3]; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION OriginalForce() { values[0] = 0; @@ -43,6 +44,7 @@ class FixFreezeKokkos : public FixFreeze { values[2] = 0; } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION OriginalForce &operator+=(const OriginalForce &rhs) { values[0] += rhs.values[0]; @@ -55,6 +57,7 @@ class FixFreezeKokkos : public FixFreeze { FixFreezeKokkos(class LAMMPS *, int, char **); void post_force(int) override; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(const int i, OriginalForce &original) const; diff --git a/src/KOKKOS/fix_gravity_kokkos.cpp b/src/KOKKOS/fix_gravity_kokkos.cpp index 8081b92283f..63e67b9188c 100644 --- a/src/KOKKOS/fix_gravity_kokkos.cpp +++ b/src/KOKKOS/fix_gravity_kokkos.cpp @@ -91,6 +91,7 @@ void FixGravityKokkos::post_force(int /*vflag*/) } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixGravityKokkos::operator()(TagFixGravityRMass, const int i, double &eg) const { @@ -104,6 +105,7 @@ void FixGravityKokkos::operator()(TagFixGravityRMass, const int i, d } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixGravityKokkos::operator()(TagFixGravityMass, const int i, double &eg) const { diff --git a/src/KOKKOS/fix_gravity_kokkos.h b/src/KOKKOS/fix_gravity_kokkos.h index 9c9b732cfc0..22fa818f98b 100644 --- a/src/KOKKOS/fix_gravity_kokkos.h +++ b/src/KOKKOS/fix_gravity_kokkos.h @@ -40,8 +40,10 @@ class FixGravityKokkos : public FixGravity { void post_force(int) override; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagFixGravityRMass, const int, double &) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagFixGravityMass, const int, double &) const; diff --git a/src/KOKKOS/fix_langevin_kokkos.cpp b/src/KOKKOS/fix_langevin_kokkos.cpp index f91ec3bfa1b..40aed5ae7b5 100644 --- a/src/KOKKOS/fix_langevin_kokkos.cpp +++ b/src/KOKKOS/fix_langevin_kokkos.cpp @@ -390,6 +390,7 @@ void FixLangevinKokkos::post_force(int /*vflag*/) template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION FSUM FixLangevinKokkos::post_force_item(int i) const { @@ -453,6 +454,7 @@ FSUM FixLangevinKokkos::post_force_item(int i) const /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixLangevinKokkos::zero_force_item(int i) const { @@ -559,6 +561,7 @@ double FixLangevinKokkos::compute_scalar() /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT FixLangevinKokkos::compute_energy_item(int i) const { @@ -604,6 +607,7 @@ void FixLangevinKokkos::end_of_step() } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixLangevinKokkos::end_of_step_item(int i) const { KK_FLOAT tmp[3]; @@ -624,6 +628,7 @@ void FixLangevinKokkos::end_of_step_item(int i) const { } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixLangevinKokkos::end_of_step_rmass_item(int i) const { diff --git a/src/KOKKOS/fix_langevin_kokkos.h b/src/KOKKOS/fix_langevin_kokkos.h index 2367fe88d76..4da46847ee1 100644 --- a/src/KOKKOS/fix_langevin_kokkos.h +++ b/src/KOKKOS/fix_langevin_kokkos.h @@ -33,10 +33,12 @@ namespace LAMMPS_NS { struct s_FSUM { double fx, fy, fz; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION s_FSUM() { fx = fy = fz = 0.0; } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION s_FSUM& operator+=(const s_FSUM &rhs) { fx += rhs.fx; @@ -77,18 +79,23 @@ namespace LAMMPS_NS { void end_of_step() override; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION FSUM post_force_item(int) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void zero_force_item(int) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_energy_item(int) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void end_of_step_item(int) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void end_of_step_rmass_item(int) const; @@ -154,23 +161,27 @@ namespace LAMMPS_NS { c(*c_ptr) {} ~FixLangevinKokkosPostForceFunctor() {c.set_copymode(1);} +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(const int i) const { c.template post_force_item(i); } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(const int i, value_type &fsum) const { fsum += c.template post_force_item(i); } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION static void init(value_type &update) { update.fx = 0.0; update.fy = 0.0; update.fz = 0.0; } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION static void join(value_type &update, const value_type &source) { @@ -188,6 +199,7 @@ namespace LAMMPS_NS { FixLangevinKokkosZeroForceFunctor(FixLangevinKokkos* c_ptr): c(*c_ptr) {c.set_copymode(1);} +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(const int i) const { c.zero_force_item(i); @@ -202,14 +214,17 @@ namespace LAMMPS_NS { FixLangevinKokkosTallyEnergyFunctor(FixLangevinKokkos* c_ptr): c(*c_ptr) {c.set_copymode(1);} +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(const int i, value_type &energy) const { energy += c.compute_energy_item(i); } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION static void init(value_type &update) { update = 0.0; } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION static void join(value_type &update, const value_type &source) { @@ -225,6 +240,7 @@ namespace LAMMPS_NS { FixLangevinKokkosEndOfStepFunctor(FixLangevinKokkos* c_ptr): c(*c_ptr) {c.set_copymode(1);} +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(const int i) const { if (RMass) c.end_of_step_rmass_item(i); diff --git a/src/KOKKOS/fix_neigh_history_kokkos.cpp b/src/KOKKOS/fix_neigh_history_kokkos.cpp index 421a93b3ff2..0fd2da5f154 100644 --- a/src/KOKKOS/fix_neigh_history_kokkos.cpp +++ b/src/KOKKOS/fix_neigh_history_kokkos.cpp @@ -153,6 +153,7 @@ void FixNeighHistoryKokkos::pre_exchange_no_newton() /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixNeighHistoryKokkos::operator()(TagFixNeighHistoryPreExchange, const int &ii) const { @@ -241,6 +242,7 @@ void FixNeighHistoryKokkos::post_neighbor() /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixNeighHistoryKokkos::operator()(TagFixNeighHistoryPostNeighbor, const int &ii) const { @@ -368,6 +370,7 @@ int FixNeighHistoryKokkos::pack_exchange(int i, double *buf) /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixNeighHistoryKokkos::operator()(TagFixNeighHistoryPackExchange, const int &mysend, int &offset, const bool &final) const { @@ -448,6 +451,7 @@ int FixNeighHistoryKokkos::pack_exchange_kokkos( /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixNeighHistoryKokkos::operator()(TagFixNeighHistoryUnpackExchange, const int &i) const { diff --git a/src/KOKKOS/fix_neigh_history_kokkos.h b/src/KOKKOS/fix_neigh_history_kokkos.h index 1fc0accb3bf..d1115d5403f 100644 --- a/src/KOKKOS/fix_neigh_history_kokkos.h +++ b/src/KOKKOS/fix_neigh_history_kokkos.h @@ -53,15 +53,19 @@ class FixNeighHistoryKokkos : public FixNeighHistory, public KokkosBase { int unpack_exchange(int, double *) override; double memory_usage() override; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagFixNeighHistoryPreExchange, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagFixNeighHistoryPostNeighbor, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagFixNeighHistoryPackExchange, const int&, int &, const bool &) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagFixNeighHistoryUnpackExchange, const int&) const; @@ -110,6 +114,7 @@ class FixNeighHistoryKokkos : public FixNeighHistory, public KokkosBase { void pre_exchange_no_newton() override; // Shift by HISTBITS and check the first bit +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION int histmask(int j) const { return j >> HISTBITS & 1; } }; diff --git a/src/KOKKOS/fix_nh_kokkos.cpp b/src/KOKKOS/fix_nh_kokkos.cpp index ed93fa65d17..1f6fee0014f 100644 --- a/src/KOKKOS/fix_nh_kokkos.cpp +++ b/src/KOKKOS/fix_nh_kokkos.cpp @@ -538,6 +538,7 @@ void FixNHKokkos::nh_v_press() template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixNHKokkos::operator()(TagFixNH_nh_v_press, const int &i) const { if (mask[i] & groupbit) { @@ -584,6 +585,7 @@ void FixNHKokkos::nve_v() template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixNHKokkos::operator()(TagFixNH_nve_v, const int &i) const { if (RMASS) { @@ -627,6 +629,7 @@ void FixNHKokkos::nve_x() } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixNHKokkos::operator()(TagFixNH_nve_x, const int &i) const { if (mask[i] & groupbit) { @@ -678,6 +681,7 @@ void FixNHKokkos::nh_v_temp() } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixNHKokkos::operator()(TagFixNH_nh_v_temp, const int &i) const { if (mask[i] & groupbit) { diff --git a/src/KOKKOS/fix_nh_kokkos.h b/src/KOKKOS/fix_nh_kokkos.h index 4d62a1dc5e9..34f1fff5c86 100644 --- a/src/KOKKOS/fix_nh_kokkos.h +++ b/src/KOKKOS/fix_nh_kokkos.h @@ -45,16 +45,20 @@ class FixNHKokkos : public FixNH { void pre_exchange() override; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagFixNH_nh_v_press, const int&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagFixNH_nve_v, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagFixNH_nve_x, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagFixNH_nh_v_temp, const int&) const; diff --git a/src/KOKKOS/fix_nve_kokkos.cpp b/src/KOKKOS/fix_nve_kokkos.cpp index ed701dcf81a..9e18c5d776a 100644 --- a/src/KOKKOS/fix_nve_kokkos.cpp +++ b/src/KOKKOS/fix_nve_kokkos.cpp @@ -76,6 +76,7 @@ void FixNVEKokkos::initial_integrate(int /*vflag*/) } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixNVEKokkos::initial_integrate_item(int i) const { @@ -91,6 +92,7 @@ void FixNVEKokkos::initial_integrate_item(int i) const } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixNVEKokkos::initial_integrate_rmass_item(int i) const { @@ -135,6 +137,7 @@ void FixNVEKokkos::final_integrate() } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixNVEKokkos::final_integrate_item(int i) const { @@ -147,6 +150,7 @@ void FixNVEKokkos::final_integrate_item(int i) const } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixNVEKokkos::final_integrate_rmass_item(int i) const { @@ -189,6 +193,7 @@ void FixNVEKokkos::fused_integrate(int /*vflag*/) } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixNVEKokkos::fused_integrate_item(int i) const { @@ -204,6 +209,7 @@ void FixNVEKokkos::fused_integrate_item(int i) const } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixNVEKokkos::fused_integrate_rmass_item(int i) const { diff --git a/src/KOKKOS/fix_nve_kokkos.h b/src/KOKKOS/fix_nve_kokkos.h index f667831f83e..d4525e83416 100644 --- a/src/KOKKOS/fix_nve_kokkos.h +++ b/src/KOKKOS/fix_nve_kokkos.h @@ -50,16 +50,22 @@ class FixNVEKokkos : public FixNVE { void final_integrate() override; void fused_integrate(int) override; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void initial_integrate_item(int) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void initial_integrate_rmass_item(int) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void final_integrate_item(int) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void final_integrate_rmass_item(int) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void fused_integrate_item(int) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void fused_integrate_rmass_item(int) const; @@ -81,6 +87,7 @@ struct FixNVEKokkosInitialIntegrateFunctor { FixNVEKokkosInitialIntegrateFunctor(FixNVEKokkos* c_ptr): c(*c_ptr) {c.cleanup_copy();}; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(const int i) const { if (RMass) c.initial_integrate_rmass_item(i); @@ -95,6 +102,7 @@ struct FixNVEKokkosFinalIntegrateFunctor { FixNVEKokkosFinalIntegrateFunctor(FixNVEKokkos* c_ptr): c(*c_ptr) {c.cleanup_copy();}; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(const int i) const { if (RMass) c.final_integrate_rmass_item(i); @@ -109,6 +117,7 @@ struct FixNVEKokkosFusedIntegrateFunctor { FixNVEKokkosFusedIntegrateFunctor(FixNVEKokkos* c_ptr): c(*c_ptr) {c.cleanup_copy();}; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(const int i) const { if (RMass) diff --git a/src/KOKKOS/fix_nve_sphere_kokkos.cpp b/src/KOKKOS/fix_nve_sphere_kokkos.cpp index 2e2aea2504b..00ceef4c2c5 100644 --- a/src/KOKKOS/fix_nve_sphere_kokkos.cpp +++ b/src/KOKKOS/fix_nve_sphere_kokkos.cpp @@ -89,6 +89,7 @@ void FixNVESphereKokkos::initial_integrate(int /*vflag*/) /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixNVESphereKokkos::initial_integrate_item(const int i) const { @@ -148,6 +149,7 @@ void FixNVESphereKokkos::final_integrate() /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixNVESphereKokkos::final_integrate_item(const int i) const { @@ -201,6 +203,7 @@ void FixNVESphereKokkos::fused_integrate(int /*vflag*/) /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixNVESphereKokkos::fused_integrate_item(const int i) const { diff --git a/src/KOKKOS/fix_nve_sphere_kokkos.h b/src/KOKKOS/fix_nve_sphere_kokkos.h index d2b7f665a91..06f40eded28 100644 --- a/src/KOKKOS/fix_nve_sphere_kokkos.h +++ b/src/KOKKOS/fix_nve_sphere_kokkos.h @@ -41,10 +41,13 @@ class FixNVESphereKokkos : public FixNVESphere { void final_integrate() override; void fused_integrate(int) override; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void initial_integrate_item(const int i) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void final_integrate_item(const int i) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void fused_integrate_item(int) const; @@ -66,6 +69,7 @@ struct FixNVESphereKokkosInitialIntegrateFunctor { typedef ArrayTypes AT; FixNVESphereKokkos c; FixNVESphereKokkosInitialIntegrateFunctor(FixNVESphereKokkos *c_ptr): c(*c_ptr) { c.cleanup_copy(); } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(const int i) const { c.initial_integrate_item(i); @@ -78,6 +82,7 @@ struct FixNVESphereKokkosFinalIntegrateFunctor { typedef ArrayTypes AT; FixNVESphereKokkos c; FixNVESphereKokkosFinalIntegrateFunctor(FixNVESphereKokkos *c_ptr): c(*c_ptr) { c.cleanup_copy(); } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(const int i) const { c.final_integrate_item(i); @@ -90,6 +95,7 @@ struct FixNVESphereKokkosFusedIntegrateFunctor { typedef ArrayTypes AT; FixNVESphereKokkos c; FixNVESphereKokkosFusedIntegrateFunctor(FixNVESphereKokkos *c_ptr): c(*c_ptr) { c.cleanup_copy(); } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(const int i) const { c.fused_integrate_item(i); diff --git a/src/KOKKOS/fix_nvt_sllod_kokkos.cpp b/src/KOKKOS/fix_nvt_sllod_kokkos.cpp index 5b56d89763c..8f4ccbbc4e8 100644 --- a/src/KOKKOS/fix_nvt_sllod_kokkos.cpp +++ b/src/KOKKOS/fix_nvt_sllod_kokkos.cpp @@ -178,6 +178,7 @@ void FixNVTSllodKokkos::nh_v_temp() } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixNVTSllodKokkos::operator()(TagFixNVTSllod_temp1, const int &i) const { if (mask[i] & this->groupbit) { @@ -188,6 +189,7 @@ void FixNVTSllodKokkos::operator()(TagFixNVTSllod_temp1, const int & } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixNVTSllodKokkos::operator()(TagFixNVTSllod_temp2, const int &i) const { if (mask[i] & this->groupbit) { diff --git a/src/KOKKOS/fix_nvt_sllod_kokkos.h b/src/KOKKOS/fix_nvt_sllod_kokkos.h index 0c6922e7d88..ec20ede8868 100644 --- a/src/KOKKOS/fix_nvt_sllod_kokkos.h +++ b/src/KOKKOS/fix_nvt_sllod_kokkos.h @@ -42,9 +42,11 @@ class FixNVTSllodKokkos : public FixNHKokkos { void init() override; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagFixNVTSllod_temp1, const int& i) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagFixNVTSllod_temp2, const int& i) const; diff --git a/src/KOKKOS/fix_qeq_reaxff_kokkos.cpp b/src/KOKKOS/fix_qeq_reaxff_kokkos.cpp index 92babd6e0a7..e5dc705aa5b 100644 --- a/src/KOKKOS/fix_qeq_reaxff_kokkos.cpp +++ b/src/KOKKOS/fix_qeq_reaxff_kokkos.cpp @@ -303,6 +303,7 @@ void FixQEqReaxFFKokkos::pre_force(int /*vflag*/) /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixQEqReaxFFKokkos::num_neigh_item(int ii, bigint &totneigh) const { @@ -378,6 +379,7 @@ void FixQEqReaxFFKokkos::allocate_array() /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixQEqReaxFFKokkos::operator()(TagQEqZero, const int &ii) const { @@ -405,6 +407,7 @@ void FixQEqReaxFFKokkos::operator()(TagQEqZero, const int &ii) const template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixQEqReaxFFKokkos::compute_h_item(int ii, bigint &m_fill, const bool &final) const { @@ -473,6 +476,7 @@ void FixQEqReaxFFKokkos::compute_h_item(int ii, bigint &m_fill, cons template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixQEqReaxFFKokkos::compute_h_team( const typename Kokkos::TeamPolicy::member_type &team, @@ -678,6 +682,7 @@ void FixQEqReaxFFKokkos::compute_h_team( /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT FixQEqReaxFFKokkos::calculate_H_k(const KK_FLOAT &r, const KK_FLOAT &shld) const { @@ -700,6 +705,7 @@ KK_FLOAT FixQEqReaxFFKokkos::calculate_H_k(const KK_FLOAT &r, const /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixQEqReaxFFKokkos::operator()(TagQEqInitMatvec, const int &ii) const { @@ -889,6 +895,7 @@ void FixQEqReaxFFKokkos::sparse_matvec_kokkos(typename AT::t_kkfloat /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixQEqReaxFFKokkos::operator()(TagQEqSparseMatvec1, const int &ii) const { @@ -906,6 +913,7 @@ void FixQEqReaxFFKokkos::operator()(TagQEqSparseMatvec1, const int & /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixQEqReaxFFKokkos::operator()(TagQEqZeroQGhosts, const int &i) const { @@ -921,6 +929,7 @@ void FixQEqReaxFFKokkos::operator()(TagQEqZeroQGhosts, const int &i) template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixQEqReaxFFKokkos::operator()(TagQEqSparseMatvec2_Half, const typename Kokkos::TeamPolicy>::member_type &team) const { @@ -961,6 +970,7 @@ void FixQEqReaxFFKokkos::operator()(TagQEqSparseMatvec2_Half +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixQEqReaxFFKokkos::operator()(TagQEqSparseMatvec2_Full, const membertype_vec &team) const { @@ -990,6 +1000,7 @@ void FixQEqReaxFFKokkos::operator()(TagQEqSparseMatvec2_Full, const /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixQEqReaxFFKokkos::operator()(TagQEqNorm1, const int &ii, KK_double2& out) const { @@ -1015,6 +1026,7 @@ void FixQEqReaxFFKokkos::operator()(TagQEqNorm1, const int &ii, KK_d /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixQEqReaxFFKokkos::operator()(TagQEqDot1, const int &ii, KK_double2& out) const { @@ -1030,6 +1042,7 @@ void FixQEqReaxFFKokkos::operator()(TagQEqDot1, const int &ii, KK_do /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixQEqReaxFFKokkos::operator()(TagQEqDot2, const int &ii, KK_double2& out) const { @@ -1045,6 +1058,7 @@ void FixQEqReaxFFKokkos::operator()(TagQEqDot2, const int &ii, KK_do /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixQEqReaxFFKokkos::operator()(TagQEqDot3, const int &ii, KK_double2& out) const { @@ -1077,6 +1091,7 @@ void FixQEqReaxFFKokkos::operator()(TagQEqDot3, const int &ii, KK_do /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixQEqReaxFFKokkos::operator()(TagQEqSum1, const int &ii) const { @@ -1092,6 +1107,7 @@ void FixQEqReaxFFKokkos::operator()(TagQEqSum1, const int &ii) const /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixQEqReaxFFKokkos::operator()(TagQEqSum2, const int &ii, KK_double2& out) const { @@ -1105,6 +1121,7 @@ void FixQEqReaxFFKokkos::operator()(TagQEqSum2, const int &ii, KK_do /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixQEqReaxFFKokkos::operator()(TagQEqCalculateQ, const int &ii) const { @@ -1139,6 +1156,7 @@ int FixQEqReaxFFKokkos::pack_forward_comm_kokkos(int n, DAT::tdual_i /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixQEqReaxFFKokkos::operator()(TagQEqPackForwardComm, const int &i) const { int j = d_sendlist(i); @@ -1169,6 +1187,7 @@ void FixQEqReaxFFKokkos::unpack_forward_comm_kokkos(int n, int first } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixQEqReaxFFKokkos::operator()(TagQEqUnpackForwardComm, const int &i) const { if (pack_flag == 1) { @@ -1363,6 +1382,7 @@ void FixQEqReaxFFKokkos::sort_kokkos(Kokkos::BinSort +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixQEqReaxFFKokkos::operator()(TagQEqPackExchange, const int &mysend) const { @@ -1416,6 +1436,7 @@ int FixQEqReaxFFKokkos::pack_exchange_kokkos( /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixQEqReaxFFKokkos::operator()(TagQEqUnpackExchange, const int &i) const { diff --git a/src/KOKKOS/fix_qeq_reaxff_kokkos.h b/src/KOKKOS/fix_qeq_reaxff_kokkos.h index f5110e98798..822cfa1cedb 100644 --- a/src/KOKKOS/fix_qeq_reaxff_kokkos.h +++ b/src/KOKKOS/fix_qeq_reaxff_kokkos.h @@ -69,70 +69,91 @@ class FixQEqReaxFFKokkos : public FixQEqReaxFF, public KokkosBase { void setup_pre_force(int) override; void pre_force(int) override; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void num_neigh_item(int, bigint&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagQEqZero, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagQEqInitMatvec, const int&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void compute_h_item(int, bigint &, const bool &) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void compute_h_team(const typename Kokkos::TeamPolicy::member_type &team, int, int) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagQEqSparseMatvec1, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagQEqZeroQGhosts, const int&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagQEqSparseMatvec2_Half, const typename Kokkos::TeamPolicy>::member_type &team) const; typedef typename Kokkos::TeamPolicy::member_type membertype_vec; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagQEqSparseMatvec2_Full, const membertype_vec &team) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagQEqNorm1, const int&, KK_double2&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagQEqDot1, const int&, KK_double2&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagQEqDot2, const int&, KK_double2&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagQEqDot3, const int&, KK_double2&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagQEqSum1, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagQEqSum2, const int&, KK_double2&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagQEqCalculateQ, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT calculate_H_k(const KK_FLOAT &r, const KK_FLOAT &shld) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagQEqPackForwardComm, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagQEqUnpackForwardComm, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagQEqPackExchange, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagQEqUnpackExchange, const int&) const; @@ -147,8 +168,10 @@ class FixQEqReaxFFKokkos : public FixQEqReaxFF, public KokkosBase { ExecutionSpace space) override; struct params_qeq{ +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION params_qeq() {chi=0;eta=0;gamma=0;}; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION params_qeq(int /*i*/) {chi=0;eta=0;gamma=0;}; KK_FLOAT chi, eta, gamma; @@ -300,6 +323,7 @@ struct FixQEqReaxFFKokkosNumNeighFunctor { FixQEqReaxFFKokkosNumNeighFunctor(FixQEqReaxFFKokkos* c_ptr):c(*c_ptr) { c.cleanup_copy(); }; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(const int ii, bigint &totneigh) const { c.num_neigh_item(ii, totneigh); @@ -323,18 +347,20 @@ struct FixQEqReaxFFKokkosComputeHFunctor { c.cleanup_copy(); }; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(const int ii, bigint &m_fill, const bool &final) const { c.template compute_h_item(ii,m_fill,final); } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()( const typename Kokkos::TeamPolicy::member_type &team) const { c.template compute_h_team(team, atoms_per_team, vector_length); } - size_t team_shmem_size(int /*team_size*/) const { + [[nodiscard]] size_t team_shmem_size(int /*team_size*/) const { size_t shmem_size = Kokkos::View::shmem_size( atoms_per_team) + // s_ilist @@ -359,6 +385,7 @@ namespace Kokkos { // reduction identity must be defined in Kokkos namespace template<> struct reduction_identity { +// NOLINTNEXTLINE KOKKOS_FORCEINLINE_FUNCTION static KK_double2 sum() { return KK_double2(); } diff --git a/src/KOKKOS/fix_rx_kokkos.cpp b/src/KOKKOS/fix_rx_kokkos.cpp index 5a800e1bd18..72d542a044f 100644 --- a/src/KOKKOS/fix_rx_kokkos.cpp +++ b/src/KOKKOS/fix_rx_kokkos.cpp @@ -190,6 +190,7 @@ void FixRxKokkos::rk4(const double t_stop, double *y, double *rwork, template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixRxKokkos::k_rk4(const double t_stop, VectorType& y, VectorType& rwork, UserDataType& userData) const { @@ -250,6 +251,7 @@ void FixRxKokkos::k_rk4(const double t_stop, VectorType& y, VectorTy template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixRxKokkos::k_rkf45_step (const int neq, const double h, VectorType& y, VectorType& y_out, VectorType& rwk, UserDataType& userData) const { @@ -354,6 +356,7 @@ void FixRxKokkos::k_rkf45_step (const int neq, const double h, Vecto template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION int FixRxKokkos::k_rkf45_h0 (const int neq, const double t, const double /*t_stop*/, const double hmin, const double hmax, @@ -449,6 +452,7 @@ int FixRxKokkos::k_rkf45_h0 (const int neq, const double t, const do template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixRxKokkos::k_rkf45(const int neq, const double t_stop, VectorType& y, VectorType& rwork, UserDataType& userData, CounterType& counter) const { @@ -991,6 +995,7 @@ int FixRxKokkos::rhs_sparse(double /*t*/, const double *y, double *d template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION int FixRxKokkos::k_rhs(double t, const VectorType& y, VectorType& dydt, UserDataType& userData) const { @@ -1005,6 +1010,7 @@ int FixRxKokkos::k_rhs(double t, const VectorType& y, VectorType& dy template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION int FixRxKokkos::k_rhs_dense(double /*t*/, const VectorType& y, VectorType& dydt, UserDataType& userData) const { @@ -1042,6 +1048,7 @@ int FixRxKokkos::k_rhs_dense(double /*t*/, const VectorType& y, Vect template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION int FixRxKokkos::k_rhs_sparse(double /*t*/, const VectorType& y, VectorType& dydt, UserDataType& userData) const { @@ -1129,6 +1136,7 @@ int FixRxKokkos::k_rhs_sparse(double /*t*/, const VectorType& y, Vec /*template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixRxKokkos::operator()(SolverType, const int &i) const { @@ -1265,6 +1273,7 @@ void FixRxKokkos::pre_force(int vflag) /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixRxKokkos::operator()(Tag_FixRxKokkos_zeroCounterViews, const int& i) const { @@ -1276,6 +1285,7 @@ void FixRxKokkos::operator()(Tag_FixRxKokkos_zeroCounterViews, const template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixRxKokkos::operator()(Tag_FixRxKokkos_solveSystems, const int& i, CounterType& counter) const { @@ -1700,6 +1710,7 @@ void FixRxKokkos::odeDiagnostics() /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixRxKokkos::operator()(Tag_FixRxKokkos_zeroTemperatureViews, const int& i) const { @@ -1711,6 +1722,7 @@ void FixRxKokkos::operator()(Tag_FixRxKokkos_zeroTemperatureViews, c template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixRxKokkos::operator()(Tag_FixRxKokkos_firstPairOperator, const int& ii) const { @@ -1778,6 +1790,7 @@ void FixRxKokkos::operator()(Tag_FixRxKokkos_firstPairOperator template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixRxKokkos::operator()(Tag_FixRxKokkos_2ndPairOperator, const int& i) const { diff --git a/src/KOKKOS/fix_rx_kokkos.h b/src/KOKKOS/fix_rx_kokkos.h index c43bdf8027a..6c3286599be 100644 --- a/src/KOKKOS/fix_rx_kokkos.h +++ b/src/KOKKOS/fix_rx_kokkos.h @@ -47,9 +47,11 @@ struct s_CounterType { int nSteps, nIters, nFuncs, nFails; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION s_CounterType() : nSteps(0), nIters(0), nFuncs(0), nFails(0) {}; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION s_CounterType& operator+=(const s_CounterType &rhs) { @@ -79,21 +81,26 @@ class FixRxKokkos : public FixRX { // Define a value_type here for the reduction operator on CounterType. typedef CounterType value_type; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(Tag_FixRxKokkos_zeroCounterViews, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(Tag_FixRxKokkos_zeroTemperatureViews, const int&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(Tag_FixRxKokkos_firstPairOperator, const int&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(Tag_FixRxKokkos_2ndPairOperator, const int&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(Tag_FixRxKokkos_solveSystems, const int&, CounterType&) const; @@ -112,14 +119,20 @@ class FixRxKokkos : public FixRX { value_type *m_data; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION StridedArrayType() : m_data(nullptr) {} +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION StridedArrayType(value_type *ptr) : m_data(ptr) {} +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION value_type& operator()(const int idx) { return m_data[Stride*idx]; } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION const value_type& operator()(const int idx) const { return m_data[Stride*idx]; } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION value_type& operator[](const int idx) { return m_data[Stride*idx]; } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION const value_type& operator[](const int idx) const { return m_data[Stride*idx]; } }; @@ -137,14 +150,17 @@ class FixRxKokkos : public FixRX { int rhs_sparse(double, const double *, double *, void *) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION int k_rhs (double, const VectorType&, VectorType&, UserDataType& ) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION int k_rhs_dense (double, const VectorType&, VectorType&, UserDataType& ) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION int k_rhs_sparse(double, const VectorType&, VectorType&, UserDataType& ) const; @@ -165,22 +181,26 @@ class FixRxKokkos : public FixRX { //!< Classic Runge-Kutta 4th-order stepper. template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void k_rk4(const double t_stop, VectorType& y, VectorType& rwork, UserDataType& userData) const; //!< Runge-Kutta-Fehlberg ODE Solver. template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void k_rkf45(const int neq, const double t_stop, VectorType& y, VectorType& rwork, UserDataType& userData, CounterType& counter) const; //!< Runge-Kutta-Fehlberg ODE stepper function. template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void k_rkf45_step (const int neq, const double h, VectorType& y, VectorType& y_out, VectorType& rwk, UserDataType& userData) const; //!< Initial step size estimation for the Runge-Kutta-Fehlberg ODE solver. template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION int k_rkf45_h0 (const int neq, const double t, const double t_stop, const double hmin, const double hmax, diff --git a/src/KOKKOS/fix_setforce_kokkos.cpp b/src/KOKKOS/fix_setforce_kokkos.cpp index 66d67e4e122..568831fccce 100644 --- a/src/KOKKOS/fix_setforce_kokkos.cpp +++ b/src/KOKKOS/fix_setforce_kokkos.cpp @@ -148,6 +148,7 @@ void FixSetForceKokkos::post_force(int /*vflag*/) } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixSetForceKokkos::operator()(TagFixSetForceConstant, const int &i, double_3& foriginal_kk) const { if (mask[i] & groupbit) { @@ -162,6 +163,7 @@ void FixSetForceKokkos::operator()(TagFixSetForceConstant, const int } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixSetForceKokkos::operator()(TagFixSetForceNonConstant, const int &i, double_3& foriginal_kk) const { if (mask[i] & groupbit) { diff --git a/src/KOKKOS/fix_setforce_kokkos.h b/src/KOKKOS/fix_setforce_kokkos.h index 7773a4c7c56..8ba70a24e12 100644 --- a/src/KOKKOS/fix_setforce_kokkos.h +++ b/src/KOKKOS/fix_setforce_kokkos.h @@ -30,10 +30,12 @@ namespace LAMMPS_NS { struct s_double_3 { double d0, d1, d2; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION s_double_3() { d0 = d1 = d2 = 0.0; } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION s_double_3& operator+=(const s_double_3 &rhs) { d0 += rhs.d0; @@ -60,9 +62,11 @@ class FixSetForceKokkos : public FixSetForce { void init() override; void post_force(int) override; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagFixSetForceConstant, const int&, double_3&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagFixSetForceNonConstant, const int&, double_3&) const; diff --git a/src/KOKKOS/fix_shake_kokkos.cpp b/src/KOKKOS/fix_shake_kokkos.cpp index d010da930b0..f2d237ad5d6 100644 --- a/src/KOKKOS/fix_shake_kokkos.cpp +++ b/src/KOKKOS/fix_shake_kokkos.cpp @@ -32,6 +32,8 @@ using namespace LAMMPS_NS; using namespace FixConst; using namespace MathConst; +static constexpr double BIG = 1.0e20; // Exact match to fix_shake.cpp + /* ---------------------------------------------------------------------- */ template @@ -179,16 +181,6 @@ void FixShakeKokkos::init() overflow_kk = get_overflow_max(); } -/* ---------------------------------------------------------------------- - run setup for minimization. -------------------------------------------------------------------------- */ - -template -void FixShakeKokkos::min_setup(int /*vflag*/) -{ - error->all(FLERR, "Cannot yet use fix {} during minimization with Kokkos", style); -} - /* ---------------------------------------------------------------------- build list of SHAKE clusters to constrain if one or more atoms in cluster are on this proc, @@ -272,6 +264,7 @@ void FixShakeKokkos::pre_neighbor() /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixShakeKokkos::operator()(TagFixShakePreNeighbor, const int &i) const { if (d_shake_flag[i]) { @@ -328,6 +321,205 @@ void FixShakeKokkos::operator()(TagFixShakePreNeighbor, const int &i } } +/* ---------------------------------------------------------------------- + substitute shake constraints with very strong bonds +------------------------------------------------------------------------- */ + +template +void FixShakeKokkos::min_setup(int vflag) +{ + // setup SHAKE output + bigint ntimestep = update->ntimestep; + if (output_every) { + next_output = ntimestep + output_every; + if (ntimestep % output_every != 0) + next_output = (ntimestep/output_every)*output_every + output_every; + } else next_output = -1; + + FixShake::min_setup(vflag); +} + +/* ---------------------------------------------------------------------- */ + +template +void FixShakeKokkos::min_post_force(int vflag) +{ + int eflag = eflag_pre_reverse; + ev_init(eflag, vflag); + ebond = 0.0; + + atomKK->sync(execution_space, X_MASK | F_MASK); + k_shake_flag.sync(); + k_shake_type.sync(); + k_list.sync(); + k_closest_list.sync(); + k_bond_distance.sync(); + k_angle_distance.sync(); + + // Assign class member views for Tagged Kernel access + this->d_x = atomKK->k_x.view(); + this->d_f = atomKK->k_f.view(); + + neighflag = lmp->kokkos->neighflag; + if (neighflag == FULL) { + neighflag = (lmp->kokkos->nthreads > 1 || lmp->kokkos->ngpus > 0) ? HALFTHREAD : HALF; + } + + need_dup = 0; + if (neighflag != HALF) + need_dup = std::is_same_v, Kokkos::Experimental::ScatterDuplicated>; + + if (need_dup) + dup_f = Kokkos::Experimental::create_scatter_view(d_f); + else + ndup_f = Kokkos::Experimental::create_scatter_view(d_f); + + copymode = 1; + + if (output_every) { + d_b_stats = typename AT::t_double_2d("shake:b_stats", atom->nbondtypes + 1, 4); + d_a_stats = typename AT::t_double_2d("shake:a_stats", atom->nangletypes + 1, 4); + + // Capture views locally for the lambda + auto l_b_stats = this->d_b_stats; + auto l_a_stats = this->d_a_stats; + const int nb = atom->nbondtypes + 1; + const int na = atom->nangletypes + 1; + + Kokkos::parallel_for("FixShake:zero_stats", Kokkos::RangePolicy(0, MAX(nb, na)), + KOKKOS_LAMBDA(const int &i) { + if (i < nb) { l_b_stats(i,0) = 0; l_b_stats(i,1) = 0; l_b_stats(i,2) = 0; l_b_stats(i,3) = BIG; } + if (i < na) { l_a_stats(i,0) = 0; l_a_stats(i,1) = 0; l_a_stats(i,2) = 0; l_a_stats(i,3) = BIG; } + }); + } + + EV_FLOAT ev; + + if (neighflag == HALF) { + if(vflag) + Kokkos::parallel_reduce(Kokkos::RangePolicy>(0, nlist), *this, ev); + else + Kokkos::parallel_for(Kokkos::RangePolicy>(0, nlist), *this); + } else { + if(vflag) + Kokkos::parallel_reduce(Kokkos::RangePolicy>(0, nlist), *this, ev); + else + Kokkos::parallel_for(Kokkos::RangePolicy>(0, nlist), *this); + } + + copymode = 0; + + if (need_dup) Kokkos::Experimental::contribute(d_f, dup_f); + comm->reverse_comm(this); + this->ebond = ev.evdwl; + + if (vflag_global) { + virial[0] += static_cast(ev.v[0]); + virial[1] += static_cast(ev.v[1]); + virial[2] += static_cast(ev.v[2]); + virial[3] += static_cast(ev.v[3]); + virial[4] += static_cast(ev.v[4]); + virial[5] += static_cast(ev.v[5]); + } + + atomKK->modified(execution_space, F_MASK); + + if (update->ntimestep == next_output) { + atomKK->modified(execution_space, X_MASK); + stats(); + } + + if (need_dup) dup_f = {}; +} + +/* ---------------------------------------------------------------------- */ + +template +template +KOKKOS_INLINE_FUNCTION +void FixShakeKokkos::operator()(TagFixShakeMinPostForce, const int &i, EV_FLOAT &ev) const +{ + auto v_f = ScatterViewHelper, decltype(dup_f), decltype(ndup_f)>::get(dup_f, ndup_f); + auto a_f = v_f.template access>(); + + const int m = d_list[i]; + const int flag = d_shake_flag[m]; + const int i0 = d_closest_list(i, 0); + + auto apply_restraint = [&](int idx0, int idx1, int type_idx, bool is_angle) { + if (idx0 < 0 || idx1 < 0) return 0.0; + const KK_FLOAT d0 = is_angle ? d_angle_distance[type_idx] : d_bond_distance[type_idx]; + const KK_FLOAT delx = d_x(idx0, 0) - d_x(idx1, 0); + const KK_FLOAT dely = d_x(idx0, 1) - d_x(idx1, 1); + const KK_FLOAT delz = d_x(idx0, 2) - d_x(idx1, 2); + const KK_FLOAT r = sqrt(delx*delx + dely*dely + delz*delz); + const KK_FLOAT dr = r - d0; + const KK_FLOAT rk = kbond * dr; + const KK_FLOAT fbond = (r > 0.0) ? -2.0 * rk / r : 0.0; + const KK_FLOAT eb = rk * dr; + a_f(idx0, 0) += static_cast(delx * fbond); + a_f(idx0, 1) += static_cast(dely * fbond); + a_f(idx0, 2) += static_cast(delz * fbond); + a_f(idx1, 0) -= static_cast(delx * fbond); + a_f(idx1, 1) -= static_cast(dely * fbond); + a_f(idx1, 2) -= static_cast(delz * fbond); + ev.evdwl += eb; + if (VFLAG) { + ev.v[0] += static_cast(0.5 * delx * delx * fbond); + ev.v[1] += static_cast(0.5 * dely * dely * fbond); + ev.v[2] += static_cast(0.5 * delz * delz * fbond); + ev.v[3] += static_cast(0.5 * delx * dely * fbond); + ev.v[4] += static_cast(0.5 * delx * delz * fbond); + ev.v[5] += static_cast(0.5 * dely * delz * fbond); + } + if (output_every && !is_angle) { + Kokkos::atomic_add(&d_b_stats(type_idx, 0), 1.0); + Kokkos::atomic_add(&d_b_stats(type_idx, 1), (double)r); + Kokkos::atomic_add(&d_b_stats(type_idx, 0), 1.0); + Kokkos::atomic_add(&d_b_stats(type_idx, 1), (double)r); + Kokkos::atomic_max(&d_b_stats(type_idx, 2), (double)r); + Kokkos::atomic_min(&d_b_stats(type_idx, 3), (double)r); + } + return r; + }; + + if (flag == 2) { + apply_restraint(i0, d_closest_list(i, 1), d_shake_type(m, 0), false); + } else if (flag == 3) { + apply_restraint(i0, d_closest_list(i, 1), d_shake_type(m, 0), false); + apply_restraint(i0, d_closest_list(i, 2), d_shake_type(m, 1), false); + } else if (flag == 4) { + apply_restraint(i0, d_closest_list(i, 1), d_shake_type(m, 0), false); + apply_restraint(i0, d_closest_list(i, 2), d_shake_type(m, 1), false); + apply_restraint(i0, d_closest_list(i, 3), d_shake_type(m, 2), false); + } else if (flag == 1) { + int i1 = d_closest_list(i, 1); + int i2 = d_closest_list(i, 2); + KK_FLOAT r1 = apply_restraint(i0, i1, d_shake_type(m, 0), false); + KK_FLOAT r2 = apply_restraint(i0, i2, d_shake_type(m, 1), false); + KK_FLOAT r3 = apply_restraint(i1, i2, d_shake_type(m, 2), true); + if (output_every) { + KK_FLOAT angle = acos((r1*r1 + r2*r2 - r3*r3) / (2.0*r1*r2)) * 180.0/MY_PI; + int mt = d_shake_type(m, 2); + int count = (i0 < nlocal) + (i1 < nlocal) + (i2 < nlocal); + if (count > 0) { + Kokkos::atomic_add(&d_a_stats(mt, 0), (double)count); + Kokkos::atomic_add(&d_a_stats(mt, 1), (double)count * angle); + Kokkos::atomic_max(&d_a_stats(mt, 2), (double)angle); + Kokkos::atomic_min(&d_a_stats(mt, 3), (double)angle); + } + } + } +} + +template +template +KOKKOS_INLINE_FUNCTION +void FixShakeKokkos::operator()(TagFixShakeMinPostForce, const int &i) const { + EV_FLOAT ev; + this->template operator()(TagFixShakeMinPostForce(), i, ev); +} + /* ---------------------------------------------------------------------- compute the force adjustment for SHAKE constraint ------------------------------------------------------------------------- */ @@ -474,30 +666,11 @@ void FixShakeKokkos::post_force(int vflag) } } -/* ---------------------------------------------------------------------- - substitute shake constraints with very strong bonds -------------------------------------------------------------------------- */ - -template -void FixShakeKokkos::min_post_force(int vflag) -{ - // not yet ported to Kokkos - - atomKK->sync(Host,X_MASK | F_MASK); - k_shake_flag.sync_host(); - k_shake_type.sync_host(); - k_list.sync_host(); - k_closest_list.sync_host(); - - FixShake::min_post_force(vflag); - - atomKK->modified(Host,F_MASK); -} - /* ---------------------------------------------------------------------- */ template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixShakeKokkos::operator()(TagFixShakePostForce, const int &i, EV_FLOAT& ev) const { const int m = d_list[i]; @@ -509,6 +682,7 @@ void FixShakeKokkos::operator()(TagFixShakePostForce template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixShakeKokkos::operator()(TagFixShakePostForce, const int &i) const { EV_FLOAT ev; @@ -634,6 +808,7 @@ void FixShakeKokkos::unconstrained_update() template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixShakeKokkos::shake(int ilist, EV_FLOAT& ev) const { @@ -744,6 +919,7 @@ void FixShakeKokkos::shake(int ilist, EV_FLOAT& ev) const template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixShakeKokkos::shake3(int ilist, EV_FLOAT& ev) const { @@ -922,6 +1098,7 @@ void FixShakeKokkos::shake3(int ilist, EV_FLOAT& ev) const template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixShakeKokkos::shake4(int ilist, EV_FLOAT& ev) const { @@ -1176,6 +1353,7 @@ void FixShakeKokkos::shake4(int ilist, EV_FLOAT& ev) const template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixShakeKokkos::shake3angle(int ilist, EV_FLOAT& ev) const { @@ -1558,6 +1736,7 @@ void FixShakeKokkos::set_molecule(int nlocalprev, tagint tagprev, in /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixShakeKokkos::pack_exchange_item(const int &mysend, int &offset, const bool &final) const { @@ -1687,6 +1866,7 @@ int FixShakeKokkos::pack_exchange_kokkos( /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixShakeKokkos::operator()(TagFixShakeUnpackExchange, const int &i) const { @@ -1830,6 +2010,7 @@ int FixShakeKokkos::pack_forward_comm_kokkos(int n, DAT::tdual_int_1 template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixShakeKokkos::operator()(TagFixShakePackForwardComm, const int &i) const { const int j = d_sendlist(i); @@ -1871,6 +2052,7 @@ void FixShakeKokkos::unpack_forward_comm_kokkos(int n, int first_in, } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixShakeKokkos::operator()(TagFixShakeUnpackForwardComm, const int &i) const { d_xshake(i + first,0) = static_cast(d_buf[3*i]); @@ -2014,6 +2196,7 @@ void FixShakeKokkos::correct_coordinates(int vflag) { ------------------------------------------------------------------------- */ template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixShakeKokkos::v_tally(EV_FLOAT &ev, int n, int *atomlist, KK_FLOAT total, KK_FLOAT *v) const @@ -2045,6 +2228,7 @@ void FixShakeKokkos::v_tally(EV_FLOAT &ev, int n, int *atomlist, KK_ ------------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION int FixShakeKokkos::closest_image(const int i, int j) const { diff --git a/src/KOKKOS/fix_shake_kokkos.h b/src/KOKKOS/fix_shake_kokkos.h index 6cf5372e5cc..13a4dd6f896 100644 --- a/src/KOKKOS/fix_shake_kokkos.h +++ b/src/KOKKOS/fix_shake_kokkos.h @@ -32,6 +32,9 @@ namespace LAMMPS_NS { struct TagFixShakePreNeighbor{}; +template +struct TagFixShakeMinPostForce{}; + template struct TagFixShakePostForce{}; @@ -52,10 +55,10 @@ class FixShakeKokkos : public FixShake, public KokkosBase { FixShakeKokkos(class LAMMPS *, int, char **); ~FixShakeKokkos() override; void init() override; - void min_setup(int) override; void pre_neighbor() override; - void post_force(int) override; + void min_setup(int) override; void min_post_force(int) override; + void post_force(int) override; void grow_arrays(int) override; void copy_arrays(int, int, int) override; @@ -79,27 +82,42 @@ class FixShakeKokkos : public FixShake, public KokkosBase { void unconstrained_update() override; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagFixShakePreNeighbor, const int&) const; + template + KOKKOS_INLINE_FUNCTION + void operator()(TagFixShakeMinPostForce, const int&, EV_FLOAT&) const; + + template + KOKKOS_INLINE_FUNCTION + void operator()(TagFixShakeMinPostForce, const int&) const; + template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagFixShakePostForce, const int&, EV_FLOAT&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagFixShakePostForce, const int&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagFixShakePackForwardComm, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagFixShakeUnpackForwardComm, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void pack_exchange_item(const int&, int &, const bool &) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagFixShakeUnpackExchange, const int&) const; @@ -167,18 +185,22 @@ class FixShakeKokkos : public FixShake, public KokkosBase { void stats() override; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void shake(int, EV_FLOAT&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void shake3(int, EV_FLOAT&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void shake4(int, EV_FLOAT&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void shake3angle(int, EV_FLOAT&) const; @@ -208,6 +230,7 @@ class FixShakeKokkos : public FixShake, public KokkosBase { HAT::t_int_scalar h_nlist; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void v_tally(EV_FLOAT&, int, int *, KK_FLOAT, KK_FLOAT *) const; @@ -220,6 +243,9 @@ class FixShakeKokkos : public FixShake, public KokkosBase { typename AT::t_int_1d d_copylist; typename AT::t_int_1d d_indices; + typename AT::t_double_2d d_b_stats; + typename AT::t_double_2d d_a_stats; + KK_FLOAT dx,dy,dz; KK_FLOAT dtv_kk,dtfsq_kk; @@ -248,6 +274,7 @@ class FixShakeKokkos : public FixShake, public KokkosBase { // copied from Domain +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION int closest_image(const int, int) const; @@ -265,6 +292,7 @@ struct FixShakeKokkosPackExchangeFunctor { typedef int value_type; FixShakeKokkos c; FixShakeKokkosPackExchangeFunctor(FixShakeKokkos* c_ptr):c(*c_ptr) {}; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(const int &i, int &offset, const bool &final) const { c.pack_exchange_item(i, offset, final); diff --git a/src/KOKKOS/fix_shardlow_kokkos.cpp b/src/KOKKOS/fix_shardlow_kokkos.cpp index 698cfa1d2a0..ba7e4e78f3d 100644 --- a/src/KOKKOS/fix_shardlow_kokkos.cpp +++ b/src/KOKKOS/fix_shardlow_kokkos.cpp @@ -386,6 +386,7 @@ void FixShardlowKokkos::ssa_update_dpd( ------------------------------------------------------------------------- */ template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixShardlowKokkos::ssa_update_dpde( int start_ii, int count, int id @@ -688,6 +689,7 @@ fprintf(stdout, "\n%6d %6d,%6d %6d: " template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixShardlowKokkos::operator()(TagFixShardlowSSAUpdateDPDE, const int &workItem) const { const int ct = ssa_itemLen(workPhase, workItem); @@ -697,6 +699,7 @@ void FixShardlowKokkos::operator()(TagFixShardlowSSAUpdateDPDE template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixShardlowKokkos::operator()(TagFixShardlowSSAUpdateDPDEGhost, const int &workItem) const { const int ct = ssa_gitemLen(workPhase, workItem); diff --git a/src/KOKKOS/fix_shardlow_kokkos.h b/src/KOKKOS/fix_shardlow_kokkos.h index 5a903d21185..e7a37c22f83 100644 --- a/src/KOKKOS/fix_shardlow_kokkos.h +++ b/src/KOKKOS/fix_shardlow_kokkos.h @@ -65,18 +65,22 @@ class FixShardlowKokkos : public FixShardlow { void unpack_forward_comm(int , int , double *); struct params_ssa { +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION params_ssa() {cutinv=FLT_MAX;halfsigma=0;kappa=0;alpha=0;}; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION params_ssa(int /*i*/) {cutinv=FLT_MAX;halfsigma=0;kappa=0;alpha=0;}; KK_FLOAT cutinv,halfsigma,kappa,alpha; }; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagFixShardlowSSAUpdateDPDE, const int&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagFixShardlowSSAUpdateDPDEGhost, const int&) const; @@ -141,10 +145,12 @@ class FixShardlowKokkos : public FixShardlow { #ifdef ENABLE_KOKKOS_DPD_CONSTANT_TEMPERATURE template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ssa_update_dpd(int, int, int) const; // Constant Temperature #endif template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ssa_update_dpde(int, int, int) const; // Constant Energy diff --git a/src/KOKKOS/fix_spring_self_kokkos.cpp b/src/KOKKOS/fix_spring_self_kokkos.cpp index 9c00c4b1a45..efe07167110 100644 --- a/src/KOKKOS/fix_spring_self_kokkos.cpp +++ b/src/KOKKOS/fix_spring_self_kokkos.cpp @@ -178,6 +178,7 @@ void FixSpringSelfKokkos::copy_arrays(int i, int j, int delflag) /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixSpringSelfKokkos::pack_exchange_item(const int &mysend, int &offset, const bool &/*final*/) const { @@ -246,6 +247,7 @@ int FixSpringSelfKokkos::pack_exchange_kokkos( /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixSpringSelfKokkos::operator()(TagFixSpringSelfUnpackExchange, const int &i) const { diff --git a/src/KOKKOS/fix_spring_self_kokkos.h b/src/KOKKOS/fix_spring_self_kokkos.h index 62dc8ecca78..a13d8060749 100644 --- a/src/KOKKOS/fix_spring_self_kokkos.h +++ b/src/KOKKOS/fix_spring_self_kokkos.h @@ -45,9 +45,11 @@ class FixSpringSelfKokkos : public FixSpringSelf, public KokkosBase { void copy_arrays(int, int, int) override; void post_force(int) override; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void pack_exchange_item(const int&, int &, const bool &) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagFixSpringSelfUnpackExchange, const int&) const; @@ -99,6 +101,7 @@ struct FixSpringSelfKokkosPackExchangeFunctor { typedef int value_type; FixSpringSelfKokkos c; FixSpringSelfKokkosPackExchangeFunctor(FixSpringSelfKokkos* c_ptr):c(*c_ptr) {}; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(const int &i, int &offset, const bool &final) const { c.pack_exchange_item(i, offset, final); diff --git a/src/KOKKOS/fix_viscous_kokkos.cpp b/src/KOKKOS/fix_viscous_kokkos.cpp index 8e02601e7fd..e92d6fc046a 100644 --- a/src/KOKKOS/fix_viscous_kokkos.cpp +++ b/src/KOKKOS/fix_viscous_kokkos.cpp @@ -83,6 +83,7 @@ void FixViscousKokkos::post_force(int /*vflag*/) } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixViscousKokkos::operator()(TagFixViscous, const int &i) const { if (mask[i] & groupbit) { diff --git a/src/KOKKOS/fix_viscous_kokkos.h b/src/KOKKOS/fix_viscous_kokkos.h index 1d1e4da3d7f..80315e0eab0 100644 --- a/src/KOKKOS/fix_viscous_kokkos.h +++ b/src/KOKKOS/fix_viscous_kokkos.h @@ -41,6 +41,7 @@ class FixViscousKokkos : public FixViscous { void init() override; void post_force(int) override; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagFixViscous, const int&) const; diff --git a/src/KOKKOS/fix_wall_flow_kokkos.cpp b/src/KOKKOS/fix_wall_flow_kokkos.cpp index ac0fba4e914..adee4200b2f 100644 --- a/src/KOKKOS/fix_wall_flow_kokkos.cpp +++ b/src/KOKKOS/fix_wall_flow_kokkos.cpp @@ -68,6 +68,7 @@ template void FixWallFlowKokkos::init() } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixWallFlowKokkos::operator()(TagFixWallFlowInit, const int &i) const { @@ -102,6 +103,7 @@ template void FixWallFlowKokkos::end_of_step() template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixWallFlowKokkos::operator()(TagFixWallFlowEndOfStep, const int &atom_i) const { @@ -115,6 +117,7 @@ KOKKOS_INLINE_FUNCTION void FixWallFlowKokkos::operator()(TagFixWall template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixWallFlowKokkos::generate_velocity_kk(int atom_i) const { const int newton_iteration_count = 10; @@ -157,6 +160,7 @@ KOKKOS_INLINE_FUNCTION void FixWallFlowKokkos::generate_velocity_kk( } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION int FixWallFlowKokkos::compute_current_segment_kk(KK_FLOAT pos) const { @@ -208,6 +212,7 @@ template int FixWallFlowKokkos::pack_exchange(int } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixWallFlowKokkos::operator()(TagFixWallFlowPackExchange, const int &mysend) const { @@ -260,6 +265,7 @@ template int FixWallFlowKokkos::unpack_exchange(i } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixWallFlowKokkos::operator()(TagFixWallFlowUnpackExchange, const int &i) const { diff --git a/src/KOKKOS/fix_wall_flow_kokkos.h b/src/KOKKOS/fix_wall_flow_kokkos.h index b3f40ec0303..0302f4c5a4a 100644 --- a/src/KOKKOS/fix_wall_flow_kokkos.h +++ b/src/KOKKOS/fix_wall_flow_kokkos.h @@ -54,16 +54,20 @@ class FixWallFlowKokkos : public FixWallFlow, public KokkosBase { int pack_exchange(int, double *) override; int unpack_exchange(int, double *) override; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (TagFixWallFlowInit, const int&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagFixWallFlowEndOfStep, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagFixWallFlowPackExchange, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagFixWallFlowUnpackExchange, const int&) const; @@ -103,18 +107,22 @@ class FixWallFlowKokkos : public FixWallFlow, public KokkosBase { rand_pool_t rand_pool; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void generate_velocity_kk(int atom_i) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION int compute_current_segment_kk(KK_FLOAT pos) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT get_mass(MassTag, int atom_i) const { return d_mass(d_type(atom_i)); } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT get_mass(RMassTag, int atom_i) const { diff --git a/src/KOKKOS/fix_wall_gran_kokkos.cpp b/src/KOKKOS/fix_wall_gran_kokkos.cpp index 2477fbe6639..d00d25c94a1 100644 --- a/src/KOKKOS/fix_wall_gran_kokkos.cpp +++ b/src/KOKKOS/fix_wall_gran_kokkos.cpp @@ -127,6 +127,7 @@ void FixWallGranKokkos::post_force(int /*vflag*/) template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixWallGranKokkos::operator()(TagFixWallGranHookeHistory, const int &i) const { @@ -353,6 +354,7 @@ int FixWallGranKokkos::unpack_exchange(int nlocal, double *buf) /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixWallGranKokkos::operator()(TagFixWallGranPackExchange, const int &mysend) const { @@ -402,6 +404,7 @@ int FixWallGranKokkos::pack_exchange_kokkos( /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixWallGranKokkos::operator()(TagFixWallGranUnpackExchange, const int &i) const { diff --git a/src/KOKKOS/fix_wall_gran_kokkos.h b/src/KOKKOS/fix_wall_gran_kokkos.h index d3915ddb81f..bc7da57e54c 100644 --- a/src/KOKKOS/fix_wall_gran_kokkos.h +++ b/src/KOKKOS/fix_wall_gran_kokkos.h @@ -52,12 +52,15 @@ class FixWallGranKokkos : public FixWallGranOld, public KokkosBase { int unpack_exchange(int, double *) override; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagFixWallGranHookeHistory, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagFixWallGranPackExchange, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagFixWallGranUnpackExchange, const int&) const; diff --git a/src/KOKKOS/fix_wall_lj93_kokkos.cpp b/src/KOKKOS/fix_wall_lj93_kokkos.cpp index 7150bef31d2..1f0ac36672e 100644 --- a/src/KOKKOS/fix_wall_lj93_kokkos.cpp +++ b/src/KOKKOS/fix_wall_lj93_kokkos.cpp @@ -168,6 +168,7 @@ void FixWallLJ93Kokkos::wall_particle(int m_in, int which, double co } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixWallLJ93Kokkos::operator()(const int &i, value_type result) const { if (d_mask(i) & groupbit) { @@ -210,6 +211,7 @@ void FixWallLJ93Kokkos::operator()(const int &i, value_type result) ------------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixWallLJ93Kokkos::v_tally(value_type result, int n, int i, KK_FLOAT vn) const { diff --git a/src/KOKKOS/fix_wall_lj93_kokkos.h b/src/KOKKOS/fix_wall_lj93_kokkos.h index 4d9bf38260d..51bdd7dbd2c 100644 --- a/src/KOKKOS/fix_wall_lj93_kokkos.h +++ b/src/KOKKOS/fix_wall_lj93_kokkos.h @@ -44,6 +44,7 @@ class FixWallLJ93Kokkos : public FixWallLJ93 { int m; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(const int&, value_type) const; @@ -61,6 +62,7 @@ class FixWallLJ93Kokkos : public FixWallLJ93 { DAT::ttransform_kkfloat_1d k_cutoff,k_coeff1,k_coeff2,k_coeff3,k_coeff4,k_offset; typename AT::t_kkfloat_1d d_cutoff,d_coeff1,d_coeff2,d_coeff3,d_coeff4,d_offset; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void v_tally(value_type, int, int, KK_FLOAT) const; }; diff --git a/src/KOKKOS/fix_wall_reflect_kokkos.cpp b/src/KOKKOS/fix_wall_reflect_kokkos.cpp index 4e5262fcb58..fd2dece6e6f 100644 --- a/src/KOKKOS/fix_wall_reflect_kokkos.cpp +++ b/src/KOKKOS/fix_wall_reflect_kokkos.cpp @@ -79,6 +79,7 @@ void FixWallReflectKokkos::post_integrate() } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixWallReflectKokkos::operator()(TagFixWallReflectPostIntegrate, const int &i) const { if (mask[i] & groupbit) { diff --git a/src/KOKKOS/fix_wall_reflect_kokkos.h b/src/KOKKOS/fix_wall_reflect_kokkos.h index ffbe84977d3..5e3c4a128cc 100644 --- a/src/KOKKOS/fix_wall_reflect_kokkos.h +++ b/src/KOKKOS/fix_wall_reflect_kokkos.h @@ -38,6 +38,7 @@ class FixWallReflectKokkos : public FixWallReflect { FixWallReflectKokkos(class LAMMPS *, int, char **); void post_integrate() override; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagFixWallReflectPostIntegrate, const int&) const; diff --git a/src/KOKKOS/fix_wall_region_kokkos.cpp b/src/KOKKOS/fix_wall_region_kokkos.cpp index 7c37f2db057..ac9fc3d48ad 100644 --- a/src/KOKKOS/fix_wall_region_kokkos.cpp +++ b/src/KOKKOS/fix_wall_region_kokkos.cpp @@ -135,6 +135,7 @@ void FixWallRegionKokkos::post_force(int vflag) template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixWallRegionKokkos::wall_particle(T regionKK, const int i, value_type result) const { if (d_mask(i) & groupbit) { @@ -202,6 +203,7 @@ void FixWallRegionKokkos::wall_particle(T regionKK, const int i, val ------------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT FixWallRegionKokkos::lj93(KK_FLOAT r, KK_FLOAT& fwallKK) const { @@ -219,6 +221,7 @@ KK_FLOAT FixWallRegionKokkos::lj93(KK_FLOAT r, KK_FLOAT& fwallKK) co ------------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT FixWallRegionKokkos::lj126(KK_FLOAT r, KK_FLOAT& fwallKK) const { @@ -235,6 +238,7 @@ KK_FLOAT FixWallRegionKokkos::lj126(KK_FLOAT r, KK_FLOAT& fwallKK) c ------------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT FixWallRegionKokkos::lj1043(KK_FLOAT r, KK_FLOAT& fwallKK) const { @@ -252,6 +256,7 @@ KK_FLOAT FixWallRegionKokkos::lj1043(KK_FLOAT r, KK_FLOAT& fwallKK) ------------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT FixWallRegionKokkos::morse(KK_FLOAT r, KK_FLOAT& fwallKK) const { @@ -267,6 +272,7 @@ KK_FLOAT FixWallRegionKokkos::morse(KK_FLOAT r, KK_FLOAT& fwallKK) c ------------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT FixWallRegionKokkos::colloid(KK_FLOAT r, KK_FLOAT rad, KK_FLOAT& fwallKK) const { @@ -307,6 +313,7 @@ KK_FLOAT FixWallRegionKokkos::colloid(KK_FLOAT r, KK_FLOAT rad, KK_F ------------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT FixWallRegionKokkos::harmonic(KK_FLOAT r, KK_FLOAT& fwallKK) const { @@ -327,6 +334,7 @@ KK_FLOAT FixWallRegionKokkos::harmonic(KK_FLOAT r, KK_FLOAT& fwallKK ------------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FixWallRegionKokkos::v_tally(value_type result, int i, KK_FLOAT *v) const { diff --git a/src/KOKKOS/fix_wall_region_kokkos.h b/src/KOKKOS/fix_wall_region_kokkos.h index a1c96e821bc..584a0615be5 100644 --- a/src/KOKKOS/fix_wall_region_kokkos.h +++ b/src/KOKKOS/fix_wall_region_kokkos.h @@ -43,6 +43,7 @@ class FixWallRegionKokkos : public FixWallRegion { void post_force(int) override; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void wall_particle(T, const int, value_type) const; @@ -56,24 +57,31 @@ class FixWallRegionKokkos : public FixWallRegion { DAT::ttransform_kkacc_1d_6 k_vatom; typename AT::t_kkacc_1d_6 d_vatom; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT lj93(KK_FLOAT, KK_FLOAT&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT lj126(KK_FLOAT, KK_FLOAT&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT lj1043(KK_FLOAT, KK_FLOAT&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT morse(KK_FLOAT, KK_FLOAT&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT colloid(KK_FLOAT, KK_FLOAT, KK_FLOAT&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT harmonic(KK_FLOAT, KK_FLOAT&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void v_tally(value_type, int, KK_FLOAT*) const; }; @@ -90,11 +98,13 @@ struct FixWallRegionKokkosFunctor { FixWallRegionKokkosFunctor(FixWallRegionKokkos* c_ptr, T *regionKK): value_count(10), c(*c_ptr), regionKK(regionKK) {} +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void init(value_type result) const { for (int i=0 ; i<10 ; i++ ) result[i] = 0.0; } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(const int i, value_type result) const { c.wall_particle(regionKK,i,result); diff --git a/src/KOKKOS/improper_class2_kokkos.cpp b/src/KOKKOS/improper_class2_kokkos.cpp index 3c86404c745..b3139d67c48 100644 --- a/src/KOKKOS/improper_class2_kokkos.cpp +++ b/src/KOKKOS/improper_class2_kokkos.cpp @@ -192,6 +192,7 @@ void ImproperClass2Kokkos::compute(int eflag_in, int vflag_in) template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ImproperClass2Kokkos::operator()(TagImproperClass2Compute, const int &n, EV_FLOAT& ev) const { @@ -631,6 +632,7 @@ void ImproperClass2Kokkos::operator()(TagImproperClass2Compute template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ImproperClass2Kokkos::operator()(TagImproperClass2Compute, const int &n) const { EV_FLOAT ev; @@ -641,6 +643,7 @@ void ImproperClass2Kokkos::operator()(TagImproperClass2Compute template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ImproperClass2Kokkos::operator()(TagImproperClass2AngleAngle, const int &n, EV_FLOAT& ev) const { @@ -839,6 +842,7 @@ void ImproperClass2Kokkos::operator()(TagImproperClass2AngleAngle template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ImproperClass2Kokkos::operator()(TagImproperClass2AngleAngle, const int &n) const { EV_FLOAT ev; @@ -989,6 +993,7 @@ void ImproperClass2Kokkos::read_restart(FILE *fp) template //template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ImproperClass2Kokkos::ev_tally(EV_FLOAT &ev, const int i1, const int i2, const int i3, const int i4, KK_FLOAT &eimproper, KK_FLOAT *f1, KK_FLOAT *f3, KK_FLOAT *f4, diff --git a/src/KOKKOS/improper_class2_kokkos.h b/src/KOKKOS/improper_class2_kokkos.h index 867c154a8e5..5b7af0c42eb 100644 --- a/src/KOKKOS/improper_class2_kokkos.h +++ b/src/KOKKOS/improper_class2_kokkos.h @@ -48,22 +48,27 @@ class ImproperClass2Kokkos : public ImproperClass2 { void read_restart(FILE *) override; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagImproperClass2Compute, const int&, EV_FLOAT&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagImproperClass2Compute, const int&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagImproperClass2AngleAngle, const int&, EV_FLOAT&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagImproperClass2AngleAngle, const int&) const; //template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ev_tally(EV_FLOAT &ev, const int i1, const int i2, const int i3, const int i4, KK_FLOAT &eimproper, KK_FLOAT *f1, KK_FLOAT *f3, KK_FLOAT *f4, diff --git a/src/KOKKOS/improper_cvff_kokkos.cpp b/src/KOKKOS/improper_cvff_kokkos.cpp index d5e987b54fc..fcaf387e806 100644 --- a/src/KOKKOS/improper_cvff_kokkos.cpp +++ b/src/KOKKOS/improper_cvff_kokkos.cpp @@ -159,6 +159,7 @@ void ImproperCvffKokkos::compute(int eflag_in, int vflag_in) template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ImproperCvffKokkos::operator()(TagImproperCvffCompute, const int &n, EV_FLOAT& ev) const { @@ -349,6 +350,7 @@ void ImproperCvffKokkos::operator()(TagImproperCvffCompute template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ImproperCvffKokkos::operator()(TagImproperCvffCompute, const int &n) const { EV_FLOAT ev; @@ -425,6 +427,7 @@ void ImproperCvffKokkos::read_restart(FILE *fp) template //template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ImproperCvffKokkos::ev_tally(EV_FLOAT &ev, const int i1, const int i2, const int i3, const int i4, KK_FLOAT &eimproper, KK_FLOAT *f1, KK_FLOAT *f3, KK_FLOAT *f4, diff --git a/src/KOKKOS/improper_cvff_kokkos.h b/src/KOKKOS/improper_cvff_kokkos.h index 10a2b27c31e..9886a59edb8 100644 --- a/src/KOKKOS/improper_cvff_kokkos.h +++ b/src/KOKKOS/improper_cvff_kokkos.h @@ -45,14 +45,17 @@ class ImproperCvffKokkos : public ImproperCvff { void read_restart(FILE *) override; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagImproperCvffCompute, const int&, EV_FLOAT&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagImproperCvffCompute, const int&) const; //template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ev_tally(EV_FLOAT &ev, const int i1, const int i2, const int i3, const int i4, KK_FLOAT &eimproper, KK_FLOAT *f1, KK_FLOAT *f3, KK_FLOAT *f4, diff --git a/src/KOKKOS/improper_harmonic_kokkos.cpp b/src/KOKKOS/improper_harmonic_kokkos.cpp index 14db559b746..3b6d0cda527 100644 --- a/src/KOKKOS/improper_harmonic_kokkos.cpp +++ b/src/KOKKOS/improper_harmonic_kokkos.cpp @@ -158,6 +158,7 @@ void ImproperHarmonicKokkos::compute(int eflag_in, int vflag_in) template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ImproperHarmonicKokkos::operator()(TagImproperHarmonicCompute, const int &n, EV_FLOAT& ev) const { @@ -289,6 +290,7 @@ void ImproperHarmonicKokkos::operator()(TagImproperHarmonicCompute template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ImproperHarmonicKokkos::operator()(TagImproperHarmonicCompute, const int &n) const { EV_FLOAT ev; @@ -359,6 +361,7 @@ void ImproperHarmonicKokkos::read_restart(FILE *fp) template //template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ImproperHarmonicKokkos::ev_tally(EV_FLOAT &ev, const int i1, const int i2, const int i3, const int i4, KK_FLOAT &eimproper, KK_FLOAT *f1, KK_FLOAT *f3, KK_FLOAT *f4, diff --git a/src/KOKKOS/improper_harmonic_kokkos.h b/src/KOKKOS/improper_harmonic_kokkos.h index 05e38d6e886..843f38b3447 100644 --- a/src/KOKKOS/improper_harmonic_kokkos.h +++ b/src/KOKKOS/improper_harmonic_kokkos.h @@ -45,14 +45,17 @@ class ImproperHarmonicKokkos : public ImproperHarmonic { void read_restart(FILE *) override; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagImproperHarmonicCompute, const int&, EV_FLOAT&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagImproperHarmonicCompute, const int&) const; //template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ev_tally(EV_FLOAT &ev, const int i1, const int i2, const int i3, const int i4, KK_FLOAT &eimproper, KK_FLOAT *f1, KK_FLOAT *f3, KK_FLOAT *f4, diff --git a/src/KOKKOS/kissfft_kokkos.h b/src/KOKKOS/kissfft_kokkos.h index 3d1d78e6132..90456bd9b5a 100644 --- a/src/KOKKOS/kissfft_kokkos.h +++ b/src/KOKKOS/kissfft_kokkos.h @@ -154,6 +154,7 @@ class KissFFTKokkos { typedef ArrayTypes AT; typedef FFTArrayTypes FFT_AT; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION static void kf_bfly2(typename FFT_AT::t_FFT_DATA_1d_um &d_Fout, const size_t fstride, const kiss_fft_state_kokkos &st, int m, int Fout_count) @@ -180,6 +181,7 @@ class KissFFTKokkos { } while(--m); } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION static void kf_bfly4(typename FFT_AT::t_FFT_DATA_1d_um &d_Fout, const size_t fstride, const kiss_fft_state_kokkos &st, const size_t m, int Fout_count) @@ -238,6 +240,7 @@ class KissFFTKokkos { } while(--k); } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION static void kf_bfly3(typename FFT_AT::t_FFT_DATA_1d_um &d_Fout, const size_t fstride, const kiss_fft_state_kokkos &st, size_t m, int Fout_count) @@ -290,6 +293,7 @@ class KissFFTKokkos { } while(--k); } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION static void kf_bfly5(typename FFT_AT::t_FFT_DATA_1d_um &d_Fout, const size_t fstride, const kiss_fft_state_kokkos &st, int m, int Fout_count) @@ -370,6 +374,7 @@ class KissFFTKokkos { /* perform the butterfly for one stage of a mixed radix FFT */ +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION static void kf_bfly_generic(typename FFT_AT::t_FFT_DATA_1d_um &d_Fout, const size_t fstride, const kiss_fft_state_kokkos &st, int m, int p, int Fout_count) @@ -409,6 +414,7 @@ class KissFFTKokkos { } } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION static void kf_work(typename FFT_AT::t_FFT_DATA_1d_um &d_Fout, const typename FFT_AT::t_FFT_DATA_1d_um &d_f, const size_t fstride, int in_stride, @@ -525,6 +531,7 @@ class KissFFTKokkos { return st; } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION static void kiss_fft_stride(const kiss_fft_state_kokkos &st, const typename FFT_AT::t_FFT_DATA_1d_um &d_fin, typename FFT_AT::t_FFT_DATA_1d_um &d_fout, int in_stride, int offset) { @@ -539,6 +546,7 @@ class KissFFTKokkos { //} } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION static void kiss_fft_kokkos(const kiss_fft_state_kokkos &cfg, const typename FFT_AT::t_FFT_DATA_1d_um d_fin, typename FFT_AT::t_FFT_DATA_1d_um d_fout, int offset) { diff --git a/src/KOKKOS/kokkos_few.h b/src/KOKKOS/kokkos_few.h index 96cbd1681f0..79a539250a9 100644 --- a/src/KOKKOS/kokkos_few.h +++ b/src/KOKKOS/kokkos_few.h @@ -16,30 +16,39 @@ class Few { new (data() + (i++)) T(*it); } } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION Few(T const a[]) { for (std::size_t i = 0; i < n; ++i) new (data() + i) T(a[i]); } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION Few() { for (std::size_t i = 0; i < n; ++i) new (data() + i) T(); } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION ~Few() { for (std::size_t i = 0; i < n; ++i) (data()[i]).~T(); } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION Few(Few const& rhs) { for (std::size_t i = 0; i < n; ++i) new (data() + i) T(rhs[i]); } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator=(Few const& rhs) { for (std::size_t i = 0; i < n; ++i) data()[i] = rhs[i]; } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION T* data() { return reinterpret_cast(array_); } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION T const* data() const { return reinterpret_cast(array_); } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION T& operator[](std::size_t i) { return data()[i]; } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION T const& operator[](std::size_t i) const { return data()[i]; } diff --git a/src/KOKKOS/kokkos_type.h b/src/KOKKOS/kokkos_type.h index 09569b05bee..239dab92868 100644 --- a/src/KOKKOS/kokkos_type.h +++ b/src/KOKKOS/kokkos_type.h @@ -45,8 +45,11 @@ namespace LAMMPS_NS { union d_ubuf { double d; int64_t i; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION d_ubuf(double arg) : d(arg) {} +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION d_ubuf(int64_t arg) : i(arg) {} +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION d_ubuf(int arg) : i(arg) {} }; } @@ -59,15 +62,18 @@ namespace Kokkos { struct lmp_float3 { float x,y,z; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION lmp_float3():x(0.0f),y(0.0f),z(0.0f) {} +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator += (const lmp_float3& tmp) { x+=tmp.x; y+=tmp.y; z+=tmp.z; } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator = (const lmp_float3& tmp) { x=tmp.x; @@ -78,15 +84,18 @@ namespace Kokkos { struct lmp_double3 { double x,y,z; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION lmp_double3():x(0.0),y(0.0),z(0.0) {} +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator += (const lmp_double3& tmp) { x+=tmp.x; y+=tmp.y; z+=tmp.z; } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator = (const lmp_double3& tmp) { x=tmp.x; @@ -99,27 +108,32 @@ template struct t_scalar3 { Scalar x,y,z; +// NOLINTNEXTLINE KOKKOS_FORCEINLINE_FUNCTION t_scalar3() { x = 0; y = 0; z = 0; } +// NOLINTNEXTLINE KOKKOS_FORCEINLINE_FUNCTION t_scalar3(const t_scalar3& rhs) { x = rhs.x; y = rhs.y; z = rhs.z; } +// NOLINTNEXTLINE KOKKOS_FORCEINLINE_FUNCTION t_scalar3(const Scalar& x_, const Scalar& y_, const Scalar& z_ ) { x = x_; y = y_; z = z_; } +// NOLINTNEXTLINE KOKKOS_FORCEINLINE_FUNCTION t_scalar3 operator= (const t_scalar3& rhs) { x = rhs.x; y = rhs.y; z = rhs.z; return *this; } +// NOLINTNEXTLINE KOKKOS_FORCEINLINE_FUNCTION t_scalar3 operator+= (const t_scalar3& rhs) { x += rhs.x; y += rhs.y; z += rhs.z; @@ -128,6 +142,7 @@ struct t_scalar3 { }; template +// NOLINTNEXTLINE KOKKOS_FORCEINLINE_FUNCTION t_scalar3 operator + (const t_scalar3& a, const t_scalar3& b) { @@ -135,6 +150,7 @@ t_scalar3 operator + } template +// NOLINTNEXTLINE KOKKOS_FORCEINLINE_FUNCTION t_scalar3 operator * (const t_scalar3& a, const Scalar& b) { @@ -142,6 +158,7 @@ t_scalar3 operator * } template +// NOLINTNEXTLINE KOKKOS_FORCEINLINE_FUNCTION t_scalar3 operator * (const Scalar& b, const t_scalar3& a) { @@ -348,6 +365,7 @@ class ScatterViewHelper {}; template class ScatterViewHelper { public: +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION static T1 get(const T1 &dup, const T2 & /*nondup*/) { return dup; @@ -357,6 +375,7 @@ class ScatterViewHelper { template class ScatterViewHelper { public: +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION static T2 get(const T1 & /*dup*/, const T2 &nondup) { return nondup; @@ -390,6 +409,7 @@ struct s_EV_FLOAT { KK_ACC_FLOAT evdwl; KK_ACC_FLOAT ecoul; KK_ACC_FLOAT v[6]; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION s_EV_FLOAT() { evdwl = 0; @@ -398,6 +418,7 @@ struct s_EV_FLOAT { v[i] = 0; } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator+=(const s_EV_FLOAT &rhs) { evdwl += rhs.evdwl; @@ -413,6 +434,7 @@ struct s_EV_FLOAT_REAX { KK_ACC_FLOAT ecoul; KK_ACC_FLOAT v[6]; KK_ACC_FLOAT ereax[9]; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION s_EV_FLOAT_REAX() { evdwl = 0; @@ -423,6 +445,7 @@ struct s_EV_FLOAT_REAX { ereax[i] = 0; } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator+=(const s_EV_FLOAT_REAX &rhs) { evdwl += rhs.evdwl; @@ -440,6 +463,7 @@ struct s_FEV_FLOAT { KK_ACC_FLOAT evdwl; KK_ACC_FLOAT ecoul; KK_ACC_FLOAT v[6]; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION s_FEV_FLOAT() { evdwl = 0; @@ -450,6 +474,7 @@ struct s_FEV_FLOAT { f[i] = 0; } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator+=(const s_FEV_FLOAT &rhs) { evdwl += rhs.evdwl; @@ -465,11 +490,13 @@ typedef struct s_FEV_FLOAT FEV_FLOAT; struct alignas(2*sizeof(double)) s_KK_double2 { double v[2]; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION s_KK_double2() { v[0] = v[1] = 0.0; } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator+=(const s_KK_double2 &rhs) { v[0] += rhs.v[0]; @@ -481,11 +508,13 @@ typedef struct s_KK_double2 KK_double2; struct alignas(2*sizeof(KK_FLOAT)) s_KK_FLOAT2 { KK_FLOAT v[2]; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION s_KK_FLOAT2() { v[0] = v[1] = 0; } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator+=(const s_KK_FLOAT2 &rhs) { v[0] += rhs.v[0]; @@ -519,6 +548,7 @@ struct BinOp3DLAMMPS { } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION int bin(ViewType& keys, const int& i) const { int ix = static_cast ((keys(i, 0) - min_[0]) * mul_[0]); int iy = static_cast ((keys(i, 1) - min_[1]) * mul_[1]); @@ -533,10 +563,12 @@ struct BinOp3DLAMMPS { return ibin; } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION int max_bins() const { return max_bins_[0] * max_bins_[1] * max_bins_[2]; } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION bool operator()(ViewType& keys, iType1& i1, iType2& i2) const { if (keys(i1, 2) > keys(i2, 2)) @@ -590,10 +622,12 @@ struct dual_hash_type { std::enable_if_t || Kokkos::SpaceAccessibility::accessible),host_hash_type&> view() {return h_view;} template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION std::enable_if_t<(std::is_same_v || Kokkos::SpaceAccessibility::accessible),const hash_type&> const_view() const {return d_view;} template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION std::enable_if_t || Kokkos::SpaceAccessibility::accessible),const host_hash_type&> const_view() const {return h_view;} @@ -633,9 +667,11 @@ struct dual_hash_type { template std::enable_if_t::value || Kokkos::SpaceAccessibility::accessible),void> sync() {sync_host();} +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION host_hash_type& view_host() { return h_view; } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION hash_type& view_device() { return d_view; } @@ -1029,6 +1065,7 @@ struct TransformView { // instead template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION constexpr std::enable_if_t, size_t> extent(const iType& r) const { @@ -1036,6 +1073,7 @@ struct TransformView { } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION constexpr std::enable_if_t, int> extent_int(const iType& r) const { @@ -1049,9 +1087,11 @@ struct TransformView { std::enable_if_t || Kokkos::SpaceAccessibility::accessible),typename kk_view::t_host&> view() {return h_viewkk;} template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION std::enable_if_t<(std::is_same_v || Kokkos::SpaceAccessibility::accessible),const typename kk_view::t_dev&> view() const {return d_view;} template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION std::enable_if_t || Kokkos::SpaceAccessibility::accessible),const typename kk_view::t_host&> view() const {return h_viewkk;} template @@ -1096,12 +1136,15 @@ struct TransformView { return k_view.need_sync_host(); } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION const legacy_view& view_host() const { return h_view; } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION const typename kk_view::t_host& view_hostkk() const { return h_viewkk; } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION const typename kk_view::t_dev& view_device() const { return d_view; } @@ -1325,6 +1368,7 @@ template struct MemsetZeroFunctor { typedef DeviceType execution_space ; void* ptr; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(const int i) const { ((int*)ptr)[i] = 0; } @@ -1339,8 +1383,10 @@ void memset_kokkos (ViewType &view) { } struct params_lj_coul { +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION params_lj_coul() {cut_ljsq=0;cut_coulsq=0;lj1=0;lj2=0;lj3=0;lj4=0;offset=0;}; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION params_lj_coul(int /*i*/) {cut_ljsq=0;cut_coulsq=0;lj1=0;lj2=0;lj3=0;lj4=0;offset=0;}; KK_FLOAT cut_ljsq,cut_coulsq,lj1,lj2,lj3,lj4,offset; @@ -1380,67 +1426,84 @@ struct alignas(2*sizeof(real_type_)) SNAComplex using complex = SNAComplex; real_type re,im; +// NOLINTNEXTLINE KOKKOS_FORCEINLINE_FUNCTION SNAComplex() : re(static_cast(0.)), im(static_cast(0.)) { ; } +// NOLINTNEXTLINE KOKKOS_FORCEINLINE_FUNCTION SNAComplex(real_type re) : re(re), im(static_cast(0.)) { ; } +// NOLINTNEXTLINE KOKKOS_FORCEINLINE_FUNCTION SNAComplex(real_type re, real_type im) : re(re), im(im) { ; } +// NOLINTNEXTLINE KOKKOS_FORCEINLINE_FUNCTION SNAComplex(const SNAComplex& other) : re(other.re), im(other.im) { ; } +// NOLINTNEXTLINE KOKKOS_FORCEINLINE_FUNCTION SNAComplex& operator=(const SNAComplex& other) { re = other.re; im = other.im; return *this; } +// NOLINTNEXTLINE KOKKOS_FORCEINLINE_FUNCTION SNAComplex(SNAComplex&& other) : re(other.re), im(other.im) { ; } +// NOLINTNEXTLINE KOKKOS_FORCEINLINE_FUNCTION SNAComplex& operator=(SNAComplex&& other) { re = other.re; im = other.im; return *this; } +// NOLINTNEXTLINE KOKKOS_FORCEINLINE_FUNCTION SNAComplex operator+(SNAComplex const& other) { return SNAComplex(re + other.re, im + other.im); } +// NOLINTNEXTLINE KOKKOS_FORCEINLINE_FUNCTION SNAComplex& operator+=(SNAComplex const& other) { re += other.re; im += other.im; return *this; } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION static constexpr complex zero() { return complex(static_cast(0.), static_cast(0.)); } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION static constexpr complex one() { return complex(static_cast(1.), static_cast(0.)); } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION const complex conj() const { return complex(re, -im); } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION const real_type real_part_product(const complex &cm2) { return re * cm2.re - im * cm2.im; } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION const real_type real_part_product(const real_type &r) const { return re * r; } }; template +// NOLINTNEXTLINE KOKKOS_FORCEINLINE_FUNCTION SNAComplex operator*(const real_type& r, const SNAComplex& self) { return SNAComplex(r*self.re, r*self.im); } template +// NOLINTNEXTLINE KOKKOS_FORCEINLINE_FUNCTION SNAComplex operator*(const SNAComplex& self, const real_type& r) { return SNAComplex(r*self.re, r*self.im); } template +// NOLINTNEXTLINE KOKKOS_FORCEINLINE_FUNCTION SNAComplex operator*(const SNAComplex& self, const SNAComplex& cm2) { return SNAComplex(self.re*cm2.re - self.im*cm2.im, self.re*cm2.im + self.im*cm2.re); } diff --git a/src/KOKKOS/math_special_kokkos.h b/src/KOKKOS/math_special_kokkos.h index 886eed75e67..5ecb23a891e 100644 --- a/src/KOKKOS/math_special_kokkos.h +++ b/src/KOKKOS/math_special_kokkos.h @@ -18,9 +18,9 @@ #include #include "kokkos_type.h" -namespace LAMMPS_NS { -namespace MathSpecialKokkos { + +namespace LAMMPS_NS::MathSpecialKokkos { /*! Fast tabulated factorial function * @@ -71,6 +71,7 @@ namespace MathSpecialKokkos { * \param x argument * \return value of 2^x as double precision number */ +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION static double exp2_x86(double x) { @@ -123,6 +124,7 @@ namespace MathSpecialKokkos { * \param x argument * \return value of e^x as double precision number */ +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION static double fm_exp(double x) { @@ -185,6 +187,7 @@ namespace MathSpecialKokkos { * \param x argument * \return x*x */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION static T square(const T &x) { return x * x; } @@ -193,6 +196,7 @@ namespace MathSpecialKokkos { * \param x argument * \return x*x */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION static T cube(const T &x) { return x * x * x; } @@ -201,6 +205,7 @@ namespace MathSpecialKokkos { * \param n argument (integer) * \return -1 if n is odd, 1.0 if n is even */ +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION static KK_FLOAT powsign(const int n) { return (n & 1) ? static_cast(-1.0) : static_cast(1.0); } @@ -213,6 +218,7 @@ namespace MathSpecialKokkos { * \return value of x^n */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION static T powint(const T &x, const int n) { @@ -236,6 +242,7 @@ namespace MathSpecialKokkos { * \return value of (sin(x)/x)^n */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION static T powsinxx(const T &x, int n) { @@ -256,6 +263,7 @@ namespace MathSpecialKokkos { ------------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION static void sub3(const T *v1, const T *v2, T *ans) { @@ -269,13 +277,14 @@ namespace MathSpecialKokkos { ------------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION static T dot3(const T *v1, const T *v2) { return v1[0] * v2[0] + v1[1] * v2[1] + v1[2] * v2[2]; } -} // namespace MathSpecialKokkos -} // namespace LAMMPS_NS +} // namespace LAMMPS_NS::MathSpecialKokkos + #endif diff --git a/src/KOKKOS/meam_dens_final_kokkos.h b/src/KOKKOS/meam_dens_final_kokkos.h index c39122982af..e2b8109f317 100644 --- a/src/KOKKOS/meam_dens_final_kokkos.h +++ b/src/KOKKOS/meam_dens_final_kokkos.h @@ -50,6 +50,7 @@ MEAMKokkos::meam_dens_final(int nlocal, int eflag_either, int eflag_ /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void MEAMKokkos::operator()(TagMEAMDensFinal, const int &i, EV_FLOAT& ev) const { diff --git a/src/KOKKOS/meam_dens_init_kokkos.h b/src/KOKKOS/meam_dens_init_kokkos.h index f885808bf8e..17bfad5d79a 100644 --- a/src/KOKKOS/meam_dens_init_kokkos.h +++ b/src/KOKKOS/meam_dens_init_kokkos.h @@ -22,6 +22,7 @@ using namespace MathSpecialKokkos; template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void MEAMKokkos::operator()(TagMEAMDensInit, const int &i) const { int offsetval = d_offset[i]; @@ -37,6 +38,7 @@ void MEAMKokkos::operator()(TagMEAMDensInit, const int &i /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void MEAMKokkos::operator()(TagMEAMZero, const int &i) const { d_rho0[i] = 0.0; @@ -284,6 +286,7 @@ MEAMKokkos::meam_dens_init(int inum_half, int ntype, typename AT::t_ template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void MEAMKokkos::getscreen(int i, int offset, typename AT::t_kkfloat_1d_3_lr x, typename AT::t_int_1d d_numneigh_half, @@ -445,6 +448,7 @@ const { template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void MEAMKokkos::calc_rho1(int i, int /*ntype*/, typename AT::t_int_1d type, typename AT::t_int_1d d_map, typename AT::t_kkfloat_1d_3_lr x, typename AT::t_int_1d d_numneigh, @@ -606,6 +610,7 @@ MEAMKokkos::calc_rho1(int i, int /*ntype*/, typename AT::t_int_1d ty //Cutoff function and derivative template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT MEAMKokkos::dfcut(const KK_FLOAT xi, KK_FLOAT& dfc) const { @@ -631,6 +636,7 @@ KK_FLOAT MEAMKokkos::dfcut(const KK_FLOAT xi, KK_FLOAT& dfc) const // Inputs: rij,rij2,rik2,rjk2 template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT MEAMKokkos::dCfunc(const KK_FLOAT rij2, const KK_FLOAT rik2, const KK_FLOAT rjk2) const { @@ -646,6 +652,7 @@ KK_FLOAT MEAMKokkos::dCfunc(const KK_FLOAT rij2, const KK_FLOAT rik2 /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void MEAMKokkos::dCfunc2(const KK_FLOAT rij2, const KK_FLOAT rik2, const KK_FLOAT rjk2, KK_FLOAT& dCikj1, KK_FLOAT& dCikj2) const { @@ -662,6 +669,7 @@ void MEAMKokkos::dCfunc2(const KK_FLOAT rij2, const KK_FLOAT rik2, c /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT MEAMKokkos::fcut(const KK_FLOAT xi) const { diff --git a/src/KOKKOS/meam_force_kokkos.h b/src/KOKKOS/meam_force_kokkos.h index d6b84c35263..785cbab97ce 100644 --- a/src/KOKKOS/meam_force_kokkos.h +++ b/src/KOKKOS/meam_force_kokkos.h @@ -82,6 +82,7 @@ void MEAMKokkos::meam_force( template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void MEAMKokkos::operator()(TagMEAMForce, const int &ii, EV_FLOAT &ev) const { diff --git a/src/KOKKOS/meam_funcs_kokkos.h b/src/KOKKOS/meam_funcs_kokkos.h index a0aa15953bd..2a239b4daca 100644 --- a/src/KOKKOS/meam_funcs_kokkos.h +++ b/src/KOKKOS/meam_funcs_kokkos.h @@ -33,6 +33,7 @@ using namespace MathSpecialKokkos; // -5 => G = +-sqrt(abs(1+gamma)) // template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT MEAMKokkos::G_gam(const KK_FLOAT gamma, const int ibar, int &errorflag) const { @@ -76,6 +77,7 @@ KK_FLOAT MEAMKokkos::G_gam(const KK_FLOAT gamma, const int ibar, int // -5 => G = +-sqrt(abs(1+gamma)) // template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT MEAMKokkos::dG_gam(const KK_FLOAT gamma, const int ibar, KK_FLOAT& dG) const { @@ -126,6 +128,7 @@ KK_FLOAT MEAMKokkos::dG_gam(const KK_FLOAT gamma, const int ibar, KK // Compute ZBL potential // template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT MEAMKokkos::zbl(const KK_FLOAT r, const int z1, const int z2) const { @@ -151,6 +154,7 @@ KK_FLOAT MEAMKokkos::zbl(const KK_FLOAT r, const int z1, const int z // Compute embedding function F(rhobar) and derivative F'(rhobar), eqn I.5 // template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT MEAMKokkos::embedding(const KK_FLOAT A, const KK_FLOAT Ec, const KK_FLOAT rhobar, KK_FLOAT& dF) const { @@ -175,6 +179,7 @@ KK_FLOAT MEAMKokkos::embedding(const KK_FLOAT A, const KK_FLOAT Ec, // Compute Rose energy function, I.16 // template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT MEAMKokkos::erose(const KK_FLOAT r, const KK_FLOAT re, const KK_FLOAT alpha, const KK_FLOAT Ec, const KK_FLOAT repuls, const KK_FLOAT attrac, const int form) const @@ -204,6 +209,7 @@ KK_FLOAT MEAMKokkos::erose(const KK_FLOAT r, const KK_FLOAT re, cons // Shape factors for various configurations // template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void MEAMKokkos::get_shpfcn(const lattice_t latt, const KK_FLOAT sthe, const KK_FLOAT cthe, KK_FLOAT (&s)[3]) const { @@ -257,6 +263,7 @@ void MEAMKokkos::get_shpfcn(const lattice_t latt, const KK_FLOAT sth // Number of neighbors for the reference structure // template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION int MEAMKokkos::get_Zij(const lattice_t latt) const { diff --git a/src/KOKKOS/meam_kokkos.h b/src/KOKKOS/meam_kokkos.h index 60c62007a37..3d948f6e078 100644 --- a/src/KOKKOS/meam_kokkos.h +++ b/src/KOKKOS/meam_kokkos.h @@ -39,16 +39,20 @@ template class MEAMKokkos : public MEAM { MEAMKokkos(Memory *mem); ~MEAMKokkos() override; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagMEAMDensFinal, const int &, EV_FLOAT &) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagMEAMDensInit, const int &) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagMEAMZero, const int &) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagMEAMForce, const int &, EV_FLOAT &) const; private: @@ -91,33 +95,46 @@ template class MEAMKokkos : public MEAM { typename AT::t_int_1d, typename AT::t_neighbors_2d, typename AT::t_neighbors_2d, int, int, EV_FLOAT &); template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void getscreen(int, int, typename AT::t_kkfloat_1d_3_lr, typename AT::t_int_1d, typename AT::t_int_1d, int, typename AT::t_int_1d, typename AT::t_int_1d) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void calc_rho1(int, int, typename AT::t_int_1d, typename AT::t_int_1d, typename AT::t_kkfloat_1d_3_lr, typename AT::t_int_1d, int) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT fcut(const KK_FLOAT xi) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT dfcut(const KK_FLOAT xi, KK_FLOAT &dfc) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT dCfunc(const KK_FLOAT, const KK_FLOAT, const KK_FLOAT) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void dCfunc2(const KK_FLOAT, const KK_FLOAT, const KK_FLOAT, KK_FLOAT &, KK_FLOAT &) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT G_gam(const KK_FLOAT, const int, int &) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT dG_gam(const KK_FLOAT, const int, KK_FLOAT &) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT zbl(const KK_FLOAT, const int, const int) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT embedding(const KK_FLOAT, const KK_FLOAT, const KK_FLOAT, KK_FLOAT &) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT erose(const KK_FLOAT, const KK_FLOAT, const KK_FLOAT, const KK_FLOAT, const KK_FLOAT, const KK_FLOAT, const int) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void get_shpfcn(const lattice_t latt, const KK_FLOAT sthe, const KK_FLOAT cthe, KK_FLOAT (&s)[3]) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION int get_Zij(const lattice_t) const; @@ -230,18 +247,21 @@ template class MEAMKokkos : public MEAM { ndup_arho3mb; }; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION static bool iszero_kk(const KK_FLOAT f) { return fabs(f) < 1e-20; } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION static bool isone_kk(const KK_FLOAT f) { return fabs(f - 1.0) < 1e-20; } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION static KK_FLOAT fdiv_zero_kk(const KK_FLOAT n, const KK_FLOAT d) { diff --git a/src/KOKKOS/min_linesearch_kokkos.h b/src/KOKKOS/min_linesearch_kokkos.h index 2f7aac7bdf5..b821911f73b 100644 --- a/src/KOKKOS/min_linesearch_kokkos.h +++ b/src/KOKKOS/min_linesearch_kokkos.h @@ -21,10 +21,12 @@ namespace LAMMPS_NS { struct s_KK_double2 { KK_FLOAT d0, d1; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION s_KK_double2() { d0 = d1 = 0.0; } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION s_KK_double2& operator+=(const s_KK_double2 &rhs) { d0 += rhs.d0; diff --git a/src/KOKKOS/mliap_descriptor_so3_kokkos.cpp b/src/KOKKOS/mliap_descriptor_so3_kokkos.cpp index a0acde36b65..10712594f1b 100644 --- a/src/KOKKOS/mliap_descriptor_so3_kokkos.cpp +++ b/src/KOKKOS/mliap_descriptor_so3_kokkos.cpp @@ -141,6 +141,7 @@ void MLIAPDescriptorSO3Kokkos::compute_forces(class MLIAPData *data_ ------------------------------------------------------------------------- */ template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void MLIAPDescriptorSO3Kokkos::v_tally(int vflag_either, int vflag_global, int vflag_atom, int i, int j, int ij, double *fij, ViewType rij, Kokkos::View virial, ViewType vatom) diff --git a/src/KOKKOS/mliap_so3_kokkos.cpp b/src/KOKKOS/mliap_so3_kokkos.cpp index 88b659519f2..e0290be03ef 100644 --- a/src/KOKKOS/mliap_so3_kokkos.cpp +++ b/src/KOKKOS/mliap_so3_kokkos.cpp @@ -349,6 +349,7 @@ void MLIAP_SO3Kokkos::compute_W(int nmax, double *arr) /* ---------------------------------------------------------------------- */ template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void MLIAP_SO3Kokkos::compute_pi(int nmax, int lmax, ViewType clisttot_r, ViewType clisttot_i, int /*lcl2*/, float_2d plist_r, int indpl) const @@ -399,6 +400,7 @@ double MLIAP_SO3Kokkos::compute_g(double r, int n, int nmax, double /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION double MLIAP_SO3Kokkos::Cosine(double Rij, double Rc) const { @@ -408,6 +410,7 @@ double MLIAP_SO3Kokkos::Cosine(double Rij, double Rc) const /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION double MLIAP_SO3Kokkos::CosinePrime(double Rij, double Rc) const { @@ -417,6 +420,7 @@ double MLIAP_SO3Kokkos::CosinePrime(double Rij, double Rc) const /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION double MLIAP_SO3Kokkos::compute_sfac(double r, double rcut) const { @@ -428,6 +432,7 @@ double MLIAP_SO3Kokkos::compute_sfac(double r, double rcut) const /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION double MLIAP_SO3Kokkos::compute_dsfac(double r, double rcut) const { @@ -440,6 +445,7 @@ double MLIAP_SO3Kokkos::compute_dsfac(double r, double rcut) const /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION int MLIAP_SO3Kokkos::get_sum(int istart, int iend, int id, int imult) { @@ -455,6 +461,7 @@ int MLIAP_SO3Kokkos::get_sum(int istart, int iend, int id, int imult template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void MLIAP_SO3Kokkos::compute_uarray_recursive(double x, double y, double z, double r, int twol, UlistView ulist_r, UlistView ulist_i, int_1d idxu_block, @@ -567,6 +574,7 @@ void MLIAP_SO3Kokkos::init_garray(int nmax, int lmax, double rcut, d /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void MLIAP_SO3Kokkos::operator() (const MLIAPSO3GetSBESArrayTag&, int ii) const{ int ipair = t_ij(ii); @@ -627,6 +635,7 @@ void MLIAP_SO3Kokkos::operator() (const MLIAPSO3GetSBESArrayTag&, in /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void MLIAP_SO3Kokkos::operator() (const MLIAPSO3GetRipArrayTag&, int ii) const{ int ipair = t_ij(ii); @@ -725,6 +734,7 @@ void MLIAP_SO3Kokkos::spectrum(int nlocal, DAT::tdual_int_1d numneig /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void MLIAP_SO3Kokkos::operator() (const MLIAP_SO3Kokkos::MLIAPSO3SpectrumTag&, int ii) const { int ii_chunk = ii%m_chunk_size; @@ -849,6 +859,7 @@ void MLIAP_SO3Kokkos::spectrum_dxdr(int nlocal, DAT::tdual_int_1d nu /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void MLIAP_SO3Kokkos::operator() (const MLIAP_SO3Kokkos::MLIAPSO3SpectrumDXDRTag&, int ii) const { //TO-DO Need to move m_ulist_r, m_ulist_i into local shared memory diff --git a/src/KOKKOS/nbin_kokkos.cpp b/src/KOKKOS/nbin_kokkos.cpp index 29ed21ca5bc..45b25bf2ce8 100644 --- a/src/KOKKOS/nbin_kokkos.cpp +++ b/src/KOKKOS/nbin_kokkos.cpp @@ -127,6 +127,7 @@ void NBinKokkos::bin_atoms() /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void NBinKokkos::binatomsItem(const int &i) const { diff --git a/src/KOKKOS/nbin_kokkos.h b/src/KOKKOS/nbin_kokkos.h index b759de1f68a..e99ba90bf77 100644 --- a/src/KOKKOS/nbin_kokkos.h +++ b/src/KOKKOS/nbin_kokkos.h @@ -56,9 +56,11 @@ class NBinKokkos : public NBinStandard { HAT::t_int_scalar h_resize; typename AT::t_kkfloat_1d_3_lr_randomread x; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void binatomsItem(const int &i) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION int coord2bin(const double & x,const double & y,const double & z) const { @@ -91,6 +93,7 @@ class NBinKokkos : public NBinStandard { return (iz-mbinzlo)*mbiny*mbinx + (iy-mbinylo)*mbinx + (ix-mbinxlo); } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION int coord2bin(const double & x,const double & y,const double & z, int* i) const { @@ -140,6 +143,7 @@ struct NPairKokkosBinAtomsFunctor { NPairKokkosBinAtomsFunctor(const NBinKokkos &_c): c(_c) {}; ~NPairKokkosBinAtomsFunctor() {} +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (const int & i) const { c.binatomsItem(i); diff --git a/src/KOKKOS/nbin_ssa_kokkos.cpp b/src/KOKKOS/nbin_ssa_kokkos.cpp index 13f5aaceefa..596cd55077d 100644 --- a/src/KOKKOS/nbin_ssa_kokkos.cpp +++ b/src/KOKKOS/nbin_ssa_kokkos.cpp @@ -210,6 +210,7 @@ void NBinSSAKokkos::bin_atoms() /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void NBinSSAKokkos::binAtomsItem(const int &i) const { @@ -219,6 +220,7 @@ void NBinSSAKokkos::binAtomsItem(const int &i) const } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void NBinSSAKokkos::binIDAtomsItem(const int &i, int &update) const { @@ -239,6 +241,7 @@ void NBinSSAKokkos::binIDAtomsItem(const int &i, int &update) const } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void NBinSSAKokkos::binIDGhostsItem(const int &i, int &update) const { @@ -252,6 +255,7 @@ void NBinSSAKokkos::binIDGhostsItem(const int &i, int &update) const // An implementation of heapsort without recursion template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void NBinSSAKokkos::sortBin( typename AT::t_int_1d gbincount, diff --git a/src/KOKKOS/nbin_ssa_kokkos.h b/src/KOKKOS/nbin_ssa_kokkos.h index d9f26dbee31..fed42c52be7 100644 --- a/src/KOKKOS/nbin_ssa_kokkos.h +++ b/src/KOKKOS/nbin_ssa_kokkos.h @@ -80,15 +80,19 @@ class NBinSSAKokkos : public NBinStandard { HAT::t_int_scalar h_lbinzhi; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void binAtomsItem(const int &i) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void binIDAtomsItem(const int &i, int &update) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void binIDGhostsItem(const int &i, int &update) const; +// NOLINTNEXTLINE static KOKKOS_INLINE_FUNCTION void sortBin( typename AT::t_int_1d gbincount, @@ -98,6 +102,7 @@ class NBinSSAKokkos : public NBinStandard { /* ---------------------------------------------------------------------- convert atom coords into the ssa active interaction region number ------------------------------------------------------------------------- */ +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION int coord2ssaAIR(const double & x,const double & y,const double & z) const { @@ -127,6 +132,7 @@ class NBinSSAKokkos : public NBinStandard { return -2; } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION int coord2bin(const double & x,const double & y,const double & z, int* i) const { @@ -177,6 +183,7 @@ struct NPairSSAKokkosBinAtomsFunctor { NPairSSAKokkosBinAtomsFunctor(const NBinSSAKokkos &_c): c(_c) {}; ~NPairSSAKokkosBinAtomsFunctor() {} +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (const int & i) const { c.binAtomsItem(i); @@ -193,17 +200,20 @@ struct NPairSSAKokkosBinIDAtomsFunctor { NPairSSAKokkosBinIDAtomsFunctor(const NBinSSAKokkos &_c): c(_c) {}; ~NPairSSAKokkosBinIDAtomsFunctor() {} +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (const int & i, value_type& update) const { c.binIDAtomsItem(i, update); } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void join (value_type& dst, const value_type& src) const { if (dst < src) dst = src; } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void init (value_type& dst) const { dst = INT_MIN; @@ -220,17 +230,20 @@ struct NPairSSAKokkosBinIDGhostsFunctor { NPairSSAKokkosBinIDGhostsFunctor(const NBinSSAKokkos &_c): c(_c) {}; ~NPairSSAKokkosBinIDGhostsFunctor() {} +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (const int & i, value_type& update) const { c.binIDGhostsItem(i, update); } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void join (value_type& dst, const value_type& src) const { if (dst < src) dst = src; } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void init (value_type& dst) const { dst = INT_MIN; diff --git a/src/KOKKOS/neigh_bond_kokkos.cpp b/src/KOKKOS/neigh_bond_kokkos.cpp index 290ee3d9add..4037b2c888b 100644 --- a/src/KOKKOS/neigh_bond_kokkos.cpp +++ b/src/KOKKOS/neigh_bond_kokkos.cpp @@ -285,6 +285,7 @@ void NeighBondKokkos::bond_all() } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void NeighBondKokkos::operator()(TagNeighBondBondAll, const int &i, int &nmissing) const { for (int m = 0; m < num_bond[i]; m++) { @@ -364,6 +365,7 @@ void NeighBondKokkos::bond_partial() } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void NeighBondKokkos::operator()(TagNeighBondBondPartial, const int &i, int &nmissing) const { for (int m = 0; m < num_bond[i]; m++) { @@ -405,6 +407,7 @@ void NeighBondKokkos::bond_check() } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void NeighBondKokkos::operator()(TagNeighBondBondCheck, const int &m, int &flag) const { const int i = v_bondlist(m,0); @@ -469,6 +472,7 @@ void NeighBondKokkos::angle_all() } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void NeighBondKokkos::operator()(TagNeighBondAngleAll, const int &i, int &nmissing) const { for (int m = 0; m < num_angle[i]; m++) { @@ -555,6 +559,7 @@ void NeighBondKokkos::angle_partial() } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void NeighBondKokkos::operator()(TagNeighBondAnglePartial, const int &i, int &nmissing) const { for (int m = 0; m < num_angle[i]; m++) { @@ -604,6 +609,7 @@ void NeighBondKokkos::angle_check() } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void NeighBondKokkos::operator()(TagNeighBondAngleCheck, const int &m, int &flag) const { const int i = v_anglelist(m,0); @@ -680,6 +686,7 @@ void NeighBondKokkos::dihedral_all() } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void NeighBondKokkos::operator()(TagNeighBondDihedralAll, const int &i, int &nmissing) const { for (int m = 0; m < num_dihedral[i]; m++) { @@ -771,6 +778,7 @@ void NeighBondKokkos::dihedral_partial() } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void NeighBondKokkos::operator()(TagNeighBondDihedralPartial, const int &i, int &nmissing) const { for (int m = 0; m < num_dihedral[i]; m++) { @@ -826,6 +834,7 @@ void NeighBondKokkos::dihedral_check(int nlist, typename AT::t_int_2 } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void NeighBondKokkos::operator()(TagNeighBondDihedralCheck, const int &m, int &flag) const { const int i = list(m,0); @@ -918,6 +927,7 @@ void NeighBondKokkos::improper_all() } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void NeighBondKokkos::operator()(TagNeighBondImproperAll, const int &i, int &nmissing) const { for (int m = 0; m < num_improper[i]; m++) { @@ -1009,6 +1019,7 @@ void NeighBondKokkos::improper_partial() } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void NeighBondKokkos::operator()(TagNeighBondImproperPartial, const int &i, int &nmissing) const { for (int m = 0; m < num_improper[i]; m++) { @@ -1044,6 +1055,7 @@ void NeighBondKokkos::operator()(TagNeighBondImproperPartial, const /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION int NeighBondKokkos::closest_image(const int i, int j) const { @@ -1081,6 +1093,7 @@ int NeighBondKokkos::closest_image(const int i, int j) const ------------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void NeighBondKokkos::minimum_image(double &dx, double &dy, double &dz) const { diff --git a/src/KOKKOS/neigh_bond_kokkos.h b/src/KOKKOS/neigh_bond_kokkos.h index 7bd19a26e46..38208b99f64 100644 --- a/src/KOKKOS/neigh_bond_kokkos.h +++ b/src/KOKKOS/neigh_bond_kokkos.h @@ -45,26 +45,37 @@ class NeighBondKokkos : protected Pointers { void init_topology_kk(); void build_topology_kk(); +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagNeighBondBondAll, const int&, int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagNeighBondBondPartial, const int&, int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagNeighBondBondCheck, const int&, int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagNeighBondAngleAll, const int&, int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagNeighBondAnglePartial, const int&, int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagNeighBondAngleCheck, const int&, int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagNeighBondDihedralAll, const int&, int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagNeighBondDihedralPartial, const int&, int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagNeighBondDihedralCheck, const int&, int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagNeighBondImproperAll, const int&, int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagNeighBondImproperPartial, const int&, int&) const; @@ -121,9 +132,11 @@ class NeighBondKokkos : protected Pointers { typename AT::t_int_scalar d_fail_flag; HAT::t_int_scalar h_fail_flag; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION int closest_image(const int, int) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void minimum_image(double &dx, double &dy, double &dz) const; diff --git a/src/KOKKOS/neigh_list_kokkos.h b/src/KOKKOS/neigh_list_kokkos.h index b34adcad9a1..571b2f0cc64 100644 --- a/src/KOKKOS/neigh_list_kokkos.h +++ b/src/KOKKOS/neigh_list_kokkos.h @@ -27,10 +27,12 @@ class AtomNeighbors public: const int num_neighs; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION AtomNeighbors(int* const & firstneigh, const int & _num_neighs, const int & stride): num_neighs(_num_neighs), _firstneigh(firstneigh), _stride(stride) {}; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION int& operator()(const int &i) const { return _firstneigh[(bigint) i*_stride]; @@ -47,10 +49,12 @@ class AtomNeighborsConst const int* const _firstneigh; const int num_neighs; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION AtomNeighborsConst(const int* const & firstneigh, const int & _num_neighs, const int & stride): _firstneigh(firstneigh), num_neighs(_num_neighs), _stride(stride) {}; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION const int& operator()(const int &i) const { return _firstneigh[(bigint) i*_stride]; @@ -78,18 +82,21 @@ class NeighListKokkos: public NeighList { NeighListKokkos(class LAMMPS *lmp); +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION AtomNeighbors get_neighbors(const int &i) const { return AtomNeighbors(&d_neighbors(i,0),d_numneigh(i), &d_neighbors(i,1)-&d_neighbors(i,0)); } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION AtomNeighbors get_neighbors_transpose(const int &i) const { return AtomNeighbors(&d_neighbors_transpose(i,0),d_numneigh(i), &d_neighbors_transpose(i,1)-&d_neighbors_transpose(i,0)); } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION static AtomNeighborsConst static_neighbors_const(int i, typename AT::t_neighbors_2d_const const& d_neighbors, @@ -98,12 +105,14 @@ class NeighListKokkos: public NeighList { &d_neighbors(i,1)-&d_neighbors(i,0)); } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION AtomNeighborsConst get_neighbors_const(const int &i) const { return AtomNeighborsConst(&d_neighbors(i,0),d_numneigh(i), &d_neighbors(i,1)-&d_neighbors(i,0)); } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION int& num_neighs(const int & i) const { return d_numneigh(i); diff --git a/src/KOKKOS/neighbor_kokkos.cpp b/src/KOKKOS/neighbor_kokkos.cpp index d3c52639107..41c5386bb8c 100644 --- a/src/KOKKOS/neighbor_kokkos.cpp +++ b/src/KOKKOS/neighbor_kokkos.cpp @@ -205,6 +205,7 @@ int NeighborKokkos::check_distance_kokkos() } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void NeighborKokkos::operator()(TagNeighborCheckDistance, const int &i, int &flag) const { const double delx = x.view()(i,0) - xhold.view()(i,0); @@ -313,6 +314,7 @@ void NeighborKokkos::build_kokkos(int topoflag) } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void NeighborKokkos::operator()(TagNeighborXhold, const int &i) const { xhold.view()(i,0) = x.view()(i,0); diff --git a/src/KOKKOS/neighbor_kokkos.h b/src/KOKKOS/neighbor_kokkos.h index 237e9ab38a8..a4e431915ad 100644 --- a/src/KOKKOS/neighbor_kokkos.h +++ b/src/KOKKOS/neighbor_kokkos.h @@ -39,10 +39,12 @@ class NeighborKokkos : public Neighbor { void build_topology() override; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagNeighborCheckDistance, const int&, int&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagNeighborXhold, const int&) const; diff --git a/src/KOKKOS/npair_halffull_kokkos.cpp b/src/KOKKOS/npair_halffull_kokkos.cpp index 0afe30508d9..d25c21cd095 100644 --- a/src/KOKKOS/npair_halffull_kokkos.cpp +++ b/src/KOKKOS/npair_halffull_kokkos.cpp @@ -83,6 +83,7 @@ void NPairHalffullKokkos::build(NeighList *list) } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void NPairHalffullKokkos::operator()(TagNPairHalffullCompute, const int &ii) const { int n = 0; diff --git a/src/KOKKOS/npair_halffull_kokkos.h b/src/KOKKOS/npair_halffull_kokkos.h index ca5d0e71e62..517b96a60cf 100644 --- a/src/KOKKOS/npair_halffull_kokkos.h +++ b/src/KOKKOS/npair_halffull_kokkos.h @@ -357,6 +357,7 @@ class NPairHalffullKokkos : public NPair { NPairHalffullKokkos(class LAMMPS *); void build(class NeighList *) override; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagNPairHalffullCompute, const int&) const; diff --git a/src/KOKKOS/npair_kokkos.cpp b/src/KOKKOS/npair_kokkos.cpp index dd7d18a9652..07fb8d1d779 100644 --- a/src/KOKKOS/npair_kokkos.cpp +++ b/src/KOKKOS/npair_kokkos.cpp @@ -349,6 +349,7 @@ void NPairKokkos::build(NeighList *list_) /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION int NeighborKokkosExecute::find_special(const int &i, const int &j) const { @@ -379,6 +380,7 @@ int NeighborKokkosExecute::find_special(const int &i, const int &j) /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION int NeighborKokkosExecute::exclusion(const int &i,const int &j, const int &itype,const int &jtype) const diff --git a/src/KOKKOS/npair_kokkos.h b/src/KOKKOS/npair_kokkos.h index e375d3325d3..943ae4c69d5 100644 --- a/src/KOKKOS/npair_kokkos.h +++ b/src/KOKKOS/npair_kokkos.h @@ -366,6 +366,7 @@ class NeighborKokkosExecute size_t sharedsize) const; #endif +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION int coord2bin(const double & x,const double & y,const double & z, int* i) const { @@ -402,12 +403,15 @@ class NeighborKokkosExecute return (iz-mbinzlo)*mbiny*mbinx + (iy-mbinylo)*mbinx + (ix-mbinxlo); } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION int exclusion(const int &i,const int &j, const int &itype,const int &jtype) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION int find_special(const int &i, const int &j) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION int minimum_image_check(double dx, double dy, double dz) const { if (xperiodic && fabs(dx) > xprd_half) return 1; @@ -429,6 +433,7 @@ struct NPairKokkosBuildFunctor { size_t _sharedsize):c(_c), sharedsize(_sharedsize) {} +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (const int & i) const { c.template build_Item(i); @@ -453,6 +458,7 @@ struct NPairKokkosBuildFunctor { size_t _sharedsize):c(_c), sharedsize(_sharedsize) {} +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (const int & i) const { c.template build_Item(i); @@ -472,6 +478,7 @@ struct NPairKokkosBuildFunctorGhost { size_t _sharedsize):c(_c), sharedsize(_sharedsize) {} +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (const int & i) const { c.template build_ItemGhost(i); @@ -497,6 +504,7 @@ struct NPairKokkosBuildFunctorGhost { size_t _sharedsize):c(_c), sharedsize(_sharedsize) {} +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (const int & i) const { c.template build_ItemGhost(i); @@ -515,6 +523,7 @@ struct NPairKokkosBuildFunctorSize { NPairKokkosBuildFunctorSize(const NeighborKokkosExecute &_c, size_t _sharedsize): c(_c), sharedsize(_sharedsize) {} +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (const int & i) const { c.template build_ItemSize(i); @@ -539,6 +548,7 @@ struct NPairKokkosBuildFunctorSize { NPairKokkosBuildFunctorSize(const NeighborKokkosExecute &_c, size_t _sharedsize): c(_c), sharedsize(_sharedsize) {} +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (const int & i) const { c.template build_ItemSize(i); diff --git a/src/KOKKOS/npair_skip_kokkos.cpp b/src/KOKKOS/npair_skip_kokkos.cpp index 8c50f64cac5..6e97a12d8d0 100644 --- a/src/KOKKOS/npair_skip_kokkos.cpp +++ b/src/KOKKOS/npair_skip_kokkos.cpp @@ -105,6 +105,7 @@ void NPairSkipKokkos::build(NeighList *list) } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void NPairSkipKokkos::operator()(TagNPairSkipCompute, const int &ii, int &inum, const bool &final) const { @@ -160,6 +161,7 @@ void NPairSkipKokkos::operator()(TagNPairSkipCompute, const int } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void NPairSkipKokkos::operator()(TagNPairSkipCountLocal, const int &i, int &num) const { if (d_ilist[i] < nlocal) num++; diff --git a/src/KOKKOS/npair_skip_kokkos.h b/src/KOKKOS/npair_skip_kokkos.h index b2a44131b26..360e8440435 100644 --- a/src/KOKKOS/npair_skip_kokkos.h +++ b/src/KOKKOS/npair_skip_kokkos.h @@ -94,9 +94,11 @@ class NPairSkipKokkos : public NPair { NPairSkipKokkos(class LAMMPS *); void build(class NeighList *) override; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagNPairSkipCompute, const int&, int&, const bool&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagNPairSkipCountLocal, const int&, int&) const; diff --git a/src/KOKKOS/npair_ssa_kokkos.cpp b/src/KOKKOS/npair_ssa_kokkos.cpp index db017004b0f..ab2427b4503 100644 --- a/src/KOKKOS/npair_ssa_kokkos.cpp +++ b/src/KOKKOS/npair_ssa_kokkos.cpp @@ -170,6 +170,7 @@ void NPairSSAKokkos::copy_stencil_info() /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION int NPairSSAKokkosExecute::find_special(const int &i, const int &j) const { @@ -200,6 +201,7 @@ int NPairSSAKokkosExecute::find_special(const int &i, const int &j) /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION int NPairSSAKokkosExecute::exclusion(const int &i,const int &j, const int &itype,const int &jtype) const @@ -520,6 +522,7 @@ fprintf(stdout, "Fina%03d %6d inum %6d gnum, total used %6d, allocated %6d\n" template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void NPairSSAKokkosExecute::build_locals_onePhase(const bool firstTry, int workPhase) const { @@ -657,6 +660,7 @@ fprintf(stdout, "Phas%03d phase %3d used %6d inums, workItems = %3d, skipped = % template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void NPairSSAKokkosExecute::build_ghosts_onePhase(int workPhase) const { diff --git a/src/KOKKOS/npair_ssa_kokkos.h b/src/KOKKOS/npair_ssa_kokkos.h index c02d782eb69..dafe3f85828 100644 --- a/src/KOKKOS/npair_ssa_kokkos.h +++ b/src/KOKKOS/npair_ssa_kokkos.h @@ -292,6 +292,7 @@ class NPairSSAKokkosExecute KOKKOS_FUNCTION void build_ghosts_onePhase(int workPhase) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION int coord2bin(const double & x,const double & y,const double & z, int* i) const { @@ -328,12 +329,15 @@ class NPairSSAKokkosExecute return (iz-mbinzlo)*mbiny*mbinx + (iy-mbinylo)*mbinx + (ix-mbinxlo); } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION int exclusion(const int &i,const int &j, const int &itype,const int &jtype) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION int find_special(const int &i, const int &j) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION int minimum_image_check(double dx, double dy, double dz) const { if (xperiodic && fabs(dx) > xprd_half) return 1; diff --git a/src/KOKKOS/npair_trim_kokkos.cpp b/src/KOKKOS/npair_trim_kokkos.cpp index 2bf4f65c335..3df6cf4038c 100644 --- a/src/KOKKOS/npair_trim_kokkos.cpp +++ b/src/KOKKOS/npair_trim_kokkos.cpp @@ -85,6 +85,7 @@ void NPairTrimKokkos::trim_to_kokkos(NeighList *list) } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void NPairTrimKokkos::operator()(TagNPairTrim, const int &ii) const { int n = 0; diff --git a/src/KOKKOS/npair_trim_kokkos.h b/src/KOKKOS/npair_trim_kokkos.h index 5ae25b7effb..5b7b9937ce6 100644 --- a/src/KOKKOS/npair_trim_kokkos.h +++ b/src/KOKKOS/npair_trim_kokkos.h @@ -43,6 +43,7 @@ class NPairTrimKokkos : public NPair { NPairTrimKokkos(class LAMMPS *); void build(class NeighList *) override; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagNPairTrim, const int&) const; diff --git a/src/KOKKOS/pack_kokkos.h b/src/KOKKOS/pack_kokkos.h index 95db4ac1d0a..6495945e87a 100644 --- a/src/KOKKOS/pack_kokkos.h +++ b/src/KOKKOS/pack_kokkos.h @@ -67,6 +67,7 @@ struct pack_3d_functor { nstride_plane = plan->nstride_plane; } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (const int &index) const { const int fast = index / (nslow * nmid); @@ -121,6 +122,7 @@ struct unpack_3d_functor { nstride_plane = plan->nstride_plane; } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (const int &index) const { const int fast = index / (nslow * nmid); @@ -176,6 +178,7 @@ struct unpack_3d_permute1_1_functor { nstride_plane = plan->nstride_plane; } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (const int &index) const { const int fast = index / (nslow * nmid); @@ -229,6 +232,7 @@ struct unpack_3d_permute1_2_functor { nstride_plane = plan->nstride_plane; } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (const int &index) const { const int fast = index / (nslow * nmid); @@ -286,6 +290,7 @@ struct unpack_3d_permute1_n_functor { nqty = plan->nqty ; } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (const int &index) const { const int fast = index / (nslow * nmid); @@ -340,6 +345,7 @@ struct unpack_3d_permute2_1_functor { nstride_plane = plan->nstride_plane; } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (const int &index) const { const int fast = index / (nslow * nmid); @@ -393,6 +399,7 @@ struct unpack_3d_permute2_2_functor { nstride_plane = plan->nstride_plane; } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (const int &index) const { const int fast = index / (nslow * nmid); @@ -448,6 +455,7 @@ struct unpack_3d_permute2_n_functor { nqty = plan->nqty ; } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (const int &index) const { const int fast = index / (nslow * nmid); diff --git a/src/KOKKOS/pair_adp_kokkos.cpp b/src/KOKKOS/pair_adp_kokkos.cpp index 77dd2892654..1d924f1e725 100644 --- a/src/KOKKOS/pair_adp_kokkos.cpp +++ b/src/KOKKOS/pair_adp_kokkos.cpp @@ -483,6 +483,7 @@ int PairADPKokkos::pack_forward_comm_kokkos(int n, DAT::tdual_int_1d } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairADPKokkos::operator()(TagPairADPPackForwardComm, const int &i) const { int j = d_sendlist(i); @@ -509,6 +510,7 @@ void PairADPKokkos::unpack_forward_comm_kokkos(int n, int first_in, } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairADPKokkos::operator()(TagPairADPUnpackForwardComm, const int &i) const { d_fp(i + first) = v_buf[10 * i]; @@ -644,6 +646,7 @@ void PairADPKokkos::unpack_reverse_comm(int n, int *list, double *bu /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairADPKokkos::operator()(TagPairADPInitialize, const int &i) const { d_rho[i] = 0.0; @@ -663,6 +666,7 @@ void PairADPKokkos::operator()(TagPairADPInitialize, const int &i) c ////Specialisation for Neighborlist types Half, HalfThread, Full template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairADPKokkos::operator()(TagPairADPKernelA, const int &ii) const { @@ -771,6 +775,7 @@ void PairADPKokkos::operator()(TagPairADPKernelA template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairADPKokkos::operator()(TagPairADPKernelB, const int &ii, EV_FLOAT& ev) const { // fp = derivative of embedding energy at each atom @@ -803,6 +808,7 @@ void PairADPKokkos::operator()(TagPairADPKernelB, const int & template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairADPKokkos::operator()(TagPairADPKernelB, const int &ii) const { EV_FLOAT ev; @@ -814,6 +820,7 @@ void PairADPKokkos::operator()(TagPairADPKernelB, const int & ////Specialisation for Neighborlist types Half, HalfThread, Full template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairADPKokkos::operator()(TagPairADPKernelAB, const int &ii, EV_FLOAT& ev) const { @@ -914,6 +921,7 @@ void PairADPKokkos::operator()(TagPairADPKernelAB, const int template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairADPKokkos::operator()(TagPairADPKernelAB, const int &ii) const { EV_FLOAT ev; @@ -925,6 +933,7 @@ void PairADPKokkos::operator()(TagPairADPKernelAB, const int ////Specialisation for Neighborlist types Half, HalfThread, Full template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairADPKokkos::operator()(TagPairADPKernelC, const int &ii, EV_FLOAT& ev) const { @@ -1068,6 +1077,7 @@ void PairADPKokkos::operator()(TagPairADPKernelC template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairADPKokkos::operator()(TagPairADPKernelC, const int &ii) const { EV_FLOAT ev; @@ -1078,6 +1088,7 @@ void PairADPKokkos::operator()(TagPairADPKernelC template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairADPKokkos::ev_tally_xyz(EV_FLOAT &ev, const int &i, const int &j, const KK_FLOAT &epair, const KK_FLOAT &fx, const KK_FLOAT &fy, const KK_FLOAT &fz, const KK_FLOAT &delx, diff --git a/src/KOKKOS/pair_adp_kokkos.h b/src/KOKKOS/pair_adp_kokkos.h index 118ef701978..adac4452680 100644 --- a/src/KOKKOS/pair_adp_kokkos.h +++ b/src/KOKKOS/pair_adp_kokkos.h @@ -65,44 +65,55 @@ class PairADPKokkos : public PairADP, public KokkosBase void compute(int, int) override; void init_style() override; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairADPPackForwardComm, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairADPUnpackForwardComm, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairADPInitialize, const int&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairADPKernelA, const int&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairADPKernelB, const int&, EV_FLOAT&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairADPKernelB, const int&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairADPKernelAB, const int&, EV_FLOAT&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairADPKernelAB, const int&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairADPKernelC, const int&, EV_FLOAT&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairADPKernelC, const int&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ev_tally_xyz(EV_FLOAT &ev, const int &i, const int &j, const KK_FLOAT &epair, const KK_FLOAT &fx, const KK_FLOAT &fy, const KK_FLOAT &fz, const KK_FLOAT &delx, diff --git a/src/KOKKOS/pair_brownian_kokkos.cpp b/src/KOKKOS/pair_brownian_kokkos.cpp index 9702082d0e2..e01336994f6 100644 --- a/src/KOKKOS/pair_brownian_kokkos.cpp +++ b/src/KOKKOS/pair_brownian_kokkos.cpp @@ -267,6 +267,7 @@ void PairBrownianKokkos::compute(int eflag_in, int vflag_in) template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairBrownianKokkos::operator()(TagPairBrownianCompute, const int ii, EV_FLOAT &ev) const { @@ -481,6 +482,7 @@ void PairBrownianKokkos::operator()(TagPairBrownianCompute template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairBrownianKokkos::operator()(TagPairBrownianCompute, const int ii) const { EV_FLOAT ev; @@ -492,6 +494,7 @@ void PairBrownianKokkos::operator()(TagPairBrownianCompute template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairBrownianKokkos::ev_tally_xyz(EV_FLOAT & ev, int i, int j, KK_FLOAT fx, KK_FLOAT fy, KK_FLOAT fz, diff --git a/src/KOKKOS/pair_brownian_kokkos.h b/src/KOKKOS/pair_brownian_kokkos.h index f66c8877afd..3b70ed22a28 100644 --- a/src/KOKKOS/pair_brownian_kokkos.h +++ b/src/KOKKOS/pair_brownian_kokkos.h @@ -51,13 +51,16 @@ class PairBrownianKokkos : public PairBrownian, public KokkosBase { double init_one(int, int) override; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairBrownianCompute, const int, EV_FLOAT &ev) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairBrownianCompute, const int) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ev_tally_xyz(EV_FLOAT &ev, int i, int j, KK_FLOAT fx, KK_FLOAT fy, KK_FLOAT fz, @@ -94,6 +97,7 @@ class PairBrownianKokkos : public PairBrownian, public KokkosBase { void allocate() override; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void set_3_orthogonal_vectors(const KK_FLOAT p1[3], KK_FLOAT * const p2, KK_FLOAT * const p3) const { KK_FLOAT norm; diff --git a/src/KOKKOS/pair_buck_coul_cut_kokkos.cpp b/src/KOKKOS/pair_buck_coul_cut_kokkos.cpp index 1872b0d5705..4153b420fee 100644 --- a/src/KOKKOS/pair_buck_coul_cut_kokkos.cpp +++ b/src/KOKKOS/pair_buck_coul_cut_kokkos.cpp @@ -156,6 +156,7 @@ void PairBuckCoulCutKokkos::compute(int eflag_in, int vflag_in) ---------------------------------------------------------------------- */ template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairBuckCoulCutKokkos:: compute_fpair(const KK_FLOAT& rsq, const int& /*i*/, const int& /*j*/, @@ -177,6 +178,7 @@ compute_fpair(const KK_FLOAT& rsq, const int& /*i*/, const int& /*j*/, ---------------------------------------------------------------------- */ template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairBuckCoulCutKokkos:: compute_evdwl(const KK_FLOAT& rsq, const int& /*i*/, const int& /*j*/, @@ -196,6 +198,7 @@ compute_evdwl(const KK_FLOAT& rsq, const int& /*i*/, const int& /*j*/, ---------------------------------------------------------------------- */ template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairBuckCoulCutKokkos:: compute_fcoul(const KK_FLOAT& rsq, const int& /*i*/, const int&j, @@ -214,6 +217,7 @@ compute_fcoul(const KK_FLOAT& rsq, const int& /*i*/, const int&j, ---------------------------------------------------------------------- */ template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairBuckCoulCutKokkos:: compute_ecoul(const KK_FLOAT& rsq, const int& /*i*/, const int& j, diff --git a/src/KOKKOS/pair_buck_coul_cut_kokkos.h b/src/KOKKOS/pair_buck_coul_cut_kokkos.h index b488e661dd3..e13e0bb3266 100644 --- a/src/KOKKOS/pair_buck_coul_cut_kokkos.h +++ b/src/KOKKOS/pair_buck_coul_cut_kokkos.h @@ -45,8 +45,10 @@ class PairBuckCoulCutKokkos : public PairBuckCoulCut { double init_one(int, int) override; struct params_buck_coul { +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION params_buck_coul() {cut_ljsq=0;cut_coulsq=0;a=0;c=0;rhoinv=0;buck1=0;buck2=0;offset=0;}; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION params_buck_coul(int /*i*/) {cut_ljsq=0;cut_coulsq=0;a=0;c=0;rhoinv=0;buck1=0;buck2=0;offset=0;}; KK_FLOAT cut_ljsq,cut_coulsq,a,c,rhoinv,buck1,buck2,offset; @@ -54,21 +56,25 @@ class PairBuckCoulCutKokkos : public PairBuckCoulCut { protected: template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_fpair(const KK_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_evdwl(const KK_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_fcoul(const KK_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype, const KK_FLOAT& factor_coul, const KK_FLOAT& qtmp) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_ecoul(const KK_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype, const KK_FLOAT& factor_coul, const KK_FLOAT& qtmp) const; diff --git a/src/KOKKOS/pair_buck_coul_long_kokkos.cpp b/src/KOKKOS/pair_buck_coul_long_kokkos.cpp index c00af066a0f..35c797827e8 100644 --- a/src/KOKKOS/pair_buck_coul_long_kokkos.cpp +++ b/src/KOKKOS/pair_buck_coul_long_kokkos.cpp @@ -152,6 +152,7 @@ void PairBuckCoulLongKokkos::compute(int eflag_in, int vflag_in) ---------------------------------------------------------------------- */ template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairBuckCoulLongKokkos:: compute_fpair(const KK_FLOAT& rsq, const int& /*i*/, const int& /*j*/, @@ -173,6 +174,7 @@ compute_fpair(const KK_FLOAT& rsq, const int& /*i*/, const int& /*j*/, ---------------------------------------------------------------------- */ template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairBuckCoulLongKokkos:: compute_evdwl(const KK_FLOAT& rsq, const int& /*i*/, const int& /*j*/, @@ -193,6 +195,7 @@ compute_evdwl(const KK_FLOAT& rsq, const int& /*i*/, const int& /*j*/, template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairBuckCoulLongKokkos:: compute_fcoul(const KK_FLOAT& rsq, const int& /*i*/, const int&j, @@ -232,6 +235,7 @@ compute_fcoul(const KK_FLOAT& rsq, const int& /*i*/, const int&j, template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairBuckCoulLongKokkos:: compute_ecoul(const KK_FLOAT& rsq, const int& /*i*/, const int&j, diff --git a/src/KOKKOS/pair_buck_coul_long_kokkos.h b/src/KOKKOS/pair_buck_coul_long_kokkos.h index 497c8891e84..0762563740e 100644 --- a/src/KOKKOS/pair_buck_coul_long_kokkos.h +++ b/src/KOKKOS/pair_buck_coul_long_kokkos.h @@ -46,8 +46,10 @@ class PairBuckCoulLongKokkos : public PairBuckCoulLong { double init_one(int, int) override; struct params_buck_coul{ +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION params_buck_coul() {cut_ljsq=0;cut_coulsq=0;a=0;c=0;rhoinv=0;buck1=0;buck2=0;offset=0;}; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION params_buck_coul(int /*i*/) {cut_ljsq=0;cut_coulsq=0;a=0;c=0;rhoinv=0;buck1=0;buck2=0;offset=0;}; KK_FLOAT cut_ljsq,cut_coulsq,a,c,rhoinv,buck1,buck2,offset; @@ -55,21 +57,25 @@ class PairBuckCoulLongKokkos : public PairBuckCoulLong { protected: template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_fpair(const KK_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_fcoul(const KK_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype, const KK_FLOAT& factor_coul, const KK_FLOAT& qtmp) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_evdwl(const KK_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_ecoul(const KK_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype, const KK_FLOAT& factor_coul, const KK_FLOAT& qtmp) const; diff --git a/src/KOKKOS/pair_buck_kokkos.cpp b/src/KOKKOS/pair_buck_kokkos.cpp index afb7a5d2650..7f1ae64e9a0 100644 --- a/src/KOKKOS/pair_buck_kokkos.cpp +++ b/src/KOKKOS/pair_buck_kokkos.cpp @@ -136,6 +136,7 @@ void PairBuckKokkos::compute(int eflag_in, int vflag_in) template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairBuckKokkos:: compute_fpair(const KK_FLOAT &rsq, const int &, const int &, const int &itype, const int &jtype) const { @@ -153,6 +154,7 @@ compute_fpair(const KK_FLOAT &rsq, const int &, const int &, const int &itype, c template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairBuckKokkos:: compute_evdwl(const KK_FLOAT &rsq, const int &, const int &, const int &itype, const int &jtype) const { diff --git a/src/KOKKOS/pair_buck_kokkos.h b/src/KOKKOS/pair_buck_kokkos.h index 681ce432fbb..426c46ba9f7 100644 --- a/src/KOKKOS/pair_buck_kokkos.h +++ b/src/KOKKOS/pair_buck_kokkos.h @@ -45,8 +45,10 @@ class PairBuckKokkos : public PairBuck { double init_one(int, int) override; struct params_buck{ +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION params_buck() {cutsq=0;a=0;c=0;rhoinv=0;buck1=0;buck2=0;offset=0;}; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION params_buck(int /*i*/) {cutsq=0;a=0;c=0;rhoinv=0;buck1=0;buck2=0;offset=0;}; KK_FLOAT cutsq,a,c,rhoinv,buck1,buck2,offset; @@ -54,14 +56,17 @@ class PairBuckKokkos : public PairBuck { protected: template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_fpair(const KK_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_evdwl(const KK_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_ecoul(const KK_FLOAT& /*rsq*/, const int& /*i*/, const int& /*j*/, const int& /*itype*/, const int& /*jtype*/) const { return 0; } diff --git a/src/KOKKOS/pair_coul_cut_kokkos.cpp b/src/KOKKOS/pair_coul_cut_kokkos.cpp index be1f08a5066..873109d8ede 100644 --- a/src/KOKKOS/pair_coul_cut_kokkos.cpp +++ b/src/KOKKOS/pair_coul_cut_kokkos.cpp @@ -135,6 +135,7 @@ void PairCoulCutKokkos::compute(int eflag_in, int vflag_in) template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairCoulCutKokkos:: compute_fcoul(const KK_FLOAT& rsq, const int& /*i*/, const int&j, const int& itype, @@ -151,6 +152,7 @@ compute_fcoul(const KK_FLOAT& rsq, const int& /*i*/, const int&j, const int& ity template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairCoulCutKokkos:: compute_ecoul(const KK_FLOAT& rsq, const int& /*i*/, const int&j, const int& itype, diff --git a/src/KOKKOS/pair_coul_cut_kokkos.h b/src/KOKKOS/pair_coul_cut_kokkos.h index 2808fa693c1..192e91b152b 100644 --- a/src/KOKKOS/pair_coul_cut_kokkos.h +++ b/src/KOKKOS/pair_coul_cut_kokkos.h @@ -45,8 +45,10 @@ class PairCoulCutKokkos : public PairCoulCut { double init_one(int, int) override; struct params_coul{ +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION params_coul() {cutsq=0,scale=0;}; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION params_coul(int /*i*/) {cutsq=0,scale=0;}; KK_FLOAT cutsq, scale; @@ -54,21 +56,25 @@ class PairCoulCutKokkos : public PairCoulCut { protected: template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_fpair(const KK_FLOAT& /*rsq*/, const int& /*i*/, const int& /*j*/, const int& /*itype*/, const int& /*jtype*/) const { return 0.0; } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_fcoul(const KK_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype, const KK_FLOAT& factor_coul, const KK_FLOAT& qtmp) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_evdwl(const KK_FLOAT& /*rsq*/, const int& /*i*/, const int& /*j*/, const int& /*itype*/, const int& /*jtype*/) const { return 0; } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_ecoul(const KK_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype, const KK_FLOAT& factor_coul, const KK_FLOAT& qtmp) const; diff --git a/src/KOKKOS/pair_coul_debye_kokkos.cpp b/src/KOKKOS/pair_coul_debye_kokkos.cpp index dc62816610a..cf268adfda3 100644 --- a/src/KOKKOS/pair_coul_debye_kokkos.cpp +++ b/src/KOKKOS/pair_coul_debye_kokkos.cpp @@ -145,6 +145,7 @@ void PairCoulDebyeKokkos::compute(int eflag_in, int vflag_in) ---------------------------------------------------------------------- */ template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairCoulDebyeKokkos:: compute_fcoul(const KK_FLOAT& rsq, const int& /*i*/, const int&j, @@ -168,6 +169,7 @@ compute_fcoul(const KK_FLOAT& rsq, const int& /*i*/, const int&j, ---------------------------------------------------------------------- */ template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairCoulDebyeKokkos:: compute_ecoul(const KK_FLOAT& rsq, const int& /*i*/, const int&j, diff --git a/src/KOKKOS/pair_coul_debye_kokkos.h b/src/KOKKOS/pair_coul_debye_kokkos.h index d0af242e115..505ef579ee5 100644 --- a/src/KOKKOS/pair_coul_debye_kokkos.h +++ b/src/KOKKOS/pair_coul_debye_kokkos.h @@ -45,8 +45,10 @@ class PairCoulDebyeKokkos : public PairCoulDebye { double init_one(int, int) override; struct params_coul{ +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION params_coul() {cutsq=0,scale=0;}; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION params_coul(int /*i*/) {cutsq=0,scale=0;}; KK_FLOAT cutsq, scale; @@ -54,21 +56,25 @@ class PairCoulDebyeKokkos : public PairCoulDebye { protected: template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_fpair(const KK_FLOAT& /*rsq*/, const int& /*i*/, const int& /*j*/, const int& /*itype*/, const int& /*jtype*/) const { return 0.0; } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_fcoul(const KK_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype, const KK_FLOAT& factor_coul, const KK_FLOAT& qtmp) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_evdwl(const KK_FLOAT& /*rsq*/, const int& /*i*/, const int& /*j*/, const int& /*itype*/, const int& /*jtype*/) const { return 0; } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_ecoul(const KK_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype, const KK_FLOAT& factor_coul, const KK_FLOAT& qtmp) const; diff --git a/src/KOKKOS/pair_coul_dsf_kokkos.cpp b/src/KOKKOS/pair_coul_dsf_kokkos.cpp index c8614c9b889..a9b50b6d60a 100644 --- a/src/KOKKOS/pair_coul_dsf_kokkos.cpp +++ b/src/KOKKOS/pair_coul_dsf_kokkos.cpp @@ -208,6 +208,7 @@ void PairCoulDSFKokkos::init_style() ////Specialisation for Neighborlist types Half, HalfThread, Full template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairCoulDSFKokkos::operator()(TagPairCoulDSFKernelA, const int &ii, EV_FLOAT& ev) const { @@ -289,6 +290,7 @@ void PairCoulDSFKokkos::operator()(TagPairCoulDSFKernelA template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairCoulDSFKokkos::operator()(TagPairCoulDSFKernelA, const int &ii) const { EV_FLOAT ev; @@ -299,6 +301,7 @@ void PairCoulDSFKokkos::operator()(TagPairCoulDSFKernelA template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairCoulDSFKokkos::ev_tally(EV_FLOAT &ev, const int &i, const int &j, const KK_FLOAT &epair, const KK_FLOAT &fpair, const KK_FLOAT &delx, @@ -392,6 +395,7 @@ void PairCoulDSFKokkos::ev_tally(EV_FLOAT &ev, const int &i, const i /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION int PairCoulDSFKokkos::sbmask(const int& j) const { return j >> SBBITS & 3; diff --git a/src/KOKKOS/pair_coul_dsf_kokkos.h b/src/KOKKOS/pair_coul_dsf_kokkos.h index 1356199eac0..5044bdb1a63 100644 --- a/src/KOKKOS/pair_coul_dsf_kokkos.h +++ b/src/KOKKOS/pair_coul_dsf_kokkos.h @@ -47,19 +47,23 @@ class PairCoulDSFKokkos : public PairCoulDSF { void init_style() override; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairCoulDSFKernelA, const int&, EV_FLOAT&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairCoulDSFKernelA, const int&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ev_tally(EV_FLOAT &ev, const int &i, const int &j, const KK_FLOAT &epair, const KK_FLOAT &fpair, const KK_FLOAT &delx, const KK_FLOAT &dely, const KK_FLOAT &delz) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION int sbmask(const int& j) const; diff --git a/src/KOKKOS/pair_coul_long_kokkos.cpp b/src/KOKKOS/pair_coul_long_kokkos.cpp index 62f328af39c..0c039fe6158 100644 --- a/src/KOKKOS/pair_coul_long_kokkos.cpp +++ b/src/KOKKOS/pair_coul_long_kokkos.cpp @@ -161,6 +161,7 @@ void PairCoulLongKokkos::compute(int eflag_in, int vflag_in) template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairCoulLongKokkos:: compute_fcoul(const KK_FLOAT& rsq, const int& /*i*/, const int&j, @@ -200,6 +201,7 @@ compute_fcoul(const KK_FLOAT& rsq, const int& /*i*/, const int&j, template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairCoulLongKokkos:: compute_ecoul(const KK_FLOAT& rsq, const int& /*i*/, const int&j, diff --git a/src/KOKKOS/pair_coul_long_kokkos.h b/src/KOKKOS/pair_coul_long_kokkos.h index 6837ecb9efa..0fd9d1f4b7e 100644 --- a/src/KOKKOS/pair_coul_long_kokkos.h +++ b/src/KOKKOS/pair_coul_long_kokkos.h @@ -46,8 +46,10 @@ class PairCoulLongKokkos : public PairCoulLong { double init_one(int, int) override; struct params_coul{ +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION params_coul() {cut_coulsq=0;}; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION params_coul(int /*i*/) {cut_coulsq=0;}; KK_FLOAT cut_coulsq; @@ -55,21 +57,25 @@ class PairCoulLongKokkos : public PairCoulLong { protected: template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_fpair(const KK_FLOAT& /*rsq*/, const int& /*i*/, const int& /*j*/, const int& /*itype*/, const int& /*jtype*/) const { return 0.0; } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_fcoul(const KK_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype, const KK_FLOAT& factor_coul, const KK_FLOAT& qtmp) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_evdwl(const KK_FLOAT& /*rsq*/, const int& /*i*/, const int& /*j*/, const int& /*itype*/, const int& /*jtype*/) const { return 0; } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_ecoul(const KK_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype, const KK_FLOAT& factor_coul, const KK_FLOAT& qtmp) const; diff --git a/src/KOKKOS/pair_coul_wolf_kokkos.cpp b/src/KOKKOS/pair_coul_wolf_kokkos.cpp index fd54de3444d..432b07ca6db 100644 --- a/src/KOKKOS/pair_coul_wolf_kokkos.cpp +++ b/src/KOKKOS/pair_coul_wolf_kokkos.cpp @@ -212,6 +212,7 @@ void PairCoulWolfKokkos::init_style() ////Specialisation for Neighborlist types Half, HalfThread, Full template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairCoulWolfKokkos::operator()(TagPairCoulWolfKernelA, const int &ii, EV_FLOAT& ev) const { @@ -294,6 +295,7 @@ void PairCoulWolfKokkos::operator()(TagPairCoulWolfKernelA template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairCoulWolfKokkos::operator()(TagPairCoulWolfKernelA, const int &ii) const { EV_FLOAT ev; @@ -304,6 +306,7 @@ void PairCoulWolfKokkos::operator()(TagPairCoulWolfKernelA template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairCoulWolfKokkos::ev_tally(EV_FLOAT &ev, const int &i, const int &j, const KK_FLOAT &epair, const KK_FLOAT &fpair, const KK_FLOAT &delx, @@ -397,6 +400,7 @@ void PairCoulWolfKokkos::ev_tally(EV_FLOAT &ev, const int &i, const /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION int PairCoulWolfKokkos::sbmask(const int& j) const { return j >> SBBITS & 3; diff --git a/src/KOKKOS/pair_coul_wolf_kokkos.h b/src/KOKKOS/pair_coul_wolf_kokkos.h index d1d952f5acc..1204881063e 100644 --- a/src/KOKKOS/pair_coul_wolf_kokkos.h +++ b/src/KOKKOS/pair_coul_wolf_kokkos.h @@ -47,19 +47,23 @@ class PairCoulWolfKokkos : public PairCoulWolf { void init_style() override; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairCoulWolfKernelA, const int&, EV_FLOAT&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairCoulWolfKernelA, const int&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ev_tally(EV_FLOAT &ev, const int &i, const int &j, const KK_FLOAT &epair, const KK_FLOAT &fpair, const KK_FLOAT &delx, const KK_FLOAT &dely, const KK_FLOAT &delz) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION int sbmask(const int& j) const; diff --git a/src/KOKKOS/pair_dpd_ext_kokkos.cpp b/src/KOKKOS/pair_dpd_ext_kokkos.cpp index 48684dcc58c..602b18d14fa 100644 --- a/src/KOKKOS/pair_dpd_ext_kokkos.cpp +++ b/src/KOKKOS/pair_dpd_ext_kokkos.cpp @@ -217,6 +217,7 @@ void PairDPDExtKokkos::compute(int eflagin, int vflagin) template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairDPDExtKokkos::operator() (TagDPDExtKokkos, const int &ii) const { EV_FLOAT ev; @@ -225,6 +226,7 @@ void PairDPDExtKokkos::operator() (TagDPDExtKokkos template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairDPDExtKokkos::operator() (TagDPDExtKokkos, const int &ii, EV_FLOAT &ev) const { @@ -348,6 +350,7 @@ void PairDPDExtKokkos::operator() (TagDPDExtKokkos template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairDPDExtKokkos::ev_tally_xyz(EV_FLOAT &ev, const int &i, const int &j, const KK_FLOAT &epair, @@ -421,6 +424,7 @@ void PairDPDExtKokkos::allocate() /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION int PairDPDExtKokkos::sbmask(const int& j) const { return j >> SBBITS & 3; diff --git a/src/KOKKOS/pair_dpd_ext_kokkos.h b/src/KOKKOS/pair_dpd_ext_kokkos.h index 7bb7a80415a..9d9d1cc9791 100644 --- a/src/KOKKOS/pair_dpd_ext_kokkos.h +++ b/src/KOKKOS/pair_dpd_ext_kokkos.h @@ -55,8 +55,10 @@ class PairDPDExtKokkos : public PairDPDExt { void compute(int, int) override; struct params_dpd { +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION params_dpd() {cut=ws=wsT=a0=gamma=sigma=gammaT=sigmaT=0;} +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION params_dpd(int /*i*/) {cut=ws=wsT=a0=gamma=sigma=gammaT=sigmaT=0;} KK_FLOAT cut,ws,wsT,a0,gamma,sigma,gammaT,sigmaT; @@ -66,14 +68,17 @@ class PairDPDExtKokkos : public PairDPDExt { struct TagDPDExtKokkos{}; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator () (TagDPDExtKokkos, const int &i) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator () (TagDPDExtKokkos, const int &i, EV_FLOAT&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ev_tally_xyz(EV_FLOAT &ev, const int &i, const int &j, const KK_FLOAT &epair, @@ -133,6 +138,7 @@ class PairDPDExtKokkos : public PairDPDExt { typename AT::t_kkacc_1d d_eatom; typename AT::t_kkacc_1d_6 d_vatom; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION int sbmask(const int& j) const; friend void pair_virial_fdotr_compute(PairDPDExtKokkos*); diff --git a/src/KOKKOS/pair_dpd_ext_tstat_kokkos.cpp b/src/KOKKOS/pair_dpd_ext_tstat_kokkos.cpp index f96b8bc045c..4512d46933c 100644 --- a/src/KOKKOS/pair_dpd_ext_tstat_kokkos.cpp +++ b/src/KOKKOS/pair_dpd_ext_tstat_kokkos.cpp @@ -221,6 +221,7 @@ void PairDPDExtTstatKokkos::compute(int eflagin, int vflagin) template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairDPDExtTstatKokkos::operator() (TagDPDExtTstatKokkos, const int &ii) const { EV_FLOAT ev; @@ -229,6 +230,7 @@ void PairDPDExtTstatKokkos::operator() (TagDPDExtTstatKokkos template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairDPDExtTstatKokkos::operator() (TagDPDExtTstatKokkos, const int &ii, EV_FLOAT &ev) const { @@ -340,6 +342,7 @@ void PairDPDExtTstatKokkos::operator() (TagDPDExtTstatKokkos template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairDPDExtTstatKokkos::v_tally_xyz(EV_FLOAT &ev, const int &i, const int &j, const KK_FLOAT &fx, const KK_FLOAT &fy, const KK_FLOAT &fz, @@ -402,6 +405,7 @@ void PairDPDExtTstatKokkos::allocate() /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION int PairDPDExtTstatKokkos::sbmask(const int& j) const { return j >> SBBITS & 3; diff --git a/src/KOKKOS/pair_dpd_ext_tstat_kokkos.h b/src/KOKKOS/pair_dpd_ext_tstat_kokkos.h index 5da11792dd8..5b1cd1c9fd0 100644 --- a/src/KOKKOS/pair_dpd_ext_tstat_kokkos.h +++ b/src/KOKKOS/pair_dpd_ext_tstat_kokkos.h @@ -55,8 +55,10 @@ class PairDPDExtTstatKokkos : public PairDPDExtTstat { void compute(int, int) override; struct params_dpd { +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION params_dpd() {cut=ws=wsT=gamma=sigma=gammaT=sigmaT=0;} +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION params_dpd(int /*i*/) {cut=ws=wsT=gamma=sigma=gammaT=sigmaT=0;} KK_FLOAT cut,ws,wsT,gamma,sigma,gammaT,sigmaT; @@ -66,14 +68,17 @@ class PairDPDExtTstatKokkos : public PairDPDExtTstat { struct TagDPDExtTstatKokkos{}; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator () (TagDPDExtTstatKokkos, const int &i) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator () (TagDPDExtTstatKokkos, const int &i, EV_FLOAT&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void v_tally_xyz(EV_FLOAT &ev, const int &i, const int &j, const KK_FLOAT &fx,const KK_FLOAT &fy, const KK_FLOAT &fz, @@ -128,6 +133,7 @@ class PairDPDExtTstatKokkos : public PairDPDExtTstat { DAT::ttransform_kkacc_1d_6 k_vatom; typename AT::t_kkacc_1d_6 d_vatom; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION int sbmask(const int& j) const; friend void pair_virial_fdotr_compute(PairDPDExtTstatKokkos*); diff --git a/src/KOKKOS/pair_dpd_fdt_energy_kokkos.cpp b/src/KOKKOS/pair_dpd_fdt_energy_kokkos.cpp index bf4602f057a..e7eab07b2d6 100644 --- a/src/KOKKOS/pair_dpd_fdt_energy_kokkos.cpp +++ b/src/KOKKOS/pair_dpd_fdt_energy_kokkos.cpp @@ -356,6 +356,7 @@ void PairDPDfdtEnergyKokkos::compute(int eflag_in, int vflag_in) } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairDPDfdtEnergyKokkos::operator()(TagPairDPDfdtEnergyZero, const int &ii) const { d_duCond[ii] = 0.0; @@ -364,6 +365,7 @@ void PairDPDfdtEnergyKokkos::operator()(TagPairDPDfdtEnergyZero, con template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairDPDfdtEnergyKokkos::operator()(TagPairDPDfdtEnergyComputeSplit, const int &ii, EV_FLOAT& ev) const { @@ -440,6 +442,7 @@ void PairDPDfdtEnergyKokkos::operator()(TagPairDPDfdtEnergyComputeSp template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairDPDfdtEnergyKokkos::operator()(TagPairDPDfdtEnergyComputeSplit, const int &ii) const { EV_FLOAT ev; @@ -448,6 +451,7 @@ void PairDPDfdtEnergyKokkos::operator()(TagPairDPDfdtEnergyComputeSp template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairDPDfdtEnergyKokkos::operator()(TagPairDPDfdtEnergyComputeNoSplit, const int &ii, EV_FLOAT& ev) const { @@ -597,6 +601,7 @@ void PairDPDfdtEnergyKokkos::operator()(TagPairDPDfdtEnergyComputeNo template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairDPDfdtEnergyKokkos::operator()(TagPairDPDfdtEnergyComputeNoSplit, const int &ii) const { EV_FLOAT ev; @@ -667,6 +672,7 @@ double PairDPDfdtEnergyKokkos::init_one(int i, int j) template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairDPDfdtEnergyKokkos::ev_tally(EV_FLOAT &ev, const int &i, const int &j, const KK_FLOAT &epair, const KK_FLOAT &fpair, const KK_FLOAT &delx, @@ -758,6 +764,7 @@ void PairDPDfdtEnergyKokkos::ev_tally(EV_FLOAT &ev, const int &i, co /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION int PairDPDfdtEnergyKokkos::sbmask(const int& j) const { return j >> SBBITS & 3; diff --git a/src/KOKKOS/pair_dpd_fdt_energy_kokkos.h b/src/KOKKOS/pair_dpd_fdt_energy_kokkos.h index 34bfb6bf152..ef39159945a 100644 --- a/src/KOKKOS/pair_dpd_fdt_energy_kokkos.h +++ b/src/KOKKOS/pair_dpd_fdt_energy_kokkos.h @@ -59,37 +59,46 @@ class PairDPDfdtEnergyKokkos : public PairDPDfdtEnergy { void init_style() override; double init_one(int, int) override; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairDPDfdtEnergyZero, const int&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairDPDfdtEnergyComputeSplit, const int&, EV_FLOAT&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairDPDfdtEnergyComputeSplit, const int&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairDPDfdtEnergyComputeNoSplit, const int&, EV_FLOAT&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairDPDfdtEnergyComputeNoSplit, const int&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ev_tally(EV_FLOAT &ev, const int &i, const int &j, const KK_FLOAT &epair, const KK_FLOAT &fpair, const KK_FLOAT &delx, const KK_FLOAT &dely, const KK_FLOAT &delz) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION int sbmask(const int& j) const; struct params_dpd { +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION params_dpd() {cut=0;a0=0;sigma=0;kappa=0;alpha=0;}; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION params_dpd(int /*i*/) {cut=0;a0=0;sigma=0;kappa=0;alpha=0;}; KK_FLOAT cut,a0,sigma,kappa,alpha; diff --git a/src/KOKKOS/pair_dpd_kokkos.cpp b/src/KOKKOS/pair_dpd_kokkos.cpp index 78c863a958e..5fdcac9eaaa 100644 --- a/src/KOKKOS/pair_dpd_kokkos.cpp +++ b/src/KOKKOS/pair_dpd_kokkos.cpp @@ -217,6 +217,7 @@ void PairDPDKokkos::compute(int eflagin, int vflagin) template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairDPDKokkos::operator() (TagDPDKokkos, const int &ii) const { EV_FLOAT ev; @@ -225,6 +226,7 @@ void PairDPDKokkos::operator() (TagDPDKokkos, cons template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairDPDKokkos::operator() (TagDPDKokkos, const int &ii, EV_FLOAT &ev) const { @@ -314,6 +316,7 @@ void PairDPDKokkos::operator() (TagDPDKokkos, cons template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairDPDKokkos::ev_tally(EV_FLOAT &ev, const int &i, const int &j, const KK_FLOAT &epair, const KK_FLOAT &fpair, const KK_FLOAT &delx, @@ -386,6 +389,7 @@ void PairDPDKokkos::allocate() /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION int PairDPDKokkos::sbmask(const int& j) const { return j >> SBBITS & 3; diff --git a/src/KOKKOS/pair_dpd_kokkos.h b/src/KOKKOS/pair_dpd_kokkos.h index 8e5a0c2c708..d302a0eb71a 100644 --- a/src/KOKKOS/pair_dpd_kokkos.h +++ b/src/KOKKOS/pair_dpd_kokkos.h @@ -55,8 +55,10 @@ class PairDPDKokkos : public PairDPD { void compute(int, int) override; struct params_dpd { +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION params_dpd() {cut=a0=gamma=sigma=0;} +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION params_dpd(int /*i*/) {cut=a0=gamma=sigma=0;} KK_FLOAT cut,a0,gamma,sigma; @@ -66,14 +68,17 @@ class PairDPDKokkos : public PairDPD { struct TagDPDKokkos{}; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator () (TagDPDKokkos, const int &i) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator () (TagDPDKokkos, const int &i, EV_FLOAT&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ev_tally(EV_FLOAT &ev, const int &i, const int &j, const KK_FLOAT &epair, const KK_FLOAT &fpair, @@ -132,6 +137,7 @@ class PairDPDKokkos : public PairDPD { typename AT::t_kkacc_1d d_eatom; typename AT::t_kkacc_1d_6 d_vatom; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION int sbmask(const int& j) const; friend void pair_virial_fdotr_compute(PairDPDKokkos*); diff --git a/src/KOKKOS/pair_dpd_tstat_kokkos.cpp b/src/KOKKOS/pair_dpd_tstat_kokkos.cpp index b6ab73bd038..b13053942b3 100644 --- a/src/KOKKOS/pair_dpd_tstat_kokkos.cpp +++ b/src/KOKKOS/pair_dpd_tstat_kokkos.cpp @@ -220,6 +220,7 @@ void PairDPDTstatKokkos::compute(int eflagin, int vflagin) template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairDPDTstatKokkos::operator() (TagDPDTstatKokkos, const int &ii) const { EV_FLOAT ev; @@ -228,6 +229,7 @@ void PairDPDTstatKokkos::operator() (TagDPDTstatKokkos template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairDPDTstatKokkos::operator() (TagDPDTstatKokkos, const int &ii, EV_FLOAT &ev) const { @@ -306,6 +308,7 @@ void PairDPDTstatKokkos::operator() (TagDPDTstatKokkos template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairDPDTstatKokkos::v_tally(EV_FLOAT &ev, const int &i, const int &j, const KK_FLOAT &fpair, const KK_FLOAT &delx, @@ -368,6 +371,7 @@ void PairDPDTstatKokkos::allocate() /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION int PairDPDTstatKokkos::sbmask(const int& j) const { return j >> SBBITS & 3; diff --git a/src/KOKKOS/pair_dpd_tstat_kokkos.h b/src/KOKKOS/pair_dpd_tstat_kokkos.h index 4b6c7c0c025..8fe2c2121d0 100644 --- a/src/KOKKOS/pair_dpd_tstat_kokkos.h +++ b/src/KOKKOS/pair_dpd_tstat_kokkos.h @@ -55,8 +55,10 @@ class PairDPDTstatKokkos : public PairDPDTstat { void compute(int, int) override; struct params_dpd { +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION params_dpd() {cut=gamma=sigma=0;} +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION params_dpd(int /*i*/) {cut=gamma=sigma=0;} KK_FLOAT cut,gamma,sigma; @@ -66,14 +68,17 @@ class PairDPDTstatKokkos : public PairDPDTstat { struct TagDPDTstatKokkos{}; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator () (TagDPDTstatKokkos, const int &i) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator () (TagDPDTstatKokkos, const int &i, EV_FLOAT&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void v_tally(EV_FLOAT &ev, const int &i, const int &j, const KK_FLOAT &fpair, const KK_FLOAT &delx, @@ -128,6 +133,7 @@ class PairDPDTstatKokkos : public PairDPDTstat { DAT::ttransform_kkacc_1d_6 k_vatom; typename AT::t_kkacc_1d_6 d_vatom; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION int sbmask(const int& j) const; friend void pair_virial_fdotr_compute(PairDPDTstatKokkos*); diff --git a/src/KOKKOS/pair_eam_alloy_kokkos.cpp b/src/KOKKOS/pair_eam_alloy_kokkos.cpp index 78fac9b3607..7f16c851e8d 100644 --- a/src/KOKKOS/pair_eam_alloy_kokkos.cpp +++ b/src/KOKKOS/pair_eam_alloy_kokkos.cpp @@ -461,6 +461,7 @@ int PairEAMAlloyKokkos::pack_forward_comm_kokkos(int n, DAT::tdual_i } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairEAMAlloyKokkos::operator()(TagPairEAMAlloyPackForwardComm, const int &i) const { int j = d_sendlist(i); @@ -478,6 +479,7 @@ void PairEAMAlloyKokkos::unpack_forward_comm_kokkos(int n, int first } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairEAMAlloyKokkos::operator()(TagPairEAMAlloyUnpackForwardComm, const int &i) const { d_fp[i + first] = v_buf[i]; @@ -550,6 +552,7 @@ void PairEAMAlloyKokkos::unpack_reverse_comm(int n, int *list, doubl /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairEAMAlloyKokkos::operator()(TagPairEAMAlloyInitialize, const int &i) const { d_rho[i] = 0.0; @@ -560,6 +563,7 @@ void PairEAMAlloyKokkos::operator()(TagPairEAMAlloyInitialize, const ////Specialisation for Neighborlist types Half, HalfThread, Full template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairEAMAlloyKokkos::operator()(TagPairEAMAlloyKernelA, const int &ii) const { @@ -615,6 +619,7 @@ void PairEAMAlloyKokkos::operator()(TagPairEAMAlloyKernelA template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairEAMAlloyKokkos::operator()(TagPairEAMAlloyKernelB, const int &ii, EV_FLOAT& ev) const { @@ -644,6 +649,7 @@ void PairEAMAlloyKokkos::operator()(TagPairEAMAlloyKernelB, c template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairEAMAlloyKokkos::operator()(TagPairEAMAlloyKernelB, const int &ii) const { EV_FLOAT ev; @@ -655,6 +661,7 @@ void PairEAMAlloyKokkos::operator()(TagPairEAMAlloyKernelB, c ////Specialisation for Neighborlist types Half, HalfThread, Full template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairEAMAlloyKokkos::operator()(TagPairEAMAlloyKernelAB, const int &ii, EV_FLOAT& ev) const { @@ -719,6 +726,7 @@ void PairEAMAlloyKokkos::operator()(TagPairEAMAlloyKernelAB, template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairEAMAlloyKokkos::operator()(TagPairEAMAlloyKernelAB, const int &ii) const { EV_FLOAT ev; @@ -730,6 +738,7 @@ void PairEAMAlloyKokkos::operator()(TagPairEAMAlloyKernelAB, ////Specialisation for Neighborlist types Half, HalfThread, Full template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairEAMAlloyKokkos::operator()(TagPairEAMAlloyKernelC, const int &ii, EV_FLOAT& ev) const { @@ -829,6 +838,7 @@ void PairEAMAlloyKokkos::operator()(TagPairEAMAlloyKernelC template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairEAMAlloyKokkos::operator()(TagPairEAMAlloyKernelC, const int &ii) const { EV_FLOAT ev; @@ -840,6 +850,7 @@ void PairEAMAlloyKokkos::operator()(TagPairEAMAlloyKernelC template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairEAMAlloyKokkos::operator()(TagPairEAMAlloyKernelAB, const typename Kokkos::TeamPolicy::member_type& team_member, @@ -924,6 +935,7 @@ void PairEAMAlloyKokkos::operator()(TagPairEAMAlloyKernelAB, #endif template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairEAMAlloyKokkos::operator()(TagPairEAMAlloyKernelAB, const typename Kokkos::TeamPolicy::member_type& team_member) const { @@ -936,6 +948,7 @@ void PairEAMAlloyKokkos::operator()(TagPairEAMAlloyKernelAB, ////Specialisation for Neighborlist types Half, HalfThread, Full template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairEAMAlloyKokkos::operator()(TagPairEAMAlloyKernelC, const typename Kokkos::TeamPolicy::member_type& team_member, @@ -1056,6 +1069,7 @@ void PairEAMAlloyKokkos::operator()(TagPairEAMAlloyKernelC template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairEAMAlloyKokkos::operator()(TagPairEAMAlloyKernelC, /*const int &ii*/ @@ -1068,6 +1082,7 @@ void PairEAMAlloyKokkos::operator()(TagPairEAMAlloyKernelC template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairEAMAlloyKokkos::ev_tally(EV_FLOAT &ev, const int &i, const int &j, const KK_FLOAT &epair, const KK_FLOAT &fpair, const KK_FLOAT &delx, diff --git a/src/KOKKOS/pair_eam_alloy_kokkos.h b/src/KOKKOS/pair_eam_alloy_kokkos.h index a2c74b9a635..be469c5c732 100644 --- a/src/KOKKOS/pair_eam_alloy_kokkos.h +++ b/src/KOKKOS/pair_eam_alloy_kokkos.h @@ -63,60 +63,75 @@ class PairEAMAlloyKokkos : public PairEAM, public KokkosBase { void init_style() override; void coeff(int, char **) override; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairEAMAlloyPackForwardComm, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairEAMAlloyUnpackForwardComm, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairEAMAlloyInitialize, const int&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairEAMAlloyKernelA, const int&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairEAMAlloyKernelB, const int&, EV_FLOAT&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairEAMAlloyKernelB, const int&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairEAMAlloyKernelAB, const int&, EV_FLOAT&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairEAMAlloyKernelAB, const int&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairEAMAlloyKernelAB, const typename Kokkos::TeamPolicy::member_type&, EV_FLOAT&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairEAMAlloyKernelAB, const typename Kokkos::TeamPolicy::member_type&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairEAMAlloyKernelC, const int&, EV_FLOAT&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairEAMAlloyKernelC, const int&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairEAMAlloyKernelC, const typename Kokkos::TeamPolicy::member_type&, EV_FLOAT&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairEAMAlloyKernelC, const typename Kokkos::TeamPolicy::member_type&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ev_tally(EV_FLOAT &ev, const int &i, const int &j, const KK_FLOAT &epair, const KK_FLOAT &fpair, const KK_FLOAT &delx, diff --git a/src/KOKKOS/pair_eam_fs_kokkos.cpp b/src/KOKKOS/pair_eam_fs_kokkos.cpp index 32484aab580..fb80a6fa758 100644 --- a/src/KOKKOS/pair_eam_fs_kokkos.cpp +++ b/src/KOKKOS/pair_eam_fs_kokkos.cpp @@ -461,6 +461,7 @@ int PairEAMFSKokkos::pack_forward_comm_kokkos(int n, DAT::tdual_int_ } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairEAMFSKokkos::operator()(TagPairEAMFSPackForwardComm, const int &i) const { int j = d_sendlist(i); @@ -478,6 +479,7 @@ void PairEAMFSKokkos::unpack_forward_comm_kokkos(int n, int first_in } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairEAMFSKokkos::operator()(TagPairEAMFSUnpackForwardComm, const int &i) const { d_fp[i + first] = v_buf[i]; @@ -550,6 +552,7 @@ void PairEAMFSKokkos::unpack_reverse_comm(int n, int *list, double * /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairEAMFSKokkos::operator()(TagPairEAMFSInitialize, const int &i) const { d_rho[i] = 0.0; @@ -560,6 +563,7 @@ void PairEAMFSKokkos::operator()(TagPairEAMFSInitialize, const int & ////Specialisation for Neighborlist types Half, HalfThread, Full template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairEAMFSKokkos::operator()(TagPairEAMFSKernelA, const int &ii) const { @@ -615,6 +619,7 @@ void PairEAMFSKokkos::operator()(TagPairEAMFSKernelA template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairEAMFSKokkos::operator()(TagPairEAMFSKernelB, const int &ii, EV_FLOAT& ev) const { @@ -644,6 +649,7 @@ void PairEAMFSKokkos::operator()(TagPairEAMFSKernelB, const i template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairEAMFSKokkos::operator()(TagPairEAMFSKernelB, const int &ii) const { EV_FLOAT ev; @@ -655,6 +661,7 @@ void PairEAMFSKokkos::operator()(TagPairEAMFSKernelB, const i ////Specialisation for Neighborlist types Half, HalfThread, Full template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairEAMFSKokkos::operator()(TagPairEAMFSKernelAB, const int &ii, EV_FLOAT& ev) const { @@ -719,6 +726,7 @@ void PairEAMFSKokkos::operator()(TagPairEAMFSKernelAB, const template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairEAMFSKokkos::operator()(TagPairEAMFSKernelAB, const int &ii) const { EV_FLOAT ev; this->template operator()(TagPairEAMFSKernelAB(), ii, ev); @@ -730,6 +738,7 @@ void PairEAMFSKokkos::operator()(TagPairEAMFSKernelAB, const ////Specialisation for Neighborlist types Half, HalfThread, Full template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairEAMFSKokkos::operator()(TagPairEAMFSKernelC, const int &ii, EV_FLOAT& ev) const { @@ -829,6 +838,7 @@ void PairEAMFSKokkos::operator()(TagPairEAMFSKernelC template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairEAMFSKokkos::operator()(TagPairEAMFSKernelC, const int &ii) const { EV_FLOAT ev; @@ -840,6 +850,7 @@ void PairEAMFSKokkos::operator()(TagPairEAMFSKernelC template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairEAMFSKokkos::operator()(TagPairEAMFSKernelAB, const typename Kokkos::TeamPolicy::member_type& team_member, @@ -924,6 +935,7 @@ void PairEAMFSKokkos::operator()(TagPairEAMFSKernelAB, #endif template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairEAMFSKokkos::operator()(TagPairEAMFSKernelAB, const typename Kokkos::TeamPolicy::member_type& team_member) const { @@ -937,6 +949,7 @@ void PairEAMFSKokkos::operator()(TagPairEAMFSKernelAB, #ifdef KOKKOS_ENABLE_HIP template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairEAMFSKokkos::operator()(TagPairEAMFSKernelC, const typename Kokkos::TeamPolicy::member_type& team_member, @@ -1057,6 +1070,7 @@ void PairEAMFSKokkos::operator()(TagPairEAMFSKernelC template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairEAMFSKokkos::operator()(TagPairEAMFSKernelC, /*const int &ii*/ @@ -1069,6 +1083,7 @@ void PairEAMFSKokkos::operator()(TagPairEAMFSKernelC template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairEAMFSKokkos::ev_tally(EV_FLOAT &ev, const int &i, const int &j, const KK_FLOAT &epair, const KK_FLOAT &fpair, const KK_FLOAT &delx, diff --git a/src/KOKKOS/pair_eam_fs_kokkos.h b/src/KOKKOS/pair_eam_fs_kokkos.h index 2565d32d29b..364c939e0d9 100644 --- a/src/KOKKOS/pair_eam_fs_kokkos.h +++ b/src/KOKKOS/pair_eam_fs_kokkos.h @@ -63,60 +63,75 @@ class PairEAMFSKokkos : public PairEAM, public KokkosBase { void init_style() override; void coeff(int, char **) override; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairEAMFSPackForwardComm, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairEAMFSUnpackForwardComm, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairEAMFSInitialize, const int&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairEAMFSKernelA, const int&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairEAMFSKernelB, const int&, EV_FLOAT&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairEAMFSKernelB, const int&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairEAMFSKernelAB, const int&, EV_FLOAT&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairEAMFSKernelAB, const int&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairEAMFSKernelAB, const typename Kokkos::TeamPolicy::member_type&, EV_FLOAT&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairEAMFSKernelAB, const typename Kokkos::TeamPolicy::member_type&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairEAMFSKernelC, const int&, EV_FLOAT&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairEAMFSKernelC, const int&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairEAMFSKernelC, const typename Kokkos::TeamPolicy::member_type&, EV_FLOAT&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairEAMFSKernelC, const typename Kokkos::TeamPolicy::member_type&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ev_tally(EV_FLOAT &ev, const int &i, const int &j, const KK_FLOAT &epair, const KK_FLOAT &fpair, const KK_FLOAT &delx, diff --git a/src/KOKKOS/pair_eam_kokkos.cpp b/src/KOKKOS/pair_eam_kokkos.cpp index 5f7d890f859..f7f80d8cd9a 100644 --- a/src/KOKKOS/pair_eam_kokkos.cpp +++ b/src/KOKKOS/pair_eam_kokkos.cpp @@ -464,6 +464,7 @@ int PairEAMKokkos::pack_forward_comm_kokkos(int n, DAT::tdual_int_1d } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairEAMKokkos::operator()(TagPairEAMPackForwardComm, const int &i) const { int j = d_sendlist(i); @@ -481,6 +482,7 @@ void PairEAMKokkos::unpack_forward_comm_kokkos(int n, int first_in, } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairEAMKokkos::operator()(TagPairEAMUnpackForwardComm, const int &i) const { d_fp[i + first] = static_cast(v_buf[i]); @@ -553,6 +555,7 @@ void PairEAMKokkos::unpack_reverse_comm(int n, int *list, double *bu /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairEAMKokkos::operator()(TagPairEAMInitialize, const int &i) const { d_rho[i] = 0; @@ -563,6 +566,7 @@ void PairEAMKokkos::operator()(TagPairEAMInitialize, const int &i) c ////Specialisation for Neighborlist types Half, HalfThread, Full template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairEAMKokkos::operator()(TagPairEAMKernelA, const int &ii) const { @@ -618,6 +622,7 @@ void PairEAMKokkos::operator()(TagPairEAMKernelA template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairEAMKokkos::operator()(TagPairEAMKernelB, const int &ii, EV_FLOAT& ev) const { @@ -647,6 +652,7 @@ void PairEAMKokkos::operator()(TagPairEAMKernelB, const int & template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairEAMKokkos::operator()(TagPairEAMKernelB, const int &ii) const { EV_FLOAT ev; @@ -658,6 +664,7 @@ void PairEAMKokkos::operator()(TagPairEAMKernelB, const int & ////Specialisation for Neighborlist types Half, HalfThread, Full template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairEAMKokkos::operator()(TagPairEAMKernelAB, const int &ii, EV_FLOAT& ev) const { @@ -722,6 +729,7 @@ void PairEAMKokkos::operator()(TagPairEAMKernelAB, const int template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairEAMKokkos::operator()(TagPairEAMKernelAB, const int &ii) const { EV_FLOAT ev; @@ -733,6 +741,7 @@ void PairEAMKokkos::operator()(TagPairEAMKernelAB, const int ////Specialisation for Neighborlist types Half, HalfThread, Full template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairEAMKokkos::operator()(TagPairEAMKernelC, const int &ii, EV_FLOAT& ev) const { @@ -832,6 +841,7 @@ void PairEAMKokkos::operator()(TagPairEAMKernelC template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairEAMKokkos::operator()(TagPairEAMKernelC, const int &ii) const { EV_FLOAT ev; @@ -843,6 +853,7 @@ void PairEAMKokkos::operator()(TagPairEAMKernelC template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairEAMKokkos::operator()(TagPairEAMKernelAB, const typename Kokkos::TeamPolicy::member_type& team_member, @@ -927,6 +938,7 @@ void PairEAMKokkos::operator()(TagPairEAMKernelAB, #endif template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairEAMKokkos::operator()(TagPairEAMKernelAB, const typename Kokkos::TeamPolicy::member_type& team_member) const { @@ -939,6 +951,7 @@ void PairEAMKokkos::operator()(TagPairEAMKernelAB, ////Specialisation for Neighborlist types Half, HalfThread, Full template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairEAMKokkos::operator()(TagPairEAMKernelC, const typename Kokkos::TeamPolicy::member_type& team_member, @@ -1059,6 +1072,7 @@ void PairEAMKokkos::operator()(TagPairEAMKernelC template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairEAMKokkos::operator()(TagPairEAMKernelC, /*const int &ii*/ @@ -1071,6 +1085,7 @@ void PairEAMKokkos::operator()(TagPairEAMKernelC template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairEAMKokkos::ev_tally(EV_FLOAT &ev, const int &i, const int &j, const KK_FLOAT &epair, const KK_FLOAT &fpair, const KK_FLOAT &delx, diff --git a/src/KOKKOS/pair_eam_kokkos.h b/src/KOKKOS/pair_eam_kokkos.h index 87010831dba..c13ab514a09 100644 --- a/src/KOKKOS/pair_eam_kokkos.h +++ b/src/KOKKOS/pair_eam_kokkos.h @@ -61,60 +61,75 @@ class PairEAMKokkos : public PairEAM, public KokkosBase { void init_style() override; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairEAMPackForwardComm, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairEAMUnpackForwardComm, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairEAMInitialize, const int&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairEAMKernelA, const int&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairEAMKernelB, const int&, EV_FLOAT&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairEAMKernelB, const int&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairEAMKernelAB, const int&, EV_FLOAT&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairEAMKernelAB, const int&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairEAMKernelAB, const typename Kokkos::TeamPolicy::member_type&, EV_FLOAT&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairEAMKernelAB, const typename Kokkos::TeamPolicy::member_type&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairEAMKernelC, const int&, EV_FLOAT&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairEAMKernelC, const int&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairEAMKernelC, const typename Kokkos::TeamPolicy::member_type&, EV_FLOAT&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairEAMKernelC, const typename Kokkos::TeamPolicy::member_type&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ev_tally(EV_FLOAT &ev, const int &i, const int &j, const KK_FLOAT &epair, const KK_FLOAT &fpair, const KK_FLOAT &delx, diff --git a/src/KOKKOS/pair_exp6_rx_kokkos.cpp b/src/KOKKOS/pair_exp6_rx_kokkos.cpp index 2853bcdb455..bbbaaaa43fc 100644 --- a/src/KOKKOS/pair_exp6_rx_kokkos.cpp +++ b/src/KOKKOS/pair_exp6_rx_kokkos.cpp @@ -348,6 +348,7 @@ void PairExp6rxKokkos::compute(int eflag_in, int vflag_in) } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairExp6rxKokkos::operator()(TagPairExp6rxZeroMixingWeights, const int &i) const { PairExp6ParamData.epsilon1[i] = 0.0; @@ -369,6 +370,7 @@ void PairExp6rxKokkos::operator()(TagPairExp6rxZeroMixingWeights, co } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairExp6rxKokkos::operator()(TagPairExp6rxgetMixingWeights, const int &i) const { getMixingWeights (i, PairExp6ParamData.epsilon1[i], @@ -391,6 +393,7 @@ void PairExp6rxKokkos::operator()(TagPairExp6rxgetMixingWeights, con template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairExp6rxKokkos::operator()(TagPairExp6rxCompute, const int &ii, EV_FLOAT& ev) const { @@ -752,6 +755,7 @@ void PairExp6rxKokkos::operator()(TagPairExp6rxCompute template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairExp6rxKokkos::operator()(TagPairExp6rxCompute, const int &ii) const { EV_FLOAT ev; @@ -762,6 +766,7 @@ void PairExp6rxKokkos::operator()(TagPairExp6rxCompute template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairExp6rxKokkos::operator()(TagPairExp6rxComputeNoAtomics, const int &ii, EV_FLOAT& ev) const { @@ -1132,6 +1137,7 @@ void PairExp6rxKokkos::operator()(TagPairExp6rxComputeNoAtomics +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT __powint(const KK_FLOAT& x, const int) { @@ -1147,6 +1153,7 @@ KK_FLOAT __powint(const KK_FLOAT& x, const int) template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairExp6rxKokkos::vectorized_operator(const int &ii, EV_FLOAT& ev) const { @@ -1598,6 +1605,7 @@ void PairExp6rxKokkos::vectorized_operator(const int &ii, EV_FLOAT& template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairExp6rxKokkos::operator()(TagPairExp6rxComputeNoAtomics, const int &ii) const { EV_FLOAT ev; @@ -1605,6 +1613,7 @@ void PairExp6rxKokkos::operator()(TagPairExp6rxComputeNoAtomics +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairExp6rxKokkos::operator()(TagPairExp6rxCollapseDupViews, const int &i) const { for (int n = 0; n < nthreads; n++) { @@ -1617,6 +1626,7 @@ void PairExp6rxKokkos::operator()(TagPairExp6rxCollapseDupViews, con } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairExp6rxKokkos::operator()(TagPairExp6rxZeroDupViews, const int &i) const { for (int n = 0; n < nthreads; n++) { @@ -1820,6 +1830,7 @@ void PairExp6rxKokkos::setup() /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairExp6rxKokkos::getMixingWeights(int id,KK_FLOAT &epsilon1,KK_FLOAT &alpha1,KK_FLOAT &rm1, KK_FLOAT &mixWtSite1,KK_FLOAT &epsilon2,KK_FLOAT &alpha2,KK_FLOAT &rm2,KK_FLOAT &mixWtSite2,KK_FLOAT &epsilon1_old,KK_FLOAT &alpha1_old,KK_FLOAT &rm1_old, KK_FLOAT &mixWtSite1old,KK_FLOAT &epsilon2_old,KK_FLOAT &alpha2_old,KK_FLOAT &rm2_old,KK_FLOAT &mixWtSite2old) const { @@ -2476,6 +2487,7 @@ void PairExp6rxKokkos::getMixingWeightsVect(const int np_total, int /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairExp6rxKokkos::exponentScaling(KK_FLOAT phi, KK_FLOAT &epsilon, KK_FLOAT &rm) const { @@ -2501,6 +2513,7 @@ void PairExp6rxKokkos::exponentScaling(KK_FLOAT phi, KK_FLOAT &epsil /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairExp6rxKokkos::polynomialScaling(KK_FLOAT phi, KK_FLOAT &alpha, KK_FLOAT &epsilon, KK_FLOAT &rm) const { @@ -2517,6 +2530,7 @@ void PairExp6rxKokkos::polynomialScaling(KK_FLOAT phi, KK_FLOAT &alp /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairExp6rxKokkos::func_rin(const KK_FLOAT &alpha) const { @@ -2534,6 +2548,7 @@ KK_FLOAT PairExp6rxKokkos::func_rin(const KK_FLOAT &alpha) const /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairExp6rxKokkos::expValue(KK_FLOAT value) const { @@ -2548,6 +2563,7 @@ KK_FLOAT PairExp6rxKokkos::expValue(KK_FLOAT value) const template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairExp6rxKokkos::ev_tally(EV_FLOAT &ev, const int &i, const int &j, const KK_FLOAT &epair, const KK_FLOAT &fpair, const KK_FLOAT &delx, @@ -2641,6 +2657,7 @@ void PairExp6rxKokkos::ev_tally(EV_FLOAT &ev, const int &i, const in /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION int PairExp6rxKokkos::sbmask(const int& j) const { return j >> SBBITS & 3; diff --git a/src/KOKKOS/pair_exp6_rx_kokkos.h b/src/KOKKOS/pair_exp6_rx_kokkos.h index e95ac2c456b..5849b30b583 100644 --- a/src/KOKKOS/pair_exp6_rx_kokkos.h +++ b/src/KOKKOS/pair_exp6_rx_kokkos.h @@ -92,44 +92,55 @@ class PairExp6rxKokkos : public PairExp6rx { void coeff(int, char **) override; void init_style() override; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairExp6rxZeroMixingWeights, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairExp6rxgetMixingWeights, const int&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairExp6rxCompute, const int&, EV_FLOAT&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairExp6rxCompute, const int&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairExp6rxComputeNoAtomics, const int&, EV_FLOAT&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void vectorized_operator(const int&, EV_FLOAT&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairExp6rxComputeNoAtomics, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairExp6rxCollapseDupViews, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairExp6rxZeroDupViews, const int&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ev_tally(EV_FLOAT &ev, const int &i, const int &j, const KK_FLOAT &epair, const KK_FLOAT &fpair, const KK_FLOAT &delx, const KK_FLOAT &dely, const KK_FLOAT &delz) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION int sbmask(const int& j) const; @@ -181,23 +192,28 @@ class PairExp6rxKokkos : public PairExp6rx { void read_file(char *) override; void setup() override; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void getMixingWeights(int, KK_FLOAT &, KK_FLOAT &, KK_FLOAT &, KK_FLOAT &, KK_FLOAT &, KK_FLOAT &, KK_FLOAT &, KK_FLOAT &, KK_FLOAT &, KK_FLOAT &, KK_FLOAT &, KK_FLOAT &, KK_FLOAT &, KK_FLOAT &, KK_FLOAT &, KK_FLOAT &) const; template void getMixingWeightsVect(const int, int, ArrayT &, ArrayT &, ArrayT &, ArrayT &, ArrayT &, ArrayT &, ArrayT &, ArrayT &, ArrayT &, ArrayT &, ArrayT &, ArrayT &, ArrayT &, ArrayT &, ArrayT &, ArrayT &) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void exponentScaling(KK_FLOAT, KK_FLOAT &, KK_FLOAT &) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void polynomialScaling(KK_FLOAT, KK_FLOAT &, KK_FLOAT &, KK_FLOAT &) const; double s_coeffAlpha[6],s_coeffEps[6],s_coeffRm[6]; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT func_rin(const KK_FLOAT &) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT expValue(const KK_FLOAT) const; diff --git a/src/KOKKOS/pair_gran_hooke_history_kokkos.cpp b/src/KOKKOS/pair_gran_hooke_history_kokkos.cpp index 889413d5f94..14c9841c54a 100644 --- a/src/KOKKOS/pair_gran_hooke_history_kokkos.cpp +++ b/src/KOKKOS/pair_gran_hooke_history_kokkos.cpp @@ -261,6 +261,7 @@ void PairGranHookeHistoryKokkos::compute(int eflag_in, int vflag_in) template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairGranHookeHistoryKokkos::operator()(TagPairGranHookeHistoryCompute, const int ii, EV_FLOAT &ev) const { @@ -463,6 +464,7 @@ void PairGranHookeHistoryKokkos::operator()(TagPairGranHookeHistoryC template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairGranHookeHistoryKokkos::operator()(TagPairGranHookeHistoryCompute, const int ii) const { EV_FLOAT ev; @@ -471,6 +473,7 @@ void PairGranHookeHistoryKokkos::operator()(TagPairGranHookeHistoryC template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairGranHookeHistoryKokkos::ev_tally_xyz(EV_FLOAT &ev, int i, int j, KK_FLOAT fx, KK_FLOAT fy, KK_FLOAT fz, diff --git a/src/KOKKOS/pair_gran_hooke_history_kokkos.h b/src/KOKKOS/pair_gran_hooke_history_kokkos.h index aceead44b4a..5c497c4a514 100644 --- a/src/KOKKOS/pair_gran_hooke_history_kokkos.h +++ b/src/KOKKOS/pair_gran_hooke_history_kokkos.h @@ -48,13 +48,16 @@ class PairGranHookeHistoryKokkos : public PairGranHookeHistory { void init_style() override; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairGranHookeHistoryCompute, const int, EV_FLOAT &ev) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairGranHookeHistoryCompute, const int) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ev_tally_xyz(EV_FLOAT &ev, int i, int j, KK_FLOAT fx, KK_FLOAT fy, KK_FLOAT fz, @@ -96,6 +99,7 @@ class PairGranHookeHistoryKokkos : public PairGranHookeHistory { FixNeighHistoryKokkos *fix_historyKK; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION int sbmask(const int& j) const {return j >> SBBITS & 3;} diff --git a/src/KOKKOS/pair_kokkos.h b/src/KOKKOS/pair_kokkos.h index 1ded42d5430..d8d3d7adaf5 100644 --- a/src/KOKKOS/pair_kokkos.h +++ b/src/KOKKOS/pair_kokkos.h @@ -102,6 +102,7 @@ struct PairComputeFunctor { // Set copymode = 1 so parent allocations aren't destructed by copies of the style ~PairComputeFunctor() {c.copymode = 1; list.copymode = 1;}; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION int sbmask(const int& j) const { return j >> SBBITS & 3; } @@ -743,6 +744,7 @@ struct PairComputeFunctor { return ev; } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ev_tally(EV_FLOAT &ev, const int &i, const int &j, const KK_FLOAT &epair, const KK_FLOAT &fpair, const KK_FLOAT &delx, @@ -814,12 +816,14 @@ struct PairComputeFunctor { } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(const int i) const { if (c.newton_pair) compute_item<0,1>(i,list,typename DoCoul::type()); else compute_item<0,0>(i,list,typename DoCoul::type()); } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(const int i, value_type &energy_virial) const { if (c.newton_pair) @@ -828,11 +832,13 @@ struct PairComputeFunctor { energy_virial += compute_item<1,0>(i,list,typename DoCoul::type()); } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(const typename Kokkos::TeamPolicy::member_type& team) const { compute_item_team(team,list,typename DoCoul::type()); } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(const typename Kokkos::TeamPolicy::member_type& team, value_type &energy_virial) const { energy_virial += compute_item_team_ev(team,list,typename DoCoul::type()); @@ -1007,6 +1013,7 @@ struct PairVirialFDotRCompute { typename AT::t_kkacc_1d_3_const_um f_, const int offset_):x(x_),f(f_),offset(offset_) {} +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(const int j, value_type &energy_virial) const { const int i = j + offset; diff --git a/src/KOKKOS/pair_lj96_cut_kokkos.cpp b/src/KOKKOS/pair_lj96_cut_kokkos.cpp index c9c77e3ef28..ae7898d1522 100644 --- a/src/KOKKOS/pair_lj96_cut_kokkos.cpp +++ b/src/KOKKOS/pair_lj96_cut_kokkos.cpp @@ -131,6 +131,7 @@ void PairLJ96CutKokkos::compute(int eflag_in, int vflag_in) template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairLJ96CutKokkos:: compute_fpair(const KK_FLOAT &rsq, const int &, const int &, const int &itype, const int &jtype) const { @@ -147,6 +148,7 @@ compute_fpair(const KK_FLOAT &rsq, const int &, const int &, const int &itype, c template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairLJ96CutKokkos:: compute_evdwl(const KK_FLOAT &rsq, const int &, const int &, const int &itype, const int &jtype) const { diff --git a/src/KOKKOS/pair_lj96_cut_kokkos.h b/src/KOKKOS/pair_lj96_cut_kokkos.h index a23536d6fd2..231e7008bc5 100644 --- a/src/KOKKOS/pair_lj96_cut_kokkos.h +++ b/src/KOKKOS/pair_lj96_cut_kokkos.h @@ -45,8 +45,10 @@ class PairLJ96CutKokkos : public PairLJ96Cut { double init_one(int, int) override; struct params_lj{ +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION params_lj() {cutsq=0,lj1=0;lj2=0;lj3=0;lj4=0;offset=0;}; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION params_lj(int /*i*/) {cutsq=0,lj1=0;lj2=0;lj3=0;lj4=0;offset=0;}; KK_FLOAT cutsq,lj1,lj2,lj3,lj4,offset; @@ -54,14 +56,17 @@ class PairLJ96CutKokkos : public PairLJ96Cut { protected: template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_fpair(const KK_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_evdwl(const KK_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_ecoul(const KK_FLOAT& /*rsq*/, const int& /*i*/, const int& /*j*/, const int& /*itype*/, const int& /*jtype*/) const { return 0; } diff --git a/src/KOKKOS/pair_lj_charmm_coul_charmm_implicit_kokkos.cpp b/src/KOKKOS/pair_lj_charmm_coul_charmm_implicit_kokkos.cpp index cd8b8d85ef9..36752d24fdd 100644 --- a/src/KOKKOS/pair_lj_charmm_coul_charmm_implicit_kokkos.cpp +++ b/src/KOKKOS/pair_lj_charmm_coul_charmm_implicit_kokkos.cpp @@ -159,6 +159,7 @@ void PairLJCharmmCoulCharmmImplicitKokkos::compute(int eflag_in, int ---------------------------------------------------------------------- */ template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairLJCharmmCoulCharmmImplicitKokkos:: compute_fpair(const KK_FLOAT& rsq, const int& /*i*/, const int& /*j*/, @@ -189,6 +190,7 @@ compute_fpair(const KK_FLOAT& rsq, const int& /*i*/, const int& /*j*/, ---------------------------------------------------------------------- */ template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairLJCharmmCoulCharmmImplicitKokkos:: compute_evdwl(const KK_FLOAT& rsq, const int& /*i*/, const int& /*j*/, @@ -216,6 +218,7 @@ compute_evdwl(const KK_FLOAT& rsq, const int& /*i*/, const int& /*j*/, ---------------------------------------------------------------------- */ template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairLJCharmmCoulCharmmImplicitKokkos:: compute_fcoul(const KK_FLOAT& rsq, const int& /*i*/, const int&j, @@ -243,6 +246,7 @@ compute_fcoul(const KK_FLOAT& rsq, const int& /*i*/, const int&j, ---------------------------------------------------------------------- */ template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairLJCharmmCoulCharmmImplicitKokkos:: compute_ecoul(const KK_FLOAT& rsq, const int& /*i*/, const int&j, diff --git a/src/KOKKOS/pair_lj_charmm_coul_charmm_implicit_kokkos.h b/src/KOKKOS/pair_lj_charmm_coul_charmm_implicit_kokkos.h index d440f683916..01a55d193a0 100644 --- a/src/KOKKOS/pair_lj_charmm_coul_charmm_implicit_kokkos.h +++ b/src/KOKKOS/pair_lj_charmm_coul_charmm_implicit_kokkos.h @@ -48,21 +48,25 @@ class PairLJCharmmCoulCharmmImplicitKokkos : public PairLJCharmmCoulCharmmImplic protected: template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_fpair(const KK_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_fcoul(const KK_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype, const KK_FLOAT& factor_coul, const KK_FLOAT& qtmp) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_evdwl(const KK_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_ecoul(const KK_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype, const KK_FLOAT& factor_coul, const KK_FLOAT& qtmp) const; diff --git a/src/KOKKOS/pair_lj_charmm_coul_charmm_kokkos.cpp b/src/KOKKOS/pair_lj_charmm_coul_charmm_kokkos.cpp index 9507d6b4040..db22bab350e 100644 --- a/src/KOKKOS/pair_lj_charmm_coul_charmm_kokkos.cpp +++ b/src/KOKKOS/pair_lj_charmm_coul_charmm_kokkos.cpp @@ -160,6 +160,7 @@ void PairLJCharmmCoulCharmmKokkos::compute(int eflag_in, int vflag_i ---------------------------------------------------------------------- */ template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairLJCharmmCoulCharmmKokkos:: compute_fpair(const KK_FLOAT& rsq, const int& /*i*/, const int& /*j*/, @@ -190,6 +191,7 @@ compute_fpair(const KK_FLOAT& rsq, const int& /*i*/, const int& /*j*/, ---------------------------------------------------------------------- */ template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairLJCharmmCoulCharmmKokkos:: compute_evdwl(const KK_FLOAT& rsq, const int& /*i*/, const int& /*j*/, @@ -217,6 +219,7 @@ compute_evdwl(const KK_FLOAT& rsq, const int& /*i*/, const int& /*j*/, ---------------------------------------------------------------------- */ template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairLJCharmmCoulCharmmKokkos:: compute_fcoul(const KK_FLOAT& rsq, const int& /*i*/, const int&j, @@ -243,6 +246,7 @@ compute_fcoul(const KK_FLOAT& rsq, const int& /*i*/, const int&j, ---------------------------------------------------------------------- */ template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairLJCharmmCoulCharmmKokkos:: compute_ecoul(const KK_FLOAT& rsq, const int& /*i*/, const int&j, diff --git a/src/KOKKOS/pair_lj_charmm_coul_charmm_kokkos.h b/src/KOKKOS/pair_lj_charmm_coul_charmm_kokkos.h index 3dde277a75e..e2e694baf7e 100644 --- a/src/KOKKOS/pair_lj_charmm_coul_charmm_kokkos.h +++ b/src/KOKKOS/pair_lj_charmm_coul_charmm_kokkos.h @@ -48,21 +48,25 @@ class PairLJCharmmCoulCharmmKokkos : public PairLJCharmmCoulCharmm { protected: template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_fpair(const KK_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_fcoul(const KK_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype, const KK_FLOAT& factor_coul, const KK_FLOAT& qtmp) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_evdwl(const KK_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_ecoul(const KK_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype, const KK_FLOAT& factor_coul, const KK_FLOAT& qtmp) const; diff --git a/src/KOKKOS/pair_lj_charmm_coul_long_kokkos.cpp b/src/KOKKOS/pair_lj_charmm_coul_long_kokkos.cpp index 9d51d5dc158..1ec71d20e19 100644 --- a/src/KOKKOS/pair_lj_charmm_coul_long_kokkos.cpp +++ b/src/KOKKOS/pair_lj_charmm_coul_long_kokkos.cpp @@ -165,6 +165,7 @@ void PairLJCharmmCoulLongKokkos::compute(int eflag_in, int vflag_in) ---------------------------------------------------------------------- */ template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairLJCharmmCoulLongKokkos:: compute_fpair(const KK_FLOAT& rsq, const int& /*i*/, const int& /*j*/, @@ -195,6 +196,7 @@ compute_fpair(const KK_FLOAT& rsq, const int& /*i*/, const int& /*j*/, ---------------------------------------------------------------------- */ template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairLJCharmmCoulLongKokkos:: compute_evdwl(const KK_FLOAT& rsq, const int& /*i*/, const int& /*j*/, @@ -220,6 +222,7 @@ compute_evdwl(const KK_FLOAT& rsq, const int& /*i*/, const int& /*j*/, ---------------------------------------------------------------------- */ template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairLJCharmmCoulLongKokkos:: compute_fcoul(const KK_FLOAT& rsq, const int& /*i*/, const int&j, @@ -258,6 +261,7 @@ compute_fcoul(const KK_FLOAT& rsq, const int& /*i*/, const int&j, ---------------------------------------------------------------------- */ template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairLJCharmmCoulLongKokkos:: compute_ecoul(const KK_FLOAT& rsq, const int& /*i*/, const int&j, diff --git a/src/KOKKOS/pair_lj_charmm_coul_long_kokkos.h b/src/KOKKOS/pair_lj_charmm_coul_long_kokkos.h index 08e9d3b8a8b..210268893a5 100644 --- a/src/KOKKOS/pair_lj_charmm_coul_long_kokkos.h +++ b/src/KOKKOS/pair_lj_charmm_coul_long_kokkos.h @@ -47,21 +47,25 @@ class PairLJCharmmCoulLongKokkos : public PairLJCharmmCoulLong { protected: template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_fpair(const KK_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_fcoul(const KK_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype, const KK_FLOAT& factor_coul, const KK_FLOAT& qtmp) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_evdwl(const KK_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_ecoul(const KK_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype, const KK_FLOAT& factor_coul, const KK_FLOAT& qtmp) const; diff --git a/src/KOKKOS/pair_lj_charmmfsw_coul_long_kokkos.cpp b/src/KOKKOS/pair_lj_charmmfsw_coul_long_kokkos.cpp index 6d068ad149a..78027355699 100644 --- a/src/KOKKOS/pair_lj_charmmfsw_coul_long_kokkos.cpp +++ b/src/KOKKOS/pair_lj_charmmfsw_coul_long_kokkos.cpp @@ -165,6 +165,7 @@ void PairLJCharmmfswCoulLongKokkos::compute(int eflag_in, int vflag_ ---------------------------------------------------------------------- */ template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairLJCharmmfswCoulLongKokkos:: compute_fpair(const KK_FLOAT& rsq, const int& /*i*/, const int& /*j*/, @@ -191,6 +192,7 @@ compute_fpair(const KK_FLOAT& rsq, const int& /*i*/, const int& /*j*/, ---------------------------------------------------------------------- */ template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairLJCharmmfswCoulLongKokkos:: compute_evdwl(const KK_FLOAT& rsq, const int& /*i*/, const int& /*j*/, @@ -224,6 +226,7 @@ compute_evdwl(const KK_FLOAT& rsq, const int& /*i*/, const int& /*j*/, ---------------------------------------------------------------------- */ template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairLJCharmmfswCoulLongKokkos:: compute_fcoul(const KK_FLOAT& rsq, const int& /*i*/, const int&j, @@ -262,6 +265,7 @@ compute_fcoul(const KK_FLOAT& rsq, const int& /*i*/, const int&j, ---------------------------------------------------------------------- */ template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairLJCharmmfswCoulLongKokkos:: compute_ecoul(const KK_FLOAT& rsq, const int& /*i*/, const int&j, diff --git a/src/KOKKOS/pair_lj_charmmfsw_coul_long_kokkos.h b/src/KOKKOS/pair_lj_charmmfsw_coul_long_kokkos.h index 0ce4822590d..19032bebcbe 100644 --- a/src/KOKKOS/pair_lj_charmmfsw_coul_long_kokkos.h +++ b/src/KOKKOS/pair_lj_charmmfsw_coul_long_kokkos.h @@ -47,19 +47,23 @@ class PairLJCharmmfswCoulLongKokkos : public PairLJCharmmfswCoulLong { protected: template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_fpair(const KK_FLOAT& rsq, const int& i, const int& j, const int& itype, const int& jtype) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_evdwl(const KK_FLOAT& rsq, const int& i, const int& j, const int& itype, const int& jtype) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_fcoul(const KK_FLOAT& rsq, const int& i, const int& j, const int& itype, const int& jtype, const KK_FLOAT& factor_coul, const KK_FLOAT& qtmp) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_ecoul(const KK_FLOAT& rsq, const int& i, const int& j, const int& itype, const int& jtype, const KK_FLOAT& factor_coul, const KK_FLOAT& qtmp) const; diff --git a/src/KOKKOS/pair_lj_class2_coul_cut_kokkos.cpp b/src/KOKKOS/pair_lj_class2_coul_cut_kokkos.cpp index 3586b2cdea6..a744b0f2f5d 100644 --- a/src/KOKKOS/pair_lj_class2_coul_cut_kokkos.cpp +++ b/src/KOKKOS/pair_lj_class2_coul_cut_kokkos.cpp @@ -153,6 +153,7 @@ void PairLJClass2CoulCutKokkos::compute(int eflag_in, int vflag_in) ---------------------------------------------------------------------- */ template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairLJClass2CoulCutKokkos:: compute_fpair(const KK_FLOAT &rsq, const int &, const int &, @@ -174,6 +175,7 @@ compute_fpair(const KK_FLOAT &rsq, const int &, const int &, ---------------------------------------------------------------------- */ template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairLJClass2CoulCutKokkos:: compute_fcoul(const KK_FLOAT &rsq, const int &/*i*/, const int &j, @@ -193,6 +195,7 @@ compute_fcoul(const KK_FLOAT &rsq, const int &/*i*/, const int &j, ---------------------------------------------------------------------- */ template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairLJClass2CoulCutKokkos:: compute_evdwl(const KK_FLOAT& rsq, const int& i, const int&j, @@ -214,6 +217,7 @@ compute_evdwl(const KK_FLOAT& rsq, const int& i, const int&j, ---------------------------------------------------------------------- */ template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairLJClass2CoulCutKokkos:: compute_ecoul(const KK_FLOAT& rsq, const int& /*i*/, const int&j, diff --git a/src/KOKKOS/pair_lj_class2_coul_cut_kokkos.h b/src/KOKKOS/pair_lj_class2_coul_cut_kokkos.h index 6a3b0838531..9befb6a5a9f 100644 --- a/src/KOKKOS/pair_lj_class2_coul_cut_kokkos.h +++ b/src/KOKKOS/pair_lj_class2_coul_cut_kokkos.h @@ -47,21 +47,25 @@ class PairLJClass2CoulCutKokkos : public PairLJClass2CoulCut { protected: template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_fpair(const KK_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_fcoul(const KK_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype, const KK_FLOAT& factor_coul, const KK_FLOAT& qtmp) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_evdwl(const KK_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_ecoul(const KK_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype, const KK_FLOAT& factor_coul, const KK_FLOAT& qtmp) const; diff --git a/src/KOKKOS/pair_lj_class2_coul_long_kokkos.cpp b/src/KOKKOS/pair_lj_class2_coul_long_kokkos.cpp index 2d04ff12563..7917b3fdb23 100644 --- a/src/KOKKOS/pair_lj_class2_coul_long_kokkos.cpp +++ b/src/KOKKOS/pair_lj_class2_coul_long_kokkos.cpp @@ -158,6 +158,7 @@ void PairLJClass2CoulLongKokkos::compute(int eflag_in, int vflag_in) ---------------------------------------------------------------------- */ template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairLJClass2CoulLongKokkos:: compute_fpair(const KK_FLOAT &rsq, const int &, const int &, @@ -179,6 +180,7 @@ compute_fpair(const KK_FLOAT &rsq, const int &, const int &, ---------------------------------------------------------------------- */ template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairLJClass2CoulLongKokkos:: compute_fcoul(const KK_FLOAT &rsq, const int &/*i*/, const int &j, @@ -217,6 +219,7 @@ compute_fcoul(const KK_FLOAT &rsq, const int &/*i*/, const int &j, ---------------------------------------------------------------------- */ template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairLJClass2CoulLongKokkos:: compute_evdwl(const KK_FLOAT& rsq, const int& i, const int&j, @@ -238,6 +241,7 @@ compute_evdwl(const KK_FLOAT& rsq, const int& i, const int&j, ---------------------------------------------------------------------- */ template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairLJClass2CoulLongKokkos:: compute_ecoul(const KK_FLOAT& rsq, const int& /*i*/, const int&j, diff --git a/src/KOKKOS/pair_lj_class2_coul_long_kokkos.h b/src/KOKKOS/pair_lj_class2_coul_long_kokkos.h index 4129e9b6a35..b05f3728100 100644 --- a/src/KOKKOS/pair_lj_class2_coul_long_kokkos.h +++ b/src/KOKKOS/pair_lj_class2_coul_long_kokkos.h @@ -47,21 +47,25 @@ class PairLJClass2CoulLongKokkos : public PairLJClass2CoulLong { protected: template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_fpair(const KK_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_fcoul(const KK_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype, const KK_FLOAT& factor_coul, const KK_FLOAT& qtmp) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_evdwl(const KK_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_ecoul(const KK_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype, const KK_FLOAT& factor_coul, const KK_FLOAT& qtmp) const; diff --git a/src/KOKKOS/pair_lj_class2_kokkos.cpp b/src/KOKKOS/pair_lj_class2_kokkos.cpp index 4fad9f13384..ed4e41cee1f 100644 --- a/src/KOKKOS/pair_lj_class2_kokkos.cpp +++ b/src/KOKKOS/pair_lj_class2_kokkos.cpp @@ -137,6 +137,7 @@ void PairLJClass2Kokkos::compute(int eflag_in, int vflag_in) template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairLJClass2Kokkos:: compute_fpair(const KK_FLOAT &rsq, const int &, const int &, const int &itype, const int &jtype) const { @@ -155,6 +156,7 @@ compute_fpair(const KK_FLOAT &rsq, const int &, const int &, const int &itype, c template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairLJClass2Kokkos:: compute_evdwl(const KK_FLOAT &rsq, const int &, const int &, const int &itype, const int &jtype) const { diff --git a/src/KOKKOS/pair_lj_class2_kokkos.h b/src/KOKKOS/pair_lj_class2_kokkos.h index e27e98ebf3b..16aadf70d33 100644 --- a/src/KOKKOS/pair_lj_class2_kokkos.h +++ b/src/KOKKOS/pair_lj_class2_kokkos.h @@ -45,8 +45,10 @@ class PairLJClass2Kokkos : public PairLJClass2 { double init_one(int, int) override; struct params_lj{ +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION params_lj() {cutsq=0,lj1=0;lj2=0;lj3=0;lj4=0;offset=0;}; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION params_lj(int /*i*/) {cutsq=0,lj1=0;lj2=0;lj3=0;lj4=0;offset=0;}; KK_FLOAT cutsq,lj1,lj2,lj3,lj4,offset; @@ -54,19 +56,23 @@ class PairLJClass2Kokkos : public PairLJClass2 { protected: template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_fpair(const KK_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_evdwl(const KK_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_ecoul(const KK_FLOAT& /*rsq*/, const int& /*i*/, const int& /*j*/, const int& /*itype*/, const int& /*jtype*/) const { return 0; } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_fcoul(const KK_FLOAT& /*rsq*/, const int& /*i*/, const int& /*j*/, const int& /*itype*/, const int& /*jtype*/, const KK_FLOAT& /*factor_coul*/, const KK_FLOAT& /*qtmp*/) const { return 0; } diff --git a/src/KOKKOS/pair_lj_cut_coul_cut_kokkos.cpp b/src/KOKKOS/pair_lj_cut_coul_cut_kokkos.cpp index 6dd636ca466..0245d878384 100644 --- a/src/KOKKOS/pair_lj_cut_coul_cut_kokkos.cpp +++ b/src/KOKKOS/pair_lj_cut_coul_cut_kokkos.cpp @@ -147,6 +147,7 @@ void PairLJCutCoulCutKokkos::compute(int eflag_in, int vflag_in) ---------------------------------------------------------------------- */ template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairLJCutCoulCutKokkos:: compute_fpair(const KK_FLOAT& rsq, const int& /*i*/, const int& /*j*/, @@ -167,6 +168,7 @@ compute_fpair(const KK_FLOAT& rsq, const int& /*i*/, const int& /*j*/, ---------------------------------------------------------------------- */ template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairLJCutCoulCutKokkos:: compute_fcoul(const KK_FLOAT& rsq, const int& /*i*/, const int&j, @@ -186,6 +188,7 @@ compute_fcoul(const KK_FLOAT& rsq, const int& /*i*/, const int&j, ---------------------------------------------------------------------- */ template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairLJCutCoulCutKokkos:: compute_evdwl(const KK_FLOAT& rsq, const int& /*i*/, const int& /*j*/, @@ -205,6 +208,7 @@ compute_evdwl(const KK_FLOAT& rsq, const int& /*i*/, const int& /*j*/, ---------------------------------------------------------------------- */ template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairLJCutCoulCutKokkos:: compute_ecoul(const KK_FLOAT& rsq, const int& /*i*/, const int&j, diff --git a/src/KOKKOS/pair_lj_cut_coul_cut_kokkos.h b/src/KOKKOS/pair_lj_cut_coul_cut_kokkos.h index d07c15f40cf..334ac9a71d1 100644 --- a/src/KOKKOS/pair_lj_cut_coul_cut_kokkos.h +++ b/src/KOKKOS/pair_lj_cut_coul_cut_kokkos.h @@ -46,21 +46,25 @@ class PairLJCutCoulCutKokkos : public PairLJCutCoulCut { protected: template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_fpair(const KK_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_fcoul(const KK_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype, const KK_FLOAT& factor_coul, const KK_FLOAT& qtmp) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_evdwl(const KK_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_ecoul(const KK_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype, const KK_FLOAT& factor_coul, const KK_FLOAT& qtmp) const; diff --git a/src/KOKKOS/pair_lj_cut_coul_debye_kokkos.cpp b/src/KOKKOS/pair_lj_cut_coul_debye_kokkos.cpp index 6be7a61832b..2f99f9fbdd8 100644 --- a/src/KOKKOS/pair_lj_cut_coul_debye_kokkos.cpp +++ b/src/KOKKOS/pair_lj_cut_coul_debye_kokkos.cpp @@ -156,6 +156,7 @@ void PairLJCutCoulDebyeKokkos::compute(int eflag_in, int vflag_in) ---------------------------------------------------------------------- */ template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairLJCutCoulDebyeKokkos:: compute_fpair(const KK_FLOAT& rsq, const int& /*i*/, const int& /*j*/, @@ -176,6 +177,7 @@ compute_fpair(const KK_FLOAT& rsq, const int& /*i*/, const int& /*j*/, ---------------------------------------------------------------------- */ template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairLJCutCoulDebyeKokkos:: compute_fcoul(const KK_FLOAT& rsq, const int& /*i*/, const int&j, @@ -199,6 +201,7 @@ compute_fcoul(const KK_FLOAT& rsq, const int& /*i*/, const int&j, ---------------------------------------------------------------------- */ template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairLJCutCoulDebyeKokkos:: compute_evdwl(const KK_FLOAT& rsq, const int& /*i*/, const int& /*j*/, @@ -218,6 +221,7 @@ compute_evdwl(const KK_FLOAT& rsq, const int& /*i*/, const int& /*j*/, ---------------------------------------------------------------------- */ template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairLJCutCoulDebyeKokkos:: compute_ecoul(const KK_FLOAT& rsq, const int& /*i*/, const int&j, diff --git a/src/KOKKOS/pair_lj_cut_coul_debye_kokkos.h b/src/KOKKOS/pair_lj_cut_coul_debye_kokkos.h index fda0596ee96..a132fcdff49 100644 --- a/src/KOKKOS/pair_lj_cut_coul_debye_kokkos.h +++ b/src/KOKKOS/pair_lj_cut_coul_debye_kokkos.h @@ -46,21 +46,25 @@ class PairLJCutCoulDebyeKokkos : public PairLJCutCoulDebye { protected: template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_fpair(const KK_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_fcoul(const KK_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype, const KK_FLOAT& factor_coul, const KK_FLOAT& qtmp) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_evdwl(const KK_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_ecoul(const KK_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype, const KK_FLOAT& factor_coul, const KK_FLOAT& qtmp) const; diff --git a/src/KOKKOS/pair_lj_cut_coul_dsf_kokkos.cpp b/src/KOKKOS/pair_lj_cut_coul_dsf_kokkos.cpp index 79075911d56..7313abe91e1 100644 --- a/src/KOKKOS/pair_lj_cut_coul_dsf_kokkos.cpp +++ b/src/KOKKOS/pair_lj_cut_coul_dsf_kokkos.cpp @@ -168,6 +168,7 @@ void PairLJCutCoulDSFKokkos::compute(int eflag_in, int vflag_in) ---------------------------------------------------------------------- */ template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairLJCutCoulDSFKokkos:: compute_fpair(const KK_FLOAT& rsq, const int& /*i*/, const int& /*j*/, @@ -188,6 +189,7 @@ compute_fpair(const KK_FLOAT& rsq, const int& /*i*/, const int& /*j*/, ---------------------------------------------------------------------- */ template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairLJCutCoulDSFKokkos:: compute_evdwl(const KK_FLOAT& rsq, const int& /*i*/, const int& /*j*/, @@ -207,6 +209,7 @@ compute_evdwl(const KK_FLOAT& rsq, const int& /*i*/, const int& /*j*/, ---------------------------------------------------------------------- */ template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairLJCutCoulDSFKokkos:: compute_fcoul(const KK_FLOAT& rsq, const int& /*i*/, const int&j, @@ -229,6 +232,7 @@ compute_fcoul(const KK_FLOAT& rsq, const int& /*i*/, const int&j, ---------------------------------------------------------------------- */ template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairLJCutCoulDSFKokkos:: compute_ecoul(const KK_FLOAT& rsq, const int& /*i*/, const int&j, diff --git a/src/KOKKOS/pair_lj_cut_coul_dsf_kokkos.h b/src/KOKKOS/pair_lj_cut_coul_dsf_kokkos.h index abc9d47b25e..b448018e24d 100644 --- a/src/KOKKOS/pair_lj_cut_coul_dsf_kokkos.h +++ b/src/KOKKOS/pair_lj_cut_coul_dsf_kokkos.h @@ -46,21 +46,25 @@ class PairLJCutCoulDSFKokkos : public PairLJCutCoulDSF { protected: template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_fpair(const KK_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_fcoul(const KK_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype, const KK_FLOAT& factor_coul, const KK_FLOAT& qtmp) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_evdwl(const KK_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_ecoul(const KK_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype, const KK_FLOAT& factor_coul, const KK_FLOAT& qtmp) const; diff --git a/src/KOKKOS/pair_lj_cut_coul_long_kokkos.cpp b/src/KOKKOS/pair_lj_cut_coul_long_kokkos.cpp index 30bbfd1ef3e..e1d99faa65c 100644 --- a/src/KOKKOS/pair_lj_cut_coul_long_kokkos.cpp +++ b/src/KOKKOS/pair_lj_cut_coul_long_kokkos.cpp @@ -159,6 +159,7 @@ void PairLJCutCoulLongKokkos::compute(int eflag_in, int vflag_in) ---------------------------------------------------------------------- */ template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairLJCutCoulLongKokkos:: compute_fpair(const KK_FLOAT& rsq, const int& /*i*/, const int& /*j*/, @@ -179,6 +180,7 @@ compute_fpair(const KK_FLOAT& rsq, const int& /*i*/, const int& /*j*/, ---------------------------------------------------------------------- */ template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairLJCutCoulLongKokkos:: compute_fcoul(const KK_FLOAT& rsq, const int& /*i*/, const int&j, @@ -218,6 +220,7 @@ compute_fcoul(const KK_FLOAT& rsq, const int& /*i*/, const int&j, ---------------------------------------------------------------------- */ template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairLJCutCoulLongKokkos:: compute_evdwl(const KK_FLOAT& rsq, const int& /*i*/, const int& /*j*/, @@ -237,6 +240,7 @@ compute_evdwl(const KK_FLOAT& rsq, const int& /*i*/, const int& /*j*/, ---------------------------------------------------------------------- */ template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairLJCutCoulLongKokkos:: compute_ecoul(const KK_FLOAT& rsq, const int& /*i*/, const int&j, diff --git a/src/KOKKOS/pair_lj_cut_coul_long_kokkos.h b/src/KOKKOS/pair_lj_cut_coul_long_kokkos.h index 9b45a6b6151..1e18198169c 100644 --- a/src/KOKKOS/pair_lj_cut_coul_long_kokkos.h +++ b/src/KOKKOS/pair_lj_cut_coul_long_kokkos.h @@ -47,21 +47,25 @@ class PairLJCutCoulLongKokkos : public PairLJCutCoulLong { protected: template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_fpair(const KK_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_fcoul(const KK_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype, const KK_FLOAT& factor_coul, const KK_FLOAT& qtmp) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_evdwl(const KK_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_ecoul(const KK_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype, const KK_FLOAT& factor_coul, const KK_FLOAT& qtmp) const; diff --git a/src/KOKKOS/pair_lj_cut_dipole_cut_kokkos.cpp b/src/KOKKOS/pair_lj_cut_dipole_cut_kokkos.cpp index fc750925695..ff3cb64f7cf 100644 --- a/src/KOKKOS/pair_lj_cut_dipole_cut_kokkos.cpp +++ b/src/KOKKOS/pair_lj_cut_dipole_cut_kokkos.cpp @@ -220,6 +220,7 @@ void PairLJCutDipoleCutKokkos::compute(int eflag_in, int vflag_in) ---------------------------------------------------------------------- */ template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairLJCutDipoleCutKokkos::operator()(TagPairLJCutDipoleCutKernel, const int ii, EV_FLOAT &ev) const { @@ -431,6 +432,7 @@ void PairLJCutDipoleCutKokkos::operator()(TagPairLJCutDipoleCutKerne template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairLJCutDipoleCutKokkos::operator()(TagPairLJCutDipoleCutKernel, const int ii) const { EV_FLOAT ev; @@ -441,6 +443,7 @@ void PairLJCutDipoleCutKokkos::operator()(TagPairLJCutDipoleCutKerne template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairLJCutDipoleCutKokkos::ev_tally_xyz(EV_FLOAT & ev, int i, int j, const KK_FLOAT &epair, KK_FLOAT fx, KK_FLOAT fy, KK_FLOAT fz, @@ -617,6 +620,7 @@ double PairLJCutDipoleCutKokkos::init_one(int i, int j) /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION int PairLJCutDipoleCutKokkos::sbmask(const int& j) const { return j >> SBBITS & 3; diff --git a/src/KOKKOS/pair_lj_cut_dipole_cut_kokkos.h b/src/KOKKOS/pair_lj_cut_dipole_cut_kokkos.h index 9fa3a2a8cbc..0a4bf4a3841 100644 --- a/src/KOKKOS/pair_lj_cut_dipole_cut_kokkos.h +++ b/src/KOKKOS/pair_lj_cut_dipole_cut_kokkos.h @@ -49,18 +49,22 @@ class PairLJCutDipoleCutKokkos : public PairLJCutDipoleCut { double init_one(int, int) override; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairLJCutDipoleCutKernel, const int, EV_FLOAT &ev) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairLJCutDipoleCutKernel, const int) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ev_tally_xyz(EV_FLOAT &ev, int i, int j, const KK_FLOAT &epair, KK_FLOAT fx, KK_FLOAT fy, KK_FLOAT fz, KK_FLOAT delx, KK_FLOAT dely, KK_FLOAT delz) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION int sbmask(const int& j) const; diff --git a/src/KOKKOS/pair_lj_cut_kokkos.cpp b/src/KOKKOS/pair_lj_cut_kokkos.cpp index f60622ce5bb..eae533390b7 100644 --- a/src/KOKKOS/pair_lj_cut_kokkos.cpp +++ b/src/KOKKOS/pair_lj_cut_kokkos.cpp @@ -131,6 +131,7 @@ void PairLJCutKokkos::compute(int eflag_in, int vflag_in) template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairLJCutKokkos:: compute_fpair(const KK_FLOAT &rsq, const int &, const int &, const int &itype, const int &jtype) const { @@ -146,6 +147,7 @@ compute_fpair(const KK_FLOAT &rsq, const int &, const int &, const int &itype, c template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairLJCutKokkos:: compute_evdwl(const KK_FLOAT &rsq, const int &, const int &, const int &itype, const int &jtype) const { diff --git a/src/KOKKOS/pair_lj_cut_kokkos.h b/src/KOKKOS/pair_lj_cut_kokkos.h index a0c50afd80b..cd5a1d03f21 100644 --- a/src/KOKKOS/pair_lj_cut_kokkos.h +++ b/src/KOKKOS/pair_lj_cut_kokkos.h @@ -45,8 +45,10 @@ class PairLJCutKokkos : public PairLJCut { double init_one(int, int) override; struct params_lj{ +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION params_lj() {cutsq=0,lj1=0;lj2=0;lj3=0;lj4=0;offset=0;}; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION params_lj(int /*i*/) {cutsq=0,lj1=0;lj2=0;lj3=0;lj4=0;offset=0;}; KK_FLOAT cutsq,lj1,lj2,lj3,lj4,offset; @@ -54,14 +56,17 @@ class PairLJCutKokkos : public PairLJCut { protected: template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_fpair(const KK_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_evdwl(const KK_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_ecoul(const KK_FLOAT& /*rsq*/, const int& /*i*/, const int& /*j*/, const int& /*itype*/, const int& /*jtype*/) const { return 0; } diff --git a/src/KOKKOS/pair_lj_expand_coul_long_kokkos.cpp b/src/KOKKOS/pair_lj_expand_coul_long_kokkos.cpp index d4f45d5c79b..daba83cc732 100644 --- a/src/KOKKOS/pair_lj_expand_coul_long_kokkos.cpp +++ b/src/KOKKOS/pair_lj_expand_coul_long_kokkos.cpp @@ -164,6 +164,7 @@ void PairLJExpandCoulLongKokkos::compute(int eflag_in, int vflag_in) ---------------------------------------------------------------------- */ template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairLJExpandCoulLongKokkos:: compute_fpair(const KK_FLOAT& rsq, const int& /*i*/, const int& /*j*/, @@ -186,6 +187,7 @@ compute_fpair(const KK_FLOAT& rsq, const int& /*i*/, const int& /*j*/, ---------------------------------------------------------------------- */ template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairLJExpandCoulLongKokkos:: compute_fcoul(const KK_FLOAT& rsq, const int& /*i*/, const int&j, @@ -223,6 +225,7 @@ compute_fcoul(const KK_FLOAT& rsq, const int& /*i*/, const int&j, ---------------------------------------------------------------------- */ template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairLJExpandCoulLongKokkos:: compute_evdwl(const KK_FLOAT& rsq, const int& /*i*/, const int& /*j*/, @@ -244,6 +247,7 @@ compute_evdwl(const KK_FLOAT& rsq, const int& /*i*/, const int& /*j*/, ---------------------------------------------------------------------- */ template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairLJExpandCoulLongKokkos:: compute_ecoul(const KK_FLOAT& rsq, const int& /*i*/, const int&j, diff --git a/src/KOKKOS/pair_lj_expand_coul_long_kokkos.h b/src/KOKKOS/pair_lj_expand_coul_long_kokkos.h index ef294bfe3a6..fb7e4fb6409 100644 --- a/src/KOKKOS/pair_lj_expand_coul_long_kokkos.h +++ b/src/KOKKOS/pair_lj_expand_coul_long_kokkos.h @@ -47,8 +47,10 @@ class PairLJExpandCoulLongKokkos : public PairLJExpandCoulLong { double init_one(int, int) override; struct params_lj_coul{ +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION params_lj_coul() {cut_ljsq=0;cut_coulsq=0;lj1=0;lj2=0;lj3=0;lj4=0;offset=0;shift=0;}; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION params_lj_coul(int /*i*/) {cut_ljsq=0;cut_coulsq=0;lj1=0;lj2=0;lj3=0;lj4=0;offset=0;shift=0;}; KK_FLOAT cut_ljsq,cut_coulsq,lj1,lj2,lj3,lj4,offset,shift; @@ -56,21 +58,25 @@ class PairLJExpandCoulLongKokkos : public PairLJExpandCoulLong { protected: template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_fpair(const KK_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_fcoul(const KK_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype, const KK_FLOAT& factor_coul, const KK_FLOAT& qtmp) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_evdwl(const KK_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_ecoul(const KK_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype, const KK_FLOAT& factor_coul, const KK_FLOAT& qtmp) const; diff --git a/src/KOKKOS/pair_lj_expand_kokkos.cpp b/src/KOKKOS/pair_lj_expand_kokkos.cpp index 753e3291269..f2cb4dd6a39 100644 --- a/src/KOKKOS/pair_lj_expand_kokkos.cpp +++ b/src/KOKKOS/pair_lj_expand_kokkos.cpp @@ -139,6 +139,7 @@ void PairLJExpandKokkos::compute(int eflag_in, int vflag_in) template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairLJExpandKokkos:: compute_fpair(const KK_FLOAT& rsq, const int& /*i*/, const int& /*j*/, @@ -160,6 +161,7 @@ compute_fpair(const KK_FLOAT& rsq, const int& /*i*/, const int& /*j*/, template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairLJExpandKokkos:: compute_evdwl(const KK_FLOAT& rsq, const int& /*i*/, const int& /*j*/, diff --git a/src/KOKKOS/pair_lj_expand_kokkos.h b/src/KOKKOS/pair_lj_expand_kokkos.h index 0315ca305e6..f7b34b362ae 100644 --- a/src/KOKKOS/pair_lj_expand_kokkos.h +++ b/src/KOKKOS/pair_lj_expand_kokkos.h @@ -45,8 +45,10 @@ class PairLJExpandKokkos : public PairLJExpand { double init_one(int, int) override; struct params_lj{ +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION params_lj() {cutsq=0,lj1=0;lj2=0;lj3=0;lj4=0;offset=0;shift=0;}; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION params_lj(int /*i*/) {cutsq=0,lj1=0;lj2=0;lj3=0;lj4=0;offset=0;shift=0;}; KK_FLOAT cutsq,lj1,lj2,lj3,lj4,offset,shift; @@ -54,19 +56,23 @@ class PairLJExpandKokkos : public PairLJExpand { protected: template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_fpair(const KK_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_evdwl(const KK_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_ecoul(const KK_FLOAT& /*rsq*/, const int& /*i*/, const int& /*j*/, const int& /*itype*/, const int& /*jtype*/) const { return 0; } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_fcoul(const KK_FLOAT& /*rsq*/, const int& /*i*/, const int& /*j*/, const int& /*itype*/, const int& /*jtype*/, const KK_FLOAT& /*factor_coul*/, const KK_FLOAT& /*qtmp*/) const { return 0; } diff --git a/src/KOKKOS/pair_lj_gromacs_coul_gromacs_kokkos.cpp b/src/KOKKOS/pair_lj_gromacs_coul_gromacs_kokkos.cpp index a0eac51b882..f0466287dc8 100644 --- a/src/KOKKOS/pair_lj_gromacs_coul_gromacs_kokkos.cpp +++ b/src/KOKKOS/pair_lj_gromacs_coul_gromacs_kokkos.cpp @@ -158,6 +158,7 @@ void PairLJGromacsCoulGromacsKokkos::compute(int eflag_in, int vflag ---------------------------------------------------------------------- */ template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairLJGromacsCoulGromacsKokkos:: compute_fpair(const KK_FLOAT& rsq, const int& /*i*/, const int& /*j*/, @@ -185,6 +186,7 @@ compute_fpair(const KK_FLOAT& rsq, const int& /*i*/, const int& /*j*/, ---------------------------------------------------------------------- */ template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairLJGromacsCoulGromacsKokkos:: compute_evdwl(const KK_FLOAT& rsq, const int& /*i*/, const int& /*j*/, @@ -213,6 +215,7 @@ compute_evdwl(const KK_FLOAT& rsq, const int& /*i*/, const int& /*j*/, ---------------------------------------------------------------------- */ template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairLJGromacsCoulGromacsKokkos:: compute_fcoul(const KK_FLOAT& rsq, const int& /*i*/, const int&j, @@ -237,6 +240,7 @@ compute_fcoul(const KK_FLOAT& rsq, const int& /*i*/, const int&j, ---------------------------------------------------------------------- */ template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairLJGromacsCoulGromacsKokkos:: compute_ecoul(const KK_FLOAT& rsq, const int& /*i*/, const int&j, diff --git a/src/KOKKOS/pair_lj_gromacs_coul_gromacs_kokkos.h b/src/KOKKOS/pair_lj_gromacs_coul_gromacs_kokkos.h index 03db70d7d02..6e8ed89df70 100644 --- a/src/KOKKOS/pair_lj_gromacs_coul_gromacs_kokkos.h +++ b/src/KOKKOS/pair_lj_gromacs_coul_gromacs_kokkos.h @@ -46,8 +46,10 @@ class PairLJGromacsCoulGromacsKokkos : public PairLJGromacsCoulGromacs { double init_one(int, int) override; struct params_lj_coul_gromacs{ +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION params_lj_coul_gromacs() {cut_ljsq=0;cut_coulsq=0;lj1=0;lj2=0;lj3=0;lj4=0;offset=0;ljsw1=0;ljsw2=0;ljsw3=0;ljsw4=0;ljsw5=0;}; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION params_lj_coul_gromacs(int /*i*/) {cut_ljsq=0;cut_coulsq=0;lj1=0;lj2=0;lj3=0;lj4=0;offset=0;ljsw1=0;ljsw2=0;ljsw3=0;ljsw4=0;ljsw5=0;}; KK_FLOAT cut_ljsq,cut_coulsq,lj1,lj2,lj3,lj4,offset,ljsw1,ljsw2,ljsw3,ljsw4,ljsw5; @@ -55,21 +57,25 @@ class PairLJGromacsCoulGromacsKokkos : public PairLJGromacsCoulGromacs { protected: template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_fpair(const KK_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_fcoul(const KK_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype, const KK_FLOAT& factor_coul, const KK_FLOAT& qtmp) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_evdwl(const KK_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_ecoul(const KK_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype, const KK_FLOAT& factor_coul, const KK_FLOAT& qtmp) const; diff --git a/src/KOKKOS/pair_lj_gromacs_kokkos.cpp b/src/KOKKOS/pair_lj_gromacs_kokkos.cpp index 250a58f0e16..b6a19e61166 100644 --- a/src/KOKKOS/pair_lj_gromacs_kokkos.cpp +++ b/src/KOKKOS/pair_lj_gromacs_kokkos.cpp @@ -152,6 +152,7 @@ void PairLJGromacsKokkos::compute(int eflag_in, int vflag_in) ---------------------------------------------------------------------- */ template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairLJGromacsKokkos:: compute_fpair(const KK_FLOAT& rsq, const int& /*i*/, const int& /*j*/, @@ -179,6 +180,7 @@ compute_fpair(const KK_FLOAT& rsq, const int& /*i*/, const int& /*j*/, ---------------------------------------------------------------------- */ template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairLJGromacsKokkos:: compute_evdwl(const KK_FLOAT& rsq, const int& /*i*/, const int& /*j*/, diff --git a/src/KOKKOS/pair_lj_gromacs_kokkos.h b/src/KOKKOS/pair_lj_gromacs_kokkos.h index e9810405b00..bdb16165ae7 100644 --- a/src/KOKKOS/pair_lj_gromacs_kokkos.h +++ b/src/KOKKOS/pair_lj_gromacs_kokkos.h @@ -45,8 +45,10 @@ class PairLJGromacsKokkos : public PairLJGromacs { double init_one(int, int) override; struct params_lj{ +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION params_lj() {cut_inner_sq=0;cut_inner=0;lj1=0;lj2=0;lj3=0;lj4=0;offset=0;ljsw1=0;ljsw2=0;ljsw3=0;ljsw4=0;ljsw5=0;}; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION params_lj(int /*i*/) {cut_inner_sq=0;cut_inner=0;lj1=0;lj2=0;lj3=0;lj4=0;offset=0;ljsw1=0;ljsw2=0;ljsw3=0;ljsw4=0;ljsw5=0;}; KK_FLOAT cut_inner_sq,cut_inner,lj1,lj2,lj3,lj4,offset,ljsw1,ljsw2,ljsw3,ljsw4,ljsw5; @@ -54,21 +56,25 @@ class PairLJGromacsKokkos : public PairLJGromacs { protected: template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_fpair(const KK_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_evdwl(const KK_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_ecoul(const KK_FLOAT& /*rsq*/, const int& /*i*/, const int& /*j*/, const int& /*itype*/, const int& /*jtype*/) const { return 0; } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_fcoul(const KK_FLOAT& /*rsq*/, const int& /*i*/, const int& /*j*/, const int& /*itype*/, const int& /*jtype*/, const KK_FLOAT& /*factor_coul*/, const KK_FLOAT& /*qtmp*/) const { return 0; } diff --git a/src/KOKKOS/pair_lj_spica_coul_long_kokkos.cpp b/src/KOKKOS/pair_lj_spica_coul_long_kokkos.cpp index eb0748fd718..10d7396fb46 100644 --- a/src/KOKKOS/pair_lj_spica_coul_long_kokkos.cpp +++ b/src/KOKKOS/pair_lj_spica_coul_long_kokkos.cpp @@ -166,6 +166,7 @@ void PairLJSPICACoulLongKokkos::compute(int eflag_in, int vflag_in) template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairLJSPICACoulLongKokkos:: compute_fpair(const KK_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype) const { @@ -190,6 +191,7 @@ compute_fpair(const KK_FLOAT& rsq, const int& i, const int&j, const int& itype, template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairLJSPICACoulLongKokkos:: compute_evdwl(const KK_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype) const { @@ -226,6 +228,7 @@ compute_evdwl(const KK_FLOAT& rsq, const int& i, const int&j, const int& itype, template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairLJSPICACoulLongKokkos:: compute_fcoul(const KK_FLOAT& rsq, const int& /*i*/, const int&j, @@ -266,6 +269,7 @@ compute_fcoul(const KK_FLOAT& rsq, const int& /*i*/, const int&j, template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairLJSPICACoulLongKokkos:: compute_ecoul(const KK_FLOAT& rsq, const int& /*i*/, const int&j, diff --git a/src/KOKKOS/pair_lj_spica_coul_long_kokkos.h b/src/KOKKOS/pair_lj_spica_coul_long_kokkos.h index 5dc70bc26c1..9f8b8fd4571 100644 --- a/src/KOKKOS/pair_lj_spica_coul_long_kokkos.h +++ b/src/KOKKOS/pair_lj_spica_coul_long_kokkos.h @@ -49,8 +49,10 @@ class PairLJSPICACoulLongKokkos : public PairLJSPICACoulLong { double init_one(int, int) override; struct params_lj_spica_coul { +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION params_lj_spica_coul() {cut_ljsq=0;cut_coulsq=0;lj1=0;lj2=0;lj3=0;lj4=0;offset=0;lj_type=0;}; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION params_lj_spica_coul(int /*i*/) {cut_ljsq=0;cut_coulsq=0;lj1=0;lj2=0;lj3=0;lj4=0;offset=0;lj_type=0;}; KK_FLOAT cut_ljsq,cut_coulsq,lj1,lj2,lj3,lj4,offset; @@ -59,19 +61,23 @@ class PairLJSPICACoulLongKokkos : public PairLJSPICACoulLong { protected: template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_fpair(const KK_FLOAT& rsq, const int& i, const int& j, const int& itype, const int& jtype) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_evdwl(const KK_FLOAT& rsq, const int& i, const int& j, const int& itype, const int& jtype) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_fcoul(const KK_FLOAT& rsq, const int& i, const int& j, const int& itype, const int& jtype, const KK_FLOAT& factor_coul, const KK_FLOAT& qtmp) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_ecoul(const KK_FLOAT& rsq, const int& i, const int& j, const int& itype, const int& jtype, const KK_FLOAT& factor_coul, const KK_FLOAT& qtmp) const; diff --git a/src/KOKKOS/pair_lj_spica_kokkos.cpp b/src/KOKKOS/pair_lj_spica_kokkos.cpp index b8925013972..fe46bd61642 100644 --- a/src/KOKKOS/pair_lj_spica_kokkos.cpp +++ b/src/KOKKOS/pair_lj_spica_kokkos.cpp @@ -142,6 +142,7 @@ void PairLJSPICAKokkos::compute(int eflag_in, int vflag_in) template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairLJSPICAKokkos:: compute_fpair(const KK_FLOAT &rsq, const int &, const int &, const int &itype, const int &jtype) const { @@ -164,6 +165,7 @@ compute_fpair(const KK_FLOAT &rsq, const int &, const int &, const int &itype, c template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairLJSPICAKokkos:: compute_evdwl(const KK_FLOAT &rsq, const int &, const int &, const int &itype, const int &jtype) const { diff --git a/src/KOKKOS/pair_lj_spica_kokkos.h b/src/KOKKOS/pair_lj_spica_kokkos.h index 9b753d21bbc..b5c3ffbef69 100644 --- a/src/KOKKOS/pair_lj_spica_kokkos.h +++ b/src/KOKKOS/pair_lj_spica_kokkos.h @@ -48,8 +48,10 @@ class PairLJSPICAKokkos : public PairLJSPICA { double init_one(int, int) override; struct params_lj{ +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION params_lj() {cutsq=0,lj1=0;lj2=0;lj3=0;lj4=0;offset=0;lj_type=0;}; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION params_lj(int /*i*/) {cutsq=0,lj1=0;lj2=0;lj3=0;lj4=0;offset=0;lj_type=0;}; KK_FLOAT cutsq,lj1,lj2,lj3,lj4,offset; @@ -58,14 +60,17 @@ class PairLJSPICAKokkos : public PairLJSPICA { protected: template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_fpair(const KK_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_evdwl(const KK_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_ecoul(const KK_FLOAT& /*rsq*/, const int& /*i*/, const int& /*j*/, const int& /*itype*/, const int& /*jtype*/) const { return 0; } diff --git a/src/KOKKOS/pair_meam_kokkos.cpp b/src/KOKKOS/pair_meam_kokkos.cpp index 5e4f79ca42f..94c2dc0ba69 100644 --- a/src/KOKKOS/pair_meam_kokkos.cpp +++ b/src/KOKKOS/pair_meam_kokkos.cpp @@ -350,6 +350,7 @@ int PairMEAMKokkos::pack_forward_comm_kokkos(int n, DAT::tdual_int_1 /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairMEAMKokkos::operator()(TagPairMEAMPackForwardComm, const int &i) const { int j = d_sendlist(i); @@ -414,6 +415,7 @@ void PairMEAMKokkos::unpack_forward_comm_kokkos(int n, int first_in, /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairMEAMKokkos::operator()(TagPairMEAMUnpackForwardComm, const int &i) const{ //int m = i*38; @@ -668,6 +670,7 @@ int PairMEAMKokkos::pack_reverse_comm_kokkos(int n, int first_in, DA /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairMEAMKokkos::operator()(TagPairMEAMPackReverseComm, const int &i) const { //int m = i*30; @@ -791,6 +794,7 @@ void PairMEAMKokkos::unpack_reverse_comm_kokkos(int n, DAT::tdual_in /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairMEAMKokkos::operator()(TagPairMEAMUnpackReverseComm, const int &i) const { int j = d_sendlist(i); @@ -924,6 +928,7 @@ void PairMEAMKokkos::unpack_reverse_comm(int n, int *list, double *b ------------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairMEAMKokkos::operator()(TagPairMEAMNeighStrip, const int &ii) const { @@ -939,6 +944,7 @@ void PairMEAMKokkos::operator()(TagPairMEAMNeighStrip, const int &ii /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairMEAMKokkos::operator()(TagPairMEAMOffsets, const int ii, int &n) const { const int i = d_ilist_half[ii]; diff --git a/src/KOKKOS/pair_meam_kokkos.h b/src/KOKKOS/pair_meam_kokkos.h index e27287c4c0a..81d95d77fdb 100644 --- a/src/KOKKOS/pair_meam_kokkos.h +++ b/src/KOKKOS/pair_meam_kokkos.h @@ -55,21 +55,27 @@ class PairMEAMKokkos : public PairMEAM, public KokkosBase { void coeff(int, char **) override; void init_style() override; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairMEAMPackForwardComm, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairMEAMUnpackForwardComm, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairMEAMPackReverseComm, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairMEAMUnpackReverseComm, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairMEAMNeighStrip, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairMEAMOffsets, const int, int&) const; diff --git a/src/KOKKOS/pair_morse_kokkos.cpp b/src/KOKKOS/pair_morse_kokkos.cpp index 4df498643a1..666c3cbea6f 100644 --- a/src/KOKKOS/pair_morse_kokkos.cpp +++ b/src/KOKKOS/pair_morse_kokkos.cpp @@ -138,6 +138,7 @@ void PairMorseKokkos::compute(int eflag_in, int vflag_in) template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairMorseKokkos:: compute_fpair(const KK_FLOAT &rsq, const int &, const int &, const int &itype, const int &jtype) const { @@ -158,6 +159,7 @@ compute_fpair(const KK_FLOAT &rsq, const int &, const int &, const int &itype, c template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairMorseKokkos:: compute_evdwl(const KK_FLOAT &rsq, const int &, const int &, const int &itype, const int &jtype) const { diff --git a/src/KOKKOS/pair_morse_kokkos.h b/src/KOKKOS/pair_morse_kokkos.h index 42ef2a8f890..19747879e3c 100644 --- a/src/KOKKOS/pair_morse_kokkos.h +++ b/src/KOKKOS/pair_morse_kokkos.h @@ -45,8 +45,10 @@ class PairMorseKokkos : public PairMorse { double init_one(int, int) override; struct params_morse{ +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION params_morse() {cutsq=0,d0=0;alpha=0;r0=0;offset=0;} +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION params_morse(int /*i*/) {cutsq=0,d0=0;alpha=0;r0=0;offset=0;} KK_FLOAT cutsq,d0,alpha,r0,offset; @@ -54,14 +56,17 @@ class PairMorseKokkos : public PairMorse { protected: template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_fpair(const KK_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_evdwl(const KK_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_ecoul(const KK_FLOAT& /*rsq*/, const int& /*i*/, const int& /*j*/, const int& /*itype*/, const int& /*jtype*/) const { return 0; } diff --git a/src/KOKKOS/pair_multi_lucy_rx_kokkos.cpp b/src/KOKKOS/pair_multi_lucy_rx_kokkos.cpp index 9e6780bad29..cadb5500d59 100644 --- a/src/KOKKOS/pair_multi_lucy_rx_kokkos.cpp +++ b/src/KOKKOS/pair_multi_lucy_rx_kokkos.cpp @@ -250,6 +250,7 @@ void PairMultiLucyRXKokkos::compute_style(int eflag_in, int vflag_in } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairMultiLucyRXKokkos::operator()(TagPairMultiLucyRXgetMixingWeights, const int &i) const { getMixingWeights(i, d_mixWtSite1old[i], d_mixWtSite2old[i], d_mixWtSite1[i], d_mixWtSite2[i]); @@ -257,6 +258,7 @@ void PairMultiLucyRXKokkos::operator()(TagPairMultiLucyRXgetMixingWe template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairMultiLucyRXKokkos::operator()(TagPairMultiLucyRXCompute, const int &ii, EV_FLOAT& ev) const { @@ -421,6 +423,7 @@ void PairMultiLucyRXKokkos::operator()(TagPairMultiLucyRXCompute template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairMultiLucyRXKokkos::operator()(TagPairMultiLucyRXCompute, const int &ii) const { EV_FLOAT ev; @@ -509,6 +512,7 @@ void PairMultiLucyRXKokkos::computeLocalDensity() } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairMultiLucyRXKokkos::operator()(TagPairMultiLucyRXZero, const int &i) const { rho[i] = 0.0; @@ -516,6 +520,7 @@ void PairMultiLucyRXKokkos::operator()(TagPairMultiLucyRXZero, const template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairMultiLucyRXKokkos::operator()(TagPairMultiLucyRXComputeLocalDensity, const int &ii) const { @@ -571,6 +576,7 @@ void PairMultiLucyRXKokkos::operator()(TagPairMultiLucyRXComputeLoca /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairMultiLucyRXKokkos::getMixingWeights(int id, KK_FLOAT &mixWtSite1old, KK_FLOAT &mixWtSite2old, KK_FLOAT &mixWtSite1, KK_FLOAT &mixWtSite2) const { @@ -657,6 +663,7 @@ int PairMultiLucyRXKokkos::pack_forward_comm_kokkos(int n, DAT::tdua } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairMultiLucyRXKokkos::operator()(TagPairMultiLucyRXPackForwardComm, const int &i) const { int j = d_sendlist(i); @@ -676,6 +683,7 @@ void PairMultiLucyRXKokkos::unpack_forward_comm_kokkos(int n, int fi } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairMultiLucyRXKokkos::operator()(TagPairMultiLucyRXUnpackForwardComm, const int &i) const { rho[i + first] = v_buf[i]; @@ -752,6 +760,7 @@ void PairMultiLucyRXKokkos::unpack_reverse_comm(int n, int *list, do template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairMultiLucyRXKokkos::ev_tally(EV_FLOAT &ev, const int &i, const int &j, const KK_FLOAT &epair, const KK_FLOAT &fpair, const KK_FLOAT &delx, diff --git a/src/KOKKOS/pair_multi_lucy_rx_kokkos.h b/src/KOKKOS/pair_multi_lucy_rx_kokkos.h index 3279b98c80d..5d5b83c66db 100644 --- a/src/KOKKOS/pair_multi_lucy_rx_kokkos.h +++ b/src/KOKKOS/pair_multi_lucy_rx_kokkos.h @@ -70,31 +70,39 @@ class PairMultiLucyRXKokkos : public PairMultiLucyRX, public KokkosBase { void unpack_reverse_comm(int, int *, double *) override; void computeLocalDensity(); +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairMultiLucyRXPackForwardComm, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairMultiLucyRXUnpackForwardComm, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairMultiLucyRXgetMixingWeights, const int&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairMultiLucyRXCompute, const int&, EV_FLOAT&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairMultiLucyRXCompute, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairMultiLucyRXZero, const int&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairMultiLucyRXComputeLocalDensity, const int&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ev_tally(EV_FLOAT &ev, const int &i, const int &j, const KK_FLOAT &epair, const KK_FLOAT &fpair, const KK_FLOAT &delx, @@ -154,6 +162,7 @@ class PairMultiLucyRXKokkos : public PairMultiLucyRX, public KokkosBase { int update_table; void create_kokkos_tables(); +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void getMixingWeights(int, KK_FLOAT &, KK_FLOAT &, KK_FLOAT &, KK_FLOAT &) const; diff --git a/src/KOKKOS/pair_pace_extrapolation_kokkos.cpp b/src/KOKKOS/pair_pace_extrapolation_kokkos.cpp index 0abbcc6bf1d..345e4a4e3e6 100644 --- a/src/KOKKOS/pair_pace_extrapolation_kokkos.cpp +++ b/src/KOKKOS/pair_pace_extrapolation_kokkos.cpp @@ -547,6 +547,7 @@ struct FindMaxNumNeighs { FindMaxNumNeighs(NeighListKokkos* nl): k_list(*nl) {} ~FindMaxNumNeighs() {k_list.copymode = 1;} +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (const int& ii, int& maxneigh) const { const int i = k_list.d_ilist[ii]; @@ -811,6 +812,7 @@ void PairPACEExtrapolationKokkos::compute(int eflag_in, int vflag_in /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairPACEExtrapolationKokkos::operator() (TagPairPACEComputeNeigh,const typename Kokkos::TeamPolicy::member_type& team) const { @@ -915,6 +917,7 @@ void PairPACEExtrapolationKokkos::operator() (TagPairPACEComputeNeig /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairPACEExtrapolationKokkos::operator() (TagPairPACEComputeRadial, const typename Kokkos::TeamPolicy::member_type& team) const { @@ -939,6 +942,7 @@ void PairPACEExtrapolationKokkos::operator() (TagPairPACEComputeRadi /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairPACEExtrapolationKokkos::operator() (TagPairPACEComputeAi, const typename Kokkos::TeamPolicy::member_type& team) const { @@ -1090,6 +1094,7 @@ void PairPACEExtrapolationKokkos::operator() (TagPairPACEComputeAi, /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairPACEExtrapolationKokkos::operator() (TagPairPACEConjugateAi, const int& ii) const { @@ -1131,6 +1136,7 @@ void PairPACEExtrapolationKokkos::operator() (TagPairPACEConjugateAi /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairPACEExtrapolationKokkos::operator() (TagPairPACEComputeRho, const int& iter) const { @@ -1206,6 +1212,7 @@ void PairPACEExtrapolationKokkos::operator() (TagPairPACEComputeRho, /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairPACEExtrapolationKokkos::operator() (TagPairPACEComputeFS, const int& ii) const { @@ -1259,6 +1266,7 @@ void PairPACEExtrapolationKokkos::operator() (TagPairPACEComputeFS, /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairPACEExtrapolationKokkos::operator() (TagPairPACEComputeGamma, const int& ii) const { @@ -1287,6 +1295,7 @@ void PairPACEExtrapolationKokkos::operator() (TagPairPACEComputeGamm /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairPACEExtrapolationKokkos::operator() (TagPairPACEComputeWeights, const int& iter) const { @@ -1348,6 +1357,7 @@ void PairPACEExtrapolationKokkos::operator() (TagPairPACEComputeWeig /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairPACEExtrapolationKokkos::operator() (TagPairPACEComputeDerivative, const typename Kokkos::TeamPolicy::member_type& team) const { @@ -1644,6 +1654,7 @@ void PairPACEExtrapolationKokkos::operator() (TagPairPACEComputeDeri template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairPACEExtrapolationKokkos::operator() (TagPairPACEComputeForce, const int& ii, EV_FLOAT& ev) const { @@ -1701,6 +1712,7 @@ void PairPACEExtrapolationKokkos::operator() (TagPairPACEComputeForc template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairPACEExtrapolationKokkos::operator() (TagPairPACEComputeForce,const int& ii) const { EV_FLOAT ev; @@ -1711,6 +1723,7 @@ void PairPACEExtrapolationKokkos::operator() (TagPairPACEComputeForc template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairPACEExtrapolationKokkos::v_tally_xyz(EV_FLOAT &ev, const int &i, const int &j, const KK_FLOAT &fx, const KK_FLOAT &fy, const KK_FLOAT &fz, @@ -1807,6 +1820,7 @@ void PairPACEExtrapolationKokkos::pre_compute_harmonics(int lmax) /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairPACEExtrapolationKokkos::cutoff_func_poly(const KK_FLOAT r, const KK_FLOAT r_in, const KK_FLOAT delta_in, KK_FLOAT &fc, KK_FLOAT &dfc) const { @@ -1826,6 +1840,7 @@ void PairPACEExtrapolationKokkos::cutoff_func_poly(const KK_FLOAT r, /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairPACEExtrapolationKokkos::Fexp(const KK_FLOAT x, const KK_FLOAT m, KK_FLOAT &F, KK_FLOAT &DF) const { @@ -1857,6 +1872,7 @@ void PairPACEExtrapolationKokkos::Fexp(const KK_FLOAT x, const KK_FL /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairPACEExtrapolationKokkos::FexpShiftedScaled(const KK_FLOAT rho, const KK_FLOAT mexp, KK_FLOAT &F, KK_FLOAT &DF) const { @@ -1880,6 +1896,7 @@ void PairPACEExtrapolationKokkos::FexpShiftedScaled(const KK_FLOAT r /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairPACEExtrapolationKokkos::inner_cutoff(const KK_FLOAT rho_core, const KK_FLOAT rho_cut, const KK_FLOAT drho_cut, KK_FLOAT &fcut, KK_FLOAT &dfcut) const @@ -1899,6 +1916,7 @@ void PairPACEExtrapolationKokkos::inner_cutoff(const KK_FLOAT rho_co /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairPACEExtrapolationKokkos::FS_values_and_derivatives(const int ii, KK_FLOAT &evdwl, const int mu_i) const { @@ -1922,6 +1940,7 @@ void PairPACEExtrapolationKokkos::FS_values_and_derivatives(const in /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairPACEExtrapolationKokkos::evaluate_splines(const int ii, const int jj, KK_FLOAT r, int /*nradbase_c*/, int /*nradial_c*/, @@ -1968,6 +1987,7 @@ void PairPACEExtrapolationKokkos::SplineInterpolatorKokkos::operator } /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairPACEExtrapolationKokkos::SplineInterpolatorKokkos::calcSplines(const int ii, const int jj, const KK_FLOAT r, const t_ace_3d &d_values, const t_ace_3d &d_derivatives) const { diff --git a/src/KOKKOS/pair_pace_extrapolation_kokkos.h b/src/KOKKOS/pair_pace_extrapolation_kokkos.h index 87709e69614..4aec48a7c3f 100644 --- a/src/KOKKOS/pair_pace_extrapolation_kokkos.h +++ b/src/KOKKOS/pair_pace_extrapolation_kokkos.h @@ -60,38 +60,49 @@ class PairPACEExtrapolationKokkos : public PairPACEExtrapolation { void init_style() override; double init_one(int, int) override; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (TagPairPACEComputeNeigh,const typename Kokkos::TeamPolicy::member_type& team) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (TagPairPACEComputeRadial,const typename Kokkos::TeamPolicy::member_type& team) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (TagPairPACEComputeAi,const typename Kokkos::TeamPolicy::member_type& team) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (TagPairPACEConjugateAi,const int& ii) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (TagPairPACEComputeRho,const int& iter) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (TagPairPACEComputeFS,const int& ii) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (TagPairPACEComputeGamma, const int& ii) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (TagPairPACEComputeWeights,const int& iter) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (TagPairPACEComputeDerivative,const typename Kokkos::TeamPolicy::member_type& team) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (TagPairPACEComputeForce,const int& ii) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (TagPairPACEComputeForce,const int& ii, EV_FLOAT&) const; @@ -152,26 +163,33 @@ class PairPACEExtrapolationKokkos : public PairPACEExtrapolation { double memory_usage() override; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void v_tally_xyz(EV_FLOAT &ev, const int &i, const int &j, const KK_FLOAT &fx, const KK_FLOAT &fy, const KK_FLOAT &fz, const KK_FLOAT &delx, const KK_FLOAT &dely, const KK_FLOAT &delz) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void cutoff_func_poly(const KK_FLOAT, const KK_FLOAT, const KK_FLOAT, KK_FLOAT &, KK_FLOAT &) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void Fexp(const KK_FLOAT, const KK_FLOAT, KK_FLOAT &, KK_FLOAT &) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FexpShiftedScaled(const KK_FLOAT, const KK_FLOAT, KK_FLOAT &, KK_FLOAT &) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void inner_cutoff(const KK_FLOAT, const KK_FLOAT, const KK_FLOAT, KK_FLOAT &, KK_FLOAT &) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FS_values_and_derivatives(const int, KK_FLOAT&, const int) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void evaluate_splines(const int, const int, KK_FLOAT, int, int, int, int) const; @@ -315,6 +333,7 @@ class PairPACEExtrapolationKokkos : public PairPACEExtrapolation { return lookupTable.span() * sizeof(typename decltype(lookupTable)::value_type); } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void calcSplines(const int ii, const int jj, const KK_FLOAT r, const t_ace_3d &d_values, const t_ace_3d &d_derivatives) const; }; diff --git a/src/KOKKOS/pair_pace_kokkos.cpp b/src/KOKKOS/pair_pace_kokkos.cpp index 3a628d2705c..f2a7bb83115 100644 --- a/src/KOKKOS/pair_pace_kokkos.cpp +++ b/src/KOKKOS/pair_pace_kokkos.cpp @@ -515,6 +515,7 @@ struct FindMaxNumNeighs { FindMaxNumNeighs(NeighListKokkos* nl): k_list(*nl) {} ~FindMaxNumNeighs() {k_list.copymode = 1;} +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (const int& ii, int& maxneigh) const { const int i = k_list.d_ilist[ii]; @@ -757,6 +758,7 @@ void PairPACEKokkos::compute(int eflag_in, int vflag_in) /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairPACEKokkos::operator() (TagPairPACEComputeNeigh,const typename Kokkos::TeamPolicy::member_type& team) const { @@ -861,6 +863,7 @@ void PairPACEKokkos::operator() (TagPairPACEComputeNeigh,const typen /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairPACEKokkos::operator() (TagPairPACEComputeRadial, const typename Kokkos::TeamPolicy::member_type& team) const { @@ -885,6 +888,7 @@ void PairPACEKokkos::operator() (TagPairPACEComputeRadial, const typ /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairPACEKokkos::operator() (TagPairPACEComputeAi, const typename Kokkos::TeamPolicy::member_type& team) const { @@ -1036,6 +1040,7 @@ void PairPACEKokkos::operator() (TagPairPACEComputeAi, const typenam /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairPACEKokkos::operator() (TagPairPACEConjugateAi, const int& ii) const { @@ -1077,6 +1082,7 @@ void PairPACEKokkos::operator() (TagPairPACEConjugateAi, const int& /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairPACEKokkos::operator() (TagPairPACEComputeRho, const int& iter) const { @@ -1144,6 +1150,7 @@ void PairPACEKokkos::operator() (TagPairPACEComputeRho, const int& i /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairPACEKokkos::operator() (TagPairPACEComputeFS, const int& ii) const { @@ -1197,6 +1204,7 @@ void PairPACEKokkos::operator() (TagPairPACEComputeFS, const int& ii /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairPACEKokkos::operator() (TagPairPACEComputeWeights, const int& iter) const { @@ -1258,6 +1266,7 @@ void PairPACEKokkos::operator() (TagPairPACEComputeWeights, const in /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairPACEKokkos::operator() (TagPairPACEComputeDerivative, const typename Kokkos::TeamPolicy::member_type& team) const { @@ -1554,6 +1563,7 @@ void PairPACEKokkos::operator() (TagPairPACEComputeDerivative, const template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairPACEKokkos::operator() (TagPairPACEComputeForce, const int& ii, EV_FLOAT& ev) const { @@ -1611,6 +1621,7 @@ void PairPACEKokkos::operator() (TagPairPACEComputeForce template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairPACEKokkos::operator() (TagPairPACEComputeForce,const int& ii) const { EV_FLOAT ev; @@ -1621,6 +1632,7 @@ void PairPACEKokkos::operator() (TagPairPACEComputeForce template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairPACEKokkos::v_tally_xyz(EV_FLOAT &ev, const int &i, const int &j, const KK_FLOAT &fx, const KK_FLOAT &fy, const KK_FLOAT &fz, @@ -1717,6 +1729,7 @@ void PairPACEKokkos::pre_compute_harmonics(int lmax) /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairPACEKokkos::cutoff_func_poly(const KK_FLOAT r, const KK_FLOAT r_in, const KK_FLOAT delta_in, KK_FLOAT &fc, KK_FLOAT &dfc) const { @@ -1736,6 +1749,7 @@ void PairPACEKokkos::cutoff_func_poly(const KK_FLOAT r, const KK_FLO /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairPACEKokkos::Fexp(const KK_FLOAT x, const KK_FLOAT m, KK_FLOAT &F, KK_FLOAT &DF) const { @@ -1767,6 +1781,7 @@ void PairPACEKokkos::Fexp(const KK_FLOAT x, const KK_FLOAT m, KK_FLO /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairPACEKokkos::FexpShiftedScaled(const KK_FLOAT rho, const KK_FLOAT mexp, KK_FLOAT &F, KK_FLOAT &DF) const { @@ -1790,6 +1805,7 @@ void PairPACEKokkos::FexpShiftedScaled(const KK_FLOAT rho, const KK_ /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairPACEKokkos::inner_cutoff(const KK_FLOAT rho_core, const KK_FLOAT rho_cut, const KK_FLOAT drho_cut, KK_FLOAT &fcut, KK_FLOAT &dfcut) const @@ -1809,6 +1825,7 @@ void PairPACEKokkos::inner_cutoff(const KK_FLOAT rho_core, const KK_ /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairPACEKokkos::FS_values_and_derivatives(const int ii, KK_FLOAT &evdwl, const int mu_i) const { @@ -1832,6 +1849,7 @@ void PairPACEKokkos::FS_values_and_derivatives(const int ii, KK_FLOA /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairPACEKokkos::evaluate_splines(const int ii, const int jj, KK_FLOAT r, int /*nradbase_c*/, int /*nradial_c*/, @@ -1878,6 +1896,7 @@ void PairPACEKokkos::SplineInterpolatorKokkos::operator=(const Splin } /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairPACEKokkos::SplineInterpolatorKokkos::calcSplines(const int ii, const int jj, const KK_FLOAT r, const t_ace_3d &d_values, const t_ace_3d &d_derivatives) const { diff --git a/src/KOKKOS/pair_pace_kokkos.h b/src/KOKKOS/pair_pace_kokkos.h index e4e0f99f9c2..cd3cd6b037f 100644 --- a/src/KOKKOS/pair_pace_kokkos.h +++ b/src/KOKKOS/pair_pace_kokkos.h @@ -59,35 +59,45 @@ class PairPACEKokkos : public PairPACE { void init_style() override; double init_one(int, int) override; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (TagPairPACEComputeNeigh,const typename Kokkos::TeamPolicy::member_type& team) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (TagPairPACEComputeRadial,const typename Kokkos::TeamPolicy::member_type& team) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (TagPairPACEComputeAi,const typename Kokkos::TeamPolicy::member_type& team) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (TagPairPACEConjugateAi,const int& ii) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (TagPairPACEComputeRho,const int& iter) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (TagPairPACEComputeFS,const int& ii) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (TagPairPACEComputeWeights,const int& iter) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (TagPairPACEComputeDerivative,const typename Kokkos::TeamPolicy::member_type& team) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (TagPairPACEComputeForce,const int& ii) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (TagPairPACEComputeForce,const int& ii, EV_FLOAT&) const; @@ -148,26 +158,33 @@ class PairPACEKokkos : public PairPACE { double memory_usage() override; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void v_tally_xyz(EV_FLOAT &ev, const int &i, const int &j, const KK_FLOAT &fx, const KK_FLOAT &fy, const KK_FLOAT &fz, const KK_FLOAT &delx, const KK_FLOAT &dely, const KK_FLOAT &delz) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void cutoff_func_poly(const KK_FLOAT, const KK_FLOAT, const KK_FLOAT, KK_FLOAT &, KK_FLOAT &) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void Fexp(const KK_FLOAT, const KK_FLOAT, KK_FLOAT &, KK_FLOAT &) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FexpShiftedScaled(const KK_FLOAT, const KK_FLOAT, KK_FLOAT &, KK_FLOAT &) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void inner_cutoff(const KK_FLOAT, const KK_FLOAT, const KK_FLOAT, KK_FLOAT &, KK_FLOAT &) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void FS_values_and_derivatives(const int, KK_FLOAT&, const int) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void evaluate_splines(const int, const int, KK_FLOAT, int, int, int, int) const; @@ -302,6 +319,7 @@ class PairPACEKokkos : public PairPACE { return lookupTable.span() * sizeof(typename decltype(lookupTable)::value_type); } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void calcSplines(const int ii, const int jj, const KK_FLOAT r, const t_ace_3d &d_values, const t_ace_3d &d_derivatives) const; }; diff --git a/src/KOKKOS/pair_pod_kokkos.cpp b/src/KOKKOS/pair_pod_kokkos.cpp index b1b4c62c583..01b6f749111 100644 --- a/src/KOKKOS/pair_pod_kokkos.cpp +++ b/src/KOKKOS/pair_pod_kokkos.cpp @@ -171,6 +171,7 @@ struct FindMaxNumNeighs { FindMaxNumNeighs(NeighListKokkos* nl): k_list(*nl) {} ~FindMaxNumNeighs() {k_list.copymode = 1;} +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (const int& ii, int& max_neighs) const { const int i = k_list.d_ilist[ii]; diff --git a/src/KOKKOS/pair_reaxff_kokkos.cpp b/src/KOKKOS/pair_reaxff_kokkos.cpp index 1bde2933db2..7efa239612b 100644 --- a/src/KOKKOS/pair_reaxff_kokkos.cpp +++ b/src/KOKKOS/pair_reaxff_kokkos.cpp @@ -1125,6 +1125,7 @@ void PairReaxFFKokkos::compute(int eflag_in, int vflag_in) template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairReaxFFKokkos::operator()(TagPairReaxComputePolar, const int &ii, EV_FLOAT_REAX& ev) const { @@ -1147,6 +1148,7 @@ void PairReaxFFKokkos::operator()(TagPairReaxComputePolar template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairReaxFFKokkos::operator()(TagPairReaxComputePolar, const int &ii) const { EV_FLOAT_REAX ev; @@ -1157,6 +1159,7 @@ void PairReaxFFKokkos::operator()(TagPairReaxComputePolar template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairReaxFFKokkos::operator()(TagPairReaxComputeLJCoulomb, const int &ii, EV_FLOAT_REAX& ev) const { @@ -1343,6 +1346,7 @@ void PairReaxFFKokkos::operator()(TagPairReaxComputeLJCoulomb template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairReaxFFKokkos::operator()(TagPairReaxComputeLJCoulomb, const int &ii) const { EV_FLOAT_REAX ev; @@ -1353,6 +1357,7 @@ void PairReaxFFKokkos::operator()(TagPairReaxComputeLJCoulomb template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairReaxFFKokkos::operator()(TagPairReaxComputeTabulatedLJCoulomb, const int &ii, EV_FLOAT_REAX& ev) const { @@ -1492,6 +1497,7 @@ void PairReaxFFKokkos::operator()(TagPairReaxComputeTabulatedLJCoulo template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairReaxFFKokkos::operator()(TagPairReaxComputeTabulatedLJCoulomb, const int &ii) const { EV_FLOAT_REAX ev; @@ -1574,6 +1580,7 @@ void PairReaxFFKokkos::allocate_array() /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairReaxFFKokkos::operator()(TagPairReaxZero, const int &n) const { d_total_bo(n) = 0; @@ -1588,6 +1595,7 @@ void PairReaxFFKokkos::operator()(TagPairReaxZero, const int &n) con template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairReaxFFKokkos::operator()(TagPairReaxBuildListsHalfBlocking, const int &ii) const { constexpr int blocksize = PairReaxFFKokkos::build_lists_half_blocksize; @@ -1730,6 +1738,7 @@ void PairReaxFFKokkos::operator()(TagPairReaxBuildListsHalfBlocking< template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairReaxFFKokkos::operator()(TagPairReaxBuildListsHalfBlockingPreview, const int &ii) const { constexpr int blocksize = PairReaxFFKokkos::build_lists_half_blocksize; @@ -1817,6 +1826,7 @@ void PairReaxFFKokkos::operator()(TagPairReaxBuildListsHalfBlockingP template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairReaxFFKokkos::operator()(TagPairReaxBuildListsHalfPreview, const int &ii) const { @@ -1874,6 +1884,7 @@ void PairReaxFFKokkos::operator()(TagPairReaxBuildListsHalfPreview template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairReaxFFKokkos::build_hb_list(KK_FLOAT rsq, int i, int ihb, int j, int jtype) const { @@ -1912,6 +1923,7 @@ void PairReaxFFKokkos::build_hb_list(KK_FLOAT rsq, int i, int ihb, i template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION bool PairReaxFFKokkos::build_bo_list(int i, int j, int& i_index, int& j_index) const { @@ -1944,6 +1956,7 @@ bool PairReaxFFKokkos::build_bo_list(int i, int j, int& i_index, int /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairReaxFFKokkos::operator()(TagPairReaxBuildListsFull, const int &ii) const { @@ -2016,6 +2029,7 @@ void PairReaxFFKokkos::operator()(TagPairReaxBuildListsFull, const i /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairReaxFFKokkos::compute_bo(KK_FLOAT rij, int itype, int jtype, KK_FLOAT p_bo2, KK_FLOAT p_bo4, KK_FLOAT p_bo6, KK_FLOAT& BO_s, KK_FLOAT& BO_pi, KK_FLOAT& BO_pi2, KK_FLOAT& C12, KK_FLOAT& C34, KK_FLOAT& C56) const { @@ -2047,6 +2061,7 @@ void PairReaxFFKokkos::compute_bo(KK_FLOAT rij, int itype, int jtype /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairReaxFFKokkos::operator()(TagPairReaxBondOrder1, const int &ii) const { @@ -2061,6 +2076,7 @@ void PairReaxFFKokkos::operator()(TagPairReaxBondOrder1, const int & /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairReaxFFKokkos::operator()(TagPairReaxBondOrder2, const int &ii) const { @@ -2189,6 +2205,7 @@ void PairReaxFFKokkos::operator()(TagPairReaxBondOrder2, const int & /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairReaxFFKokkos::operator()(TagPairReaxBondOrder3, const int &ii) const { // bot part of BO() @@ -2223,6 +2240,7 @@ void PairReaxFFKokkos::operator()(TagPairReaxBondOrder3, const int & /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairReaxFFKokkos::operator()(TagPairReaxComputeMulti1, const int &ii) const { @@ -2255,6 +2273,7 @@ void PairReaxFFKokkos::operator()(TagPairReaxComputeMulti1, const in template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairReaxFFKokkos::operator()(TagPairReaxComputeMulti2, const int &ii, EV_FLOAT_REAX& ev) const { @@ -2396,6 +2415,7 @@ void PairReaxFFKokkos::operator()(TagPairReaxComputeMulti2 template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairReaxFFKokkos::operator()(TagPairReaxComputeMulti2, const int &ii) const { EV_FLOAT_REAX ev; @@ -2406,6 +2426,7 @@ void PairReaxFFKokkos::operator()(TagPairReaxComputeMulti2 template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairReaxFFKokkos::operator()(TagPairReaxCountAngularTorsion, const int &ii) const { @@ -2453,6 +2474,7 @@ void PairReaxFFKokkos::operator()(TagPairReaxCountAngularTorsion +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairReaxFFKokkos::compute_angular_sbo(int i, int itype, int jnum) const { @@ -2516,6 +2538,7 @@ void PairReaxFFKokkos::compute_angular_sbo(int i, int itype, int jnu template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION int PairReaxFFKokkos::preprocess_angular(int i, int itype, int jnum, int location_angular) const { @@ -2578,6 +2601,7 @@ int PairReaxFFKokkos::preprocess_angular(int i, int itype, int jnum, template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION int PairReaxFFKokkos::preprocess_torsion(int i, int /*itype*/, tagint itag, KK_FLOAT xtmp, KK_FLOAT ytmp, KK_FLOAT ztmp, int jknum, int location_torsion) const { @@ -2653,6 +2677,7 @@ int PairReaxFFKokkos::preprocess_torsion(int i, int /*itype*/, tagin template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairReaxFFKokkos::operator()(TagPairReaxComputeAngularPreprocessed, const int &apack, EV_FLOAT_REAX& ev) const { @@ -2901,6 +2926,7 @@ void PairReaxFFKokkos::operator()(TagPairReaxComputeAngularPreproces template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairReaxFFKokkos::operator()(TagPairReaxComputeAngularPreprocessed, const int &apack) const { EV_FLOAT_REAX ev; @@ -2912,6 +2938,7 @@ void PairReaxFFKokkos::operator()(TagPairReaxComputeAngularPreproces template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairReaxFFKokkos::operator()(TagPairReaxComputeTorsionPreprocessed, const int &tpack, EV_FLOAT_REAX& ev) const { @@ -3248,6 +3275,7 @@ void PairReaxFFKokkos::operator()(TagPairReaxComputeTorsionPreproces template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairReaxFFKokkos::operator()(TagPairReaxComputeTorsionPreprocessed, const int &tpack) const { EV_FLOAT_REAX ev; @@ -3259,6 +3287,7 @@ void PairReaxFFKokkos::operator()(TagPairReaxComputeTorsionPreproces template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairReaxFFKokkos::operator()(TagPairReaxComputeHydrogen, const int &ii, EV_FLOAT_REAX& ev) const { @@ -3395,6 +3424,7 @@ void PairReaxFFKokkos::operator()(TagPairReaxComputeHydrogen template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairReaxFFKokkos::operator()(TagPairReaxComputeHydrogen, const int &ii) const { EV_FLOAT_REAX ev; @@ -3406,6 +3436,7 @@ void PairReaxFFKokkos::operator()(TagPairReaxComputeHydrogen template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairReaxFFKokkos::operator()(TagPairReaxUpdateBond, const int &ii) const { @@ -3461,6 +3492,7 @@ void PairReaxFFKokkos::operator()(TagPairReaxUpdateBond, template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairReaxFFKokkos::operator()(TagPairReaxComputeBond1, const int &ii, EV_FLOAT_REAX& ev) const { @@ -3564,6 +3596,7 @@ void PairReaxFFKokkos::operator()(TagPairReaxComputeBond1 template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairReaxFFKokkos::operator()(TagPairReaxComputeBond1, const int &ii) const { EV_FLOAT_REAX ev; @@ -3574,6 +3607,7 @@ void PairReaxFFKokkos::operator()(TagPairReaxComputeBond1 template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairReaxFFKokkos::operator()(TagPairReaxComputeBond2, const int &ii, EV_FLOAT_REAX& ev) const { @@ -3755,6 +3789,7 @@ void PairReaxFFKokkos::operator()(TagPairReaxComputeBond2 template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairReaxFFKokkos::operator()(TagPairReaxComputeBond2, const int &ii) const { EV_FLOAT_REAX ev; @@ -3765,6 +3800,7 @@ void PairReaxFFKokkos::operator()(TagPairReaxComputeBond2 template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairReaxFFKokkos::ev_tally(EV_FLOAT_REAX &ev, const int &i, const int &j, const KK_FLOAT &epair, const KK_FLOAT &fpair, const KK_FLOAT &delx, @@ -3822,6 +3858,7 @@ void PairReaxFFKokkos::ev_tally(EV_FLOAT_REAX &ev, const int &i, con template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairReaxFFKokkos::e_tally(EV_FLOAT_REAX & /*ev*/, const int &i, const int &j, const KK_FLOAT &epair) const @@ -3840,6 +3877,7 @@ void PairReaxFFKokkos::e_tally(EV_FLOAT_REAX & /*ev*/, const int &i, template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairReaxFFKokkos::e_tally_single(EV_FLOAT_REAX & /*ev*/, const int &i, const KK_FLOAT &epair) const @@ -3856,6 +3894,7 @@ void PairReaxFFKokkos::e_tally_single(EV_FLOAT_REAX & /*ev*/, const template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairReaxFFKokkos::v_tally(EV_FLOAT_REAX &ev, const int &i, KK_ACC_FLOAT *fi, KK_FLOAT *drij) const @@ -3893,6 +3932,7 @@ void PairReaxFFKokkos::v_tally(EV_FLOAT_REAX &ev, const int &i, template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairReaxFFKokkos::v_tally3(EV_FLOAT_REAX &ev, const int &i, const int &j, const int &k, KK_ACC_FLOAT *fj, KK_ACC_FLOAT *fk, KK_FLOAT *drij, KK_FLOAT *drik) const @@ -3933,6 +3973,7 @@ void PairReaxFFKokkos::v_tally3(EV_FLOAT_REAX &ev, const int &i, con template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairReaxFFKokkos::v_tally4(EV_FLOAT_REAX &ev, const int &i, const int &j, const int &k, const int &l, KK_ACC_FLOAT *fi, KK_ACC_FLOAT *fj, KK_ACC_FLOAT *fk, KK_FLOAT *dril, KK_FLOAT *drjl, KK_FLOAT *drkl) const @@ -3972,6 +4013,7 @@ void PairReaxFFKokkos::v_tally4(EV_FLOAT_REAX &ev, const int &i, con /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairReaxFFKokkos::v_tally3_atom(EV_FLOAT_REAX &ev, const int &i, const int & /*j*/, const int & /*k*/, KK_ACC_FLOAT *fj, KK_ACC_FLOAT *fk, @@ -4108,6 +4150,7 @@ void PairReaxFFKokkos::FindBond(int &numbonds, int groupbit) } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairReaxFFKokkos::operator()(TagPairReaxFindBondZero, const int &i) const { d_numneigh_bonds[i] = 0; @@ -4118,6 +4161,7 @@ void PairReaxFFKokkos::operator()(TagPairReaxFindBondZero, const int } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairReaxFFKokkos::calculate_find_bond_item(int ii, int &numbonds, int groupbit) const { @@ -4205,6 +4249,7 @@ void PairReaxFFKokkos::PackReducedBondBuffer(DAT::tdual_double_1d k_ /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairReaxFFKokkos::pack_bond_buffer_item(int i, int &j, const bool &final) const { @@ -4247,6 +4292,7 @@ void PairReaxFFKokkos::pack_bond_buffer_item(int i, int &j, const bo template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairReaxFFKokkos::pack_reduced_bond_buffer_item(int i, int &j, const bool &final) const { @@ -4319,6 +4365,7 @@ void PairReaxFFKokkos::FindBondSpecies() } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairReaxFFKokkos::operator()(TagPairReaxFindBondSpeciesZero, const int &i) const { for (int j = 0; j < MAXSPECBOND; j++) { @@ -4328,6 +4375,7 @@ void PairReaxFFKokkos::operator()(TagPairReaxFindBondSpeciesZero, co } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairReaxFFKokkos::operator()(TagPairReaxFindBondSpecies, const int &i) const { int nj = 0; diff --git a/src/KOKKOS/pair_reaxff_kokkos.h b/src/KOKKOS/pair_reaxff_kokkos.h index 05677c7692b..f8ed7f1b3f9 100644 --- a/src/KOKKOS/pair_reaxff_kokkos.h +++ b/src/KOKKOS/pair_reaxff_kokkos.h @@ -136,47 +136,58 @@ class PairReaxFFKokkos : public PairReaxFF { void FindBondSpecies(); template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairReaxComputePolar, const int&, EV_FLOAT_REAX&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairReaxComputePolar, const int&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairReaxComputeLJCoulomb, const int&, EV_FLOAT_REAX&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairReaxComputeLJCoulomb, const int&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairReaxComputeTabulatedLJCoulomb, const int&, EV_FLOAT_REAX&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairReaxComputeTabulatedLJCoulomb, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairReaxComputeLJCoulombShortNeigh, const int&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairReaxBuildListsHalfBlocking, const int&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairReaxBuildListsHalfBlockingPreview, const int&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairReaxBuildListsHalfPreview, const int&) const; // Isolated function that builds the hbond list, reused across // TagPairReaxBuildListsHalfBlocking, HalfBlockingPreview, HalfPreview template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void build_hb_list(KK_FLOAT, int, int, int, int) const; @@ -184,126 +195,159 @@ class PairReaxFFKokkos : public PairReaxFF { // TagPairReaxBuildListsHalfBlocking, HalfBlockingPreview, HalfPreview // Returns if we need to populate d_d* functions or not template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION bool build_bo_list(int, int, int&, int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairReaxBuildListsFull, const int&) const; // Isolated function that computes bond order parameters // Returns BO_s, BO_pi, BO_pi2, C12, C34, C56 by reference +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void compute_bo(KK_FLOAT, int, int, KK_FLOAT, KK_FLOAT, KK_FLOAT, KK_FLOAT&, KK_FLOAT&, KK_FLOAT&, KK_FLOAT&, KK_FLOAT&, KK_FLOAT&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairReaxZero, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairReaxBondOrder1, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairReaxBondOrder2, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairReaxBondOrder3, const int&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairReaxUpdateBond, const int&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairReaxComputeBond1, const int&, EV_FLOAT_REAX&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairReaxComputeBond1, const int&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairReaxComputeBond2, const int&, EV_FLOAT_REAX&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairReaxComputeBond2, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairReaxComputeMulti1, const int&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairReaxComputeMulti2, const int&, EV_FLOAT_REAX&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairReaxComputeMulti2, const int&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairReaxCountAngularTorsion, const int&) const; // Abstraction for computing SBSO2, CSBO2, dSBO1, dsBO2 +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void compute_angular_sbo(int, int, int) const; // Abstraction for counting and populating angular intermediates template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION int preprocess_angular(int, int, int, int) const; // Abstraction for counting and populating torsion intermediated template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION int preprocess_torsion(int, int, tagint, KK_FLOAT, KK_FLOAT, KK_FLOAT, int, int) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairReaxComputeAngularPreprocessed, const int&, EV_FLOAT_REAX&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairReaxComputeAngularPreprocessed, const int&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairReaxComputeTorsionPreprocessed, const int&, EV_FLOAT_REAX&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairReaxComputeTorsionPreprocessed, const int&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairReaxComputeHydrogen, const int&, EV_FLOAT_REAX&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairReaxComputeHydrogen, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairReaxFindBondZero, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void calculate_find_bond_item(int, int&, int) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void pack_bond_buffer_item(int, int&, const bool&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void pack_reduced_bond_buffer_item(int, int&, const bool&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairReaxFindBondSpeciesZero, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairReaxFindBondSpecies, const int&) const; struct params_sing { +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION params_sing() {mass=0;chi=0;eta=0;r_s=0;r_pi=0;r_pi2=0;valency=0;valency_val=0;valency_e=0;valency_boc=0;nlp_opt=0; p_lp2=0;p_ovun2=0;p_ovun5=0;p_val3=0;p_val5=0;p_hbond=0;bcut_acks2=0;}; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION params_sing(int /*i*/) {mass=0;chi=0;eta=0;r_s=0;r_pi=0;r_pi2=0;valency=0;valency_val=0;valency_e=0;valency_boc=0;nlp_opt=0; p_lp2=0;p_ovun2=0;p_ovun5=0;p_val3=0;p_val5=0;p_hbond=0;bcut_acks2=0;}; @@ -312,11 +356,13 @@ class PairReaxFFKokkos : public PairReaxFF { }; struct params_twbp { +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION params_twbp() {gamma=0;gamma_w=0;alpha=0;r_vdw=0;epsilon=0;acore=0;ecore=0;rcore=0;lgre=0;lgcij=0; r_s=0;r_pi=0;r_pi2=0;p_bo1=0;p_bo2=0;p_bo3=0;p_bo4=0;p_bo5=0;p_bo6=0;ovc=0;v13cor=0; p_boc3=0;p_boc4=0;p_boc5=0;p_be1=0,p_be2=0,De_s=0,De_p=0;De_pp=0; p_ovun1=0;}; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION params_twbp(int /*i*/) {gamma=0;gamma_w=0;alpha=0;r_vdw=0;epsilon=0;acore=0;ecore=0;rcore=0;lgre=0;lgcij=0; r_s=0;r_pi=0;r_pi2=0;p_bo1=0;p_bo2=0;p_bo3=0;p_bo4=0;p_bo5=0;p_bo6=0;ovc=0;v13cor=0; @@ -329,56 +375,69 @@ class PairReaxFFKokkos : public PairReaxFF { }; struct params_thbp { +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION params_thbp() {cnt=0;theta_00=0;p_val1=0;p_val2=0;p_val4=0;p_val7=0;p_pen1=0;p_coa1=0;}; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION params_thbp(int /*i*/) {cnt=0;theta_00=0;p_val1=0;p_val2=0;p_val4=0;p_val7=0;p_pen1=0;p_coa1=0;}; KK_FLOAT cnt, theta_00, p_val1, p_val2, p_val4, p_val7, p_pen1, p_coa1; }; struct params_fbp { +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION params_fbp() {p_tor1=0;p_cot1=0;V1=0;V2=0;V3=0;}; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION params_fbp(int /*i*/) {p_tor1=0;p_cot1=0;V1=0;V2=0;V3=0;}; KK_FLOAT p_tor1, p_cot1, V1, V2, V3; }; struct params_hbp { +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION params_hbp() {p_hb1=0;p_hb2=0;p_hb3=0;r0_hb=0;}; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION params_hbp(int /*i*/) {p_hb1=0;p_hb2=0;p_hb3=0;r0_hb=0;}; KK_FLOAT p_hb1, p_hb2, p_hb3, r0_hb; }; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ev_tally(EV_FLOAT_REAX &ev, const int &i, const int &j, const KK_FLOAT &epair, const KK_FLOAT &fpair, const KK_FLOAT &delx, const KK_FLOAT &dely, const KK_FLOAT &delz) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void e_tally(EV_FLOAT_REAX &ev, const int &i, const int &j, const KK_FLOAT &epair) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void e_tally_single(EV_FLOAT_REAX &ev, const int &i, const KK_FLOAT &epair) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void v_tally(EV_FLOAT_REAX &ev, const int &i, KK_ACC_FLOAT *fi, KK_FLOAT *drij) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void v_tally3(EV_FLOAT_REAX &ev, const int &i, const int &j, const int &k, KK_ACC_FLOAT *fj, KK_ACC_FLOAT *fk, KK_FLOAT *drij, KK_FLOAT *drik) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void v_tally3_atom(EV_FLOAT_REAX &ev, const int &i, const int &j, const int &k, KK_ACC_FLOAT *fj, KK_ACC_FLOAT *fk, KK_FLOAT *drji, KK_FLOAT *drjk) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void v_tally4(EV_FLOAT_REAX &ev, const int &i, const int &j, const int &k, const int &l, KK_ACC_FLOAT *fi, KK_ACC_FLOAT *fj, KK_ACC_FLOAT *fk, KK_FLOAT *dril, KK_FLOAT *drjl, KK_FLOAT *drkl) const; @@ -527,12 +586,14 @@ struct PairReaxKokkosFindBondFunctor { PairReaxFFKokkos c; PairReaxKokkosFindBondFunctor(PairReaxFFKokkos* c_ptr, int groupbit):groupbit(groupbit),c(*c_ptr){}; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void join(int &dst, const int &src) const { dst = MAX(dst,src); } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(const int ii, int &numbonds) const { c.calculate_find_bond_item(ii,numbonds,groupbit); @@ -547,6 +608,7 @@ struct PairReaxKokkosPackBondBufferFunctor { PairReaxFFKokkos c; PairReaxKokkosPackBondBufferFunctor(PairReaxFFKokkos* c_ptr):c(*c_ptr) {}; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(const int ii, int &j, const bool &final) const { c.pack_bond_buffer_item(ii,j,final); @@ -561,6 +623,7 @@ struct PairReaxKokkosPackReducedBondBufferFunctor { PairReaxFFKokkos c; PairReaxKokkosPackReducedBondBufferFunctor(PairReaxFFKokkos* c_ptr):c(*c_ptr) {}; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(const int ii, int &j, const bool &final) const { c.template pack_reduced_bond_buffer_item(ii,j,final); diff --git a/src/KOKKOS/pair_snap_kokkos.h b/src/KOKKOS/pair_snap_kokkos.h index 964b27556a2..8f46b70fb5b 100644 --- a/src/KOKKOS/pair_snap_kokkos.h +++ b/src/KOKKOS/pair_snap_kokkos.h @@ -286,146 +286,191 @@ class PairSNAPKokkos : public PairSNAP { // CPU and GPU backend template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (TagPairSNAPComputeForce,const int& ii) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (TagPairSNAPComputeForce,const int& ii, EV_FLOAT&) const; // GPU backend only +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (TagPairSNAPComputeNeigh,const typename Kokkos::TeamPolicy::member_type& team) const; // GPU backend only +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (TagPairSNAPComputeCayleyKlein, const int iatom_mod, const int jnbor, const int iatom_div) const; // CPU and GPU +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (TagPairSNAPPreUi, const int& iatom_mod, const int& j, const int& iatom_div) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (TagPairSNAPPreUi, const int& iatom, const int& j) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (TagPairSNAPPreUi, const int& iatom) const; +// NOLINTNEXTLINE template KOKKOS_INLINE_FUNCTION void operator() (TagPairSNAPComputeUiSmall, const typename Kokkos::TeamPolicy>::member_type& team) const; +// NOLINTNEXTLINE template KOKKOS_INLINE_FUNCTION void operator() (TagPairSNAPComputeUiLarge, const typename Kokkos::TeamPolicy>::member_type& team) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (TagPairSNAPTransformUi, const int& iatom_mod, const int& idxu, const int& iatom_div) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (TagPairSNAPTransformUi, const int& iatom, const int& idxu) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (TagPairSNAPTransformUi, const int& iatom) const; +// NOLINTNEXTLINE template KOKKOS_INLINE_FUNCTION void operator() (TagPairSNAPComputeZi, const int& iatom_mod, const int& idxz, const int& iatom_div) const; +// NOLINTNEXTLINE template KOKKOS_INLINE_FUNCTION void operator() (TagPairSNAPComputeZi, const int& iatom, const int& idxz) const; +// NOLINTNEXTLINE template KOKKOS_INLINE_FUNCTION void operator() (TagPairSNAPComputeZi, const int& iatom) const; +// NOLINTNEXTLINE template KOKKOS_INLINE_FUNCTION void operator() (TagPairSNAPComputeBi, const int& iatom_mod, const int& idxb, const int& iatom_div) const; +// NOLINTNEXTLINE template KOKKOS_INLINE_FUNCTION void operator() (TagPairSNAPComputeBi, const int& iatom, const int& idxb) const; +// NOLINTNEXTLINE template KOKKOS_INLINE_FUNCTION void operator() (TagPairSNAPComputeBi, const int& iatom) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (TagPairSNAPComputeBetaLinear, const int& iatom_mod, const int& idxb, const int& iatom_div) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (TagPairSNAPComputeBetaLinear, const int& iatom, const int& idxb) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (TagPairSNAPComputeBetaLinear, const int& iatom) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (TagPairSNAPComputeBetaQuadratic, const int& iatom_mod, const int& idxb, const int& iatom_div) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (TagPairSNAPComputeBetaQuadratic, const int& iatom, const int& idxb) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (TagPairSNAPComputeBetaQuadratic, const int& iatom) const; +// NOLINTNEXTLINE template KOKKOS_INLINE_FUNCTION void operator() (TagPairSNAPComputeYi, const int& iatom_mod, const int& idxz, const int& iatom_div) const; +// NOLINTNEXTLINE template KOKKOS_INLINE_FUNCTION void operator() (TagPairSNAPComputeYi, const int& iatom, const int& idxz) const; +// NOLINTNEXTLINE template KOKKOS_INLINE_FUNCTION void operator() (TagPairSNAPComputeYi, const int& iatom) const; +// NOLINTNEXTLINE template KOKKOS_INLINE_FUNCTION void operator() (TagPairSNAPComputeYiWithZlist, const int& iatom_mod, const int& idxz, const int& iatom_div) const; +// NOLINTNEXTLINE template KOKKOS_INLINE_FUNCTION void operator() (TagPairSNAPComputeYiWithZlist, const int& iatom, const int& idxz) const; +// NOLINTNEXTLINE template KOKKOS_INLINE_FUNCTION void operator() (TagPairSNAPComputeYiWithZlist, const int& iatom) const; +// NOLINTNEXTLINE template KOKKOS_INLINE_FUNCTION void operator() (TagPairSNAPComputeFusedDeidrjSmall,const typename Kokkos::TeamPolicy >::member_type& team) const; +// NOLINTNEXTLINE template KOKKOS_INLINE_FUNCTION void operator() (TagPairSNAPComputeFusedDeidrjLarge,const typename Kokkos::TeamPolicy >::member_type& team) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (TagPairSNAPComputeFusedDeidrjAllSmall, const typename Kokkos::TeamPolicy::member_type& team) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (TagPairSNAPComputeFusedDeidrjAllLarge, const typename Kokkos::TeamPolicy::member_type& team) const; // CPU backend only +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (TagPairSNAPComputeNeighCPU,const typename Kokkos::TeamPolicy::member_type& team) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (TagPairSNAPComputeUiCPU, const int& iatom_mod, const int& idxu, const int& iatom_div) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (TagPairSNAPComputeUiCPU, const int& iatom, const int& jnbor) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (TagPairSNAPComputeUiCPU, const int& iatom) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (TagPairSNAPComputeDuidrjCPU, const int& iatom_mod, const int& jnbor, const int& iatom_div) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (TagPairSNAPComputeDuidrjCPU, const int& iatom, const int& jnbor) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (TagPairSNAPComputeDuidrjCPU, const int& iatom) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (TagPairSNAPComputeDeidrjCPU, const int& iatom_mod, const int& jnbor, const int& iatom_div) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (TagPairSNAPComputeDeidrjCPU, const int& iatom, const int& jnbor) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (TagPairSNAPComputeDeidrjCPU, const int& iatom) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void v_tally_xyz(EV_FLOAT &ev, const int &i, const int &j, const accum_type &fx, const accum_type &fy, const accum_type &fz, diff --git a/src/KOKKOS/pair_snap_kokkos_impl.h b/src/KOKKOS/pair_snap_kokkos_impl.h index 00d7bffcdd9..2deef5d66d9 100644 --- a/src/KOKKOS/pair_snap_kokkos_impl.h +++ b/src/KOKKOS/pair_snap_kokkos_impl.h @@ -95,6 +95,7 @@ struct FindMaxNumNeighs { FindMaxNumNeighs(NeighListKokkos* nl): k_list(*nl) {} ~FindMaxNumNeighs() {k_list.copymode = 1;} +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (const int& ii, int& max_neighs) const { const int i = k_list.d_ilist[ii]; @@ -513,6 +514,7 @@ void PairSNAPKokkos::coeff(int ------------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairSNAPKokkos::operator() (TagPairSNAPComputeNeigh,const typename Kokkos::TeamPolicy::member_type& team) const { @@ -603,6 +605,7 @@ void PairSNAPKokkos::operator( } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairSNAPKokkos::operator() (TagPairSNAPComputeNeighCPU,const typename Kokkos::TeamPolicy::member_type& team) const { @@ -685,6 +688,7 @@ void PairSNAPKokkos::operator( ------------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairSNAPKokkos::operator() (TagPairSNAPComputeCayleyKlein,const int iatom_mod, const int jnbor, const int iatom_div) const { @@ -703,6 +707,7 @@ void PairSNAPKokkos::operator( ------------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairSNAPKokkos::operator() (TagPairSNAPPreUi, const int& iatom_mod, const int& j, const int& iatom_div) const { const int iatom = iatom_mod + iatom_div * vector_length; @@ -715,6 +720,7 @@ void PairSNAPKokkos::operator( } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairSNAPKokkos::operator() (TagPairSNAPPreUi, const int& iatom, const int& j) const { if (iatom >= chunk_size) return; @@ -726,6 +732,7 @@ void PairSNAPKokkos::operator( } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairSNAPKokkos::operator() (TagPairSNAPPreUi, const int& iatom) const { if (iatom >= chunk_size) return; @@ -745,6 +752,7 @@ void PairSNAPKokkos::operator( template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairSNAPKokkos::operator() (TagPairSNAPComputeUiSmall, const typename Kokkos::TeamPolicy>::member_type& team) const { @@ -777,6 +785,7 @@ void PairSNAPKokkos::operator( template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairSNAPKokkos::operator() (TagPairSNAPComputeUiLarge, const typename Kokkos::TeamPolicy>::member_type& team) const { @@ -810,6 +819,7 @@ void PairSNAPKokkos::operator( ------------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairSNAPKokkos::operator() (TagPairSNAPComputeUiCPU, const int& iatom_mod, const int& jnbor, const int& iatom_div) const { const int iatom = iatom_mod + iatom_div * vector_length; @@ -820,6 +830,7 @@ void PairSNAPKokkos::operator( } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairSNAPKokkos::operator() (TagPairSNAPComputeUiCPU, const int& iatom, const int& jnbor) const { if (iatom >= chunk_size) return; @@ -829,6 +840,7 @@ void PairSNAPKokkos::operator( } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairSNAPKokkos::operator() (TagPairSNAPComputeUiCPU, const int& iatom) const { if (iatom >= chunk_size) return; @@ -843,6 +855,7 @@ void PairSNAPKokkos::operator( ------------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairSNAPKokkos::operator() (TagPairSNAPTransformUi, const int& iatom_mod, const int& idxu, const int& iatom_div) const { const int iatom = iatom_mod + iatom_div * vector_length; @@ -852,6 +865,7 @@ void PairSNAPKokkos::operator( } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairSNAPKokkos::operator() (TagPairSNAPTransformUi, const int& iatom, const int& idxu) const { if (iatom >= chunk_size) return; @@ -859,6 +873,7 @@ void PairSNAPKokkos::operator( } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairSNAPKokkos::operator() (TagPairSNAPTransformUi, const int& iatom) const { if (iatom >= chunk_size) return; @@ -873,6 +888,7 @@ void PairSNAPKokkos::operator( ------------------------------------------------------------------------- */ template +// NOLINTNEXTLINE template KOKKOS_INLINE_FUNCTION void PairSNAPKokkos::operator() (TagPairSNAPComputeZi, const int& iatom_mod, const int& jjz, const int& iatom_div) const { const int iatom = iatom_mod + yi_batch * iatom_div * vector_length; @@ -882,6 +898,7 @@ void PairSNAPKokkos::operator( } template +// NOLINTNEXTLINE template KOKKOS_INLINE_FUNCTION void PairSNAPKokkos::operator() (TagPairSNAPComputeZi, const int& iatom, const int& jjz) const { int iatom_shift = iatom; @@ -895,6 +912,7 @@ void PairSNAPKokkos::operator( } template +// NOLINTNEXTLINE template KOKKOS_INLINE_FUNCTION void PairSNAPKokkos::operator() (TagPairSNAPComputeZi, const int& iatom) const { int iatom_shift = iatom; @@ -914,6 +932,7 @@ void PairSNAPKokkos::operator( ------------------------------------------------------------------------- */ template +// NOLINTNEXTLINE template KOKKOS_INLINE_FUNCTION void PairSNAPKokkos::operator() (TagPairSNAPComputeBi, const int& iatom_mod, const int& jjb, const int& iatom_div) const { const int iatom = iatom_mod + yi_batch * iatom_div * vector_length; @@ -923,6 +942,7 @@ void PairSNAPKokkos::operator( } template +// NOLINTNEXTLINE template KOKKOS_INLINE_FUNCTION void PairSNAPKokkos::operator() (TagPairSNAPComputeBi, const int& iatom, const int& jjb) const { int iatom_shift = iatom; @@ -936,6 +956,7 @@ void PairSNAPKokkos::operator( } template +// NOLINTNEXTLINE template KOKKOS_INLINE_FUNCTION void PairSNAPKokkos::operator() (TagPairSNAPComputeBi, const int& iatom) const { int iatom_shift = iatom; @@ -956,6 +977,7 @@ void PairSNAPKokkos::operator( ------------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairSNAPKokkos::operator() (TagPairSNAPComputeBetaLinear, const int& iatom_mod, const int& idxb, const int& iatom_div) const { const int iatom = iatom_mod + iatom_div * vector_length; @@ -970,6 +992,7 @@ void PairSNAPKokkos::operator( } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairSNAPKokkos::operator() (TagPairSNAPComputeBetaLinear, const int& iatom, const int& idxb) const { if (iatom >= chunk_size) return; @@ -982,6 +1005,7 @@ void PairSNAPKokkos::operator( } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairSNAPKokkos::operator() (TagPairSNAPComputeBetaLinear, const int& iatom) const { if (iatom >= chunk_size) return; @@ -1002,6 +1026,7 @@ void PairSNAPKokkos::operator( ------------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairSNAPKokkos::operator() (TagPairSNAPComputeBetaQuadratic, const int& iatom_mod, const int& idxb, const int& iatom_div) const { const int iatom = iatom_mod + iatom_div * vector_length; @@ -1016,6 +1041,7 @@ void PairSNAPKokkos::operator( } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairSNAPKokkos::operator() (TagPairSNAPComputeBetaQuadratic, const int& iatom, const int& idxb) const { if (iatom >= chunk_size) return; @@ -1028,6 +1054,7 @@ void PairSNAPKokkos::operator( } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairSNAPKokkos::operator() (TagPairSNAPComputeBetaQuadratic, const int& iatom) const { if (iatom >= chunk_size) return; @@ -1046,6 +1073,7 @@ void PairSNAPKokkos::operator( ------------------------------------------------------------------------- */ template +// NOLINTNEXTLINE template KOKKOS_INLINE_FUNCTION void PairSNAPKokkos::operator() (TagPairSNAPComputeYi, const int& iatom_mod, const int& jjz, const int& iatom_div) const { const int iatom = iatom_mod + yi_batch * iatom_div * vector_length; @@ -1055,6 +1083,7 @@ void PairSNAPKokkos::operator( } template +// NOLINTNEXTLINE template KOKKOS_INLINE_FUNCTION void PairSNAPKokkos::operator() (TagPairSNAPComputeYi, const int& iatom, const int& jjz) const { int iatom_shift = iatom; @@ -1068,6 +1097,7 @@ void PairSNAPKokkos::operator( } template +// NOLINTNEXTLINE template KOKKOS_INLINE_FUNCTION void PairSNAPKokkos::operator() (TagPairSNAPComputeYi, const int& iatom) const { int iatom_shift = iatom; @@ -1087,6 +1117,7 @@ void PairSNAPKokkos::operator( ------------------------------------------------------------------------- */ template +// NOLINTNEXTLINE template KOKKOS_INLINE_FUNCTION void PairSNAPKokkos::operator() (TagPairSNAPComputeYiWithZlist, const int& iatom_mod, const int& jjz, const int& iatom_div) const { const int iatom = iatom_mod + yi_batch * iatom_div * vector_length; @@ -1096,6 +1127,7 @@ void PairSNAPKokkos::operator( } template +// NOLINTNEXTLINE template KOKKOS_INLINE_FUNCTION void PairSNAPKokkos::operator() (TagPairSNAPComputeYiWithZlist, const int& iatom, const int& jjz) const { int iatom_shift = iatom; @@ -1109,6 +1141,7 @@ void PairSNAPKokkos::operator( } template +// NOLINTNEXTLINE template KOKKOS_INLINE_FUNCTION void PairSNAPKokkos::operator() (TagPairSNAPComputeYiWithZlist, const int& iatom) const { int iatom_shift = iatom; @@ -1131,6 +1164,7 @@ void PairSNAPKokkos::operator( template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairSNAPKokkos::operator() (TagPairSNAPComputeFusedDeidrjSmall,const typename Kokkos::TeamPolicy >::member_type& team) const { @@ -1159,6 +1193,7 @@ void PairSNAPKokkos::operator( template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairSNAPKokkos::operator() (TagPairSNAPComputeFusedDeidrjLarge,const typename Kokkos::TeamPolicy >::member_type& team) const { @@ -1185,6 +1220,7 @@ void PairSNAPKokkos::operator( /* These are super-fused routines that handle all directions at once */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairSNAPKokkos::operator() (TagPairSNAPComputeFusedDeidrjAllSmall, const typename Kokkos::TeamPolicy::member_type& team) const { @@ -1213,6 +1249,7 @@ void PairSNAPKokkos::operator( } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairSNAPKokkos::operator() (TagPairSNAPComputeFusedDeidrjAllLarge, const typename Kokkos::TeamPolicy::member_type& team) const { @@ -1243,6 +1280,7 @@ void PairSNAPKokkos::operator( ------------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairSNAPKokkos::operator() (TagPairSNAPComputeDuidrjCPU, const int& iatom_mod, const int& jnbor, const int& iatom_div) const { const int iatom = iatom_mod + vector_length * iatom_div; @@ -1253,6 +1291,7 @@ void PairSNAPKokkos::operator( } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairSNAPKokkos::operator() (TagPairSNAPComputeDuidrjCPU, const int& iatom, const int& jnbor) const { if (iatom >= chunk_size) return; @@ -1262,6 +1301,7 @@ void PairSNAPKokkos::operator( } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairSNAPKokkos::operator() (TagPairSNAPComputeDuidrjCPU, const int& iatom) const { if (iatom >= chunk_size) return; @@ -1277,6 +1317,7 @@ void PairSNAPKokkos::operator( ------------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairSNAPKokkos::operator() (TagPairSNAPComputeDeidrjCPU, const int& iatom_mod, const int& jnbor, const int& iatom_div) const { const int iatom = iatom_mod + vector_length * iatom_div; @@ -1287,6 +1328,7 @@ void PairSNAPKokkos::operator( } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairSNAPKokkos::operator() (TagPairSNAPComputeDeidrjCPU, const int& iatom, const int& jnbor) const { if (iatom >= chunk_size) return; @@ -1296,6 +1338,7 @@ void PairSNAPKokkos::operator( } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairSNAPKokkos::operator() (TagPairSNAPComputeDeidrjCPU, const int& iatom) const { if (iatom >= chunk_size) return; @@ -1312,6 +1355,7 @@ void PairSNAPKokkos::operator( template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairSNAPKokkos::operator() (TagPairSNAPComputeForce, const int& ii, EV_FLOAT& ev) const { @@ -1402,6 +1446,7 @@ void PairSNAPKokkos::operator( template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairSNAPKokkos::operator() (TagPairSNAPComputeForce,const int& ii) const { EV_FLOAT ev; @@ -1412,6 +1457,7 @@ void PairSNAPKokkos::operator( template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairSNAPKokkos::v_tally_xyz(EV_FLOAT &ev, const int &i, const int &j, const accum_type &fx, const accum_type &fy, const accum_type &fz, diff --git a/src/KOKKOS/pair_soft_kokkos.cpp b/src/KOKKOS/pair_soft_kokkos.cpp index fa8737fe485..1fb00518043 100644 --- a/src/KOKKOS/pair_soft_kokkos.cpp +++ b/src/KOKKOS/pair_soft_kokkos.cpp @@ -133,6 +133,7 @@ void PairSoftKokkos::compute(int eflag_in, int vflag_in) template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairSoftKokkos:: compute_fpair(const KK_FLOAT& rsq, const int &, const int &, const int& itype, const int& jtype) const { @@ -149,6 +150,7 @@ compute_fpair(const KK_FLOAT& rsq, const int &, const int &, const int& itype, c template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairSoftKokkos:: compute_evdwl(const KK_FLOAT& rsq, const int &, const int &, const int& itype, const int& jtype) const { diff --git a/src/KOKKOS/pair_soft_kokkos.h b/src/KOKKOS/pair_soft_kokkos.h index 68665aac2b5..92a28005ee4 100644 --- a/src/KOKKOS/pair_soft_kokkos.h +++ b/src/KOKKOS/pair_soft_kokkos.h @@ -45,8 +45,10 @@ class PairSoftKokkos : public PairSoft { double init_one(int, int) override; struct params_soft{ +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION params_soft() {cutsq=0,cut=0,prefactor=0;}; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION params_soft(int /*i*/) {cutsq=0,cut=0,prefactor=0;}; KK_FLOAT cutsq,cut,prefactor; @@ -54,14 +56,17 @@ class PairSoftKokkos : public PairSoft { protected: template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_fpair(const KK_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_evdwl(const KK_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_ecoul(const KK_FLOAT& /*rsq*/, const int& /*i*/, const int& /*j*/, const int& /*itype*/, const int& /*jtype*/) const { return 0; } diff --git a/src/KOKKOS/pair_sw_kokkos.cpp b/src/KOKKOS/pair_sw_kokkos.cpp index 9e1369b1ca6..97407b4fc75 100644 --- a/src/KOKKOS/pair_sw_kokkos.cpp +++ b/src/KOKKOS/pair_sw_kokkos.cpp @@ -196,6 +196,7 @@ void PairSWKokkos::compute(int eflag_in, int vflag_in) /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairSWKokkos::operator()(TagPairSWComputeShortNeigh, const int& ii) const { const int i = d_ilist[ii]; @@ -229,6 +230,7 @@ void PairSWKokkos::operator()(TagPairSWComputeShortNeigh, const int& template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairSWKokkos::operator()(TagPairSWCompute, const int &ii, EV_FLOAT& ev) const { @@ -352,6 +354,7 @@ void PairSWKokkos::operator()(TagPairSWCompute, co template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairSWKokkos::operator()(TagPairSWCompute, const int &ii) const { EV_FLOAT ev; @@ -443,6 +446,7 @@ void PairSWKokkos::setup_params() /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairSWKokkos::twobody(const Param& param, const KK_FLOAT& rsq, KK_FLOAT& fforce, const int& eflag, KK_FLOAT& eng) const @@ -464,6 +468,7 @@ void PairSWKokkos::twobody(const Param& param, const KK_FLOAT& rsq, /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairSWKokkos::threebody_kk(const Param& paramij, const Param& paramik, const Param& paramijk, const KK_FLOAT& rsq1, const KK_FLOAT& rsq2, @@ -524,6 +529,7 @@ void PairSWKokkos::threebody_kk(const Param& paramij, const Param& p template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairSWKokkos::ev_tally(EV_FLOAT &ev, const int &i, const int &j, const KK_FLOAT &epair, const KK_FLOAT &fpair, const KK_FLOAT &delx, @@ -587,6 +593,7 @@ void PairSWKokkos::ev_tally(EV_FLOAT &ev, const int &i, const int &j template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairSWKokkos::ev_tally3(EV_FLOAT &ev, const int &i, const int &j, int &k, const KK_FLOAT &evdwl, const KK_FLOAT &ecoul, @@ -649,6 +656,7 @@ void PairSWKokkos::ev_tally3(EV_FLOAT &ev, const int &i, const int & ------------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairSWKokkos::ev_tally3_atom(EV_FLOAT & /*ev*/, const int &i, const KK_FLOAT &evdwl, const KK_FLOAT &ecoul, diff --git a/src/KOKKOS/pair_sw_kokkos.h b/src/KOKKOS/pair_sw_kokkos.h index 9c8e8816dd2..0942cf5d261 100644 --- a/src/KOKKOS/pair_sw_kokkos.h +++ b/src/KOKKOS/pair_sw_kokkos.h @@ -49,28 +49,34 @@ class PairSWKokkos : public PairSW { void init_style() override; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairSWCompute, const int&, EV_FLOAT&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairSWCompute, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairSWComputeShortNeigh, const int&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ev_tally(EV_FLOAT &ev, const int &i, const int &j, const KK_FLOAT &epair, const KK_FLOAT &fpair, const KK_FLOAT &delx, const KK_FLOAT &dely, const KK_FLOAT &delz) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ev_tally3(EV_FLOAT &ev, const int &i, const int &j, int &k, const KK_FLOAT &evdwl, const KK_FLOAT &ecoul, KK_ACC_FLOAT *fj, KK_ACC_FLOAT *fk, KK_FLOAT *drji, KK_FLOAT *drki) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ev_tally3_atom(EV_FLOAT &ev, const int &i, const KK_FLOAT &evdwl, const KK_FLOAT &ecoul, @@ -88,9 +94,11 @@ class PairSWKokkos : public PairSW { void setup_params() override; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void twobody(const Param&, const KK_FLOAT&, KK_FLOAT&, const int&, KK_FLOAT&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void threebody_kk(const Param&, const Param&, const Param&, const KK_FLOAT&, const KK_FLOAT&, KK_FLOAT *, KK_FLOAT *, KK_ACC_FLOAT *, KK_ACC_FLOAT *, const int&, KK_FLOAT&) const; diff --git a/src/KOKKOS/pair_table_kokkos.cpp b/src/KOKKOS/pair_table_kokkos.cpp index e010e5146ae..2bf1893a01f 100644 --- a/src/KOKKOS/pair_table_kokkos.cpp +++ b/src/KOKKOS/pair_table_kokkos.cpp @@ -201,6 +201,7 @@ void PairTableKokkos::compute_style(int eflag_in, int vflag_in) template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION double PairTableKokkos:: compute_fpair(const double &rsq, const int &, const int &, const int &itype, const int &jtype) const { @@ -233,6 +234,7 @@ compute_fpair(const double &rsq, const int &, const int &, const int &itype, con template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION double PairTableKokkos:: compute_evdwl(const double &rsq, const int &, const int &, const int &itype, const int &jtype) const { diff --git a/src/KOKKOS/pair_table_kokkos.h b/src/KOKKOS/pair_table_kokkos.h index 35e405c1e4f..7322fbdc3c9 100644 --- a/src/KOKKOS/pair_table_kokkos.h +++ b/src/KOKKOS/pair_table_kokkos.h @@ -120,14 +120,17 @@ class PairTableKokkos : public PairTable { void create_kokkos_tables(); template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION double compute_fpair(const double& rsq, const int& i, const int&j, const int& itype, const int& jtype) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION double compute_evdwl(const double& rsq, const int& i, const int&j, const int& itype, const int& jtype) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION double compute_ecoul(const double& /*rsq*/, const int& /*i*/, const int& /*j*/, const int& /*itype*/, const int& /*jtype*/) const { return 0; } diff --git a/src/KOKKOS/pair_table_rx_kokkos.cpp b/src/KOKKOS/pair_table_rx_kokkos.cpp index a6045e94179..3082304e38a 100644 --- a/src/KOKKOS/pair_table_rx_kokkos.cpp +++ b/src/KOKKOS/pair_table_rx_kokkos.cpp @@ -52,6 +52,7 @@ enum{NONE,RLINEAR,RSQ,BMP}; #define isOneFluid(_site_) ( (_site_) == OneFluidValue ) template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void getMixingWeights( typename ArrayTypes::t_kkfloat_2d_randomread dvector, @@ -198,12 +199,14 @@ void PairTableRXKokkos::compute(int eflag_in, int vflag_in) compute_style(eflag_in,vflag_in); } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION static int sbmask(const int& j) { return j >> SBBITS & 3; } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION static KK_FLOAT compute_fpair(KK_FLOAT rsq, @@ -238,6 +241,7 @@ compute_fpair(KK_FLOAT rsq, } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION static KK_FLOAT compute_evdwl( @@ -273,6 +277,7 @@ compute_evdwl( } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ev_tally( @@ -384,6 +389,7 @@ ev_tally( template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION static EV_FLOAT compute_item( diff --git a/src/KOKKOS/pair_tersoff_kokkos.cpp b/src/KOKKOS/pair_tersoff_kokkos.cpp index aa9adadce10..2e53b95687d 100644 --- a/src/KOKKOS/pair_tersoff_kokkos.cpp +++ b/src/KOKKOS/pair_tersoff_kokkos.cpp @@ -304,6 +304,7 @@ void PairTersoffKokkos::compute(int eflag_in, int vflag_in) /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairTersoffKokkos::operator()(TagPairTersoffComputeShortNeigh, const int& ii) const { const int i = d_ilist[ii]; @@ -335,6 +336,7 @@ void PairTersoffKokkos::operator()(TagPairTersoffComputeShortNeigh, template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairTersoffKokkos::tersoff_compute(const int &ii, EV_FLOAT& ev) const { @@ -504,6 +506,7 @@ void PairTersoffKokkos::tersoff_compute(const int &ii, EV_FLOAT& ev) template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairTersoffKokkos::operator()(TagPairTersoffCompute, const int &ii, EV_FLOAT& ev) const { this->template tersoff_compute(ii, ev); @@ -511,6 +514,7 @@ void PairTersoffKokkos::operator()(TagPairTersoffCompute template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairTersoffKokkos::operator()(TagPairTersoffCompute, const int &ii) const { EV_FLOAT ev; @@ -519,6 +523,7 @@ void PairTersoffKokkos::operator()(TagPairTersoffCompute template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairTersoffKokkos::operator()(TagPairTersoffCompute, const int &ii, const int&, EV_FLOAT& ev) const { this->template tersoff_compute(ii, ev); @@ -526,6 +531,7 @@ void PairTersoffKokkos::operator()(TagPairTersoffCompute template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairTersoffKokkos::operator()(TagPairTersoffCompute, const int &ii, const int&) const { EV_FLOAT ev; @@ -535,6 +541,7 @@ void PairTersoffKokkos::operator()(TagPairTersoffCompute template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairTersoffKokkos::operator()(TagPairTersoffCompute, const typename Kokkos::TeamPolicy >::member_type &team, EV_FLOAT& ev) const { @@ -546,6 +553,7 @@ void PairTersoffKokkos::operator()(TagPairTersoffCompute template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairTersoffKokkos::operator()(TagPairTersoffCompute, const typename Kokkos::TeamPolicy >::member_type &team) const { @@ -560,6 +568,7 @@ void PairTersoffKokkos::operator()(TagPairTersoffCompute +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairTersoffKokkos::ters_fc_k(const ParamKokkos& param, const KK_FLOAT &r) const { @@ -574,6 +583,7 @@ KK_FLOAT PairTersoffKokkos::ters_fc_k(const ParamKokkos& param, cons /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairTersoffKokkos::ters_dfc(const ParamKokkos& param, const KK_FLOAT &r) const { @@ -588,6 +598,7 @@ KK_FLOAT PairTersoffKokkos::ters_dfc(const ParamKokkos& param, const /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairTersoffKokkos::ters_fc_k_and_ters_dfc(const ParamKokkos& param, const KK_FLOAT &r, KK_FLOAT& fc, KK_FLOAT& dfc) const { @@ -616,6 +627,7 @@ void PairTersoffKokkos::ters_fc_k_and_ters_dfc(const ParamKokkos& pa /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairTersoffKokkos::bondorder(const ParamKokkos& param, const KK_FLOAT &rij, const KK_FLOAT &dx1, const KK_FLOAT &dy1, const KK_FLOAT &dz1, @@ -639,6 +651,7 @@ KK_FLOAT PairTersoffKokkos::bondorder(const ParamKokkos& param, /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairTersoffKokkos:: ters_gijk(const ParamKokkos& param, const KK_FLOAT &cos) const @@ -653,6 +666,7 @@ KK_FLOAT PairTersoffKokkos:: /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairTersoffKokkos:: ters_dgijk(const ParamKokkos& param, const KK_FLOAT &cos) const @@ -668,6 +682,7 @@ KK_FLOAT PairTersoffKokkos:: /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairTersoffKokkos:: ters_gijk_and_ters_dgijk(const ParamKokkos& param, const KK_FLOAT &cos, KK_FLOAT &gijk, KK_FLOAT &dgijk) const @@ -686,6 +701,7 @@ void PairTersoffKokkos:: /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairTersoffKokkos::ters_fa_k(const ParamKokkos& param, const KK_FLOAT &r) const { @@ -697,6 +713,7 @@ KK_FLOAT PairTersoffKokkos::ters_fa_k(const ParamKokkos& param, cons /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairTersoffKokkos::ters_dfa(const ParamKokkos& param, const KK_FLOAT &r) const { @@ -708,6 +725,7 @@ KK_FLOAT PairTersoffKokkos::ters_dfa(const ParamKokkos& param, const /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairTersoffKokkos::ters_fa_k_and_ters_dfa(const ParamKokkos& param, const KK_FLOAT &r, KK_FLOAT &fa, KK_FLOAT &dfa) const { @@ -726,6 +744,7 @@ void PairTersoffKokkos::ters_fa_k_and_ters_dfa(const ParamKokkos& pa /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairTersoffKokkos::ters_bij_k(const ParamKokkos& param, const KK_FLOAT &bo) const { @@ -742,6 +761,7 @@ KK_FLOAT PairTersoffKokkos::ters_bij_k(const ParamKokkos& param, con /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairTersoffKokkos::ters_dbij(const ParamKokkos& param, const KK_FLOAT &bo) const { @@ -765,6 +785,7 @@ KK_FLOAT PairTersoffKokkos::ters_dbij(const ParamKokkos& param, cons /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairTersoffKokkos::ters_bij_k_and_ters_dbij(const ParamKokkos& param, const KK_FLOAT &bo, KK_FLOAT& bij, KK_FLOAT& prefactor) const { @@ -807,6 +828,7 @@ void PairTersoffKokkos::ters_bij_k_and_ters_dbij(const ParamKokkos& /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairTersoffKokkos::ters_dthb( const ParamKokkos& param, const KK_FLOAT &prefactor, @@ -880,6 +902,7 @@ void PairTersoffKokkos::ters_dthb( /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairTersoffKokkos::ters_dthbj( const ParamKokkos& param, const KK_FLOAT &prefactor, @@ -942,6 +965,7 @@ void PairTersoffKokkos::ters_dthbj( /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairTersoffKokkos::ters_dthbk( const ParamKokkos& param, const KK_FLOAT &prefactor, @@ -1000,6 +1024,7 @@ void PairTersoffKokkos::ters_dthbk( template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairTersoffKokkos::ev_tally(EV_FLOAT &ev, const int &i, const int &j, const KK_FLOAT &epair, const KK_FLOAT &fpair, const KK_FLOAT &delx, @@ -1058,6 +1083,7 @@ void PairTersoffKokkos::ev_tally(EV_FLOAT &ev, const int &i, const i template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairTersoffKokkos::v_tally3(EV_FLOAT &ev, const int &i, const int &j, const int &k, @@ -1100,6 +1126,7 @@ void PairTersoffKokkos::v_tally3(EV_FLOAT &ev, /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairTersoffKokkos::v_tally3_atom(EV_FLOAT &ev, const int &i, const int & /*j*/, const int & /*k*/, KK_ACC_FLOAT *fj, KK_ACC_FLOAT *fk, @@ -1128,6 +1155,7 @@ void PairTersoffKokkos::v_tally3_atom(EV_FLOAT &ev, const int &i, co /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION int PairTersoffKokkos::sbmask(const int& j) const { return j >> SBBITS & 3; diff --git a/src/KOKKOS/pair_tersoff_kokkos.h b/src/KOKKOS/pair_tersoff_kokkos.h index eb6b54f2754..a33035d8083 100644 --- a/src/KOKKOS/pair_tersoff_kokkos.h +++ b/src/KOKKOS/pair_tersoff_kokkos.h @@ -113,97 +113,122 @@ class PairTersoffKokkos : public PairTersoff { // RangePolicy versions template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairTersoffCompute, const int&, EV_FLOAT&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairTersoffCompute, const int&) const; // MDRangePolicy versions template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairTersoffCompute, const int&, const int&, EV_FLOAT&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairTersoffCompute, const int&, const int&) const; // TeamPolicy versions template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairTersoffCompute, const typename Kokkos::TeamPolicy >::member_type&, EV_FLOAT&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairTersoffCompute, const typename Kokkos::TeamPolicy >::member_type&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairTersoffComputeShortNeigh, const int&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void tersoff_compute(const int&, EV_FLOAT&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT ters_fc_k(const ParamKokkos& param, const KK_FLOAT &r) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT ters_dfc(const ParamKokkos& param, const KK_FLOAT &r) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ters_fc_k_and_ters_dfc(const ParamKokkos& param, const KK_FLOAT &r, KK_FLOAT &fc, KK_FLOAT &dfc) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT ters_fa_k(const ParamKokkos& param, const KK_FLOAT &r) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT ters_dfa(const ParamKokkos& param, const KK_FLOAT &r) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ters_fa_k_and_ters_dfa(const ParamKokkos& param, const KK_FLOAT &r, KK_FLOAT &fa, KK_FLOAT &dfa) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT ters_bij_k(const ParamKokkos& param, const KK_FLOAT &bo) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT ters_dbij(const ParamKokkos& param, const KK_FLOAT &bo) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ters_bij_k_and_ters_dbij(const ParamKokkos& param, const KK_FLOAT &bo, KK_FLOAT &bij, KK_FLOAT &prefactor) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT bondorder(const ParamKokkos& param, const KK_FLOAT &rij, const KK_FLOAT &dx1, const KK_FLOAT &dy1, const KK_FLOAT &dz1, const KK_FLOAT &rik, const KK_FLOAT &dx2, const KK_FLOAT &dy2, const KK_FLOAT &dz2) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT ters_gijk(const ParamKokkos& param, const KK_FLOAT &cos) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT ters_dgijk(const ParamKokkos& param, const KK_FLOAT &cos) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ters_gijk_and_ters_dgijk(const ParamKokkos& param, const KK_FLOAT &cos, KK_FLOAT& gijk, KK_FLOAT& dgijk) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ters_dthb(const ParamKokkos& param, const KK_FLOAT &prefactor, const KK_FLOAT &rij, const KK_FLOAT &dx1, const KK_FLOAT &dy1, const KK_FLOAT &dz1, const KK_FLOAT &rik, const KK_FLOAT &dx2, const KK_FLOAT &dy2, const KK_FLOAT &dz2, KK_ACC_FLOAT *fi, KK_ACC_FLOAT *fj, KK_ACC_FLOAT *fk) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ters_dthbj(const ParamKokkos& param, const KK_FLOAT &prefactor, const KK_FLOAT &rij, const KK_FLOAT &dx1, const KK_FLOAT &dy1, const KK_FLOAT &dz1, const KK_FLOAT &rik, const KK_FLOAT &dx2, const KK_FLOAT &dy2, const KK_FLOAT &dz2, KK_ACC_FLOAT *fj, KK_ACC_FLOAT *fk) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ters_dthbk(const ParamKokkos& param, const KK_FLOAT &prefactor, const KK_FLOAT &rij, const KK_FLOAT &dx1, const KK_FLOAT &dy1, const KK_FLOAT &dz1, const KK_FLOAT &rik, const KK_FLOAT &dx2, const KK_FLOAT &dy2, const KK_FLOAT &dz2, KK_ACC_FLOAT *fk) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT vec3_dot(const KK_FLOAT x[3], const KK_FLOAT y[3]) const { KK_FLOAT dot = 0; @@ -212,6 +237,7 @@ class PairTersoffKokkos : public PairTersoff { return dot; } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void vec3_add(const KK_FLOAT x[3], const KK_FLOAT y[3], KK_FLOAT * const z) const { for (int i = 0; i < 3; i++) @@ -219,6 +245,7 @@ class PairTersoffKokkos : public PairTersoff { } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void vec3_scale(const k_type k, const x_type x[3], y_type y[3]) const { for (int i = 0; i < 3; i++) @@ -226,26 +253,31 @@ class PairTersoffKokkos : public PairTersoff { } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void vec3_scaleadd(const kx_type k, const kx_type x[3], const yz_type y[3], yz_type z[3]) const { for (int i = 0; i < 3; i++) z[i] = static_cast(k*x[i])+y[i]; } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION int sbmask(const int& j) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ev_tally(EV_FLOAT &ev, const int &i, const int &j, const KK_FLOAT &epair, const KK_FLOAT &fpair, const KK_FLOAT &delx, const KK_FLOAT &dely, const KK_FLOAT &delz) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void v_tally3(EV_FLOAT &ev, const int &i, const int &j, const int &k, KK_ACC_FLOAT *fj, KK_ACC_FLOAT *fk, KK_FLOAT *drij, KK_FLOAT *drik) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void v_tally3_atom(EV_FLOAT &ev, const int &i, const int &j, const int &k, KK_ACC_FLOAT *fj, KK_ACC_FLOAT *fk, KK_FLOAT *drji, KK_FLOAT *drjk) const; diff --git a/src/KOKKOS/pair_tersoff_mod_kokkos.cpp b/src/KOKKOS/pair_tersoff_mod_kokkos.cpp index 3bb412a9d18..aebf87904c1 100644 --- a/src/KOKKOS/pair_tersoff_mod_kokkos.cpp +++ b/src/KOKKOS/pair_tersoff_mod_kokkos.cpp @@ -292,6 +292,7 @@ void PairTersoffMODKokkos::compute(int eflag_in, int vflag_in) /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairTersoffMODKokkos::operator()(TagPairTersoffMODComputeShortNeigh, const int& ii) const { const int i = d_ilist[ii]; @@ -323,6 +324,7 @@ void PairTersoffMODKokkos::operator()(TagPairTersoffMODComputeShortN template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairTersoffMODKokkos::tersoff_mod_compute(const int &ii, EV_FLOAT& ev) const { @@ -499,6 +501,7 @@ void PairTersoffMODKokkos::tersoff_mod_compute(const int &ii, EV_FLO template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairTersoffMODKokkos::operator()(TagPairTersoffMODCompute, const int &ii, EV_FLOAT& ev) const { this->template tersoff_mod_compute(ii, ev); @@ -506,6 +509,7 @@ void PairTersoffMODKokkos::operator()(TagPairTersoffMODCompute template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairTersoffMODKokkos::operator()(TagPairTersoffMODCompute, const int &ii) const { EV_FLOAT ev; @@ -514,6 +518,7 @@ void PairTersoffMODKokkos::operator()(TagPairTersoffMODCompute template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairTersoffMODKokkos::operator()(TagPairTersoffMODCompute, const int &ii, const int&, EV_FLOAT& ev) const { this->template tersoff_mod_compute(ii, ev); @@ -521,6 +526,7 @@ void PairTersoffMODKokkos::operator()(TagPairTersoffMODCompute template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairTersoffMODKokkos::operator()(TagPairTersoffMODCompute, const int &ii, const int&) const { EV_FLOAT ev; @@ -530,6 +536,7 @@ void PairTersoffMODKokkos::operator()(TagPairTersoffMODCompute template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairTersoffMODKokkos::operator()(TagPairTersoffMODCompute, const typename Kokkos::TeamPolicy >::member_type &team, EV_FLOAT& ev) const { @@ -541,6 +548,7 @@ void PairTersoffMODKokkos::operator()(TagPairTersoffMODCompute template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairTersoffMODKokkos::operator()(TagPairTersoffMODCompute, const typename Kokkos::TeamPolicy >::member_type &team) const { @@ -555,6 +563,7 @@ void PairTersoffMODKokkos::operator()(TagPairTersoffMODCompute +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairTersoffMODKokkos::ters_fc_k(const Param& param, const KK_FLOAT &r) const { @@ -570,6 +579,7 @@ KK_FLOAT PairTersoffMODKokkos::ters_fc_k(const Param& param, const K /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairTersoffMODKokkos::ters_dfc(const Param& param, const KK_FLOAT &r) const { @@ -585,6 +595,7 @@ KK_FLOAT PairTersoffMODKokkos::ters_dfc(const Param& param, const KK /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairTersoffMODKokkos::bondorder(const Param& param, const KK_FLOAT &rij, const KK_FLOAT &dx1, const KK_FLOAT &dy1, const KK_FLOAT &dz1, @@ -608,6 +619,7 @@ KK_FLOAT PairTersoffMODKokkos::bondorder(const Param& param, /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairTersoffMODKokkos:: ters_gijk(const Param& param, const KK_FLOAT &cos) const @@ -627,6 +639,7 @@ KK_FLOAT PairTersoffMODKokkos:: /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairTersoffMODKokkos:: ters_dgijk(const Param& param, const KK_FLOAT &cos) const @@ -646,6 +659,7 @@ KK_FLOAT PairTersoffMODKokkos:: /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairTersoffMODKokkos::ters_fa_k(const Param& param, const KK_FLOAT &r) const { @@ -657,6 +671,7 @@ KK_FLOAT PairTersoffMODKokkos::ters_fa_k(const Param& param, const K /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairTersoffMODKokkos::ters_dfa(const Param& param, const KK_FLOAT &r) const { @@ -668,6 +683,7 @@ KK_FLOAT PairTersoffMODKokkos::ters_dfa(const Param& param, const KK /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairTersoffMODKokkos::ters_bij_k(const Param& param, const KK_FLOAT &bo) const { @@ -682,6 +698,7 @@ KK_FLOAT PairTersoffMODKokkos::ters_bij_k(const Param& param, const /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairTersoffMODKokkos::ters_dbij(const Param& param, const KK_FLOAT &bo) const { @@ -700,6 +717,7 @@ KK_FLOAT PairTersoffMODKokkos::ters_dbij(const Param& param, const K /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairTersoffMODKokkos::ters_dthb( const Param& param, const KK_FLOAT &prefactor, @@ -774,6 +792,7 @@ void PairTersoffMODKokkos::ters_dthb( /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairTersoffMODKokkos::ters_dthbj( const Param& param, const KK_FLOAT &prefactor, @@ -836,6 +855,7 @@ void PairTersoffMODKokkos::ters_dthbj( /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairTersoffMODKokkos::ters_dthbk( const Param& param, const KK_FLOAT &prefactor, @@ -894,6 +914,7 @@ void PairTersoffMODKokkos::ters_dthbk( template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairTersoffMODKokkos::ev_tally(EV_FLOAT &ev, const int &i, const int &j, const KK_FLOAT &epair, const KK_FLOAT &fpair, const KK_FLOAT &delx, @@ -952,6 +973,7 @@ void PairTersoffMODKokkos::ev_tally(EV_FLOAT &ev, const int &i, cons template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairTersoffMODKokkos::v_tally3(EV_FLOAT &ev, const int &i, const int &j, const int &k, KK_ACC_FLOAT *fj, KK_ACC_FLOAT *fk, KK_FLOAT *drij, KK_FLOAT *drik) const @@ -1001,6 +1023,7 @@ void PairTersoffMODKokkos::v_tally3(EV_FLOAT &ev, const int &i, cons /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairTersoffMODKokkos::v_tally3_atom(EV_FLOAT &ev, const int &i, const int & /*j*/, const int & /*k*/, @@ -1034,6 +1057,7 @@ void PairTersoffMODKokkos::v_tally3_atom(EV_FLOAT &ev, const int &i, /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION int PairTersoffMODKokkos::sbmask(const int& j) const { return j >> SBBITS & 3; diff --git a/src/KOKKOS/pair_tersoff_mod_kokkos.h b/src/KOKKOS/pair_tersoff_mod_kokkos.h index 27aeca670e8..8478c31159d 100644 --- a/src/KOKKOS/pair_tersoff_mod_kokkos.h +++ b/src/KOKKOS/pair_tersoff_mod_kokkos.h @@ -57,79 +57,99 @@ class PairTersoffMODKokkos : public PairTersoffMOD { // RangePolicy versions template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairTersoffMODCompute, const int&, EV_FLOAT&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairTersoffMODCompute, const int&) const; // MDRangePolicy versions template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairTersoffMODCompute, const int&, const int&, EV_FLOAT&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairTersoffMODCompute, const int&, const int&) const; // TeamPolicy versions template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairTersoffMODCompute, const typename Kokkos::TeamPolicy >::member_type&, EV_FLOAT&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairTersoffMODCompute, const typename Kokkos::TeamPolicy >::member_type&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairTersoffMODComputeShortNeigh, const int&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void tersoff_mod_compute(const int&, EV_FLOAT&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT ters_fc_k(const Param& param, const KK_FLOAT &r) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT ters_dfc(const Param& param, const KK_FLOAT &r) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT ters_fa_k(const Param& param, const KK_FLOAT &r) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT ters_dfa(const Param& param, const KK_FLOAT &r) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT ters_bij_k(const Param& param, const KK_FLOAT &bo) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT ters_dbij(const Param& param, const KK_FLOAT &bo) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT bondorder(const Param& param, const KK_FLOAT &rij, const KK_FLOAT &dx1, const KK_FLOAT &dy1, const KK_FLOAT &dz1, const KK_FLOAT &rik, const KK_FLOAT &dx2, const KK_FLOAT &dy2, const KK_FLOAT &dz2) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT ters_gijk(const Param& param, const KK_FLOAT &cos) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT ters_dgijk(const Param& param, const KK_FLOAT &cos) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ters_dthb(const Param& param, const KK_FLOAT &prefactor, const KK_FLOAT &rij, const KK_FLOAT &dx1, const KK_FLOAT &dy1, const KK_FLOAT &dz1, const KK_FLOAT &rik, const KK_FLOAT &dx2, const KK_FLOAT &dy2, const KK_FLOAT &dz2, KK_ACC_FLOAT *fi, KK_ACC_FLOAT *fj, KK_ACC_FLOAT *fk) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ters_dthbj(const Param& param, const KK_FLOAT &prefactor, const KK_FLOAT &rij, const KK_FLOAT &dx1, const KK_FLOAT &dy1, const KK_FLOAT &dz1, const KK_FLOAT &rik, const KK_FLOAT &dx2, const KK_FLOAT &dy2, const KK_FLOAT &dz2, KK_ACC_FLOAT *fj, KK_ACC_FLOAT *fk) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ters_dthbk(const Param& param, const KK_FLOAT &prefactor, const KK_FLOAT &rij, const KK_FLOAT &dx1, const KK_FLOAT &dy1, const KK_FLOAT &dz1, @@ -137,6 +157,7 @@ class PairTersoffMODKokkos : public PairTersoffMOD { KK_ACC_FLOAT *fk) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT vec3_dot(const KK_FLOAT x[3], const KK_FLOAT y[3]) const { KK_FLOAT dot = 0; @@ -145,6 +166,7 @@ class PairTersoffMODKokkos : public PairTersoffMOD { return dot; } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void vec3_add(const KK_FLOAT x[3], const KK_FLOAT y[3], KK_FLOAT * const z) const { for (int i = 0; i < 3; i++) @@ -152,6 +174,7 @@ class PairTersoffMODKokkos : public PairTersoffMOD { } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void vec3_scale(const k_type k, const x_type x[3], y_type y[3]) const { for (int i = 0; i < 3; i++) @@ -159,26 +182,31 @@ class PairTersoffMODKokkos : public PairTersoffMOD { } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void vec3_scaleadd(const kx_type k, const kx_type x[3], const yz_type y[3], yz_type z[3]) const { for (int i = 0; i < 3; i++) z[i] = static_cast(k*x[i])+y[i]; } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION int sbmask(const int& j) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ev_tally(EV_FLOAT &ev, const int &i, const int &j, const KK_FLOAT &epair, const KK_FLOAT &fpair, const KK_FLOAT &delx, const KK_FLOAT &dely, const KK_FLOAT &delz) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void v_tally3(EV_FLOAT &ev, const int &i, const int &j, const int &k, KK_ACC_FLOAT *fj, KK_ACC_FLOAT *fk, KK_FLOAT *drij, KK_FLOAT *drik) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void v_tally3_atom(EV_FLOAT &ev, const int &i, const int &j, const int &k, KK_ACC_FLOAT *fj, KK_ACC_FLOAT *fk, KK_FLOAT *drji, KK_FLOAT *drjk) const; diff --git a/src/KOKKOS/pair_tersoff_zbl_kokkos.cpp b/src/KOKKOS/pair_tersoff_zbl_kokkos.cpp index 5b6776759a9..c3c85d7b4e6 100644 --- a/src/KOKKOS/pair_tersoff_zbl_kokkos.cpp +++ b/src/KOKKOS/pair_tersoff_zbl_kokkos.cpp @@ -305,6 +305,7 @@ void PairTersoffZBLKokkos::compute(int eflag_in, int vflag_in) /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairTersoffZBLKokkos::operator()(TagPairTersoffZBLComputeShortNeigh, const int& ii) const { const int i = d_ilist[ii]; @@ -336,6 +337,7 @@ void PairTersoffZBLKokkos::operator()(TagPairTersoffZBLComputeShortN template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairTersoffZBLKokkos::tersoff_zbl_compute(const int &ii, EV_FLOAT& ev) const { @@ -542,6 +544,7 @@ void PairTersoffZBLKokkos::tersoff_zbl_compute(const int &ii, EV_FLO template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairTersoffZBLKokkos::operator()(TagPairTersoffZBLCompute, const int &ii, EV_FLOAT& ev) const { this->template tersoff_zbl_compute(ii, ev); @@ -549,6 +552,7 @@ void PairTersoffZBLKokkos::operator()(TagPairTersoffZBLCompute template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairTersoffZBLKokkos::operator()(TagPairTersoffZBLCompute, const int &ii) const { EV_FLOAT ev; @@ -557,6 +561,7 @@ void PairTersoffZBLKokkos::operator()(TagPairTersoffZBLCompute template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairTersoffZBLKokkos::operator()(TagPairTersoffZBLCompute, const int &ii, const int&, EV_FLOAT& ev) const { this->template tersoff_zbl_compute(ii, ev); @@ -564,6 +569,7 @@ void PairTersoffZBLKokkos::operator()(TagPairTersoffZBLCompute template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairTersoffZBLKokkos::operator()(TagPairTersoffZBLCompute, const int &ii, const int&) const { EV_FLOAT ev; @@ -573,6 +579,7 @@ void PairTersoffZBLKokkos::operator()(TagPairTersoffZBLCompute template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairTersoffZBLKokkos::operator()(TagPairTersoffZBLCompute, const typename Kokkos::TeamPolicy >::member_type &team, EV_FLOAT& ev) const { @@ -584,6 +591,7 @@ void PairTersoffZBLKokkos::operator()(TagPairTersoffZBLCompute template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairTersoffZBLKokkos::operator()(TagPairTersoffZBLCompute, const typename Kokkos::TeamPolicy >::member_type &team) const { @@ -598,6 +606,7 @@ void PairTersoffZBLKokkos::operator()(TagPairTersoffZBLCompute +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairTersoffZBLKokkos::ters_fc_k(const Param& param, const KK_FLOAT &r) const { @@ -612,6 +621,7 @@ KK_FLOAT PairTersoffZBLKokkos::ters_fc_k(const Param& param, const K /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairTersoffZBLKokkos::ters_dfc(const Param& param, const KK_FLOAT &r) const { @@ -626,6 +636,7 @@ KK_FLOAT PairTersoffZBLKokkos::ters_dfc(const Param& param, const KK /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairTersoffZBLKokkos::bondorder(const Param& param, const KK_FLOAT &rij, const KK_FLOAT &dx1, const KK_FLOAT &dy1, const KK_FLOAT &dz1, @@ -649,6 +660,7 @@ KK_FLOAT PairTersoffZBLKokkos::bondorder(const Param& param, /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairTersoffZBLKokkos:: ters_gijk(const Param& param, const KK_FLOAT &cos) const @@ -663,6 +675,7 @@ KK_FLOAT PairTersoffZBLKokkos:: /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairTersoffZBLKokkos:: ters_dgijk(const Param& param, const KK_FLOAT &cos) const @@ -678,6 +691,7 @@ KK_FLOAT PairTersoffZBLKokkos:: /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairTersoffZBLKokkos::ters_fa_k(const Param& param, const KK_FLOAT &r) const { @@ -689,6 +703,7 @@ KK_FLOAT PairTersoffZBLKokkos::ters_fa_k(const Param& param, const K /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairTersoffZBLKokkos::ters_dfa(const Param& param, const KK_FLOAT &r) const { @@ -702,6 +717,7 @@ KK_FLOAT PairTersoffZBLKokkos::ters_dfa(const Param& param, const KK /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairTersoffZBLKokkos::ters_bij_k(const Param& param, const KK_FLOAT &bo) const { @@ -718,6 +734,7 @@ KK_FLOAT PairTersoffZBLKokkos::ters_bij_k(const Param& param, const /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairTersoffZBLKokkos::ters_dbij(const Param& param, const KK_FLOAT &bo) const { @@ -741,6 +758,7 @@ KK_FLOAT PairTersoffZBLKokkos::ters_dbij(const Param& param, const K /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairTersoffZBLKokkos::ters_dthb( const Param& param, const KK_FLOAT &prefactor, @@ -815,6 +833,7 @@ void PairTersoffZBLKokkos::ters_dthb( /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairTersoffZBLKokkos::ters_dthbj( const Param& param, const KK_FLOAT &prefactor, @@ -877,6 +896,7 @@ void PairTersoffZBLKokkos::ters_dthbj( /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairTersoffZBLKokkos::ters_dthbk( const Param& param, const KK_FLOAT &prefactor, @@ -935,6 +955,7 @@ void PairTersoffZBLKokkos::ters_dthbk( /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairTersoffZBLKokkos::fermi_k(const Param& param, const KK_FLOAT &r) const { @@ -945,6 +966,7 @@ KK_FLOAT PairTersoffZBLKokkos::fermi_k(const Param& param, const KK_ /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairTersoffZBLKokkos::fermi_d_k(const Param& param, const KK_FLOAT &r) const { @@ -958,6 +980,7 @@ KK_FLOAT PairTersoffZBLKokkos::fermi_d_k(const Param& param, const K template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairTersoffZBLKokkos::ev_tally(EV_FLOAT &ev, const int &i, const int &j, const KK_FLOAT &epair, const KK_FLOAT &fpair, const KK_FLOAT &delx, @@ -1016,6 +1039,7 @@ void PairTersoffZBLKokkos::ev_tally(EV_FLOAT &ev, const int &i, cons template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairTersoffZBLKokkos::v_tally3(EV_FLOAT &ev, const int &i, const int &j, const int &k, @@ -1066,6 +1090,7 @@ void PairTersoffZBLKokkos::v_tally3(EV_FLOAT &ev, /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairTersoffZBLKokkos::v_tally3_atom(EV_FLOAT &ev, const int &i, const int & /*j*/, const int & /*k*/, KK_ACC_FLOAT *fj, KK_ACC_FLOAT *fk, @@ -1098,6 +1123,7 @@ void PairTersoffZBLKokkos::v_tally3_atom(EV_FLOAT &ev, const int &i, /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION int PairTersoffZBLKokkos::sbmask(const int& j) const { return j >> SBBITS & 3; diff --git a/src/KOKKOS/pair_tersoff_zbl_kokkos.h b/src/KOKKOS/pair_tersoff_zbl_kokkos.h index 723ca7adff1..48e9ca67a34 100644 --- a/src/KOKKOS/pair_tersoff_zbl_kokkos.h +++ b/src/KOKKOS/pair_tersoff_zbl_kokkos.h @@ -57,85 +57,106 @@ class PairTersoffZBLKokkos : public PairTersoffZBL { // RangePolicy versions template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairTersoffZBLCompute, const int&, EV_FLOAT&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairTersoffZBLCompute, const int&) const; // MDRangePolicy versions template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairTersoffZBLCompute, const int&, const int&, EV_FLOAT&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairTersoffZBLCompute, const int&, const int&) const; // TeamPolicy versions template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairTersoffZBLCompute, const typename Kokkos::TeamPolicy >::member_type&, EV_FLOAT&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairTersoffZBLCompute, const typename Kokkos::TeamPolicy >::member_type&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairTersoffZBLComputeShortNeigh, const int&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void tersoff_zbl_compute(const int&, EV_FLOAT&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT ters_fc_k(const Param& param, const KK_FLOAT &r) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT ters_dfc(const Param& param, const KK_FLOAT &r) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT ters_fa_k(const Param& param, const KK_FLOAT &r) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT ters_dfa(const Param& param, const KK_FLOAT &r) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT ters_bij_k(const Param& param, const KK_FLOAT &bo) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT ters_dbij(const Param& param, const KK_FLOAT &bo) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT bondorder(const Param& param, const KK_FLOAT &rij, const KK_FLOAT &dx1, const KK_FLOAT &dy1, const KK_FLOAT &dz1, const KK_FLOAT &rik, const KK_FLOAT &dx2, const KK_FLOAT &dy2, const KK_FLOAT &dz2) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT ters_gijk(const Param& param, const KK_FLOAT &cos) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT ters_dgijk(const Param& param, const KK_FLOAT &cos) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ters_dthb(const Param& param, const KK_FLOAT &prefactor, const KK_FLOAT &rij, const KK_FLOAT &dx1, const KK_FLOAT &dy1, const KK_FLOAT &dz1, const KK_FLOAT &rik, const KK_FLOAT &dx2, const KK_FLOAT &dy2, const KK_FLOAT &dz2, KK_ACC_FLOAT *fi, KK_ACC_FLOAT *fj, KK_ACC_FLOAT *fk) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ters_dthbj(const Param& param, const KK_FLOAT &prefactor, const KK_FLOAT &rij, const KK_FLOAT &dx1, const KK_FLOAT &dy1, const KK_FLOAT &dz1, const KK_FLOAT &rik, const KK_FLOAT &dx2, const KK_FLOAT &dy2, const KK_FLOAT &dz2, KK_ACC_FLOAT *fj, KK_ACC_FLOAT *fk) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ters_dthbk(const Param& param, const KK_FLOAT &prefactor, const KK_FLOAT &rij, const KK_FLOAT &dx1, const KK_FLOAT &dy1, const KK_FLOAT &dz1, const KK_FLOAT &rik, const KK_FLOAT &dx2, const KK_FLOAT &dy2, const KK_FLOAT &dz2, KK_ACC_FLOAT *fk) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT vec3_dot(const KK_FLOAT x[3], const KK_FLOAT y[3]) const { KK_FLOAT dot = 0; @@ -144,6 +165,7 @@ class PairTersoffZBLKokkos : public PairTersoffZBL { return dot; } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void vec3_add(const KK_FLOAT x[3], const KK_FLOAT y[3], KK_FLOAT * const z) const { for (int i = 0; i < 3; i++) @@ -151,6 +173,7 @@ class PairTersoffZBLKokkos : public PairTersoffZBL { } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void vec3_scale(const k_type k, const x_type x[3], y_type y[3]) const { for (int i = 0; i < 3; i++) @@ -158,35 +181,42 @@ class PairTersoffZBLKokkos : public PairTersoffZBL { } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void vec3_scaleadd(const kx_type k, const kx_type x[3], const yz_type y[3], yz_type z[3]) const { for (int i = 0; i < 3; i++) z[i] = static_cast(k*x[i])+y[i]; } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION int sbmask(const int& j) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ev_tally(EV_FLOAT &ev, const int &i, const int &j, const KK_FLOAT &epair, const KK_FLOAT &fpair, const KK_FLOAT &delx, const KK_FLOAT &dely, const KK_FLOAT &delz) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void v_tally3(EV_FLOAT &ev, const int &i, const int &j, const int &k, KK_ACC_FLOAT *fj, KK_ACC_FLOAT *fk, KK_FLOAT *drij, KK_FLOAT *drik) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void v_tally3_atom(EV_FLOAT &ev, const int &i, const int &j, const int &k, KK_ACC_FLOAT *fj, KK_ACC_FLOAT *fk, KK_FLOAT *drji, KK_FLOAT *drjk) const; void setup_params() override; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT fermi_k(const Param& param, const KK_FLOAT &r) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT fermi_d_k(const Param& param, const KK_FLOAT &r) const; diff --git a/src/KOKKOS/pair_uf3_kokkos.cpp b/src/KOKKOS/pair_uf3_kokkos.cpp index 5a7a2c3a3f0..3e166b028ab 100644 --- a/src/KOKKOS/pair_uf3_kokkos.cpp +++ b/src/KOKKOS/pair_uf3_kokkos.cpp @@ -546,6 +546,7 @@ template void PairUF3Kokkos::create_3b_coefficien template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairUF3Kokkos::twobody(const int itype, const int jtype, const KK_FLOAT r, KK_FLOAT &evdwl, KK_FLOAT &fpair) const @@ -597,6 +598,7 @@ KOKKOS_INLINE_FUNCTION void PairUF3Kokkos::twobody(const int itype, template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairUF3Kokkos::threebody( const int itype, const int jtype, const int ktype, const KK_FLOAT value_rij, const KK_FLOAT value_rik, const KK_FLOAT value_rjk, KK_FLOAT &evdwl, KK_FLOAT (&fforce)[3]) const @@ -833,6 +835,7 @@ template void PairUF3Kokkos::compute(int eflag_in /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairUF3Kokkos::operator()(TagPairUF3ComputeShortNeigh, const int &ii) const { @@ -867,6 +870,7 @@ KOKKOS_INLINE_FUNCTION void PairUF3Kokkos::operator()(TagPairUF3Comp template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairUF3Kokkos::operator()(TagPairUF3ComputeFullA, const int &ii, EV_FLOAT &ev) const @@ -1080,6 +1084,7 @@ PairUF3Kokkos::operator()(TagPairUF3ComputeFullA, template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairUF3Kokkos::operator()(TagPairUF3ComputeFullA, const int &ii) const @@ -1092,6 +1097,7 @@ PairUF3Kokkos::operator()(TagPairUF3ComputeFullA, template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairUF3Kokkos::ev_tally(EV_FLOAT &ev, const int &i, const int &j, const KK_FLOAT &epair, const KK_FLOAT &fpair, const KK_FLOAT &delx, const KK_FLOAT &dely, @@ -1175,6 +1181,7 @@ PairUF3Kokkos::ev_tally(EV_FLOAT &ev, const int &i, const int &j, co template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairUF3Kokkos::ev_tally3(EV_FLOAT &ev, const int &i, const int &j, int &k, const KK_FLOAT &evdwl, const KK_FLOAT &ecoul, KK_ACC_FLOAT *fj, diff --git a/src/KOKKOS/pair_uf3_kokkos.h b/src/KOKKOS/pair_uf3_kokkos.h index 841653be4fc..17b6f406f10 100644 --- a/src/KOKKOS/pair_uf3_kokkos.h +++ b/src/KOKKOS/pair_uf3_kokkos.h @@ -54,13 +54,16 @@ template class PairUF3Kokkos : public PairUF3 { template void copy_3d(V &d, T ***h, int m, int n, int o); template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairUF3ComputeFullA, const int &, EV_FLOAT &) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairUF3ComputeFullA, const int &) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairUF3ComputeShortNeigh, const int &) const; @@ -115,21 +118,25 @@ template class PairUF3Kokkos : public PairUF3 { std::vector get_dncoefficients(const double *knots, const double coefficient) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void twobody(const int itype, const int jtype, const KK_FLOAT r, KK_FLOAT &evdwl, KK_FLOAT &fpair) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void threebody(const int itype, const int jtype, const int ktype, const KK_FLOAT value_rij, const KK_FLOAT value_rik, const KK_FLOAT value_rjk, KK_FLOAT &evdwl3, KK_FLOAT (&fforce)[3]) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ev_tally(EV_FLOAT &ev, const int &i, const int &j, const KK_FLOAT &epair, const KK_FLOAT &fpair, const KK_FLOAT &delx, const KK_FLOAT &dely, const KK_FLOAT &delz) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ev_tally3(EV_FLOAT &ev, const int &i, const int &j, int &k, const KK_FLOAT &evdwl, const KK_FLOAT &ecoul, KK_ACC_FLOAT *fj, KK_ACC_FLOAT *fk, KK_FLOAT *drji, KK_FLOAT *drki) const; @@ -175,10 +182,12 @@ template class PairUF3Kokkos : public PairUF3 { friend void pair_virial_fdotr_compute(PairUF3Kokkos *); }; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION int min(int i, int j) { return i < j ? i : j; } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION int max(int i, int j) { return i > j ? i : j; diff --git a/src/KOKKOS/pair_vashishta_kokkos.cpp b/src/KOKKOS/pair_vashishta_kokkos.cpp index 4beb108ac10..4a64ac0287e 100644 --- a/src/KOKKOS/pair_vashishta_kokkos.cpp +++ b/src/KOKKOS/pair_vashishta_kokkos.cpp @@ -190,6 +190,7 @@ void PairVashishtaKokkos::compute(int eflag_in, int vflag_in) } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairVashishtaKokkos::operator()(TagPairVashishtaComputeShortNeigh, const int& ii) const { const int i = d_ilist[ii]; @@ -228,6 +229,7 @@ void PairVashishtaKokkos::operator()(TagPairVashishtaComputeShortNei template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairVashishtaKokkos::operator()(TagPairVashishtaComputeHalf, const int &ii, EV_FLOAT& ev) const { @@ -353,6 +355,7 @@ void PairVashishtaKokkos::operator()(TagPairVashishtaComputeHalf template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairVashishtaKokkos::operator()(TagPairVashishtaComputeHalf, const int &ii) const { EV_FLOAT ev; @@ -363,6 +366,7 @@ void PairVashishtaKokkos::operator()(TagPairVashishtaComputeHalf template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairVashishtaKokkos::operator()(TagPairVashishtaComputeFullA, const int &ii, EV_FLOAT& ev) const { @@ -456,6 +460,7 @@ void PairVashishtaKokkos::operator()(TagPairVashishtaComputeFullA template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairVashishtaKokkos::operator()(TagPairVashishtaComputeFullA, const int &ii) const { EV_FLOAT ev; @@ -466,6 +471,7 @@ void PairVashishtaKokkos::operator()(TagPairVashishtaComputeFullA template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairVashishtaKokkos::operator()(TagPairVashishtaComputeFullB, const int &ii, EV_FLOAT& ev) const { @@ -539,6 +545,7 @@ void PairVashishtaKokkos::operator()(TagPairVashishtaComputeFullB template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairVashishtaKokkos::operator()(TagPairVashishtaComputeFullB, const int &ii) const { EV_FLOAT ev; @@ -625,6 +632,7 @@ void PairVashishtaKokkos::setup_params() /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairVashishtaKokkos::twobody(const Param& param, const KK_FLOAT& rsq, KK_FLOAT& fforce, const int& eflag, KK_FLOAT& eng) const @@ -651,6 +659,7 @@ void PairVashishtaKokkos::twobody(const Param& param, const KK_FLOAT /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairVashishtaKokkos::threebody(const Param& paramij, const Param& paramik, const Param& paramijk, const KK_FLOAT& rsq1, const KK_FLOAT& rsq2, @@ -710,6 +719,7 @@ void PairVashishtaKokkos::threebody(const Param& paramij, const Para /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairVashishtaKokkos::threebodyj(const Param& paramij, const Param& paramik, const Param& paramijk, const KK_FLOAT& rsq1, const KK_FLOAT& rsq2, KK_FLOAT *delr1, KK_FLOAT *delr2, KK_ACC_FLOAT *fj) const @@ -757,6 +767,7 @@ void PairVashishtaKokkos::threebodyj(const Param& paramij, const Par template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairVashishtaKokkos::ev_tally(EV_FLOAT &ev, const int &i, const int &j, const KK_FLOAT &epair, const KK_FLOAT &fpair, const KK_FLOAT &delx, @@ -831,6 +842,7 @@ void PairVashishtaKokkos::ev_tally(EV_FLOAT &ev, const int &i, const template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairVashishtaKokkos::ev_tally3(EV_FLOAT &ev, const int &i, const int &j, int &k, const KK_FLOAT &evdwl, const KK_FLOAT &ecoul, @@ -896,6 +908,7 @@ void PairVashishtaKokkos::ev_tally3(EV_FLOAT &ev, const int &i, cons ------------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PairVashishtaKokkos::ev_tally3_atom(EV_FLOAT & /*ev*/, const int &i, const KK_FLOAT &evdwl, const KK_FLOAT &ecoul, diff --git a/src/KOKKOS/pair_vashishta_kokkos.h b/src/KOKKOS/pair_vashishta_kokkos.h index a09b580120c..d25b15c36bc 100644 --- a/src/KOKKOS/pair_vashishta_kokkos.h +++ b/src/KOKKOS/pair_vashishta_kokkos.h @@ -55,44 +55,54 @@ class PairVashishtaKokkos : public PairVashishta { void init_style() override; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairVashishtaComputeHalf, const int&, EV_FLOAT&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairVashishtaComputeHalf, const int&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairVashishtaComputeFullA, const int&, EV_FLOAT&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairVashishtaComputeFullA, const int&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairVashishtaComputeFullB, const int&, EV_FLOAT&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairVashishtaComputeFullB, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPairVashishtaComputeShortNeigh, const int&) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ev_tally(EV_FLOAT &ev, const int &i, const int &j, const KK_FLOAT &epair, const KK_FLOAT &fpair, const KK_FLOAT &delx, const KK_FLOAT &dely, const KK_FLOAT &delz) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ev_tally3(EV_FLOAT &ev, const int &i, const int &j, int &k, const KK_FLOAT &evdwl, const KK_FLOAT &ecoul, KK_ACC_FLOAT *fj, KK_ACC_FLOAT *fk, KK_FLOAT *drji, KK_FLOAT *drki) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void ev_tally3_atom(EV_FLOAT &ev, const int &i, const KK_FLOAT &evdwl, const KK_FLOAT &ecoul, @@ -110,13 +120,16 @@ class PairVashishtaKokkos : public PairVashishta { void setup_params() override; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void twobody(const Param&, const KK_FLOAT&, KK_FLOAT&, const int&, KK_FLOAT&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void threebody(const Param&, const Param&, const Param&, const KK_FLOAT&, const KK_FLOAT&, KK_FLOAT *, KK_FLOAT *, KK_ACC_FLOAT *, KK_ACC_FLOAT *, const int&, KK_FLOAT&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void threebodyj(const Param&, const Param&, const Param&, const KK_FLOAT&, const KK_FLOAT&, KK_FLOAT *, KK_FLOAT *, KK_ACC_FLOAT *) const; diff --git a/src/KOKKOS/pair_yukawa_colloid_kokkos.cpp b/src/KOKKOS/pair_yukawa_colloid_kokkos.cpp index 2ea85981db6..4bd84eb6ca3 100644 --- a/src/KOKKOS/pair_yukawa_colloid_kokkos.cpp +++ b/src/KOKKOS/pair_yukawa_colloid_kokkos.cpp @@ -214,6 +214,7 @@ void PairYukawaColloidKokkos::compute(int eflag_in, int vflag_in) template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairYukawaColloidKokkos:: compute_fpair(const KK_FLOAT &rsq, const int &i, const int &j, @@ -238,6 +239,7 @@ compute_fpair(const KK_FLOAT &rsq, const int &i, const int &j, template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairYukawaColloidKokkos:: compute_evdwl(const KK_FLOAT &rsq, const int &i, const int &j, diff --git a/src/KOKKOS/pair_yukawa_colloid_kokkos.h b/src/KOKKOS/pair_yukawa_colloid_kokkos.h index 95e49b706b7..7bd5f74f40f 100644 --- a/src/KOKKOS/pair_yukawa_colloid_kokkos.h +++ b/src/KOKKOS/pair_yukawa_colloid_kokkos.h @@ -45,8 +45,10 @@ class PairYukawaColloidKokkos : public PairYukawaColloid { double init_one(int,int) override; struct params_yukawa { +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION params_yukawa() { cutsq=0, a = 0; offset = 0; } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION params_yukawa(int /*i*/) { cutsq=0, a = 0; offset = 0; } KK_FLOAT cutsq, a, offset; @@ -55,16 +57,19 @@ class PairYukawaColloidKokkos : public PairYukawaColloid { protected: template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_fpair(const KK_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_evdwl(const KK_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_ecoul(const KK_FLOAT& /*rsq*/, const int& /*i*/, const int& /*j*/, const int& /*itype*/, const int& /*jtype*/) const { return 0; } diff --git a/src/KOKKOS/pair_yukawa_kokkos.cpp b/src/KOKKOS/pair_yukawa_kokkos.cpp index c87f5b5eab1..fbfb6553eae 100644 --- a/src/KOKKOS/pair_yukawa_kokkos.cpp +++ b/src/KOKKOS/pair_yukawa_kokkos.cpp @@ -213,6 +213,7 @@ void PairYukawaKokkos::compute(int eflag_in, int vflag_in) template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairYukawaKokkos:: compute_fpair(const KK_FLOAT &rsq, const int &, const int &, @@ -237,6 +238,7 @@ compute_fpair(const KK_FLOAT &rsq, const int &, const int &, template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairYukawaKokkos:: compute_evdwl(const KK_FLOAT &rsq, const int &, const int &, diff --git a/src/KOKKOS/pair_yukawa_kokkos.h b/src/KOKKOS/pair_yukawa_kokkos.h index dba6ddc9bf4..dc01d351da6 100644 --- a/src/KOKKOS/pair_yukawa_kokkos.h +++ b/src/KOKKOS/pair_yukawa_kokkos.h @@ -45,8 +45,10 @@ class PairYukawaKokkos : public PairYukawa { double init_one(int,int) override; struct params_yukawa { +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION params_yukawa() { cutsq=0, a = 0; offset = 0; } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION params_yukawa(int /*i*/) { cutsq=0, a = 0; offset = 0; } KK_FLOAT cutsq, a, offset; @@ -55,16 +57,19 @@ class PairYukawaKokkos : public PairYukawa { protected: template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_fpair(const KK_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_evdwl(const KK_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_ecoul(const KK_FLOAT& /*rsq*/, const int& /*i*/, const int& /*j*/, const int& /*itype*/, const int& /*jtype*/) const { return 0; } diff --git a/src/KOKKOS/pair_zbl_kokkos.cpp b/src/KOKKOS/pair_zbl_kokkos.cpp index 7c9bae944dc..5977c1e4590 100644 --- a/src/KOKKOS/pair_zbl_kokkos.cpp +++ b/src/KOKKOS/pair_zbl_kokkos.cpp @@ -190,6 +190,7 @@ void PairZBLKokkos::compute(int eflag_in, int vflag_in) template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairZBLKokkos:: compute_fpair(const KK_FLOAT& rsq, const int &, const int &, const int &itype, const int &jtype) const { @@ -209,6 +210,7 @@ compute_fpair(const KK_FLOAT& rsq, const int &, const int &, const int &itype, c template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairZBLKokkos:: compute_evdwl(const KK_FLOAT &rsq, const int &, const int &, const int &itype, const int &jtype) const { @@ -308,6 +310,7 @@ double PairZBLKokkos::init_one(int i, int j) ------------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairZBLKokkos::e_zbl(KK_FLOAT r, int i, int j) const { @@ -333,6 +336,7 @@ KK_FLOAT PairZBLKokkos::e_zbl(KK_FLOAT r, int i, int j) const { ------------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairZBLKokkos::dzbldr(KK_FLOAT r, int i, int j) const { @@ -368,6 +372,7 @@ KK_FLOAT PairZBLKokkos::dzbldr(KK_FLOAT r, int i, int j) const { ------------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT PairZBLKokkos::d2zbldr2(KK_FLOAT r, int i, int j) const { diff --git a/src/KOKKOS/pair_zbl_kokkos.h b/src/KOKKOS/pair_zbl_kokkos.h index 17481eb926e..f419176358a 100644 --- a/src/KOKKOS/pair_zbl_kokkos.h +++ b/src/KOKKOS/pair_zbl_kokkos.h @@ -70,22 +70,28 @@ class PairZBLKokkos : public PairZBL { KK_FLOAT cut_inner_kk; KK_FLOAT cut_innersq_kk; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT e_zbl(KK_FLOAT, int, int) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT dzbldr(KK_FLOAT, int, int) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT d2zbldr2(KK_FLOAT, int, int) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_fpair(const KK_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_evdwl(const KK_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype) const; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION KK_FLOAT compute_ecoul(const KK_FLOAT& /*rsq*/, const int& /*i*/, const int& /*j*/, const int& /*itype*/, const int& /*jtype*/) const { return 0; } diff --git a/src/KOKKOS/pppm_kokkos.cpp b/src/KOKKOS/pppm_kokkos.cpp index df00378eac1..59574f5be6a 100644 --- a/src/KOKKOS/pppm_kokkos.cpp +++ b/src/KOKKOS/pppm_kokkos.cpp @@ -384,6 +384,7 @@ void PPPMKokkos::setup() } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PPPMKokkos::operator()(TagPPPM_setup1, const int &i) const { @@ -393,6 +394,7 @@ void PPPMKokkos::operator()(TagPPPM_setup1, const int &i) const } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PPPMKokkos::operator()(TagPPPM_setup2, const int &i) const { @@ -402,6 +404,7 @@ void PPPMKokkos::operator()(TagPPPM_setup2, const int &i) const } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PPPMKokkos::operator()(TagPPPM_setup3, const int &i) const { @@ -411,6 +414,7 @@ void PPPMKokkos::operator()(TagPPPM_setup3, const int &i) const } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PPPMKokkos::operator()(TagPPPM_setup4, const int &n) const { @@ -495,6 +499,7 @@ void PPPMKokkos::setup_triclinic() } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PPPMKokkos::operator()(TagPPPM_setup_triclinic1, const int &n) const { @@ -520,6 +525,7 @@ void PPPMKokkos::operator()(TagPPPM_setup_triclinic1, const int &n) } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PPPMKokkos::operator()(TagPPPM_setup_triclinic2, const int &n) const { @@ -726,6 +732,7 @@ void PPPMKokkos::compute(int eflag, int vflag) } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PPPMKokkos::operator()(TagPPPM_self1, const int &i) const { @@ -738,6 +745,7 @@ void PPPMKokkos::operator()(TagPPPM_self1, const int &i) const } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PPPMKokkos::operator()(TagPPPM_self2, const int &i) const { @@ -1024,6 +1032,7 @@ void PPPMKokkos::compute_gf_ik() } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PPPMKokkos::operator()(TagPPPM_compute_gf_ik, const int &n) const { @@ -1109,6 +1118,7 @@ void PPPMKokkos::compute_gf_ik_triclinic() } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PPPMKokkos::operator()(TagPPPM_compute_gf_ik_triclinic, const int &m) const { @@ -1217,6 +1227,7 @@ void PPPMKokkos::particle_map() } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PPPMKokkos::operator()(TagPPPM_particle_map, const int &i) const { @@ -1294,6 +1305,7 @@ void PPPMKokkos::make_rho() } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PPPMKokkos::operator()(TagPPPM_make_rho_zero, const int &ii) const { @@ -1304,6 +1316,7 @@ void PPPMKokkos::operator()(TagPPPM_make_rho_zero, const int &ii) co } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PPPMKokkos::operator()(TagPPPM_make_rho_atomic, const int &i) const { @@ -1339,6 +1352,7 @@ void PPPMKokkos::operator()(TagPPPM_make_rho_atomic, const int &i) c } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PPPMKokkos::operator() (TagPPPM_make_rho, typename Kokkos::TeamPolicy::member_type dev) const { // adapted from OPENMP/pppm.cpp: @@ -1424,6 +1438,7 @@ void PPPMKokkos::brick2fft() } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PPPMKokkos::operator()(TagPPPM_brick2fft, const int &ii) const { @@ -1551,6 +1566,7 @@ void PPPMKokkos::poisson_ik() } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PPPMKokkos::operator()(TagPPPM_poisson_ik1, const int &i) const { @@ -1559,6 +1575,7 @@ void PPPMKokkos::operator()(TagPPPM_poisson_ik1, const int &i) const } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PPPMKokkos::operator()(TagPPPM_poisson_ik2, const int &i, EV_FLOAT& ev) const { @@ -1568,6 +1585,7 @@ void PPPMKokkos::operator()(TagPPPM_poisson_ik2, const int &i, EV_FL } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PPPMKokkos::operator()(TagPPPM_poisson_ik3, const int &i, EV_FLOAT& ev) const { @@ -1576,6 +1594,7 @@ void PPPMKokkos::operator()(TagPPPM_poisson_ik3, const int &i, EV_FL } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PPPMKokkos::operator()(TagPPPM_poisson_ik4, const int &i) const { @@ -1584,6 +1603,7 @@ void PPPMKokkos::operator()(TagPPPM_poisson_ik4, const int &i) const } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PPPMKokkos::operator()(TagPPPM_poisson_ik5, const int &ii) const { @@ -1596,6 +1616,7 @@ void PPPMKokkos::operator()(TagPPPM_poisson_ik5, const int &ii) cons } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PPPMKokkos::operator()(TagPPPM_poisson_ik6, const int &ii) const { @@ -1610,6 +1631,7 @@ void PPPMKokkos::operator()(TagPPPM_poisson_ik6, const int &ii) cons } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PPPMKokkos::operator()(TagPPPM_poisson_ik7, const int &ii) const { @@ -1621,6 +1643,7 @@ void PPPMKokkos::operator()(TagPPPM_poisson_ik7, const int &ii) cons } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PPPMKokkos::operator()(TagPPPM_poisson_ik8, const int &ii) const { @@ -1635,6 +1658,7 @@ void PPPMKokkos::operator()(TagPPPM_poisson_ik8, const int &ii) cons } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PPPMKokkos::operator()(TagPPPM_poisson_ik9, const int &ii) const { @@ -1645,6 +1669,7 @@ void PPPMKokkos::operator()(TagPPPM_poisson_ik9, const int &ii) cons } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PPPMKokkos::operator()(TagPPPM_poisson_ik10, const int &ii) const { @@ -1719,6 +1744,7 @@ void PPPMKokkos::poisson_ik_triclinic() } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PPPMKokkos::operator()(TagPPPM_poisson_ik_triclinic1, const int &ii) const { @@ -1727,6 +1753,7 @@ void PPPMKokkos::operator()(TagPPPM_poisson_ik_triclinic1, const int } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PPPMKokkos::operator()(TagPPPM_poisson_ik_triclinic2, const int &ii) const { @@ -1741,6 +1768,7 @@ void PPPMKokkos::operator()(TagPPPM_poisson_ik_triclinic2, const int } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PPPMKokkos::operator()(TagPPPM_poisson_ik_triclinic3, const int &ii) const { @@ -1751,6 +1779,7 @@ void PPPMKokkos::operator()(TagPPPM_poisson_ik_triclinic3, const int } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PPPMKokkos::operator()(TagPPPM_poisson_ik_triclinic4, const int &ii) const { @@ -1768,6 +1797,7 @@ void PPPMKokkos::operator()(TagPPPM_poisson_ik_triclinic4, const int } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PPPMKokkos::operator()(TagPPPM_poisson_ik_triclinic5, const int &ii) const { @@ -1778,6 +1808,7 @@ void PPPMKokkos::operator()(TagPPPM_poisson_ik_triclinic5, const int } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PPPMKokkos::operator()(TagPPPM_poisson_ik_triclinic6, const int &ii) const { @@ -1905,6 +1936,7 @@ void PPPMKokkos::poisson_peratom() } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PPPMKokkos::operator()(TagPPPM_poisson_peratom1, const int &i) const { @@ -1916,6 +1948,7 @@ void PPPMKokkos::operator()(TagPPPM_poisson_peratom1, const int &i) } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PPPMKokkos::operator()(TagPPPM_poisson_peratom2, const int &ii) const { @@ -1930,6 +1963,7 @@ void PPPMKokkos::operator()(TagPPPM_poisson_peratom2, const int &ii) } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PPPMKokkos::operator()(TagPPPM_poisson_peratom3, const int &i) const { @@ -1941,6 +1975,7 @@ void PPPMKokkos::operator()(TagPPPM_poisson_peratom3, const int &i) } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PPPMKokkos::operator()(TagPPPM_poisson_peratom4, const int &ii) const { @@ -1955,6 +1990,7 @@ void PPPMKokkos::operator()(TagPPPM_poisson_peratom4, const int &ii) } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PPPMKokkos::operator()(TagPPPM_poisson_peratom5, const int &i) const { @@ -1966,6 +2002,7 @@ void PPPMKokkos::operator()(TagPPPM_poisson_peratom5, const int &i) } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PPPMKokkos::operator()(TagPPPM_poisson_peratom6, const int &ii) const { @@ -1980,6 +2017,7 @@ void PPPMKokkos::operator()(TagPPPM_poisson_peratom6, const int &ii) } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PPPMKokkos::operator()(TagPPPM_poisson_peratom7, const int &i) const { @@ -1991,6 +2029,7 @@ void PPPMKokkos::operator()(TagPPPM_poisson_peratom7, const int &i) } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PPPMKokkos::operator()(TagPPPM_poisson_peratom8, const int &ii) const { @@ -2005,6 +2044,7 @@ void PPPMKokkos::operator()(TagPPPM_poisson_peratom8, const int &ii) } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PPPMKokkos::operator()(TagPPPM_poisson_peratom9, const int &i) const { @@ -2016,6 +2056,7 @@ void PPPMKokkos::operator()(TagPPPM_poisson_peratom9, const int &i) } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PPPMKokkos::operator()(TagPPPM_poisson_peratom10, const int &ii) const { @@ -2030,6 +2071,7 @@ void PPPMKokkos::operator()(TagPPPM_poisson_peratom10, const int &ii } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PPPMKokkos::operator()(TagPPPM_poisson_peratom11, const int &i) const { @@ -2041,6 +2083,7 @@ void PPPMKokkos::operator()(TagPPPM_poisson_peratom11, const int &i) } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PPPMKokkos::operator()(TagPPPM_poisson_peratom12, const int &ii) const { @@ -2055,6 +2098,7 @@ void PPPMKokkos::operator()(TagPPPM_poisson_peratom12, const int &ii } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PPPMKokkos::operator()(TagPPPM_poisson_peratom13, const int &i) const { @@ -2066,6 +2110,7 @@ void PPPMKokkos::operator()(TagPPPM_poisson_peratom13, const int &i) } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PPPMKokkos::operator()(TagPPPM_poisson_peratom14, const int &ii) const { @@ -2113,6 +2158,7 @@ void PPPMKokkos::fieldforce_ik() } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PPPMKokkos::operator()(TagPPPM_fieldforce_ik, const int &i) const { @@ -2182,6 +2228,7 @@ void PPPMKokkos::fieldforce_peratom() } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PPPMKokkos::operator()(TagPPPM_fieldforce_peratom, const int &i) const { @@ -2262,6 +2309,7 @@ void PPPMKokkos::pack_forward_grid_kokkos(int flag, FFT_DAT::tdual_F } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PPPMKokkos::operator()(TagPPPM_pack_forward1, const int &i) const { @@ -2275,6 +2323,7 @@ void PPPMKokkos::operator()(TagPPPM_pack_forward1, const int &i) con } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PPPMKokkos::operator()(TagPPPM_pack_forward2, const int &i) const { @@ -2319,6 +2368,7 @@ void PPPMKokkos::unpack_forward_grid_kokkos(int flag, FFT_DAT::tdual } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PPPMKokkos::operator()(TagPPPM_unpack_forward1, const int &i) const { @@ -2332,6 +2382,7 @@ void PPPMKokkos::operator()(TagPPPM_unpack_forward1, const int &i) c } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PPPMKokkos::operator()(TagPPPM_unpack_forward2, const int &i) const { @@ -2370,6 +2421,7 @@ void PPPMKokkos::pack_reverse_grid_kokkos(int /*flag*/, FFT_DAT::tdu } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PPPMKokkos::operator()(TagPPPM_pack_reverse, const int &i) const { @@ -2401,6 +2453,7 @@ void PPPMKokkos::unpack_reverse_grid_kokkos(int /*flag*/, FFT_DAT::t } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PPPMKokkos::operator()(TagPPPM_unpack_reverse, const int &i) const { @@ -2417,6 +2470,7 @@ void PPPMKokkos::operator()(TagPPPM_unpack_reverse, const int &i) co ------------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PPPMKokkos::compute_rho1d(const int i, const FFT_SCALAR &dx, const FFT_SCALAR &dy, const FFT_SCALAR &dz) const @@ -2568,6 +2622,7 @@ void PPPMKokkos::slabcorr() } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PPPMKokkos::operator()(TagPPPM_slabcorr1, const int &i, double &dipole) const { @@ -2575,6 +2630,7 @@ void PPPMKokkos::operator()(TagPPPM_slabcorr1, const int &i, double } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PPPMKokkos::operator()(TagPPPM_slabcorr2, const int &i, double &dipole_r2) const { @@ -2582,6 +2638,7 @@ void PPPMKokkos::operator()(TagPPPM_slabcorr2, const int &i, double } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PPPMKokkos::operator()(TagPPPM_slabcorr3, const int &i) const { @@ -2592,6 +2649,7 @@ void PPPMKokkos::operator()(TagPPPM_slabcorr3, const int &i) const } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PPPMKokkos::operator()(TagPPPM_slabcorr4, const int &i) const { @@ -2631,6 +2689,7 @@ int PPPMKokkos::timing_1d(int n, double &time1d) } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void PPPMKokkos::operator()(TagPPPM_timing_zero, const int &i) const { diff --git a/src/KOKKOS/pppm_kokkos.h b/src/KOKKOS/pppm_kokkos.h index 27c78ac68bf..92803e2ba31 100644 --- a/src/KOKKOS/pppm_kokkos.h +++ b/src/KOKKOS/pppm_kokkos.h @@ -112,181 +112,240 @@ class PPPMKokkos : public PPPM, public KokkosBaseFFT { int timing_3d(int, double &) override; double memory_usage() override; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPPPM_setup1, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPPPM_setup2, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPPPM_setup3, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPPPM_setup4, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPPPM_setup_triclinic1, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPPPM_setup_triclinic2, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPPPM_compute_gf_ik, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPPPM_compute_gf_ik_triclinic, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPPPM_self1, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPPPM_self2, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPPPM_brick2fft, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPPPM_particle_map, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPPPM_make_rho_zero, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPPPM_make_rho_atomic, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPPPM_make_rho, typename Kokkos::TeamPolicy::member_type) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPPPM_poisson_ik1, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPPPM_poisson_ik2, const int&, EV_FLOAT &) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPPPM_poisson_ik3, const int&, EV_FLOAT &) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPPPM_poisson_ik4, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPPPM_poisson_ik5, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPPPM_poisson_ik6, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPPPM_poisson_ik7, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPPPM_poisson_ik8, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPPPM_poisson_ik9, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPPPM_poisson_ik10, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPPPM_poisson_ik_triclinic1, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPPPM_poisson_ik_triclinic2, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPPPM_poisson_ik_triclinic3, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPPPM_poisson_ik_triclinic4, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPPPM_poisson_ik_triclinic5, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPPPM_poisson_ik_triclinic6, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPPPM_poisson_peratom1, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPPPM_poisson_peratom2, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPPPM_poisson_peratom3, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPPPM_poisson_peratom4, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPPPM_poisson_peratom5, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPPPM_poisson_peratom6, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPPPM_poisson_peratom7, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPPPM_poisson_peratom8, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPPPM_poisson_peratom9, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPPPM_poisson_peratom10, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPPPM_poisson_peratom11, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPPPM_poisson_peratom12, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPPPM_poisson_peratom13, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPPPM_poisson_peratom14, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPPPM_fieldforce_ik, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPPPM_fieldforce_peratom, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPPPM_pack_forward1, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPPPM_pack_forward2, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPPPM_unpack_forward1, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPPPM_unpack_forward2, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPPPM_pack_reverse, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPPPM_unpack_reverse, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPPPM_slabcorr1, const int&, double&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPPPM_slabcorr2, const int&, double&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPPPM_slabcorr3, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPPPM_slabcorr4, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagPPPM_timing_zero, const int&) const; //template +// NOLINTNEXTLINE //KOKKOS_INLINE_FUNCTION //void operator()(TagPPPMKernelA, const int&) const; @@ -311,6 +370,7 @@ class PPPMKokkos : public PPPM, public KokkosBaseFFT { Few h, h_inv; template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void x2lamdaT_kokkos(T* v, T* lamda) const { @@ -406,6 +466,7 @@ class PPPMKokkos : public PPPM, public KokkosBaseFFT { void poisson_peratom() override; void fieldforce_peratom() override; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void compute_rho1d(const int i, const FFT_SCALAR &, const FFT_SCALAR &, const FFT_SCALAR &) const; @@ -437,6 +498,7 @@ class PPPMKokkos : public PPPM, public KokkosBaseFFT { gf_b = denominator expansion coeffs ------------------------------------------------------------------------- */ +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION double gf_denom(const double &x, const double &y, const double &z) const { diff --git a/src/KOKKOS/rand_pool_wrap_kokkos.h b/src/KOKKOS/rand_pool_wrap_kokkos.h index da30b350e69..5294273cd14 100644 --- a/src/KOKKOS/rand_pool_wrap_kokkos.h +++ b/src/KOKKOS/rand_pool_wrap_kokkos.h @@ -25,16 +25,19 @@ namespace LAMMPS_NS { struct RandWrap { class RanMars* rng; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION RandWrap() { rng = nullptr; } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION double drand() { return rng->uniform(); } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION double normal() { return rng->gaussian(); @@ -48,7 +51,7 @@ class RandPoolWrap : protected Pointers { void destroy(); void init(RanMars*, int); - RandWrap get_state() const + [[nodiscard]] RandWrap get_state() const { #ifdef LMP_KOKKOS_GPU error->all(FLERR,"Cannot use Marsaglia RNG with GPUs"); diff --git a/src/KOKKOS/region_block_kokkos.cpp b/src/KOKKOS/region_block_kokkos.cpp index 05ac8eea2af..9350e572504 100644 --- a/src/KOKKOS/region_block_kokkos.cpp +++ b/src/KOKKOS/region_block_kokkos.cpp @@ -62,6 +62,7 @@ void RegBlockKokkos::match_all_kokkos(int groupbit_in, DAT::tdual_in /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void RegBlockKokkos::operator()(TagRegBlockMatchAll, const int &i) const { if (d_mask[i] & groupbit) { diff --git a/src/KOKKOS/region_block_kokkos.h b/src/KOKKOS/region_block_kokkos.h index ebba040e38d..7009b6ce31e 100644 --- a/src/KOKKOS/region_block_kokkos.h +++ b/src/KOKKOS/region_block_kokkos.h @@ -48,9 +48,11 @@ class RegBlockKokkos : public RegBlock, public KokkosBase { void match_all_kokkos(int, DAT::tdual_int_1d) override; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagRegBlockMatchAll, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION int match_kokkos(double x, double y, double z) const { @@ -59,6 +61,7 @@ class RegBlockKokkos : public RegBlock, public KokkosBase { return !(k_inside(x,y,z) ^ interior); } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION int surface_kokkos(double x, double y, double z, double cutoff) { @@ -107,6 +110,7 @@ class RegBlockKokkos : public RegBlock, public KokkosBase { typename AT::t_kkfloat_1d_3_lr_randomread d_x; typename AT::t_int_1d_randomread d_mask; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION int surface_interior_kokkos(double *x, double cutoff) { @@ -180,6 +184,7 @@ class RegBlockKokkos : public RegBlock, public KokkosBase { return n; } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION int surface_exterior_kokkos(double *x, double cutoff) { @@ -238,6 +243,7 @@ class RegBlockKokkos : public RegBlock, public KokkosBase { return 0; } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void add_contact(int n, double *x, double xp, double yp, double zp) { @@ -251,6 +257,7 @@ class RegBlockKokkos : public RegBlock, public KokkosBase { d_contact[n].delz = delz; } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION int k_inside(double x, double y, double z) const { @@ -259,6 +266,7 @@ class RegBlockKokkos : public RegBlock, public KokkosBase { return 0; } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void forward_transform(double &x, double &y, double &z) const { @@ -270,6 +278,7 @@ class RegBlockKokkos : public RegBlock, public KokkosBase { } } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void inverse_transform(double &x, double &y, double &z) const { @@ -281,6 +290,7 @@ class RegBlockKokkos : public RegBlock, public KokkosBase { if (rotateflag) rotate(x,y,z,-theta); } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void rotate(double &x, double &y, double &z, double angle) const { @@ -309,6 +319,7 @@ class RegBlockKokkos : public RegBlock, public KokkosBase { z = point[2] + c[2] + disp[2]; } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void point_on_line_segment(double *a, double *b, double *c, double *d) { @@ -332,6 +343,7 @@ class RegBlockKokkos : public RegBlock, public KokkosBase { } } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION double inside_face(double *xproj, int iface) { @@ -347,6 +359,7 @@ class RegBlockKokkos : public RegBlock, public KokkosBase { return 0; } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION double find_closest_point(int i, double *x, double &xc, double &yc, double &zc) { diff --git a/src/KOKKOS/region_sphere_kokkos.cpp b/src/KOKKOS/region_sphere_kokkos.cpp index ebf068559a9..a9e50f69a87 100644 --- a/src/KOKKOS/region_sphere_kokkos.cpp +++ b/src/KOKKOS/region_sphere_kokkos.cpp @@ -65,6 +65,7 @@ void RegSphereKokkos::match_all_kokkos(int groupbit_in, DAT::tdual_i /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void RegSphereKokkos::operator()(TagRegSphereMatchAll, const int &i) const { if (d_mask[i] & groupbit) { diff --git a/src/KOKKOS/region_sphere_kokkos.h b/src/KOKKOS/region_sphere_kokkos.h index 604cba67e26..bde0a9f6193 100644 --- a/src/KOKKOS/region_sphere_kokkos.h +++ b/src/KOKKOS/region_sphere_kokkos.h @@ -45,9 +45,11 @@ class RegSphereKokkos : public RegSphere, public KokkosBase { void match_all_kokkos(int, DAT::tdual_int_1d) override; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(TagRegSphereMatchAll, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION int match_kokkos(double x, double y, double z) const { @@ -56,6 +58,7 @@ class RegSphereKokkos : public RegSphere, public KokkosBase { return !(k_inside(x,y,z) ^ interior); } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION int surface_kokkos(double x, double y, double z, double cutoff) { @@ -102,6 +105,7 @@ class RegSphereKokkos : public RegSphere, public KokkosBase { typename AT::t_kkfloat_1d_3_lr_randomread d_x; typename AT::t_int_1d_randomread d_mask; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION int surface_interior_kokkos(double *x, double cutoff) { @@ -125,6 +129,7 @@ class RegSphereKokkos : public RegSphere, public KokkosBase { return 0; } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION int surface_exterior_kokkos(double *x, double cutoff) { @@ -148,6 +153,7 @@ class RegSphereKokkos : public RegSphere, public KokkosBase { return 0; } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void add_contact(int n, double *x, double xp, double yp, double zp) { @@ -161,6 +167,7 @@ class RegSphereKokkos : public RegSphere, public KokkosBase { d_contact[n].delz = delz; } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION int k_inside(double x, double y, double z) const { @@ -173,6 +180,7 @@ class RegSphereKokkos : public RegSphere, public KokkosBase { return 0; } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void forward_transform(double &x, double &y, double &z) const { @@ -184,6 +192,7 @@ class RegSphereKokkos : public RegSphere, public KokkosBase { } } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void inverse_transform(double &x, double &y, double &z) const { @@ -195,6 +204,7 @@ class RegSphereKokkos : public RegSphere, public KokkosBase { if (rotateflag) rotate(x,y,z,-theta); } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void rotate(double &x, double &y, double &z, double angle) const { diff --git a/src/KOKKOS/sna_kokkos.h b/src/KOKKOS/sna_kokkos.h index 5d57c6c7cd3..669a314284c 100644 --- a/src/KOKKOS/sna_kokkos.h +++ b/src/KOKKOS/sna_kokkos.h @@ -47,16 +47,19 @@ struct WignerWrapper { const int offset; // my offset into the vector (0, ..., vector_length - 1) real_type* buffer; // buffer of real numbers, contiguous real then imaginary +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION WignerWrapper(complex* buffer_, const int offset_) : offset(offset_), buffer(reinterpret_cast(buffer_)) { ; } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION complex get(const int& ma) const { return complex(buffer[offset + 2 * vector_length * ma], buffer[offset + vector_length + 2 * vector_length * ma]); } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void set(const int& ma, const complex& store) const { buffer[offset + 2 * vector_length * ma] = store.re; @@ -79,11 +82,13 @@ struct MultiWignerWrapper { const int offset; // my offset into the vector (0, ..., vector_length - 1) real_type* buffer; // buffer of real numbers +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION MultiWignerWrapper(complex* buffer_, const int offset_) : offset(offset_), buffer(reinterpret_cast(buffer_)) { ; } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION complex_array get(const int& ma) const { complex_array store; @@ -94,6 +99,7 @@ struct MultiWignerWrapper { return store; } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void set(const int& ma, const complex_array& store) const { #pragma unroll num_elems @@ -104,6 +110,7 @@ struct MultiWignerWrapper { } // special function to initialize all elements to the same value +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void set_all(const int& ma, const complex& store) const { #pragma unroll num_elems @@ -129,6 +136,7 @@ struct alignas(16) idxz_struct { idxz_struct() = default; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION idxz_struct(int j1, int j2, int j, int ma1min, int ma2max, int mb1min, int mb2max, int na, int nb, int jju_half, int idxcg) : j1_j2_j_jjuhalf{j1, j2, j, jju_half}, @@ -136,6 +144,7 @@ struct alignas(16) idxz_struct { nanb_idxcg{na, nb, idxcg, 0} { } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void get_zi(int &j1, int &j2, int &j, int &ma1min, int &ma2max, int &mb1min, int &mb2max, int &na, int &nb, int &idxcg) { reax_int4 pack1 = this->j1_j2_j_jjuhalf; @@ -153,6 +162,7 @@ struct alignas(16) idxz_struct { idxcg = pack3.i2; } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void get_yi(int &j1, int &j2, int &j, int &ma1min, int &ma2max, int &mb1min, int &mb2max, int &na, int &nb, int& jju_half, int& idxcg) { reax_int4 pack1 = this->j1_j2_j_jjuhalf; @@ -171,6 +181,7 @@ struct alignas(16) idxz_struct { idxcg = pack3.i2; } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void get_yi_with_zlist(int &j1, int &j2, int &j, int &jju_half) { reax_int4 pack1 = this->j1_j2_j_jjuhalf; @@ -231,6 +242,7 @@ class SNAKokkos { inline SNAKokkos() {}; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION SNAKokkos(const SNAKokkos& sna, const typename Kokkos::TeamPolicy::member_type& team); @@ -238,6 +250,7 @@ class SNAKokkos { inline SNAKokkos(const CopyClass&); +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION ~SNAKokkos(); @@ -252,48 +265,62 @@ class SNAKokkos { int ncoeff; // functions for bispectrum coefficients, GPU only +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void compute_cayley_klein(const int&, const int&) const; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void pre_ui(const int&, const int&, const int&) const; // ForceSNAP // version of the code with parallelism over j_bend +// NOLINTNEXTLINE template KOKKOS_INLINE_FUNCTION void compute_ui_small(const typename Kokkos::TeamPolicy::member_type& team, const int, const int, const int, const int, const int) const; // ForceSNAP // version of the code without parallelism over j_bend +// NOLINTNEXTLINE template KOKKOS_INLINE_FUNCTION void compute_ui_large(const typename Kokkos::TeamPolicy::member_type& team, const int, const int, const int, const int) const; // ForceSNAP // desymmetrize ulisttot +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void transform_ui(const int&, const int&) const; +// NOLINTNEXTLINE template KOKKOS_INLINE_FUNCTION void compute_zi(const int&, const int&) const; // ForceSNAP +// NOLINTNEXTLINE template KOKKOS_INLINE_FUNCTION void compute_yi(const int&, const int&) const; // ForceSNAP +// NOLINTNEXTLINE template KOKKOS_INLINE_FUNCTION void compute_yi_with_zlist(const int&, const int&) const; // ForceSNAP +// NOLINTNEXTLINE template KOKKOS_INLINE_FUNCTION void compute_bi(const int&, const int&) const; // ForceSNAP +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void compute_beta_linear(const int&, const int&, const int&) const; +// NOLINTNEXTLINE template KOKKOS_INLINE_FUNCTION void compute_beta_quadratic(const int&, const int&, const int&) const; // functions for derivatives, GPU only // version of the code with parallelism over j_bend +// NOLINTNEXTLINE template KOKKOS_INLINE_FUNCTION void compute_fused_deidrj_small(const typename Kokkos::TeamPolicy::member_type& team, const int, const int, const int, const int) const; //ForceSNAP // version of the code without parallelism over j_bend +// NOLINTNEXTLINE template KOKKOS_INLINE_FUNCTION void compute_fused_deidrj_large(const typename Kokkos::TeamPolicy::member_type& team, const int, const int, const int) const; //ForceSNAP // core "evaluation" functions that get plugged into "compute" functions // plugged into compute_ui_small, compute_ui_large template +// NOLINTNEXTLINE KOKKOS_FORCEINLINE_FUNCTION void evaluate_ui_jbend(const MultiWignerWrapper&, const Kokkos::Array& a, @@ -303,42 +330,53 @@ class SNAKokkos { const int&, const int&) const; // plugged into compute_zi, compute_yi; returns complex +// NOLINTNEXTLINE template KOKKOS_FORCEINLINE_FUNCTION auto evaluate_zi(const int&, const int&, const int&, const int&, const int&, const int&, const int&, const int&, const int&, const int&, const int&, const int&, const real_type*) const; // plugged into compute_bi +// NOLINTNEXTLINE template KOKKOS_FORCEINLINE_FUNCTION auto evaluate_bi(const int&, const int&, const int&, const int&, const int&, const int&, const int&) const; // plugged into compute_yi, compute_yi_with_zlist; returns real_type +// NOLINTNEXTLINE template KOKKOS_FORCEINLINE_FUNCTION auto evaluate_beta_scaled(const int&, const int&, const int&, const int&, const int&, const int&, const int&) const; // plugged into compute_fused_deidrj_small, compute_fused_deidrj_large; returns real_type +// NOLINTNEXTLINE template KOKKOS_FORCEINLINE_FUNCTION auto evaluate_duidrj_jbend(const WignerWrapper&, const complex&, const complex&, const real_type&, const MultiWignerWrapper&, const Kokkos::Array&, const Kokkos::Array&, const Kokkos::Array&, const int&, const int&, const int&) const; // functions for bispectrum coefficients, CPU only +// NOLINTNEXTLINE template KOKKOS_INLINE_FUNCTION void compute_ui_cpu(const int&, const int&) const; // ForceSNAP // functions for derivatives, CPU only +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void compute_duidrj_cpu(const int&, const int&) const; //ForceSNAP +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void compute_deidrj_cpu(const int&, const int&) const; // ForceSNAP +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION real_type compute_sfac(real_type, real_type, real_type, real_type) const; // add_uarraytot, compute_duarray +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION real_type compute_dsfac(real_type, real_type, real_type, real_type) const; // compute_duarray +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void compute_s_dsfac(const real_type, const real_type, const real_type, const real_type, real_type&, real_type&) const; // compute_cayley_klein // special function that just does a "vectorized" loop +// NOLINTNEXTLINE template KOKKOS_FORCEINLINE_FUNCTION void register_loop(Functor&& f) const { #pragma unroll batch @@ -440,8 +478,10 @@ class SNAKokkos { inline double factorial(int); +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void create_team_scratch_arrays(const typename Kokkos::TeamPolicy::member_type& team); // SNAKokkos() +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void create_thread_scratch_arrays(const typename Kokkos::TeamPolicy::member_type& team); // SNAKokkos() diff --git a/src/KOKKOS/sna_kokkos_impl.h b/src/KOKKOS/sna_kokkos_impl.h index 1113766b385..ef85c4f3650 100644 --- a/src/KOKKOS/sna_kokkos_impl.h +++ b/src/KOKKOS/sna_kokkos_impl.h @@ -76,6 +76,7 @@ SNAKokkos::SNAKokkos(const Cop /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION SNAKokkos::~SNAKokkos() { @@ -349,6 +350,7 @@ void SNAKokkos::grow_rij(int n ------------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void SNAKokkos::compute_cayley_klein(const int& iatom, const int& jnbor) const { @@ -437,6 +439,7 @@ void SNAKokkos::compute_cayley ------------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void SNAKokkos::pre_ui(const int& iatom, const int& j, const int& ielem) const { @@ -470,6 +473,7 @@ void SNAKokkos::pre_ui(const i template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void SNAKokkos::compute_ui_small(const typename Kokkos::TeamPolicy::member_type& team, const int iatom_mod, const int j_bend, const int first_jnbor, const int ninside, const int iatom_div) const @@ -523,6 +527,7 @@ void SNAKokkos::compute_ui_sma // and some amount of load imbalance, at the expense of reducing parallelism template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void SNAKokkos::compute_ui_large(const typename Kokkos::TeamPolicy::member_type& team, const int iatom_mod, const int first_jnbor, const int ninside, const int iatom_div) const @@ -585,6 +590,7 @@ void SNAKokkos::compute_ui_lar // Core "evaluation" kernel that gets reused in `compute_ui_small` and `compute_ui_large` template template +// NOLINTNEXTLINE KOKKOS_FORCEINLINE_FUNCTION void SNAKokkos::evaluate_ui_jbend( const MultiWignerWrapper& ulist_wrapper, @@ -741,6 +747,7 @@ void SNAKokkos::evaluate_ui_jb ------------------------------------------------------------------------- */ template +// NOLINTNEXTLINE template KOKKOS_INLINE_FUNCTION void SNAKokkos::compute_ui_cpu(const int& iatom, const int& jnbor) const { @@ -865,6 +872,7 @@ void SNAKokkos::compute_ui_cpu ------------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void SNAKokkos::transform_ui(const int& iatom, const int& idxu) const { @@ -897,6 +905,7 @@ void SNAKokkos::transform_ui(c ------------------------------------------------------------------------- */ template +// NOLINTNEXTLINE template KOKKOS_INLINE_FUNCTION void SNAKokkos::compute_zi(const int& iatom, const int& jjz) const { @@ -932,6 +941,7 @@ void SNAKokkos::compute_zi(con ------------------------------------------------------------------------- */ template +// NOLINTNEXTLINE template KOKKOS_FORCEINLINE_FUNCTION auto SNAKokkos::evaluate_zi(const int& j1, const int& j2, const int& j, const int& ma1min, const int& ma2max, const int& mb1min, const int& mb2max, const int& na, const int& nb, @@ -994,6 +1004,7 @@ auto SNAKokkos::evaluate_zi(co ------------------------------------------------------------------------- */ template +// NOLINTNEXTLINE template KOKKOS_INLINE_FUNCTION void SNAKokkos::compute_bi(const int& iatom, const int& jjb) const { @@ -1040,6 +1051,7 @@ void SNAKokkos::compute_bi(con ------------------------------------------------------------------------- */ template +// NOLINTNEXTLINE template KOKKOS_INLINE_FUNCTION auto SNAKokkos::evaluate_bi(const int& j, const int& jjz, const int& jju, const int& iatom, const int& elem1, const int& elem2, const int& elem3) const { @@ -1133,6 +1145,7 @@ auto SNAKokkos::evaluate_bi(co ------------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void SNAKokkos::compute_beta_linear(const int& iatom, const int& idxb, const int& ielem) const { @@ -1146,6 +1159,7 @@ void SNAKokkos::compute_beta_l template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void SNAKokkos::compute_beta_quadratic(const int& iatom, const int& idxb, const int& ielem) const { @@ -1208,6 +1222,7 @@ void SNAKokkos::compute_beta_q template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void SNAKokkos::compute_yi(const int& iatom, const int& jjz) const { @@ -1268,6 +1283,7 @@ void SNAKokkos::compute_yi(con template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void SNAKokkos::compute_yi_with_zlist(const int& iatom, const int& jjz) const { @@ -1331,6 +1347,7 @@ void SNAKokkos::compute_yi_wit ------------------------------------------------------------------------- */ template +// NOLINTNEXTLINE template KOKKOS_FORCEINLINE_FUNCTION auto SNAKokkos::evaluate_beta_scaled(const int& j1, const int& j2, const int& j, const int& iatom, const int& elem1, const int& elem2, const int& elem3) const { @@ -1395,6 +1412,7 @@ auto SNAKokkos::evaluate_beta_ // Version of the code that exposes additional parallelism by threading over `j_bend` values template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void SNAKokkos::compute_fused_deidrj_small(const typename Kokkos::TeamPolicy::member_type& team, const int iatom_mod, const int j_bend, const int jnbor, const int iatom_div) const { @@ -1438,6 +1456,7 @@ void SNAKokkos::compute_fused_ // and some amount of load imbalance, at the expense of reducing parallelism template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void SNAKokkos::compute_fused_deidrj_large(const typename Kokkos::TeamPolicy::member_type& team, const int iatom_mod, const int jnbor, const int iatom_div) const { @@ -1492,6 +1511,7 @@ void SNAKokkos::compute_fused_ // `compute_fused_deidrj_large` template template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION auto SNAKokkos::evaluate_duidrj_jbend(const WignerWrapper& ulist_wrapper, const complex& a, const complex& b, const real_type& sfac, const MultiWignerWrapper& dulist_wrapper, @@ -1657,6 +1677,7 @@ auto SNAKokkos::evaluate_duidr ------------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void SNAKokkos::compute_duidrj_cpu(const int& iatom, const int& jnbor) const { @@ -1840,6 +1861,7 @@ void SNAKokkos::compute_duidrj ------------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void SNAKokkos::compute_deidrj_cpu(const int& iatom, const int& jnbor) const { @@ -2198,6 +2220,7 @@ int SNAKokkos::compute_ncoeff( /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION real_type SNAKokkos::compute_sfac(real_type r, real_type rcut, real_type sinner, real_type dinner) const { @@ -2231,6 +2254,7 @@ real_type SNAKokkos::compute_s /* ---------------------------------------------------------------------- */ template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION real_type SNAKokkos::compute_dsfac(real_type r, real_type rcut, real_type sinner, real_type dinner) const { @@ -2279,6 +2303,7 @@ real_type SNAKokkos::compute_d } template +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void SNAKokkos::compute_s_dsfac(const real_type r, const real_type rcut, const real_type sinner, const real_type dinner, real_type& sfac, real_type& dsfac) const { diff --git a/src/KOKKOS/third_order_kokkos.cpp b/src/KOKKOS/third_order_kokkos.cpp index b52dd07fee8..1979cf5220b 100644 --- a/src/KOKKOS/third_order_kokkos.cpp +++ b/src/KOKKOS/third_order_kokkos.cpp @@ -43,6 +43,7 @@ struct ForceAdder { ViewA a; ViewB b; ForceAdder(const ViewA& a_, const ViewB& b_):a(a_),b(b_) {} +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (const int& i) const { a(i,0) += b(i,0); @@ -57,6 +58,7 @@ template struct Zero { View v; Zero(const View &v_):v(v_) {} +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(const int &i) const { v(i,0) = 0; diff --git a/src/KOKKOS/third_order_kokkos.h b/src/KOKKOS/third_order_kokkos.h index b3142e5ee02..d6c7195904c 100644 --- a/src/KOKKOS/third_order_kokkos.h +++ b/src/KOKKOS/third_order_kokkos.h @@ -34,6 +34,7 @@ class ThirdOrderKokkos : public ThirdOrder { void command(int, char **) override; void setup(); +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(const int &i) const { diff --git a/src/KOKKOS/transpose_helper_kokkos.h b/src/KOKKOS/transpose_helper_kokkos.h index faac11db0cb..fd63dc5c475 100644 --- a/src/KOKKOS/transpose_helper_kokkos.h +++ b/src/KOKKOS/transpose_helper_kokkos.h @@ -100,6 +100,7 @@ struct TransposeHelperKokkos { } } +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(const typename Kokkos::TeamPolicy::member_type& team_member) const { diff --git a/src/KOKKOS/verlet_kokkos.cpp b/src/KOKKOS/verlet_kokkos.cpp index a54d72db092..d069e30d551 100644 --- a/src/KOKKOS/verlet_kokkos.cpp +++ b/src/KOKKOS/verlet_kokkos.cpp @@ -38,6 +38,7 @@ struct ForceAdder { ViewA a; ViewB b; ForceAdder(const ViewA& a_, const ViewB& b_):a(a_),b(b_) {} +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (const int& i) const { a(i,0) += b(i,0); @@ -52,6 +53,7 @@ template struct Zero { View v; Zero(const View &v_):v(v_) {} +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator()(const int &i) const { v(i,0) = 0; diff --git a/src/KOKKOS/verlet_kokkos.h b/src/KOKKOS/verlet_kokkos.h index 79d14b821d1..1b05f024e2e 100644 --- a/src/KOKKOS/verlet_kokkos.h +++ b/src/KOKKOS/verlet_kokkos.h @@ -37,6 +37,7 @@ class VerletKokkos : public Verlet { void run(int) override; void force_clear() override; +// NOLINTNEXTLINE KOKKOS_INLINE_FUNCTION void operator() (const int& i) const { f(i,0) += f_merge_copy(i,0); diff --git a/src/KSPACE/pppm.h b/src/KSPACE/pppm.h index 30c74c1a4e9..fb49ac5f852 100644 --- a/src/KSPACE/pppm.h +++ b/src/KSPACE/pppm.h @@ -175,7 +175,7 @@ class PPPM : public KSpace { gf_b = denominator expansion coeffs ------------------------------------------------------------------------- */ - inline double gf_denom(const double &x, const double &y, const double &z) const + [[nodiscard]] double gf_denom(const double &x, const double &y, const double &z) const { double sx, sy, sz; sz = sy = sx = 0.0; diff --git a/src/KSPACE/pppm_stagger.h b/src/KSPACE/pppm_stagger.h index f434c19caf2..bc217fd5b87 100644 --- a/src/KSPACE/pppm_stagger.h +++ b/src/KSPACE/pppm_stagger.h @@ -50,7 +50,7 @@ class PPPMStagger : public PPPM { void fieldforce_ad() override; void fieldforce_peratom() override; - inline double gf_denom2(const double &x, const double &y, const double &z) const + [[nodiscard]] double gf_denom2(const double &x, const double &y, const double &z) const { double sx, sy, sz; double x2 = x * x; diff --git a/src/LEPTON/lepton_utils.cpp b/src/LEPTON/lepton_utils.cpp index 3ae2d45743e..d41157471f6 100644 --- a/src/LEPTON/lepton_utils.cpp +++ b/src/LEPTON/lepton_utils.cpp @@ -44,7 +44,7 @@ class DerivativeException : public std::exception { { message = fmt::format("Order {} derivative of function {} in {} is not supported", deg, fn, vn); } - const char *what() const noexcept override { return message.c_str(); } + [[nodiscard]] const char *what() const noexcept override { return message.c_str(); } }; } // namespace Lepton @@ -98,7 +98,7 @@ class VariableException : public std::exception { { message = fmt::format("Variable {} in expression {} does not exist", var, expr); } - const char *what() const noexcept override { return message.c_str(); } + [[nodiscard]] const char *what() const noexcept override { return message.c_str(); } }; } // namespace LeptonUtils diff --git a/src/LEPTON/lepton_utils.h b/src/LEPTON/lepton_utils.h index caa1ce56ab3..2a501aad2f9 100644 --- a/src/LEPTON/lepton_utils.h +++ b/src/LEPTON/lepton_utils.h @@ -30,8 +30,8 @@ class ZBLFunction : public CustomFunction { qqr2e(_qqr2e), angstrom(_angstrom), qelectron(_qelectron){}; ZBLFunction() = delete; - int getNumArguments() const override { return 3; } - CustomFunction *clone() const override { return new ZBLFunction(qqr2e, angstrom, qelectron); } + [[nodiscard]] int getNumArguments() const override { return 3; } + [[nodiscard]] CustomFunction *clone() const override { return new ZBLFunction(qqr2e, angstrom, qelectron); } double evaluate(const double *) const override; double evaluateDerivative(const double *, const int *) const override; diff --git a/src/MANIFOLD/manifold.h b/src/MANIFOLD/manifold.h index 63665b97d78..3c331981a1d 100644 --- a/src/MANIFOLD/manifold.h +++ b/src/MANIFOLD/manifold.h @@ -40,8 +40,8 @@ #include "pointers.h" #include -namespace LAMMPS_NS { -namespace user_manifold { + +namespace LAMMPS_NS::user_manifold { // Abstract base class. class manifold : protected Pointers { @@ -88,8 +88,8 @@ namespace user_manifold { return a[0] * b[0] + a[1] * b[1] + a[2] * b[2]; } -} // namespace user_manifold +} // namespace LAMMPS_NS::user_manifold + -} // namespace LAMMPS_NS #endif // LMP_MANIFOLD_H diff --git a/src/MANIFOLD/manifold_cylinder.h b/src/MANIFOLD/manifold_cylinder.h index 1ab9b9fef0f..09d7dee2a8b 100644 --- a/src/MANIFOLD/manifold_cylinder.h +++ b/src/MANIFOLD/manifold_cylinder.h @@ -18,9 +18,9 @@ // A normal cylinder -namespace LAMMPS_NS { -namespace user_manifold { + +namespace LAMMPS_NS::user_manifold { class manifold_cylinder : public manifold { public: @@ -33,8 +33,8 @@ namespace user_manifold { static int expected_argc() { return NPARAMS; } int nparams() override { return NPARAMS; } }; -} // namespace user_manifold +} // namespace LAMMPS_NS::user_manifold + -} // namespace LAMMPS_NS #endif // LMP_MANIFOLD_CYLINDER_H diff --git a/src/MANIFOLD/manifold_cylinder_dent.h b/src/MANIFOLD/manifold_cylinder_dent.h index 7de1fd0ac1b..dc09045b84a 100644 --- a/src/MANIFOLD/manifold_cylinder_dent.h +++ b/src/MANIFOLD/manifold_cylinder_dent.h @@ -16,9 +16,9 @@ #include "manifold.h" -namespace LAMMPS_NS { -namespace user_manifold { + +namespace LAMMPS_NS::user_manifold { class manifold_cylinder_dent : public manifold { public: @@ -31,8 +31,8 @@ namespace user_manifold { static int expected_argc() { return NPARAMS; } int nparams() override { return NPARAMS; } }; -} // namespace user_manifold +} // namespace LAMMPS_NS::user_manifold + -} // namespace LAMMPS_NS #endif // LMP_MANIFOLD_CYLINDER_DENT_H diff --git a/src/MANIFOLD/manifold_dumbbell.h b/src/MANIFOLD/manifold_dumbbell.h index ee97552e24a..368b93b8237 100644 --- a/src/MANIFOLD/manifold_dumbbell.h +++ b/src/MANIFOLD/manifold_dumbbell.h @@ -16,9 +16,9 @@ #include "manifold.h" -namespace LAMMPS_NS { -namespace user_manifold { + +namespace LAMMPS_NS::user_manifold { // A dendritic dumbbell approximation: class manifold_dumbbell : public manifold { @@ -34,8 +34,8 @@ namespace user_manifold { static int expected_argc() { return NPARAMS; } int nparams() override { return NPARAMS; } }; -} // namespace user_manifold +} // namespace LAMMPS_NS::user_manifold + -} // namespace LAMMPS_NS #endif // LMP_MANIFOLD_DUMBBELL_H diff --git a/src/MANIFOLD/manifold_ellipsoid.h b/src/MANIFOLD/manifold_ellipsoid.h index efeeba7ed81..bc7b4a866f4 100644 --- a/src/MANIFOLD/manifold_ellipsoid.h +++ b/src/MANIFOLD/manifold_ellipsoid.h @@ -16,9 +16,9 @@ #include "manifold.h" -namespace LAMMPS_NS { -namespace user_manifold { + +namespace LAMMPS_NS::user_manifold { // An ellipsoid: class manifold_ellipsoid : public manifold { public: @@ -32,8 +32,8 @@ namespace user_manifold { static int expected_argc() { return NPARAMS; } int nparams() override { return NPARAMS; } }; -} // namespace user_manifold +} // namespace LAMMPS_NS::user_manifold + -} // namespace LAMMPS_NS #endif // LMP_MANIFOLD_ELLIPSOID_H diff --git a/src/MANIFOLD/manifold_factory.cpp b/src/MANIFOLD/manifold_factory.cpp index 81680c3a081..aa316917be5 100644 --- a/src/MANIFOLD/manifold_factory.cpp +++ b/src/MANIFOLD/manifold_factory.cpp @@ -48,8 +48,8 @@ #include -namespace LAMMPS_NS { -namespace user_manifold { + +namespace LAMMPS_NS::user_manifold { template static void make_manifold_if(manifold **man_ptr, const char *name, LAMMPS *lmp, int narg, char **arg) @@ -78,6 +78,6 @@ namespace user_manifold { return man; } -} // namespace user_manifold +} // namespace LAMMPS_NS::user_manifold + -} // namespace LAMMPS_NS diff --git a/src/MANIFOLD/manifold_gaussian_bump.cpp b/src/MANIFOLD/manifold_gaussian_bump.cpp index 2130f9f0a8a..7adf7129d26 100644 --- a/src/MANIFOLD/manifold_gaussian_bump.cpp +++ b/src/MANIFOLD/manifold_gaussian_bump.cpp @@ -64,7 +64,7 @@ class cubic_hermite if (fabs( y(1) - y1 ) > 1e-8 ) err->one(FLERR, "y1 wrong"); } - double get_t_from_x( double xx ) const + [[nodiscard]] double get_t_from_x( double xx ) const { if (xx < x0 || xx > x1) { err->one(FLERR,"x ( {} ) out of bounds [{}, {}]", xx, x0, x1 ); @@ -94,26 +94,26 @@ class cubic_hermite return t; } - double x( double t ) const + [[nodiscard]] double x( double t ) const { double t2 = t*t; double t3 = t2*t; return a*t3 + b*t2 + c*t + d; } - double y_from_x( double x ) const + [[nodiscard]] double y_from_x( double x ) const { double t = get_t_from_x( x ); return y(t); } - double yp_from_x( double x ) const + [[nodiscard]] double yp_from_x( double x ) const { double t = get_t_from_x( x ); return yp(t); } - double y( double t ) const + [[nodiscard]] double y( double t ) const { double t2 = t*t; double t3 = t2*t; @@ -126,19 +126,19 @@ class cubic_hermite yy = y(t); } - double xp( double t ) const + [[nodiscard]] double xp( double t ) const { double t2 = t*t; return 3*a*t2 + 2*b*t + c; } - double yp( double t ) const + [[nodiscard]] double yp( double t ) const { double t2 = t*t; return 3*t2*s + 2*u*t + v; } - double xpp( double t ) const + [[nodiscard]] double xpp( double t ) const { return 6*a*t + 2*b; } diff --git a/src/MANIFOLD/manifold_gaussian_bump.h b/src/MANIFOLD/manifold_gaussian_bump.h index 1310db9baa4..920aff7efed 100644 --- a/src/MANIFOLD/manifold_gaussian_bump.h +++ b/src/MANIFOLD/manifold_gaussian_bump.h @@ -42,9 +42,9 @@ #include "manifold.h" -namespace LAMMPS_NS { -namespace user_manifold { + +namespace LAMMPS_NS::user_manifold { // A Gaussian bump with a smoothed decay to flat 2D. class manifold_gaussian_bump : public manifold { @@ -77,20 +77,20 @@ namespace user_manifold { double *lut_z; double *lut_zp; - double gaussian_bump(double) const; - double gaussian_bump_x2(double) const; - double gaussian_bump_der(double) const; + [[nodiscard]] double gaussian_bump(double) const; + [[nodiscard]] double gaussian_bump_x2(double) const; + [[nodiscard]] double gaussian_bump_der(double) const; void make_lut(); - double lut_get_z(double rr) const; - double lut_get_zp(double rr) const; + [[nodiscard]] double lut_get_z(double rr) const; + [[nodiscard]] double lut_get_zp(double rr) const; void lut_get_z_and_zp(double rr, double &zz, double &zzp) const; double taper(double); double taper_der(double); }; -} // namespace user_manifold +} // namespace LAMMPS_NS::user_manifold + -} // namespace LAMMPS_NS #endif // LMP_MANIFOLD_GAUSSIAN_BUMP_H diff --git a/src/MANIFOLD/manifold_plane.h b/src/MANIFOLD/manifold_plane.h index 10e65212591..1a0ef5e864d 100644 --- a/src/MANIFOLD/manifold_plane.h +++ b/src/MANIFOLD/manifold_plane.h @@ -16,9 +16,9 @@ #include "manifold.h" -namespace LAMMPS_NS { -namespace user_manifold { + +namespace LAMMPS_NS::user_manifold { // A 2D plane class manifold_plane : public manifold { @@ -32,8 +32,8 @@ namespace user_manifold { static int expected_argc() { return NPARAMS; } int nparams() override { return NPARAMS; } }; -} // namespace user_manifold +} // namespace LAMMPS_NS::user_manifold + -} // namespace LAMMPS_NS #endif // LMP_MANIFOLD_PLANE_H diff --git a/src/MANIFOLD/manifold_plane_wiggle.h b/src/MANIFOLD/manifold_plane_wiggle.h index e1cd1143c45..1489c551b4c 100644 --- a/src/MANIFOLD/manifold_plane_wiggle.h +++ b/src/MANIFOLD/manifold_plane_wiggle.h @@ -16,9 +16,9 @@ #include "manifold.h" -namespace LAMMPS_NS { -namespace user_manifold { + +namespace LAMMPS_NS::user_manifold { // A 2D wiggly/wave-y plane (Like z = A cos(kx)) class manifold_plane_wiggle : public manifold { @@ -32,8 +32,8 @@ namespace user_manifold { static int expected_argc() { return NPARAMS; } int nparams() override { return NPARAMS; } }; -} // namespace user_manifold +} // namespace LAMMPS_NS::user_manifold + -} // namespace LAMMPS_NS #endif // LMP_MANIFOLD_PLANE_WIGGLE_H diff --git a/src/MANIFOLD/manifold_sphere.h b/src/MANIFOLD/manifold_sphere.h index 3a2f3562a77..6983c9a6488 100644 --- a/src/MANIFOLD/manifold_sphere.h +++ b/src/MANIFOLD/manifold_sphere.h @@ -16,9 +16,9 @@ #include "manifold.h" -namespace LAMMPS_NS { -namespace user_manifold { + +namespace LAMMPS_NS::user_manifold { // A sphere: class manifold_sphere : public manifold { @@ -62,8 +62,8 @@ namespace user_manifold { static int expected_argc() { return NPARAMS; } int nparams() override { return NPARAMS; } }; -} // namespace user_manifold +} // namespace LAMMPS_NS::user_manifold + -} // namespace LAMMPS_NS #endif // LMP_MANIFOLD_SPHERE_H diff --git a/src/MANIFOLD/manifold_spine.h b/src/MANIFOLD/manifold_spine.h index c2239221a98..d0a52e4de6a 100644 --- a/src/MANIFOLD/manifold_spine.h +++ b/src/MANIFOLD/manifold_spine.h @@ -16,9 +16,9 @@ #include "manifold.h" -namespace LAMMPS_NS { -namespace user_manifold { + +namespace LAMMPS_NS::user_manifold { // A dendritic spine approximation: class manifold_spine : public manifold { @@ -46,8 +46,8 @@ namespace user_manifold { static const char *type() { return "spine/two"; } const char *id() override { return type(); } }; -} // namespace user_manifold +} // namespace LAMMPS_NS::user_manifold + -} // namespace LAMMPS_NS #endif // LMP_MANIFOLD_SPINE_H diff --git a/src/MANIFOLD/manifold_supersphere.h b/src/MANIFOLD/manifold_supersphere.h index d71e9b68f77..6619e6b60aa 100644 --- a/src/MANIFOLD/manifold_supersphere.h +++ b/src/MANIFOLD/manifold_supersphere.h @@ -16,9 +16,9 @@ #include "manifold.h" -namespace LAMMPS_NS { -namespace user_manifold { + +namespace LAMMPS_NS::user_manifold { // A sphere: class manifold_supersphere : public manifold { @@ -58,8 +58,8 @@ namespace user_manifold { static int expected_argc() { return NPARAMS; } int nparams() override { return NPARAMS; } }; -} // namespace user_manifold +} // namespace LAMMPS_NS::user_manifold + -} // namespace LAMMPS_NS #endif diff --git a/src/MANIFOLD/manifold_thylakoid.h b/src/MANIFOLD/manifold_thylakoid.h index 72ffb870ca7..7e967da4b7c 100644 --- a/src/MANIFOLD/manifold_thylakoid.h +++ b/src/MANIFOLD/manifold_thylakoid.h @@ -17,9 +17,9 @@ #include "manifold.h" #include -namespace LAMMPS_NS { -namespace user_manifold { + +namespace LAMMPS_NS::user_manifold { struct thyla_part; class manifold_thylakoid : public manifold { @@ -66,8 +66,8 @@ namespace user_manifold { double Lx, Ly, Lz; }; -} // namespace user_manifold +} // namespace LAMMPS_NS::user_manifold + -} // namespace LAMMPS_NS #endif // LMP_MANIFOLD_THYLAKOID_H diff --git a/src/MANIFOLD/manifold_thylakoid_shared.h b/src/MANIFOLD/manifold_thylakoid_shared.h index 17a6b377329..bea286090a6 100644 --- a/src/MANIFOLD/manifold_thylakoid_shared.h +++ b/src/MANIFOLD/manifold_thylakoid_shared.h @@ -17,9 +17,9 @@ #include "lmptype.h" #include -namespace LAMMPS_NS { -namespace user_manifold { + +namespace LAMMPS_NS::user_manifold { // The thylakoid is composed of many parts struct thyla_part { @@ -61,8 +61,8 @@ namespace user_manifold { }; // struct thyla_part_geom -} // namespace user_manifold +} // namespace LAMMPS_NS::user_manifold + -} // namespace LAMMPS_NS #endif // MANIFOLD_THYLAKOID_SHARED_H diff --git a/src/MANIFOLD/manifold_torus.h b/src/MANIFOLD/manifold_torus.h index 53b4d391a76..fc81ed7b2b0 100644 --- a/src/MANIFOLD/manifold_torus.h +++ b/src/MANIFOLD/manifold_torus.h @@ -16,9 +16,9 @@ #include "manifold.h" -namespace LAMMPS_NS { -namespace user_manifold { + +namespace LAMMPS_NS::user_manifold { class manifold_torus : public manifold { public: @@ -33,8 +33,8 @@ namespace user_manifold { int nparams() override { return NPARAMS; } }; -} // namespace user_manifold +} // namespace LAMMPS_NS::user_manifold + -} // namespace LAMMPS_NS #endif // LMP_MANIFOLD_TORUS_H diff --git a/src/MANYBODY/pair_airebo.h b/src/MANYBODY/pair_airebo.h index 2eb85a7fb13..8f1234927fc 100644 --- a/src/MANYBODY/pair_airebo.h +++ b/src/MANYBODY/pair_airebo.h @@ -202,7 +202,7 @@ class PairAIREBO : public Pair { /* kronecker delta function returning a double */ - inline double kronecker(const int a, const int b) const { return (a == b) ? 1.0 : 0.0; }; + [[nodiscard]] double kronecker(const int a, const int b) const { return (a == b) ? 1.0 : 0.0; }; }; } // namespace LAMMPS_NS diff --git a/src/MANYBODY/pair_eam_cd.h b/src/MANYBODY/pair_eam_cd.h index b2c76999bb0..fdfba956155 100644 --- a/src/MANYBODY/pair_eam_cd.h +++ b/src/MANYBODY/pair_eam_cd.h @@ -57,7 +57,7 @@ class PairEAMCD : public PairEAMAlloy { // The public interface exposed by this potential class. // Evaluates the h(x) polynomial for a given local concentration x. - inline double evalH(double x) const + [[nodiscard]] double evalH(double x) const { double v = 0.0; for (int i = nhcoeff - 1; i >= 1; i--) { v = (v + hcoeff[i]) * x; } @@ -65,7 +65,7 @@ class PairEAMCD : public PairEAMAlloy { }; // Calculates the derivative of the h(x) polynomial. - inline double evalHprime(double x) const + [[nodiscard]] double evalHprime(double x) const { double v = 0.0; for (int i = nhcoeff - 1; i >= 2; i--) { v = (v + (double) i * hcoeff[i]) * x; } @@ -116,7 +116,7 @@ class PairEAMCD : public PairEAMAlloy { // NOLINTEND // Converts a radius value to an index value to be used in a spline table lookup. - inline EAMTableIndex radiusToTableIndex(double r) const + [[nodiscard]] EAMTableIndex radiusToTableIndex(double r) const { EAMTableIndex index; index.p = r * rdr + 1.0; @@ -129,7 +129,7 @@ class PairEAMCD : public PairEAMAlloy { }; // Converts a density value to an index value to be used in a spline table lookup. - inline EAMTableIndex rhoToTableIndex(double rho) const + [[nodiscard]] EAMTableIndex rhoToTableIndex(double rho) const { EAMTableIndex index; index.p = rho * rdrho + 1.0; @@ -142,49 +142,49 @@ class PairEAMCD : public PairEAMAlloy { }; // Computes the derivative of rho(r) - inline double RhoPrimeOfR(const EAMTableIndex &index, int itype, int jtype) const + [[nodiscard]] double RhoPrimeOfR(const EAMTableIndex &index, int itype, int jtype) const { const double *coeff = rhor_spline[type2rhor[itype][jtype]][index.m]; return (coeff[0] * index.p + coeff[1]) * index.p + coeff[2]; }; // Computes rho(r) - inline double RhoOfR(const EAMTableIndex &index, int itype, int jtype) const + [[nodiscard]] double RhoOfR(const EAMTableIndex &index, int itype, int jtype) const { const double *coeff = rhor_spline[type2rhor[itype][jtype]][index.m]; return ((coeff[3] * index.p + coeff[4]) * index.p + coeff[5]) * index.p + coeff[6]; }; // Computes the derivative of F(rho) - inline double FPrimeOfRho(const EAMTableIndex &index, int itype) const + [[nodiscard]] double FPrimeOfRho(const EAMTableIndex &index, int itype) const { const double *coeff = frho_spline[type2frho[itype]][index.m]; return (coeff[0] * index.p + coeff[1]) * index.p + coeff[2]; }; // Computes F(rho) - inline double FofRho(const EAMTableIndex &index, int itype) const + [[nodiscard]] double FofRho(const EAMTableIndex &index, int itype) const { const double *coeff = frho_spline[type2frho[itype]][index.m]; return ((coeff[3] * index.p + coeff[4]) * index.p + coeff[5]) * index.p + coeff[6]; }; // Computes the derivative of z2(r) - inline double Z2PrimeOfR(const EAMTableIndex &index, int itype, int jtype) const + [[nodiscard]] double Z2PrimeOfR(const EAMTableIndex &index, int itype, int jtype) const { const double *coeff = z2r_spline[type2z2r[itype][jtype]][index.m]; return (coeff[0] * index.p + coeff[1]) * index.p + coeff[2]; }; // Computes z2(r) - inline double Z2OfR(const EAMTableIndex &index, int itype, int jtype) const + [[nodiscard]] double Z2OfR(const EAMTableIndex &index, int itype, int jtype) const { const double *coeff = z2r_spline[type2z2r[itype][jtype]][index.m]; return ((coeff[3] * index.p + coeff[4]) * index.p + coeff[5]) * index.p + coeff[6]; }; // Computes pair potential V_ij(r). - inline double PhiOfR(const EAMTableIndex &index, int itype, int jtype, + [[nodiscard]] double PhiOfR(const EAMTableIndex &index, int itype, int jtype, const double oneOverR) const { // phi = pair potential energy diff --git a/src/MANYBODY/pair_meam_spline.h b/src/MANYBODY/pair_meam_spline.h index 47f3f3d8dfd..80aaa0c93c9 100644 --- a/src/MANYBODY/pair_meam_spline.h +++ b/src/MANYBODY/pair_meam_spline.h @@ -53,11 +53,11 @@ class PairMEAMSpline : public Pair { // helper functions for compute() - int ij_to_potl(const int itype, const int jtype, const int ntypes) const + [[nodiscard]] int ij_to_potl(const int itype, const int jtype, const int ntypes) const { return jtype - 1 + (itype - 1) * ntypes - (itype - 1) * itype / 2; } - int i_to_potl(const int itype) const { return itype - 1; } + [[nodiscard]] int i_to_potl(const int itype) const { return itype - 1; } int pack_forward_comm(int, int *, double *, int, int *) override; void unpack_forward_comm(int, int, double *) override; @@ -107,7 +107,7 @@ class PairMEAMSpline : public Pair { } /// Returns the number of knots. - int numKnots() const { return N; } + [[nodiscard]] int numKnots() const { return N; } /// Parses the spline knots from a text file. void parse(class PotentialFileReader &reader, bool isNewFormat); @@ -116,7 +116,7 @@ class PairMEAMSpline : public Pair { void prepareSpline(); /// Evaluates the spline function at position x. - inline double eval(double x) const + [[nodiscard]] double eval(double x) const { x -= xmin; if (x <= 0.0) { // Left extrapolation. @@ -197,10 +197,10 @@ class PairMEAMSpline : public Pair { } /// Returns the number of bytes used by this function object. - double memory_usage() const { return sizeof(*this) + sizeof(X[0]) * N * 3; } + [[nodiscard]] double memory_usage() const { return sizeof(*this) + sizeof(X[0]) * N * 3; } /// Returns the cutoff radius of this function. - double cutoff() const { return X[N - 1]; } + [[nodiscard]] double cutoff() const { return X[N - 1]; } /// Writes a Gnuplot script that plots the spline function. void writeGnuplot(const char *filename, const char *title = nullptr) const; diff --git a/src/MANYBODY/pair_meam_sw_spline.h b/src/MANYBODY/pair_meam_sw_spline.h index a5c1b0ffd47..1887f22024c 100644 --- a/src/MANYBODY/pair_meam_sw_spline.h +++ b/src/MANYBODY/pair_meam_sw_spline.h @@ -94,7 +94,7 @@ class PairMEAMSWSpline : public Pair { } /// Returns the number of knots. - int numKnots() const { return N; } + [[nodiscard]] int numKnots() const { return N; } /// Parses the spline knots from a text file. void parse(class PotentialFileReader &reader); @@ -103,7 +103,7 @@ class PairMEAMSWSpline : public Pair { void prepareSpline(); /// Evaluates the spline function at position x. - inline double eval(double x) const + [[nodiscard]] double eval(double x) const { x -= xmin; if (x <= 0.0) { // Left extrapolation. @@ -187,10 +187,10 @@ class PairMEAMSWSpline : public Pair { } /// Returns the number of bytes used by this function object. - double memory_usage() const { return sizeof(*this) + sizeof(X[0]) * N * 3; } + [[nodiscard]] double memory_usage() const { return sizeof(*this) + sizeof(X[0]) * N * 3; } /// Returns the cutoff radius of this function. - double cutoff() const { return X[N - 1]; } + [[nodiscard]] double cutoff() const { return X[N - 1]; } /// Writes a Gnuplot script that plots the spline function. void writeGnuplot(const char *filename, const char *title = nullptr) const; diff --git a/src/MGPT/pair_mgpt.h b/src/MGPT/pair_mgpt.h index 3168a3c41d4..cf21c8ea77c 100644 --- a/src/MGPT/pair_mgpt.h +++ b/src/MGPT/pair_mgpt.h @@ -62,7 +62,7 @@ class PairMGPT : public Pair { int operator==(const Doublet &b) const { return (i == b.i) && (j == b.j); } - int hash() const { return i*333331 + j*331; } + [[nodiscard]] int hash() const { return i*333331 + j*331; } }; template class Hash { @@ -329,7 +329,7 @@ class PairMGPT : public Pair { Matrix operator/(double x) const { return (*this) * (1.0/x); } - Matrix transpose() const { + [[nodiscard]] Matrix transpose() const { Matrix T; for(int i = 1; i<=sz; i++) for(int j = 1; j<=sz; j++) @@ -543,7 +543,7 @@ class PairMGPT : public Pair { // Old matrix routines, only used in force debug routines. /// This function calculates the matrix product of ha and hb. - inline Matrix prodmat(const Matrix& ha, const Matrix& hb) const { + [[nodiscard]] Matrix prodmat(const Matrix& ha, const Matrix& hb) const { Matrix h; for(int l = 1; l <= lmax; l++) { for(int n = 1; n <= lmax; n++) { @@ -556,7 +556,7 @@ class PairMGPT : public Pair { } /// This function calculates the trace of the matrix product of ha and hb. - inline double trace(const Matrix& ha, const Matrix& hb) const { + [[nodiscard]] double trace(const Matrix& ha, const Matrix& hb) const { double zquan = 0.0; for(int n = 1; n <= lmax; n++) { double cquan = 0.0; @@ -612,7 +612,7 @@ class PairMGPT : public Pair { s = s + A[i][j]*B[i][j]; return s; } - inline double transtrace(const Matrix& a,const Matrix& b) const + [[nodiscard]] double transtrace(const Matrix& a,const Matrix& b) const { int i,k; double s = 0.0; diff --git a/src/ML-POD/fitpod_command.cpp b/src/ML-POD/fitpod_command.cpp index 240d5f61fde..9e9c7fa47b0 100644 --- a/src/ML-POD/fitpod_command.cpp +++ b/src/ML-POD/fitpod_command.cpp @@ -448,7 +448,7 @@ void FitPOD::get_exyz_files(std::vector &files, std::vector -namespace LAMMPS_NS { -namespace PyUtils { + +namespace LAMMPS_NS::PyUtils { class GIL { PyGILState_STATE gstate; @@ -34,8 +34,8 @@ namespace PyUtils { PyErr_Clear(); } -} // namespace PyUtils +} // namespace LAMMPS_NS::PyUtils + -} // namespace LAMMPS_NS #endif diff --git a/src/QEQ/fix_qeq.cpp b/src/QEQ/fix_qeq.cpp index 89543c5a401..53f7518cb73 100644 --- a/src/QEQ/fix_qeq.cpp +++ b/src/QEQ/fix_qeq.cpp @@ -48,7 +48,7 @@ namespace { std::string message; public: explicit qeq_parser_error(const std::string &mesg) { message = mesg; } - const char *what() const noexcept override { return message.c_str(); } + [[nodiscard]] const char *what() const noexcept override { return message.c_str(); } }; } diff --git a/src/REACTION/fix_bond_react.cpp b/src/REACTION/fix_bond_react.cpp index f9a772bc8f4..e707670169b 100644 --- a/src/REACTION/fix_bond_react.cpp +++ b/src/REACTION/fix_bond_react.cpp @@ -28,6 +28,7 @@ Contributing Author: Jacob Gissinger (jgissing@stevens.edu) #include "force.h" #include "group.h" #include "input.h" +#include "label_map.h" #include "json_metadata.h" #include "math_const.h" #include "math_extra.h" @@ -356,7 +357,7 @@ FixBondReact::FixBondReact(LAMMPS *lmp, int narg, char **arg) : "'prob' keyword has too few arguments"); // check if probability is a variable if (strncmp(arg[iarg+1],"v_",2) == 0) { - rxn.v_prob = input->variable->find(&arg[iarg][2]); + rxn.v_prob = input->variable->find(&arg[iarg+1][2]); validate_variable_keyword(&arg[iarg+1][2], rxn.v_prob); rxn.fraction = input->variable->compute_equal(rxn.v_prob); } else { @@ -490,6 +491,7 @@ FixBondReact::FixBondReact(LAMMPS *lmp, int narg, char **arg) : int idx = 1; for (auto &atm : rxn.atoms) { atm.edge = 0; + atm.wildcard = false; atm.recharged = 1; // update all partial charges by default atm.deleted = 0; atm.created = 0; @@ -1558,31 +1560,18 @@ void FixBondReact::make_a_guess(Superimpose &super, Reaction &rxn) if (assigned_count == nfirst_neighs) status = Status::GUESSFAIL; // check if all neigh atom types are the same between simulation and unreacted mol - int *mol_ntypes = new int[atom->ntypes]; - int *lcl_ntypes = new int[atom->ntypes]; - - for (int i = 0; i < atom->ntypes; i++) { - mol_ntypes[i] = 0; - lcl_ntypes[i] = 0; - } - + std::multiset mol_types, lcl_types; for (int i = 0; i < nfirst_neighs; i++) { - mol_ntypes[(int)rxn.reactant->type[(int)rxn.reactant->special[sp.pion][i]-1]-1]++; - lcl_ntypes[(int)type[(int)atom->map(xspecial[atom->map(sp.glove[sp.pion])][i])]-1]++; //added -1 + int imolatom = (int) rxn.reactant->special[sp.pion][i]-1; + if (!rxn.atoms[imolatom].wildcard) mol_types.insert(rxn.reactant->type[imolatom]); + lcl_types.insert(type[atom->map(xspecial[atom->map(sp.glove[sp.pion])][i])]); } - for (int i = 0; i < atom->ntypes; i++) { - if (mol_ntypes[i] != lcl_ntypes[i]) { - status = Status::GUESSFAIL; - delete[] mol_ntypes; - delete[] lcl_ntypes; - return; - } + if (!std::includes(lcl_types.begin(), lcl_types.end(), mol_types.begin(), mol_types.end())) { + status = Status::GUESSFAIL; + return; } - delete[] mol_ntypes; - delete[] lcl_ntypes; - // okay everything seems to be in order. let's assign some ID pairs!!! neighbor_loop(super, rxn); } @@ -1629,7 +1618,9 @@ void FixBondReact::check_a_neighbor(Superimpose &super, Reaction &rxn) for (int i = 0; i < nfirst_neighs; i++) { - if (type[(int)atom->map(xspecial[(int)atom->map(sp.glove[sp.pion])][i])] == rxn.reactant->type[(int)rxn.reactant->special[sp.pion][sp.neigh]-1] && + int checktype = type[(int)atom->map(xspecial[(int)atom->map(sp.glove[sp.pion])][i])]; + int reactant_atom = (int) rxn.reactant->special[sp.pion][sp.neigh]; + if (compare_atomtype(checktype, rxn, reactant_atom) && nxspecial[(int)atom->map(xspecial[(int)atom->map(sp.glove[sp.pion])][i])][0] == 1) { int already_assigned = 0; @@ -1680,7 +1671,9 @@ void FixBondReact::check_a_neighbor(Superimpose &super, Reaction &rxn) for (int i = 0; i < nfirst_neighs; i++) { - if (type[atom->map((int)xspecial[(int)atom->map(sp.glove[sp.pion])][i])] == rxn.reactant->type[(int)rxn.reactant->special[sp.pion][sp.neigh]-1]) { + int checktype = type[atom->map((int)xspecial[(int)atom->map(sp.glove[sp.pion])][i])]; + int reactant_atom = (int) rxn.reactant->special[sp.pion][sp.neigh]; + if (compare_atomtype(checktype, rxn, reactant_atom)) { int already_assigned = 0; //check if a first neighbor of the pioneer is already assigned to pre-reacted template @@ -1737,7 +1730,11 @@ void FixBondReact::crosscheck_the_neighbor(Superimpose &super, Reaction &rxn) } for (sp.trace = 0; sp.trace < nfirst_neighs; sp.trace++) { - if (sp.neigh != sp.trace && rxn.reactant->type[(int)rxn.reactant->special[sp.pion][sp.neigh]-1] == rxn.reactant->type[(int)rxn.reactant->special[sp.pion][sp.trace]-1] && + int reactant_atom1 = (int) rxn.reactant->special[sp.pion][sp.trace]; + int atom1type = rxn.reactant->type[reactant_atom1-1]; + int reactant_atom2 = (int) rxn.reactant->special[sp.pion][sp.neigh]; + int atom2type = rxn.reactant->type[reactant_atom2-1]; + if (sp.neigh != sp.trace && (compare_atomtype(atom2type, rxn, reactant_atom1) || compare_atomtype(atom1type, rxn, reactant_atom2)) && sp.glove[rxn.reactant->special[sp.pion][sp.trace]-1] == 0) { if (avail_guesses == MAXGUESS) { @@ -1781,7 +1778,9 @@ void FixBondReact::inner_crosscheck_loop(Superimpose &super, Reaction &rxn) int num_choices = 0; for (int i = 0; i < nfirst_neighs; i++) { - if (type[(int)atom->map(xspecial[atom->map(sp.glove[sp.pion])][i])] == rxn.reactant->type[(int)rxn.reactant->special[sp.pion][sp.neigh]-1]) { + int checktype = type[(int)atom->map(xspecial[atom->map(sp.glove[sp.pion])][i])]; + int reactant_atom = (int) rxn.reactant->special[sp.pion][sp.neigh]; + if (compare_atomtype(checktype, rxn, reactant_atom)) { if (num_choices == 5) { // here failed because too many identical first neighbors. but really no limit if situation arises status = Status::GUESSFAIL; return; @@ -1845,6 +1844,17 @@ void FixBondReact::inner_crosscheck_loop(Superimpose &super, Reaction &rxn) status = Status::CONTINUE; } +/* ---------------------------------------------------------------------- +check if an atom type matches that of a reactant atom +------------------------------------------------------------------------- */ + +bool FixBondReact::compare_atomtype(int checktype, Reaction &rxn, int reactant_atom) +{ + int iatom = reactant_atom - 1; // index of reactant atom + if (checktype == rxn.reactant->type[iatom] || rxn.atoms[iatom].wildcard) return true; + else return false; +} + /* ---------------------------------------------------------------------- Check that newly assigned atoms have correct bonds Necessary for certain ringed structures @@ -2213,14 +2223,14 @@ void FixBondReact::customvarnames() } if (pos1 == std::string::npos) break; - pos2 = varstr.find("(",pos1); - pos3 = varstr.find(")",pos2); + pos2 = varstr.find('(',pos1); + pos3 = varstr.find(')',pos2); if (pos2 == std::string::npos || pos3 == std::string::npos) error->all(FLERR,"Fix bond/react: Illegal rxn function syntax\n"); prev3 = (int)pos3; argstr = varstr.substr(pos2+1,pos3-pos2-1); argstr.erase(remove_if(argstr.begin(), argstr.end(), isspace), argstr.end()); // remove whitespace - pos2 = argstr.find(","); + pos2 = argstr.find(','); if (pos2 != std::string::npos) varid = argstr.substr(0,pos2); else varid = argstr; // check if we already know about this variable @@ -2306,15 +2316,15 @@ bool FixBondReact::custom_constraint(const std::string &varstr, Reaction &rxn, s if (pos1 == std::string::npos) break; fragid = "all"; // operate over entire reaction site by default - pos2 = varstr.find("(",pos1); - pos3 = varstr.find(")",pos2); + pos2 = varstr.find('(',pos1); + pos3 = varstr.find(')',pos2); if (pos2 == std::string::npos || pos3 == std::string::npos) error->one(FLERR,"Fix bond/react: Illegal rxn function syntax\n"); evlstr.push_back(varstr.substr(prev3+1,pos1-(prev3+1))); prev3 = pos3; argstr = varstr.substr(pos2+1,pos3-pos2-1); argstr.erase(remove_if(argstr.begin(), argstr.end(), isspace), argstr.end()); // remove whitespace - pos2 = argstr.find(","); + pos2 = argstr.find(','); if (pos2 != std::string::npos) { varid = argstr.substr(0,pos2); fragid = argstr.substr(pos2+1); @@ -2528,11 +2538,13 @@ void FixBondReact::find_landlocked_atoms(Reaction &rxn) // bad molecule templates check // if atoms change types, but aren't landlocked, that's bad for (int i = 0; i < rxn.product->natoms; i++) { - if ((rxn.atoms[i].created == 0) && - (rxn.product->type[i] != rxn.reactant->type[rxn.atoms[i].amap[1]-1]) && - (rxn.atoms[i].landlocked == 0)) - error->all(FLERR, "Fix bond/react: Atom type affected by reaction {} is too close " + if (rxn.atoms[i].created == 0) { + int checktype = rxn.product->type[i]; + int reactant_atom = rxn.atoms[i].amap[1]; + if (!compare_atomtype(checktype, rxn, reactant_atom) && rxn.atoms[i].landlocked == 0) + error->all(FLERR, "Fix bond/react: Atom type affected by reaction {} is too close " "to template edge", rxn.name); + } } // additionally, if a bond changes type, but neither involved atom is landlocked, bad @@ -3192,7 +3204,7 @@ void FixBondReact::update_everything() i_react_tags[ilocal] = rxn.ID; i_rxn_instance[ilocal] = update_mega_glove[rxn.ibonding+1][i]; - if (rxn.atoms[j].landlocked == 1) + if (rxn.atoms[j].landlocked == 1 && !rxn.atoms[j].wildcard) type[ilocal] = rxn.product->type[j]; if (rxn.product->qflag && atom->q_flag && rxn.atoms[jj].recharged == 1) { double *q = atom->q; @@ -3284,40 +3296,40 @@ void FixBondReact::update_everything() // let's first delete all bond info about landlocked atoms for (int j = 0; j < rxn.product->natoms; j++) { int jj = rxn.atoms[j].amap[1]-1; - if (atom->map(update_mega_glove[jj+1][i]) < nlocal && atom->map(update_mega_glove[jj+1][i]) >= 0) { + int jjlocal = atom->map(update_mega_glove[jj+1][i]); + if (jjlocal < nlocal && jjlocal >= 0) { if (rxn.atoms[j].landlocked == 1) { - delta_bonds -= num_bond[atom->map(update_mega_glove[jj+1][i])]; + delta_bonds -= num_bond[jjlocal]; // If deleting all bonds, first cache then remove all histories if (n_histories > 0) for (auto &ihistory: histories) { - for (int n = 0; n < num_bond[atom->map(update_mega_glove[jj+1][i])]; n++) - dynamic_cast(ihistory)->cache_history(atom->map(update_mega_glove[jj+1][i]), n); - for (int n = 0; n < num_bond[atom->map(update_mega_glove[jj+1][i])]; n++) - dynamic_cast(ihistory)->delete_history(atom->map(update_mega_glove[jj+1][i]), 0); + for (int n = 0; n < num_bond[jjlocal]; n++) + dynamic_cast(ihistory)->cache_history(jjlocal, n); + for (int n = 0; n < num_bond[jjlocal]; n++) + dynamic_cast(ihistory)->delete_history(jjlocal, 0); } - num_bond[atom->map(update_mega_glove[jj+1][i])] = 0; + num_bond[jjlocal] = 0; } if (rxn.atoms[j].landlocked == 0) { - for (int p = num_bond[atom->map(update_mega_glove[jj+1][i])]-1; p > -1 ; p--) { + for (int p = num_bond[jjlocal]-1; p > -1 ; p--) { for (int n = 0; n < rxn.product->natoms; n++) { int nn = rxn.atoms[n].amap[1]-1; - if (n!=j && bond_atom[atom->map(update_mega_glove[jj+1][i])][p] == update_mega_glove[nn+1][i] && rxn.atoms[n].landlocked == 1) { + if (n!=j && bond_atom[jjlocal][p] == update_mega_glove[nn+1][i] && rxn.atoms[n].landlocked == 1) { // Cache history information, shift history, then delete final element if (n_histories > 0) for (auto &ihistory: histories) - dynamic_cast(ihistory)->cache_history(atom->map(update_mega_glove[jj+1][i]), p); - for (int m = p; m < num_bond[atom->map(update_mega_glove[jj+1][i])]-1; m++) { - bond_type[atom->map(update_mega_glove[jj+1][i])][m] = bond_type[atom->map(update_mega_glove[jj+1][i])][m+1]; - bond_atom[atom->map(update_mega_glove[jj+1][i])][m] = bond_atom[atom->map(update_mega_glove[jj+1][i])][m+1]; + dynamic_cast(ihistory)->cache_history(jjlocal, p); + for (int m = p; m < num_bond[jjlocal]-1; m++) { + bond_type[jjlocal][m] = bond_type[jjlocal][m+1]; + bond_atom[jjlocal][m] = bond_atom[jjlocal][m+1]; if (n_histories > 0) for (auto &ihistory: histories) - dynamic_cast(ihistory)->shift_history(atom->map(update_mega_glove[jj+1][i]),m,m+1); + dynamic_cast(ihistory)->shift_history(jjlocal,m,m+1); } if (n_histories > 0) for (auto &ihistory: histories) - dynamic_cast(ihistory)->delete_history(atom->map(update_mega_glove[jj+1][i]), - num_bond[atom->map(update_mega_glove[jj+1][i])]-1); - num_bond[atom->map(update_mega_glove[jj+1][i])]--; + dynamic_cast(ihistory)->delete_history(jjlocal, num_bond[jjlocal]-1); + num_bond[jjlocal]--; delta_bonds--; } } @@ -3328,31 +3340,54 @@ void FixBondReact::update_everything() // now let's add the new bond info. for (int j = 0; j < rxn.product->natoms; j++) { int jj = rxn.atoms[j].amap[1]-1; - if (atom->map(update_mega_glove[jj+1][i]) < nlocal && atom->map(update_mega_glove[jj+1][i]) >= 0) { + int jjlocal = atom->map(update_mega_glove[jj+1][i]); + if (jjlocal < nlocal && jjlocal >= 0) { if (rxn.atoms[j].landlocked == 1) { - num_bond[atom->map(update_mega_glove[jj+1][i])] = rxn.product->num_bond[j]; + num_bond[jjlocal] = rxn.product->num_bond[j]; delta_bonds += rxn.product->num_bond[j]; for (int p = 0; p < rxn.product->num_bond[j]; p++) { - bond_type[atom->map(update_mega_glove[jj+1][i])][p] = rxn.product->bond_type[j][p]; - bond_atom[atom->map(update_mega_glove[jj+1][i])][p] = update_mega_glove[rxn.atoms[rxn.product->bond_atom[j][p]-1].amap[1]][i]; + int batom = rxn.product->bond_atom[j][p]; + int ibatom = rxn.atoms[batom-1].amap[1]-1; + int btag = update_mega_glove[ibatom+1][i]; + if (rxn.atoms[jj].wildcard || rxn.atoms[ibatom].wildcard) { + int blocal = atom->map(btag); + if (blocal < 0) error->one(FLERR,"Bond/react: Fix bond/react needs ghost atoms from further away"); + int btype = atom->lmap->infer_bondtype(type[jjlocal],type[blocal]); + if (btype == -1) error->one(FLERR,"Bond/react: Unable to infer bond type from wildcard atoms"); + bond_type[jjlocal][p] = btype; + } else { + bond_type[jjlocal][p] = rxn.product->bond_type[j][p]; + } + bond_atom[jjlocal][p] = btag; // Check cached history data to see if bond regenerated if (n_histories > 0) for (auto &ihistory: histories) - dynamic_cast(ihistory)->check_cache(atom->map(update_mega_glove[jj+1][i]), p); + dynamic_cast(ihistory)->check_cache(jjlocal, p); } } if (rxn.atoms[j].landlocked == 0) { for (int p = 0; p < rxn.product->num_bond[j]; p++) { - if (rxn.atoms[rxn.product->bond_atom[j][p]-1].landlocked == 1) { - insert_num = num_bond[atom->map(update_mega_glove[jj+1][i])]; - bond_type[atom->map(update_mega_glove[jj+1][i])][insert_num] = rxn.product->bond_type[j][p]; - bond_atom[atom->map(update_mega_glove[jj+1][i])][insert_num] = update_mega_glove[rxn.atoms[rxn.product->bond_atom[j][p]-1].amap[1]][i]; + int batom = rxn.product->bond_atom[j][p]; + if (rxn.atoms[batom-1].landlocked == 1) { + int ibatom = rxn.atoms[batom-1].amap[1]-1; + int btag = update_mega_glove[ibatom+1][i]; + insert_num = num_bond[jjlocal]; + if (rxn.atoms[jj].wildcard || rxn.atoms[ibatom].wildcard) { + int blocal = atom->map(btag); + if (blocal < 0) error->one(FLERR,"Bond/react: Fix bond/react needs ghost atoms from further away"); + int btype = atom->lmap->infer_bondtype(type[jjlocal],type[blocal]); + if (btype == -1) error->one(FLERR,"Bond/react: Unable to infer bond type from wildcard atoms"); + bond_type[jjlocal][insert_num] = btype; + } else { + bond_type[jjlocal][insert_num] = rxn.product->bond_type[j][p]; + } + bond_atom[jjlocal][insert_num] = btag; // Check cached history data to see if bond regenerated if (n_histories > 0) for (auto &ihistory: histories) - dynamic_cast(ihistory)->check_cache(atom->map(update_mega_glove[jj+1][i]), insert_num); - num_bond[atom->map(update_mega_glove[jj+1][i])]++; - if (num_bond[atom->map(update_mega_glove[jj+1][i])] > atom->bond_per_atom) + dynamic_cast(ihistory)->check_cache(jjlocal, insert_num); + num_bond[jjlocal]++; + if (num_bond[jjlocal] > atom->bond_per_atom) error->one(FLERR,"Fix bond/react topology/atom exceed system topology/atom"); delta_bonds++; } @@ -3378,26 +3413,27 @@ void FixBondReact::update_everything() auto &rxn = rxns[(int) update_mega_glove[0][i]]; for (int j = 0; j < rxn.product->natoms; j++) { int jj = rxn.atoms[j].amap[1]-1; - if (atom->map(update_mega_glove[jj+1][i]) < nlocal && atom->map(update_mega_glove[jj+1][i]) >= 0) { + int jjlocal = atom->map(update_mega_glove[jj+1][i]); + if (jjlocal < nlocal && jjlocal >= 0) { if (rxn.atoms[j].landlocked == 1) { - delta_angle -= num_angle[atom->map(update_mega_glove[jj+1][i])]; - num_angle[atom->map(update_mega_glove[jj+1][i])] = 0; + delta_angle -= num_angle[jjlocal]; + num_angle[jjlocal] = 0; } if (rxn.atoms[j].landlocked == 0) { - for (int p = num_angle[atom->map(update_mega_glove[jj+1][i])]-1; p > -1; p--) { + for (int p = num_angle[jjlocal]-1; p > -1; p--) { for (int n = 0; n < rxn.product->natoms; n++) { int nn = rxn.atoms[n].amap[1]-1; if (n!=j && rxn.atoms[n].landlocked == 1 && - (angle_atom1[atom->map(update_mega_glove[jj+1][i])][p] == update_mega_glove[nn+1][i] || - angle_atom2[atom->map(update_mega_glove[jj+1][i])][p] == update_mega_glove[nn+1][i] || - angle_atom3[atom->map(update_mega_glove[jj+1][i])][p] == update_mega_glove[nn+1][i])) { - for (int m = p; m < num_angle[atom->map(update_mega_glove[jj+1][i])]-1; m++) { - angle_type[atom->map(update_mega_glove[jj+1][i])][m] = angle_type[atom->map(update_mega_glove[jj+1][i])][m+1]; - angle_atom1[atom->map(update_mega_glove[jj+1][i])][m] = angle_atom1[atom->map(update_mega_glove[jj+1][i])][m+1]; - angle_atom2[atom->map(update_mega_glove[jj+1][i])][m] = angle_atom2[atom->map(update_mega_glove[jj+1][i])][m+1]; - angle_atom3[atom->map(update_mega_glove[jj+1][i])][m] = angle_atom3[atom->map(update_mega_glove[jj+1][i])][m+1]; + (angle_atom1[jjlocal][p] == update_mega_glove[nn+1][i] || + angle_atom2[jjlocal][p] == update_mega_glove[nn+1][i] || + angle_atom3[jjlocal][p] == update_mega_glove[nn+1][i])) { + for (int m = p; m < num_angle[jjlocal]-1; m++) { + angle_type[jjlocal][m] = angle_type[jjlocal][m+1]; + angle_atom1[jjlocal][m] = angle_atom1[jjlocal][m+1]; + angle_atom2[jjlocal][m] = angle_atom2[jjlocal][m+1]; + angle_atom3[jjlocal][m] = angle_atom3[jjlocal][m+1]; } - num_angle[atom->map(update_mega_glove[jj+1][i])]--; + num_angle[jjlocal]--; delta_angle--; break; } @@ -3410,29 +3446,74 @@ void FixBondReact::update_everything() if (rxn.product->angleflag) { for (int j = 0; j < rxn.product->natoms; j++) { int jj = rxn.atoms[j].amap[1]-1; - if (atom->map(update_mega_glove[jj+1][i]) < nlocal && atom->map(update_mega_glove[jj+1][i]) >= 0) { + int jjlocal = atom->map(update_mega_glove[jj+1][i]); + if (jjlocal < nlocal && jjlocal >= 0) { if (rxn.atoms[j].landlocked == 1) { - num_angle[atom->map(update_mega_glove[jj+1][i])] = rxn.product->num_angle[j]; + num_angle[jjlocal] = rxn.product->num_angle[j]; delta_angle += rxn.product->num_angle[j]; for (int p = 0; p < rxn.product->num_angle[j]; p++) { - angle_type[atom->map(update_mega_glove[jj+1][i])][p] = rxn.product->angle_type[j][p]; - angle_atom1[atom->map(update_mega_glove[jj+1][i])][p] = update_mega_glove[rxn.atoms[rxn.product->angle_atom1[j][p]-1].amap[1]][i]; - angle_atom2[atom->map(update_mega_glove[jj+1][i])][p] = update_mega_glove[rxn.atoms[rxn.product->angle_atom2[j][p]-1].amap[1]][i]; - angle_atom3[atom->map(update_mega_glove[jj+1][i])][p] = update_mega_glove[rxn.atoms[rxn.product->angle_atom3[j][p]-1].amap[1]][i]; + int aatom1 = rxn.product->angle_atom1[j][p]; + int aatom2 = rxn.product->angle_atom2[j][p]; + int aatom3 = rxn.product->angle_atom3[j][p]; + int iaatom1 = rxn.atoms[aatom1-1].amap[1]-1; + int iaatom2 = rxn.atoms[aatom2-1].amap[1]-1; + int iaatom3 = rxn.atoms[aatom3-1].amap[1]-1; + int atag1 = update_mega_glove[iaatom1+1][i]; + int atag2 = update_mega_glove[iaatom2+1][i]; + int atag3 = update_mega_glove[iaatom3+1][i]; + if (rxn.atoms[iaatom1].wildcard || + rxn.atoms[iaatom2].wildcard || + rxn.atoms[iaatom3].wildcard) { + int alocal1 = atom->map(atag1); + int alocal2 = atom->map(atag2); + int alocal3 = atom->map(atag3); + if (alocal1 < 0 || alocal2 < 0 || alocal3 < 0) + error->one(FLERR,"Bond/react: Fix bond/react needs ghost atoms from further away"); + int atype = atom->lmap->infer_angletype(type[alocal1],type[alocal2],type[alocal3]); + if (atype == -1) error->one(FLERR,"Bond/react: Unable to infer angle type from wildcard atoms"); + angle_type[jjlocal][p] = atype; + } else { + angle_type[jjlocal][p] = rxn.product->angle_type[j][p]; + } + angle_atom1[jjlocal][p] = atag1; + angle_atom2[jjlocal][p] = atag2; + angle_atom3[jjlocal][p] = atag3; } } if (rxn.atoms[j].landlocked == 0) { for (int p = 0; p < rxn.product->num_angle[j]; p++) { - if (rxn.atoms[rxn.product->angle_atom1[j][p]-1].landlocked == 1 || - rxn.atoms[rxn.product->angle_atom2[j][p]-1].landlocked == 1 || - rxn.atoms[rxn.product->angle_atom3[j][p]-1].landlocked == 1) { - insert_num = num_angle[atom->map(update_mega_glove[jj+1][i])]; - angle_type[atom->map(update_mega_glove[jj+1][i])][insert_num] = rxn.product->angle_type[j][p]; - angle_atom1[atom->map(update_mega_glove[jj+1][i])][insert_num] = update_mega_glove[rxn.atoms[rxn.product->angle_atom1[j][p]-1].amap[1]][i]; - angle_atom2[atom->map(update_mega_glove[jj+1][i])][insert_num] = update_mega_glove[rxn.atoms[rxn.product->angle_atom2[j][p]-1].amap[1]][i]; - angle_atom3[atom->map(update_mega_glove[jj+1][i])][insert_num] = update_mega_glove[rxn.atoms[rxn.product->angle_atom3[j][p]-1].amap[1]][i]; - num_angle[atom->map(update_mega_glove[jj+1][i])]++; - if (num_angle[atom->map(update_mega_glove[jj+1][i])] > atom->angle_per_atom) + int aatom1 = rxn.product->angle_atom1[j][p]; + int aatom2 = rxn.product->angle_atom2[j][p]; + int aatom3 = rxn.product->angle_atom3[j][p]; + if (rxn.atoms[aatom1-1].landlocked == 1 || + rxn.atoms[aatom2-1].landlocked == 1 || + rxn.atoms[aatom3-1].landlocked == 1) { + int iaatom1 = rxn.atoms[aatom1-1].amap[1]-1; + int iaatom2 = rxn.atoms[aatom2-1].amap[1]-1; + int iaatom3 = rxn.atoms[aatom3-1].amap[1]-1; + int atag1 = update_mega_glove[iaatom1+1][i]; + int atag2 = update_mega_glove[iaatom2+1][i]; + int atag3 = update_mega_glove[iaatom3+1][i]; + insert_num = num_angle[jjlocal]; + if (rxn.atoms[iaatom1].wildcard || + rxn.atoms[iaatom2].wildcard || + rxn.atoms[iaatom3].wildcard) { + int alocal1 = atom->map(atag1); + int alocal2 = atom->map(atag2); + int alocal3 = atom->map(atag3); + if (alocal1 < 0 || alocal2 < 0 || alocal3 < 0) + error->one(FLERR,"Bond/react: Fix bond/react needs ghost atoms from further away"); + int atype = atom->lmap->infer_angletype(type[alocal1],type[alocal2],type[alocal3]); + if (atype == -1) error->one(FLERR,"Bond/react: Unable to infer angle type from wildcard atoms"); + angle_type[jjlocal][insert_num] = atype; + } else { + angle_type[jjlocal][insert_num] = rxn.product->angle_type[j][p]; + } + angle_atom1[jjlocal][insert_num] = atag1; + angle_atom2[jjlocal][insert_num] = atag2; + angle_atom3[jjlocal][insert_num] = atag3; + num_angle[jjlocal]++; + if (num_angle[jjlocal] > atom->angle_per_atom) error->one(FLERR,"Fix bond/react topology/atom exceed system topology/atom"); delta_angle++; } @@ -3457,28 +3538,29 @@ void FixBondReact::update_everything() auto &rxn = rxns[(int) update_mega_glove[0][i]]; for (int j = 0; j < rxn.product->natoms; j++) { int jj = rxn.atoms[j].amap[1]-1; - if (atom->map(update_mega_glove[jj+1][i]) < nlocal && atom->map(update_mega_glove[jj+1][i]) >= 0) { + int jjlocal = atom->map(update_mega_glove[jj+1][i]); + if (jjlocal < nlocal && jjlocal >= 0) { if (rxn.atoms[j].landlocked == 1) { - delta_dihed -= num_dihedral[atom->map(update_mega_glove[jj+1][i])]; - num_dihedral[atom->map(update_mega_glove[jj+1][i])] = 0; + delta_dihed -= num_dihedral[jjlocal]; + num_dihedral[jjlocal] = 0; } if (rxn.atoms[j].landlocked == 0) { - for (int p = num_dihedral[atom->map(update_mega_glove[jj+1][i])]-1; p > -1; p--) { + for (int p = num_dihedral[jjlocal]-1; p > -1; p--) { for (int n = 0; n < rxn.product->natoms; n++) { int nn = rxn.atoms[n].amap[1]-1; if (n!=j && rxn.atoms[n].landlocked == 1 && - (dihedral_atom1[atom->map(update_mega_glove[jj+1][i])][p] == update_mega_glove[nn+1][i] || - dihedral_atom2[atom->map(update_mega_glove[jj+1][i])][p] == update_mega_glove[nn+1][i] || - dihedral_atom3[atom->map(update_mega_glove[jj+1][i])][p] == update_mega_glove[nn+1][i] || - dihedral_atom4[atom->map(update_mega_glove[jj+1][i])][p] == update_mega_glove[nn+1][i])) { - for (int m = p; m < num_dihedral[atom->map(update_mega_glove[jj+1][i])]-1; m++) { - dihedral_type[atom->map(update_mega_glove[jj+1][i])][m] = dihedral_type[atom->map(update_mega_glove[jj+1][i])][m+1]; - dihedral_atom1[atom->map(update_mega_glove[jj+1][i])][m] = dihedral_atom1[atom->map(update_mega_glove[jj+1][i])][m+1]; - dihedral_atom2[atom->map(update_mega_glove[jj+1][i])][m] = dihedral_atom2[atom->map(update_mega_glove[jj+1][i])][m+1]; - dihedral_atom3[atom->map(update_mega_glove[jj+1][i])][m] = dihedral_atom3[atom->map(update_mega_glove[jj+1][i])][m+1]; - dihedral_atom4[atom->map(update_mega_glove[jj+1][i])][m] = dihedral_atom4[atom->map(update_mega_glove[jj+1][i])][m+1]; + (dihedral_atom1[jjlocal][p] == update_mega_glove[nn+1][i] || + dihedral_atom2[jjlocal][p] == update_mega_glove[nn+1][i] || + dihedral_atom3[jjlocal][p] == update_mega_glove[nn+1][i] || + dihedral_atom4[jjlocal][p] == update_mega_glove[nn+1][i])) { + for (int m = p; m < num_dihedral[jjlocal]-1; m++) { + dihedral_type[jjlocal][m] = dihedral_type[jjlocal][m+1]; + dihedral_atom1[jjlocal][m] = dihedral_atom1[jjlocal][m+1]; + dihedral_atom2[jjlocal][m] = dihedral_atom2[jjlocal][m+1]; + dihedral_atom3[jjlocal][m] = dihedral_atom3[jjlocal][m+1]; + dihedral_atom4[jjlocal][m] = dihedral_atom4[jjlocal][m+1]; } - num_dihedral[atom->map(update_mega_glove[jj+1][i])]--; + num_dihedral[jjlocal]--; delta_dihed--; break; } @@ -3491,32 +3573,87 @@ void FixBondReact::update_everything() if (rxn.product->dihedralflag) { for (int j = 0; j < rxn.product->natoms; j++) { int jj = rxn.atoms[j].amap[1]-1; - if (atom->map(update_mega_glove[jj+1][i]) < nlocal && atom->map(update_mega_glove[jj+1][i]) >= 0) { + int jjlocal = atom->map(update_mega_glove[jj+1][i]); + if (jjlocal < nlocal && jjlocal >= 0) { if (rxn.atoms[j].landlocked == 1) { - num_dihedral[atom->map(update_mega_glove[jj+1][i])] = rxn.product->num_dihedral[j]; + num_dihedral[jjlocal] = rxn.product->num_dihedral[j]; delta_dihed += rxn.product->num_dihedral[j]; for (int p = 0; p < rxn.product->num_dihedral[j]; p++) { - dihedral_type[atom->map(update_mega_glove[jj+1][i])][p] = rxn.product->dihedral_type[j][p]; - dihedral_atom1[atom->map(update_mega_glove[jj+1][i])][p] = update_mega_glove[rxn.atoms[rxn.product->dihedral_atom1[j][p]-1].amap[1]][i]; - dihedral_atom2[atom->map(update_mega_glove[jj+1][i])][p] = update_mega_glove[rxn.atoms[rxn.product->dihedral_atom2[j][p]-1].amap[1]][i]; - dihedral_atom3[atom->map(update_mega_glove[jj+1][i])][p] = update_mega_glove[rxn.atoms[rxn.product->dihedral_atom3[j][p]-1].amap[1]][i]; - dihedral_atom4[atom->map(update_mega_glove[jj+1][i])][p] = update_mega_glove[rxn.atoms[rxn.product->dihedral_atom4[j][p]-1].amap[1]][i]; + int atom1 = rxn.product->dihedral_atom1[j][p]; + int atom2 = rxn.product->dihedral_atom2[j][p]; + int atom3 = rxn.product->dihedral_atom3[j][p]; + int atom4 = rxn.product->dihedral_atom4[j][p]; + int iatom1 = rxn.atoms[atom1-1].amap[1]-1; + int iatom2 = rxn.atoms[atom2-1].amap[1]-1; + int iatom3 = rxn.atoms[atom3-1].amap[1]-1; + int iatom4 = rxn.atoms[atom4-1].amap[1]-1; + int tag1 = update_mega_glove[iatom1+1][i]; + int tag2 = update_mega_glove[iatom2+1][i]; + int tag3 = update_mega_glove[iatom3+1][i]; + int tag4 = update_mega_glove[iatom4+1][i]; + if (rxn.atoms[iatom1].wildcard || + rxn.atoms[iatom2].wildcard || + rxn.atoms[iatom3].wildcard || + rxn.atoms[iatom4].wildcard) { + int local1 = atom->map(tag1); + int local2 = atom->map(tag2); + int local3 = atom->map(tag3); + int local4 = atom->map(tag4); + if (local1 < 0 || local2 < 0 || local3 < 0 || local4 < 0) + error->one(FLERR,"Bond/react: Fix bond/react needs ghost atoms from further away"); + int dtype = atom->lmap->infer_dihedraltype(type[local1],type[local2],type[local3],type[local4]); + if (dtype == -1) error->one(FLERR,"Bond/react: Unable to infer dihedral type from wildcard atoms"); + dihedral_type[jjlocal][p] = dtype; + } else { + dihedral_type[jjlocal][p] = rxn.product->dihedral_type[j][p]; + } + dihedral_atom1[jjlocal][p] = tag1; + dihedral_atom2[jjlocal][p] = tag2; + dihedral_atom3[jjlocal][p] = tag3; + dihedral_atom4[jjlocal][p] = tag4; } } if (rxn.atoms[j].landlocked == 0) { for (int p = 0; p < rxn.product->num_dihedral[j]; p++) { - if (rxn.atoms[rxn.product->dihedral_atom1[j][p]-1].landlocked == 1 || - rxn.atoms[rxn.product->dihedral_atom2[j][p]-1].landlocked == 1 || - rxn.atoms[rxn.product->dihedral_atom3[j][p]-1].landlocked == 1 || - rxn.atoms[rxn.product->dihedral_atom4[j][p]-1].landlocked == 1) { - insert_num = num_dihedral[atom->map(update_mega_glove[jj+1][i])]; - dihedral_type[atom->map(update_mega_glove[jj+1][i])][insert_num] = rxn.product->dihedral_type[j][p]; - dihedral_atom1[atom->map(update_mega_glove[jj+1][i])][insert_num] = update_mega_glove[rxn.atoms[rxn.product->dihedral_atom1[j][p]-1].amap[1]][i]; - dihedral_atom2[atom->map(update_mega_glove[jj+1][i])][insert_num] = update_mega_glove[rxn.atoms[rxn.product->dihedral_atom2[j][p]-1].amap[1]][i]; - dihedral_atom3[atom->map(update_mega_glove[jj+1][i])][insert_num] = update_mega_glove[rxn.atoms[rxn.product->dihedral_atom3[j][p]-1].amap[1]][i]; - dihedral_atom4[atom->map(update_mega_glove[jj+1][i])][insert_num] = update_mega_glove[rxn.atoms[rxn.product->dihedral_atom4[j][p]-1].amap[1]][i]; - num_dihedral[atom->map(update_mega_glove[jj+1][i])]++; - if (num_dihedral[atom->map(update_mega_glove[jj+1][i])] > atom->dihedral_per_atom) + int atom1 = rxn.product->dihedral_atom1[j][p]; + int atom2 = rxn.product->dihedral_atom2[j][p]; + int atom3 = rxn.product->dihedral_atom3[j][p]; + int atom4 = rxn.product->dihedral_atom4[j][p]; + if (rxn.atoms[atom1-1].landlocked == 1 || + rxn.atoms[atom2-1].landlocked == 1 || + rxn.atoms[atom3-1].landlocked == 1 || + rxn.atoms[atom4-1].landlocked == 1) { + int iatom1 = rxn.atoms[atom1-1].amap[1]-1; + int iatom2 = rxn.atoms[atom2-1].amap[1]-1; + int iatom3 = rxn.atoms[atom3-1].amap[1]-1; + int iatom4 = rxn.atoms[atom4-1].amap[1]-1; + int tag1 = update_mega_glove[iatom1+1][i]; + int tag2 = update_mega_glove[iatom2+1][i]; + int tag3 = update_mega_glove[iatom3+1][i]; + int tag4 = update_mega_glove[iatom4+1][i]; + insert_num = num_dihedral[jjlocal]; + if (rxn.atoms[iatom1].wildcard || + rxn.atoms[iatom2].wildcard || + rxn.atoms[iatom3].wildcard || + rxn.atoms[iatom4].wildcard) { + int local1 = atom->map(tag1); + int local2 = atom->map(tag2); + int local3 = atom->map(tag3); + int local4 = atom->map(tag4); + if (local1 < 0 || local2 < 0 || local3 < 0 || local4 < 0) + error->one(FLERR,"Bond/react: Fix bond/react needs ghost atoms from further away"); + int dtype = atom->lmap->infer_dihedraltype(type[local1],type[local2],type[local3],type[local4]); + if (dtype == -1) error->one(FLERR,"Bond/react: Unable to infer dihedral type from wildcard atoms"); + dihedral_type[jjlocal][insert_num] = dtype; + } else { + dihedral_type[jjlocal][insert_num] = rxn.product->dihedral_type[j][p]; + } + dihedral_atom1[jjlocal][insert_num] = tag1; + dihedral_atom2[jjlocal][insert_num] = tag2; + dihedral_atom3[jjlocal][insert_num] = tag3; + dihedral_atom4[jjlocal][insert_num] = tag4; + num_dihedral[jjlocal]++; + if (num_dihedral[jjlocal] > atom->dihedral_per_atom) error->one(FLERR,"Fix bond/react topology/atom exceed system topology/atom"); delta_dihed++; } @@ -3541,28 +3678,29 @@ void FixBondReact::update_everything() auto &rxn = rxns[(int) update_mega_glove[0][i]]; for (int j = 0; j < rxn.product->natoms; j++) { int jj = rxn.atoms[j].amap[1]-1; - if (atom->map(update_mega_glove[jj+1][i]) < nlocal && atom->map(update_mega_glove[jj+1][i]) >= 0) { + int jjlocal = atom->map(update_mega_glove[jj+1][i]); + if (jjlocal < nlocal && jjlocal >= 0) { if (rxn.atoms[j].landlocked == 1) { - delta_imprp -= num_improper[atom->map(update_mega_glove[jj+1][i])]; - num_improper[atom->map(update_mega_glove[jj+1][i])] = 0; + delta_imprp -= num_improper[jjlocal]; + num_improper[jjlocal] = 0; } if (rxn.atoms[j].landlocked == 0) { - for (int p = num_improper[atom->map(update_mega_glove[jj+1][i])]-1; p > -1; p--) { + for (int p = num_improper[jjlocal]-1; p > -1; p--) { for (int n = 0; n < rxn.product->natoms; n++) { int nn = rxn.atoms[n].amap[1]-1; if (n!=j && rxn.atoms[n].landlocked == 1 && - (improper_atom1[atom->map(update_mega_glove[jj+1][i])][p] == update_mega_glove[nn+1][i] || - improper_atom2[atom->map(update_mega_glove[jj+1][i])][p] == update_mega_glove[nn+1][i] || - improper_atom3[atom->map(update_mega_glove[jj+1][i])][p] == update_mega_glove[nn+1][i] || - improper_atom4[atom->map(update_mega_glove[jj+1][i])][p] == update_mega_glove[nn+1][i])) { - for (int m = p; m < num_improper[atom->map(update_mega_glove[jj+1][i])]-1; m++) { - improper_type[atom->map(update_mega_glove[jj+1][i])][m] = improper_type[atom->map(update_mega_glove[jj+1][i])][m+1]; - improper_atom1[atom->map(update_mega_glove[jj+1][i])][m] = improper_atom1[atom->map(update_mega_glove[jj+1][i])][m+1]; - improper_atom2[atom->map(update_mega_glove[jj+1][i])][m] = improper_atom2[atom->map(update_mega_glove[jj+1][i])][m+1]; - improper_atom3[atom->map(update_mega_glove[jj+1][i])][m] = improper_atom3[atom->map(update_mega_glove[jj+1][i])][m+1]; - improper_atom4[atom->map(update_mega_glove[jj+1][i])][m] = improper_atom4[atom->map(update_mega_glove[jj+1][i])][m+1]; + (improper_atom1[jjlocal][p] == update_mega_glove[nn+1][i] || + improper_atom2[jjlocal][p] == update_mega_glove[nn+1][i] || + improper_atom3[jjlocal][p] == update_mega_glove[nn+1][i] || + improper_atom4[jjlocal][p] == update_mega_glove[nn+1][i])) { + for (int m = p; m < num_improper[jjlocal]-1; m++) { + improper_type[jjlocal][m] = improper_type[jjlocal][m+1]; + improper_atom1[jjlocal][m] = improper_atom1[jjlocal][m+1]; + improper_atom2[jjlocal][m] = improper_atom2[jjlocal][m+1]; + improper_atom3[jjlocal][m] = improper_atom3[jjlocal][m+1]; + improper_atom4[jjlocal][m] = improper_atom4[jjlocal][m+1]; } - num_improper[atom->map(update_mega_glove[jj+1][i])]--; + num_improper[jjlocal]--; delta_imprp--; break; } @@ -3575,32 +3713,87 @@ void FixBondReact::update_everything() if (rxn.product->improperflag) { for (int j = 0; j < rxn.product->natoms; j++) { int jj = rxn.atoms[j].amap[1]-1; - if (atom->map(update_mega_glove[jj+1][i]) < nlocal && atom->map(update_mega_glove[jj+1][i]) >= 0) { + int jjlocal = atom->map(update_mega_glove[jj+1][i]); + if (jjlocal < nlocal && jjlocal >= 0) { if (rxn.atoms[j].landlocked == 1) { - num_improper[atom->map(update_mega_glove[jj+1][i])] = rxn.product->num_improper[j]; + num_improper[jjlocal] = rxn.product->num_improper[j]; delta_imprp += rxn.product->num_improper[j]; for (int p = 0; p < rxn.product->num_improper[j]; p++) { - improper_type[atom->map(update_mega_glove[jj+1][i])][p] = rxn.product->improper_type[j][p]; - improper_atom1[atom->map(update_mega_glove[jj+1][i])][p] = update_mega_glove[rxn.atoms[rxn.product->improper_atom1[j][p]-1].amap[1]][i]; - improper_atom2[atom->map(update_mega_glove[jj+1][i])][p] = update_mega_glove[rxn.atoms[rxn.product->improper_atom2[j][p]-1].amap[1]][i]; - improper_atom3[atom->map(update_mega_glove[jj+1][i])][p] = update_mega_glove[rxn.atoms[rxn.product->improper_atom3[j][p]-1].amap[1]][i]; - improper_atom4[atom->map(update_mega_glove[jj+1][i])][p] = update_mega_glove[rxn.atoms[rxn.product->improper_atom4[j][p]-1].amap[1]][i]; + int atom1 = rxn.product->improper_atom1[j][p]; + int atom2 = rxn.product->improper_atom2[j][p]; + int atom3 = rxn.product->improper_atom3[j][p]; + int atom4 = rxn.product->improper_atom4[j][p]; + int iatom1 = rxn.atoms[atom1-1].amap[1]-1; + int iatom2 = rxn.atoms[atom2-1].amap[1]-1; + int iatom3 = rxn.atoms[atom3-1].amap[1]-1; + int iatom4 = rxn.atoms[atom4-1].amap[1]-1; + int tag1 = update_mega_glove[iatom1+1][i]; + int tag2 = update_mega_glove[iatom2+1][i]; + int tag3 = update_mega_glove[iatom3+1][i]; + int tag4 = update_mega_glove[iatom4+1][i]; + if (rxn.atoms[iatom1].wildcard || + rxn.atoms[iatom2].wildcard || + rxn.atoms[iatom3].wildcard || + rxn.atoms[iatom4].wildcard) { + int local1 = atom->map(tag1); + int local2 = atom->map(tag2); + int local3 = atom->map(tag3); + int local4 = atom->map(tag4); + if (local1 < 0 || local2 < 0 || local3 < 0 || local4 < 0) + error->one(FLERR,"Bond/react: Fix bond/react needs ghost atoms from further away"); + int itype = atom->lmap->infer_impropertype(type[local1],type[local2],type[local3],type[local4]); + if (itype == -1) error->one(FLERR,"Bond/react: Unable to infer improper type from wildcard atoms"); + improper_type[jjlocal][p] = itype; + } else { + improper_type[jjlocal][p] = rxn.product->improper_type[j][p]; + } + improper_atom1[jjlocal][p] = tag1; + improper_atom2[jjlocal][p] = tag2; + improper_atom3[jjlocal][p] = tag3; + improper_atom4[jjlocal][p] = tag4; } } if (rxn.atoms[j].landlocked == 0) { for (int p = 0; p < rxn.product->num_improper[j]; p++) { - if (rxn.atoms[rxn.product->improper_atom1[j][p]-1].landlocked == 1 || - rxn.atoms[rxn.product->improper_atom2[j][p]-1].landlocked == 1 || - rxn.atoms[rxn.product->improper_atom3[j][p]-1].landlocked == 1 || - rxn.atoms[rxn.product->improper_atom4[j][p]-1].landlocked == 1) { - insert_num = num_improper[atom->map(update_mega_glove[jj+1][i])]; - improper_type[atom->map(update_mega_glove[jj+1][i])][insert_num] = rxn.product->improper_type[j][p]; - improper_atom1[atom->map(update_mega_glove[jj+1][i])][insert_num] = update_mega_glove[rxn.atoms[rxn.product->improper_atom1[j][p]-1].amap[1]][i]; - improper_atom2[atom->map(update_mega_glove[jj+1][i])][insert_num] = update_mega_glove[rxn.atoms[rxn.product->improper_atom2[j][p]-1].amap[1]][i]; - improper_atom3[atom->map(update_mega_glove[jj+1][i])][insert_num] = update_mega_glove[rxn.atoms[rxn.product->improper_atom3[j][p]-1].amap[1]][i]; - improper_atom4[atom->map(update_mega_glove[jj+1][i])][insert_num] = update_mega_glove[rxn.atoms[rxn.product->improper_atom4[j][p]-1].amap[1]][i]; - num_improper[atom->map(update_mega_glove[jj+1][i])]++; - if (num_improper[atom->map(update_mega_glove[jj+1][i])] > atom->improper_per_atom) + int atom1 = rxn.product->improper_atom1[j][p]; + int atom2 = rxn.product->improper_atom2[j][p]; + int atom3 = rxn.product->improper_atom3[j][p]; + int atom4 = rxn.product->improper_atom4[j][p]; + if (rxn.atoms[atom1-1].landlocked == 1 || + rxn.atoms[atom2-1].landlocked == 1 || + rxn.atoms[atom3-1].landlocked == 1 || + rxn.atoms[atom4-1].landlocked == 1) { + int iatom1 = rxn.atoms[atom1-1].amap[1]-1; + int iatom2 = rxn.atoms[atom2-1].amap[1]-1; + int iatom3 = rxn.atoms[atom3-1].amap[1]-1; + int iatom4 = rxn.atoms[atom4-1].amap[1]-1; + int tag1 = update_mega_glove[iatom1+1][i]; + int tag2 = update_mega_glove[iatom2+1][i]; + int tag3 = update_mega_glove[iatom3+1][i]; + int tag4 = update_mega_glove[iatom4+1][i]; + insert_num = num_improper[jjlocal]; + if (rxn.atoms[iatom1].wildcard || + rxn.atoms[iatom2].wildcard || + rxn.atoms[iatom3].wildcard || + rxn.atoms[iatom4].wildcard) { + int local1 = atom->map(tag1); + int local2 = atom->map(tag2); + int local3 = atom->map(tag3); + int local4 = atom->map(tag4); + if (local1 < 0 || local2 < 0 || local3 < 0 || local4 < 0) + error->one(FLERR,"Bond/react: Fix bond/react needs ghost atoms from further away"); + int itype = atom->lmap->infer_impropertype(type[local1],type[local2],type[local3],type[local4]); + if (itype == -1) error->one(FLERR,"Bond/react: Unable to infer improper type from wildcard atoms"); + improper_type[jjlocal][insert_num] = itype; + } else { + improper_type[jjlocal][insert_num] = rxn.product->improper_type[j][p]; + } + improper_atom1[jjlocal][insert_num] = tag1; + improper_atom2[jjlocal][insert_num] = tag2; + improper_atom3[jjlocal][insert_num] = tag3; + improper_atom4[jjlocal][insert_num] = tag4; + num_improper[jjlocal]++; + if (num_improper[jjlocal] > atom->improper_per_atom) error->one(FLERR,"Fix bond/react topology/atom exceed system topology/atom"); delta_imprp++; } @@ -3993,7 +4186,7 @@ read map file void FixBondReact::read_map_file(Reaction &rxn) { - int rv, nedge, nequivalent, nchiral, ndelete, ncreate = 0; + int rv, nedge, nequivalent, nchiral, nwild, ndelete, ncreate = 0; char line[MAXLINE] = {'\0'}; char keyword[MAXLINE] = {'\0'}; char *eof,*ptr; @@ -4033,6 +4226,9 @@ void FixBondReact::read_map_file(Reaction &rxn) } else if (strstr(line,"chiralIDs")) { rv = sscanf(line,"%d",&nchiral); if (rv != 1) error->one(FLERR, "Map file header is incorrectly formatted"); + } else if (strstr(line,"wildcards")) { + rv = sscanf(line,"%d",&nwild); + if (rv != 1) error->one(FLERR, "Map file header is incorrectly formatted"); } else if (strstr(line,"constraints")) { int nconstraints; rv = sscanf(line,"%d",&nconstraints); @@ -4081,6 +4277,8 @@ void FixBondReact::read_map_file(Reaction &rxn) CreateAtoms(line, rxn, ncreate); } else if (strcmp(keyword,"ChiralIDs") == 0) { ChiralCenters(line, rxn, nchiral); + } else if (strcmp(keyword,"Wildcards") == 0) { + ReadWildcards(line, rxn, nwild); } else if (strcmp(keyword,"Constraints") == 0) { ReadConstraints(line, rxn); } else error->one(FLERR,"Fix bond/react: Unknown section in map file"); @@ -4222,6 +4420,18 @@ void FixBondReact::ChiralCenters(char *line, Reaction &rxn, int nchiral) } } +void FixBondReact::ReadWildcards(char *line, Reaction &rxn, int nwild) +{ + int tmp; + for (int i = 0; i < nwild; i++) { + readline(line); + sscanf(line,"%d",&tmp); + if (tmp > rxn.reactant->natoms) + error->one(FLERR,"Bond/react: Invalid template atom ID in map file"); + rxn.atoms[tmp-1].wildcard = true; + } +} + void FixBondReact::ReadConstraints(char *line, Reaction &rxn) { int rv; diff --git a/src/REACTION/fix_bond_react.h b/src/REACTION/fix_bond_react.h index d1794a1f8f9..cbc6548d6a0 100644 --- a/src/REACTION/fix_bond_react.h +++ b/src/REACTION/fix_bond_react.h @@ -115,6 +115,7 @@ class FixBondReact : public Fix { struct ReactionAtomFlags { int edge; // true if atom in molecule template has incorrect valency int landlocked; // true if atom is at least three bonds away from edge atoms + bool wildcard; // true if atom type contains a wildcard int recharged; // true if atom whose charge should be updated int deleted; // true if atom in pre-reacted template to delete int created; // true if atom in post-reacted template to create @@ -210,6 +211,7 @@ class FixBondReact : public Fix { void CreateAtoms(char *, Reaction &, int); void CustomCharges(int, Reaction &); void ChiralCenters(char *, Reaction &, int); + void ReadWildcards(char *, Reaction &, int); void ReadConstraints(char *, Reaction &); void readID(char *, Reaction::Constraint &, Reaction &, int); @@ -219,6 +221,7 @@ class FixBondReact : public Fix { void check_a_neighbor(Superimpose &, Reaction &); void crosscheck_the_neighbor(Superimpose &, Reaction &); void inner_crosscheck_loop(Superimpose &, Reaction &); + bool compare_atomtype(int, Reaction &, int); int ring_check(Reaction &, std::vector &); int check_constraints(Reaction &, std::vector &); void get_IDcoords(Reaction::Constraint::IDType, int, double *, Molecule *, std::vector &); diff --git a/src/REAXFF/reaxff_control.cpp b/src/REAXFF/reaxff_control.cpp index 4457013d7c9..eed86fb09f2 100644 --- a/src/REAXFF/reaxff_control.cpp +++ b/src/REAXFF/reaxff_control.cpp @@ -54,7 +54,7 @@ namespace ReaxFF { explicit control_parser_error(const std::string &format, const std::string &keyword) { message = fmt::format(fmt::runtime(format), keyword); } - const char *what() const noexcept override { return message.c_str(); } + [[nodiscard]] const char *what() const noexcept override { return message.c_str(); } }; // NOTE: this function is run on MPI rank 0 only diff --git a/src/REAXFF/reaxff_ffield.cpp b/src/REAXFF/reaxff_ffield.cpp index 57cdf301bd2..e0b30a9f904 100644 --- a/src/REAXFF/reaxff_ffield.cpp +++ b/src/REAXFF/reaxff_ffield.cpp @@ -50,7 +50,7 @@ namespace ReaxFF { std::string message; public: explicit ffield_parser_error(const std::string &mesg) { message = mesg; } - const char *what() const noexcept override { return message.c_str(); } + [[nodiscard]] const char *what() const noexcept override { return message.c_str(); } }; void Read_Force_Field(const char *filename, reax_interaction *reax, @@ -85,7 +85,7 @@ namespace ReaxFF { // check if header comment line is present auto *line = reader.next_line(); - if (strmatch(line, "^\\s*[0-9]+\\s+!.*general parameters.*")) + if (strmatch(line, R"(^\s*[0-9]+\s+!.*general parameters.*)")) THROW_ERROR("First line of ReaxFF potential file must be a comment or empty"); ++lineno; @@ -237,7 +237,7 @@ namespace ReaxFF { // if line does not start with a floating point number, i.e. is the start // of the data for the next element, the file does not support lgflag != 0 - if (!values.matches("^\\s*\\f+\\s*")) + if (!values.matches(R"(^\s*\f+\s*)")) THROW_ERROR("ReaxFF potential file is not compatible with 'lgvdw yes'"); CHECK_COLUMNS(2); diff --git a/src/REPLICA/bosonic_exchange.h b/src/REPLICA/bosonic_exchange.h index 2774cfe8353..9738614c44f 100644 --- a/src/REPLICA/bosonic_exchange.h +++ b/src/REPLICA/bosonic_exchange.h @@ -27,8 +27,8 @@ class BosonicExchange : protected Pointers { void prepare_with_coordinates(const double *x, const double *x_prev, const double *x_next, double beta, double spring_constant); - double get_potential() const; - double get_bead_spring_energy() const; + [[nodiscard]] double get_potential() const; + [[nodiscard]] double get_bead_spring_energy() const; void spring_force(double **f) const; @@ -37,9 +37,9 @@ class BosonicExchange : protected Pointers { private: void evaluate_cycle_energies(); void diff_two_beads(const double *x1, int l1, const double *x2, int l2, double diff[3]) const; - double get_interior_bead_spring_energy() const; + [[nodiscard]] double get_interior_bead_spring_energy() const; double distance_squared_two_beads(const double *x1, int l1, const double *x2, int l2) const; - double get_Enk(int m, int k) const; + [[nodiscard]] double get_Enk(int m, int k) const; void set_Enk(int m, int k, double val); void evaluate_connection_probabilities(); void spring_force_last_bead(double **f) const; diff --git a/src/RIGID/rigid_const.h b/src/RIGID/rigid_const.h index 690848663ca..69bed21cfac 100644 --- a/src/RIGID/rigid_const.h +++ b/src/RIGID/rigid_const.h @@ -15,8 +15,8 @@ #ifndef LMP_RIGID_CONST_H #define LMP_RIGID_CONST_H -namespace LAMMPS_NS { - namespace RigidConst { + + namespace LAMMPS_NS::RigidConst { enum{SINGLE, MOLECULE, GROUP}; enum{NONE, XYZ, XY, YZ, XZ}; @@ -50,6 +50,6 @@ namespace LAMMPS_NS { static constexpr int DELTA_BODY = 10000; static constexpr int ATTRIBUTE_PERBODY = 20; } -} + #endif diff --git a/src/UEF/uef_utils.cpp b/src/UEF/uef_utils.cpp index 7d82c4369de..5a7ed488346 100644 --- a/src/UEF/uef_utils.cpp +++ b/src/UEF/uef_utils.cpp @@ -26,8 +26,8 @@ #include #include "uef_utils.h" -namespace LAMMPS_NS { - namespace UEF_utils{ + + namespace LAMMPS_NS::UEF_utils{ UEFBox::UEFBox() { @@ -447,4 +447,4 @@ void make_unique(double b[3][3], int r[3][3], int ri[3][3]) neg_col(ri,2); } } -}} +} diff --git a/src/UEF/uef_utils.h b/src/UEF/uef_utils.h index 5f184316703..cad3f7dcedf 100644 --- a/src/UEF/uef_utils.h +++ b/src/UEF/uef_utils.h @@ -16,8 +16,8 @@ #ifndef LMP_UEF_UTILS_H #define LMP_UEF_UTILS_H -namespace LAMMPS_NS { -namespace UEF_utils { + +namespace LAMMPS_NS::UEF_utils { class UEFBox { public: @@ -126,6 +126,6 @@ namespace UEF_utils { m2[k][j] = m1[k][0] * t[0][j] + m1[k][1] * t[1][j] + m1[k][2] * t[2][j]; } -} // namespace UEF_utils -} // namespace LAMMPS_NS +} // namespace LAMMPS_NS::UEF_utils + #endif diff --git a/src/arg_info.h b/src/arg_info.h index f77f2d85f34..c786e7924cf 100644 --- a/src/arg_info.h +++ b/src/arg_info.h @@ -63,7 +63,7 @@ class ArgInfo { * * \return integer with a constant from ArgTypes enumerator */ - int get_type() const { return type; } + [[nodiscard]] int get_type() const { return type; } /*! get dimension of reference * @@ -71,7 +71,7 @@ class ArgInfo { * reference has no, one or two "[{number}]" postfixes. * * \return integer with the dimensionality of the reference */ - int get_dim() const { return dim; } + [[nodiscard]] int get_dim() const { return dim; } /*! get index of first dimension * @@ -79,7 +79,7 @@ class ArgInfo { * postfix or 0 if there is no postfix. * * \return integer with index or the postfix or 0 */ - int get_index1() const { return index1; } + [[nodiscard]] int get_index1() const { return index1; } /*! get index of second dimension * @@ -87,7 +87,7 @@ class ArgInfo { * postfix or -1 if there is no second postfix. * * \return integer with index of the postfix or -1 */ - int get_index2() const { return index2; } + [[nodiscard]] int get_index2() const { return index2; } /*! return reference to the ID or name of the reference * @@ -97,7 +97,7 @@ class ArgInfo { * with copy_name(). * * \return C-style char * string */ - const char *get_name() const { return name.c_str(); } + [[nodiscard]] const char *get_name() const { return name.c_str(); } char *copy_name(); diff --git a/src/compute.h b/src/compute.h index 602467130c4..2ffacfd921e 100644 --- a/src/compute.h +++ b/src/compute.h @@ -168,7 +168,7 @@ class Compute : protected Pointers { int matchstep(bigint); void clearstep(); - bool is_initialized() const { return initialized_flag == 1; } + [[nodiscard]] bool is_initialized() const { return initialized_flag == 1; } virtual double memory_usage() { return 0.0; } @@ -191,7 +191,7 @@ class Compute : protected Pointers { double **vbiasall; // stored velocity bias for all atoms int maxbias; // size of vbiasall array - inline int sbmask(int j) const { return j >> SBBITS & 3; } + [[nodiscard]] int sbmask(int j) const { return j >> SBBITS & 3; } // private methods diff --git a/src/compute_bond_local.cpp b/src/compute_bond_local.cpp index 9e37d67b92b..e3aa7135bfb 100644 --- a/src/compute_bond_local.cpp +++ b/src/compute_bond_local.cpp @@ -112,7 +112,7 @@ ComputeBondLocal::ComputeBondLocal(LAMMPS *lmp, int narg, char **arg) : bstyle[nvalues++] = VARIABLE; vstr[nvar] = utils::strdup(&arg[iarg][2]); nvar++; - } else if (utils::strmatch(arg[iarg], "^b\\d+$")) { // b1, b2, b3, ... bN + } else if (utils::strmatch(arg[iarg], R"(^b\d+$)")) { // b1, b2, b3, ... bN int n = std::stoi(&arg[iarg][1]); if (n <= 0) error->all(FLERR, "Invalid keyword {} in compute bond/local command", arg[iarg]); bstyle[nvalues] = BN; diff --git a/src/compute_pair_local.cpp b/src/compute_pair_local.cpp index 33ec552b902..e69706a1fc8 100644 --- a/src/compute_pair_local.cpp +++ b/src/compute_pair_local.cpp @@ -66,7 +66,7 @@ ComputePairLocal::ComputePairLocal(LAMMPS *lmp, int narg, char **arg) : pstyle[nvalues++] = DY; else if (strcmp(arg[iarg], "dz") == 0) pstyle[nvalues++] = DZ; - else if (utils::strmatch(arg[iarg], "^p\\d+$")) { // p1, p2, p3, ... pN + else if (utils::strmatch(arg[iarg], R"(^p\d+$)")) { // p1, p2, p3, ... pN int n = std::stoi(&arg[iarg][1]); if (n <= 0) error->all(FLERR, "Invalid keyword {} in compute pair/local command", arg[iarg]); pstyle[nvalues] = PN; diff --git a/src/delete_atoms.h b/src/delete_atoms.h index 9b75caa0c4b..48c75ab3a45 100644 --- a/src/delete_atoms.h +++ b/src/delete_atoms.h @@ -46,7 +46,7 @@ class DeleteAtoms : public Command { void recount_topology(); void options(int, char **); - inline int sbmask(int j) const { return j >> SBBITS & 3; } + [[nodiscard]] int sbmask(int j) const { return j >> SBBITS & 3; } // callback functions for ring communication diff --git a/src/error.h b/src/error.h index f9c0c7c3f94..a448265271b 100644 --- a/src/error.h +++ b/src/error.h @@ -84,14 +84,14 @@ class Error : protected Pointers { [[noreturn]] void done(int = 0); // 1 would be fully backwards compatible - int get_numwarn() const { return numwarn; } - int get_maxwarn() const { return maxwarn; } + [[nodiscard]] int get_numwarn() const { return numwarn; } + [[nodiscard]] int get_maxwarn() const { return maxwarn; } void set_numwarn(int val) { numwarn = val; } void set_maxwarn(int val) { maxwarn = val; } void set_allwarn(int val) { allwarn = val; } - std::string get_last_error() const; - ErrorType get_last_error_type() const; + [[nodiscard]] std::string get_last_error() const; + [[nodiscard]] ErrorType get_last_error_type() const; void set_last_error(const std::string &msg, ErrorType type = ERROR_NORMAL); int set_show_error(const int flag); diff --git a/src/ewald_const.h b/src/ewald_const.h index f529fb911a0..b9cdb140592 100644 --- a/src/ewald_const.h +++ b/src/ewald_const.h @@ -14,8 +14,8 @@ #ifndef LMP_EWALD_CONST_H #define LMP_EWALD_CONST_H -namespace LAMMPS_NS { -namespace EwaldConst { + +namespace LAMMPS_NS::EwaldConst { static constexpr double EWALD_F = 1.12837917; static constexpr double EWALD_P = 0.3275911; static constexpr double A1 = 0.254829592; @@ -23,7 +23,7 @@ namespace EwaldConst { static constexpr double A3 = 1.421413741; static constexpr double A4 = -1.453152027; static constexpr double A5 = 1.061405429; -} // namespace EwaldConst -} // namespace LAMMPS_NS +} // namespace LAMMPS_NS::EwaldConst + #endif diff --git a/src/exceptions.h b/src/exceptions.h index c03881b5a5d..280802f796b 100644 --- a/src/exceptions.h +++ b/src/exceptions.h @@ -23,7 +23,7 @@ namespace LAMMPS_NS { class LAMMPSException : public std::exception { public: LAMMPSException(const std::string &msg) : message(msg) {} - const char *what() const noexcept override { return message.c_str(); } + [[nodiscard]] const char *what() const noexcept override { return message.c_str(); } protected: std::string message; @@ -35,7 +35,7 @@ class LAMMPSAbortException : public LAMMPSException { LAMMPSException(msg), universe(_universe) { } - MPI_Comm get_universe() const { return universe; } + [[nodiscard]] MPI_Comm get_universe() const { return universe; } protected: MPI_Comm universe; diff --git a/src/file_writer.h b/src/file_writer.h index 0d686038385..28d1743878b 100644 --- a/src/file_writer.h +++ b/src/file_writer.h @@ -30,7 +30,7 @@ class FileWriter { virtual void close() = 0; virtual void flush() = 0; virtual size_t write(const void *buffer, size_t length) = 0; - virtual bool isopen() const = 0; + [[nodiscard]] virtual bool isopen() const = 0; }; class FileWriterException : public std::exception { @@ -39,7 +39,7 @@ class FileWriterException : public std::exception { public: FileWriterException(const std::string &msg) : message(msg) {} - const char *what() const noexcept override { return message.c_str(); } + [[nodiscard]] const char *what() const noexcept override { return message.c_str(); } }; } // namespace LAMMPS_NS diff --git a/src/fix_bond_history.cpp b/src/fix_bond_history.cpp index bb97014acf5..f78539de11f 100644 --- a/src/fix_bond_history.cpp +++ b/src/fix_bond_history.cpp @@ -403,6 +403,7 @@ void FixBondHistory::cache_history(int i, int m) // Copy data to vector double **stored = atom->darray[index]; std::vector data; + data.reserve(ndata); for (int idata = 0; idata < ndata; idata++) data.push_back(stored[i][m * ndata + idata]); // Add data to cache diff --git a/src/fix_bond_history.h b/src/fix_bond_history.h index 7e8c998b72c..4ea8dc367e2 100644 --- a/src/fix_bond_history.h +++ b/src/fix_bond_history.h @@ -44,7 +44,7 @@ class FixBondHistory : public Fix { void update_atom_value(int, int, int, double); double get_atom_value(int, int, int); - int get_ndata() const { return ndata; } + [[nodiscard]] int get_ndata() const { return ndata; } // methods to reorder/delete elements of atom->bond_atom void delete_history(int, int); diff --git a/src/fix_neigh_history.h b/src/fix_neigh_history.h index 0d5f127de07..f2d4f68027e 100644 --- a/src/fix_neigh_history.h +++ b/src/fix_neigh_history.h @@ -60,8 +60,8 @@ class FixNeighHistory : public Fix { int size_restart(int) override; int maxsize_restart() override; - int get_dnum() const { return dnum; } - int get_maxpartner() const { return maxpartner; } + [[nodiscard]] int get_dnum() const { return dnum; } + [[nodiscard]] int get_maxpartner() const { return maxpartner; } protected: int newton_pair; // same as force setting @@ -97,7 +97,7 @@ class FixNeighHistory : public Fix { void allocate_pages(); // Shift by HISTBITS and check the first bit - inline int histmask(int j) const { return j >> HISTBITS & 1; } + [[nodiscard]] int histmask(int j) const { return j >> HISTBITS & 1; } enum { DEFAULT, NPARTNER, PERPARTNER }; }; diff --git a/src/group.cpp b/src/group.cpp index 48a89dfbdff..461f13f08f3 100644 --- a/src/group.cpp +++ b/src/group.cpp @@ -335,11 +335,11 @@ void Group::assign(int narg, char **arg) try { ValueTokenizer values(arg[iarg], ":"); start = values.next_tagint(); - if (utils::strmatch(arg[iarg], "^-?\\d+$")) { + if (utils::strmatch(arg[iarg], R"(^-?\d+$)")) { stop = start; - } else if (utils::strmatch(arg[iarg], "^-?\\d+:-?\\d+$")) { + } else if (utils::strmatch(arg[iarg], R"(^-?\d+:-?\d+$)")) { stop = values.next_tagint(); - } else if (utils::strmatch(arg[iarg], "^-?\\d+:-?\\d+:\\d+$")) { + } else if (utils::strmatch(arg[iarg], R"(^-?\d+:-?\d+:\d+$)")) { stop = values.next_tagint(); delta = values.next_tagint(); } else diff --git a/src/input.cpp b/src/input.cpp index 0914132a5de..12494c5b7bd 100644 --- a/src/input.cpp +++ b/src/input.cpp @@ -461,8 +461,8 @@ void Input::parse() error->all(FLERR,"Unmatched single quote in command: {}",line); ptr = ptrmatch + 1; } else if (*ptr == '"') { - if (strstr(ptr,"\"\"\"") == ptr) { - ptrmatch = strstr(ptr+3,"\"\"\""); + if (strstr(ptr,R"(""")") == ptr) { + ptrmatch = strstr(ptr+3,R"(""")"); if (ptrmatch == nullptr) error->all(FLERR,"Unmatched triple quote in command: {}",line); ptr = ptrmatch + 3; @@ -542,8 +542,8 @@ char *Input::nextword(char *str, char **next) // stop = first whitespace char after start // next = char after stop, or stop itself if stop is null char - if (strstr(start,"\"\"\"") == start) { - stop = strstr(&start[3],"\"\"\""); + if (strstr(start,R"(""")") == start) { + stop = strstr(&start[3],R"(""")"); if (!stop) error->all(FLERR,"Unbalanced quotes in input line"); start += 3; *next = stop+3; @@ -655,7 +655,7 @@ void Input::substitute(char *&str, char *&str2, int &max, int &max2, int flag) // quick check for proper format string - if (!utils::strmatch(fmtstr,"%[0-9 ]*\\.[0-9]+[efgEFG]")) + if (!utils::strmatch(fmtstr,R"(%[0-9 ]*\.[0-9]+[efgEFG])")) error->all(FLERR,"Incorrect conversion in format string"); snprintf(immediate,256,fmtstr,variable->compute_equal(var)); @@ -701,8 +701,8 @@ void Input::substitute(char *&str, char *&str2, int &max, int &max2, int flag) ptr += nchars; ptr2 += nchars; } else if (*ptr == '"') { - if (strstr(ptr,"\"\"\"") == ptr) { - ptrmatch = strstr(ptr+3,"\"\"\""); + if (strstr(ptr,R"(""")") == ptr) { + ptrmatch = strstr(ptr+3,R"(""")"); if (ptrmatch == nullptr) error->all(FLERR,"Unmatched triple quote in command"); nchars = ptrmatch+3 - ptr; @@ -743,7 +743,7 @@ int Input::numtriple(char *line) { int count = 0; char *ptr = line; - while ((ptr = strstr(ptr,"\"\"\""))) { + while ((ptr = strstr(ptr,R"(""")"))) { ptr += 3; count++; } @@ -945,7 +945,7 @@ void Input::ifthenelse() // bound "then" commands if (strcmp(arg[1],"then") != 0) - error->all(FLERR, 1, "Illegal if command: expected \"then\" but found \"{}\"", arg[1]); + error->all(FLERR, 1, R"(Illegal if command: expected "then" but found "{}")", arg[1]); int first = 2; int iarg = first; @@ -1794,7 +1794,7 @@ void Input::pair_coeff() // if arg[1] < arg[0], and neither contain a wildcard, reorder int itype,jtype; - if (utils::strmatch(arg[0],"^\\d+$") && utils::strmatch(arg[1],"^\\d+$")) { + if (utils::strmatch(arg[0], R"(^\d+$)") && utils::strmatch(arg[1],R"(^\d+$)")) { itype = utils::inumeric(FLERR,arg[0],false,lmp); jtype = utils::inumeric(FLERR,arg[1],false,lmp); if (jtype < itype) { diff --git a/src/input.h b/src/input.h index 949a70defd3..d6c3bfd5a1c 100644 --- a/src/input.h +++ b/src/input.h @@ -42,7 +42,7 @@ class Input : protected Pointers { char *one(const std::string &); // process a single command void substitute(char *&, char *&, int &, int &, int); // substitute for variables in a string void write_echo(const std::string &); // send text to active echo file pointers - int get_jump_skip() const { return jump_skip; } + [[nodiscard]] int get_jump_skip() const { return jump_skip; } protected: int echo_screen; // 0 = no, 1 = yes diff --git a/src/kspace.h b/src/kspace.h index eff18cf7960..214d0a63cc1 100644 --- a/src/kspace.h +++ b/src/kspace.h @@ -180,7 +180,7 @@ class KSpace : protected Pointers { see Eq 4 from Parallel Computing 35 (2009) 164-177 ------------------------------------------------------------------------- */ - double gamma(const double &rho) const + [[nodiscard]] double gamma(const double &rho) const { if (rho <= 1.0) { const int split_order = order / 2; @@ -201,7 +201,7 @@ class KSpace : protected Pointers { see Eq 4 from Parallel Computing 35 (2009) 164-177 ------------------------------------------------------------------------- */ - double dgamma(const double &rho) const + [[nodiscard]] double dgamma(const double &rho) const { if (rho <= 1.0) { const int split_order = order / 2; diff --git a/src/label_map.cpp b/src/label_map.cpp index c3becc3b4bb..a4bc67d9a04 100644 --- a/src/label_map.cpp +++ b/src/label_map.cpp @@ -18,7 +18,9 @@ #include "comm.h" #include "error.h" #include "force.h" +#include "improper.h" +#include #include #include @@ -375,6 +377,213 @@ bool LabelMap::is_complete(int mode) const return false; } +/* ---------------------------------------------------------------------- + infer bond type from two atom types + input/output is numeric types, uses type labels internally + assumes bond type labels are of the form "a-b" for atom types 'a' and 'b' +------------------------------------------------------------------------- */ + +int LabelMap::infer_bondtype(int type1, int type2) +{ + std::vector mytypes(2); + mytypes[0] = typelabel[type1-1]; + mytypes[1] = typelabel[type2-1]; + if (mytypes[0].empty() || mytypes[1].empty()) return -1; + + return infer_bondtype(mytypes); +} + +/* ---------------------------------------------------------------------- + infer numeric type from two atom type labels + assumes bond types are of the form "a-b" for atom types 'a' and 'b' +------------------------------------------------------------------------- */ + +int LabelMap::infer_bondtype(std::vector mytypes) +{ + // search for matching bond type label with symmetry considerations + + std::vector btypes(2); + for (int i = 0; i < nbondtypes; i++) { + int status = parse_typelabel(2, btypelabel[i], btypes); + if (status != -1) + if ((mytypes[0] == btypes[0] && mytypes[1] == btypes[1]) || + (mytypes[0] == btypes[1] && mytypes[1] == btypes[0])) return i+1; + } + return -1; +} + + +/* ---------------------------------------------------------------------- + infer angle type from three atom types + input/output is numeric types, uses type labels internally + assumes angle types of the form "a-b-c" for atom types 'a', 'b', 'c' +------------------------------------------------------------------------- */ + +int LabelMap::infer_angletype(int type1, int type2, int type3) +{ + // convert numeric atom types to type label + + std::vector mytypes(3); + mytypes[0] = typelabel[type1-1]; + mytypes[1] = typelabel[type2-1]; + mytypes[2] = typelabel[type3-1]; + for (size_t i = 0; i < 3; i++) + if (mytypes[i].empty()) return -1; + + return infer_angletype(mytypes); +} + +/* ---------------------------------------------------------------------- + infer angle type from three atom types + input/output is numeric types, uses type labels internally + assumes angle types of the form "a-b-c" for atom types 'a', 'b', 'c' +------------------------------------------------------------------------- */ + +int LabelMap::infer_angletype(std::vector mytypes) +{ + // search for matching angle type label, with symmetry considerations + + int status; + std::vector atypes(3); + for (int i = 0; i < nangletypes; i++) { + status = parse_typelabel(3, atypelabel[i], atypes); + if (status != -1 && mytypes[1] == atypes[1]) + if ((mytypes[0] == atypes[0] && mytypes[2] == atypes[2]) || + (mytypes[0] == atypes[2] && mytypes[2] == atypes[0])) return i+1; + } + return -1; +} + + +/* ---------------------------------------------------------------------- + infer dihedral type from four atom types + input/output is numeric types, uses type labels internally + assumes dihedral types of the form "a-b-c-d" +------------------------------------------------------------------------- */ + +int LabelMap::infer_dihedraltype(int type1, int type2, int type3, int type4) +{ + // convert numeric atom types to type label + + std::vector mytypes(4); + mytypes[0] = typelabel[type1-1]; + mytypes[1] = typelabel[type2-1]; + mytypes[2] = typelabel[type3-1]; + mytypes[3] = typelabel[type4-1]; + for (size_t i = 0; i < 4; i++) + if (mytypes[i].empty()) return -1; + + return infer_dihedraltype(mytypes); +} + +/* ---------------------------------------------------------------------- + infer dihedral type from four atom types + input/output is numeric types, uses type labels internally + assumes dihedral types of the form "a-b-c-d" +------------------------------------------------------------------------- */ + +int LabelMap::infer_dihedraltype(std::vector mytypes) +{ + // search for matching dihedral type label + + int status; + std::vector dtypes(4); + for (int i = 0; i < ndihedraltypes; i++) { + status = parse_typelabel(4, dtypelabel[i], dtypes); + if (status != -1) + if ((mytypes[0] == dtypes[0] && mytypes[1] == dtypes[1] && + mytypes[2] == dtypes[2] && mytypes[3] == dtypes[3]) || + (mytypes[3] == dtypes[0] && mytypes[2] == dtypes[1] && + mytypes[1] == dtypes[2] && mytypes[0] == dtypes[3])) return i+1; + } + return -1; +} + +/* ---------------------------------------------------------------------- + infer improper type from four atom types + input/output is numeric types, uses type labels internally + assumes improper types of the form "a-b-c-d" + the symmetry of the improper is encoded in improper.symmatoms +------------------------------------------------------------------------- */ + +int LabelMap::infer_impropertype(int type1, int type2, int type3, int type4) +{ + // convert numeric atom types to type label + + std::vector mytypes(4); + mytypes[0] = typelabel[type1-1]; + mytypes[1] = typelabel[type2-1]; + mytypes[2] = typelabel[type3-1]; + mytypes[3] = typelabel[type4-1]; + for (int i = 0; i < 4; i++) + if (mytypes[i].empty()) return -1; + + return infer_impropertype(mytypes); +} + +/* ---------------------------------------------------------------------- + infer improper type from four atom types + input/output is numeric types, uses type labels internally + assumes improper types of the form "a-b-c-d" + the symmetry of the improper is encoded in improper.symmatoms +------------------------------------------------------------------------- */ + +int LabelMap::infer_impropertype(std::vector mytypes) +{ + // search for matching improper type label + + int status, nlist; + std::vector itypes(4); + std::vector list1(4); + std::vector list2(4); + for (int i = 0; i < nimpropertypes; i++) { + nlist = 0; + status = parse_typelabel(4, itypelabel[i], itypes); + if (status != -1) { + for (int j = 0; j < 4; j++) { + if (force->improper->symmatoms[j] == 1) { + if (mytypes[j] != itypes[j]) { + status = -1; + break; + } + } else { + list1[nlist] = mytypes[j]; + list2[nlist++] = itypes[j]; + } + } + if (status == -1) continue; + std::sort(list1.begin(),list1.end()); + std::sort(list2.begin(),list2.end()); + for (int j = 0; j < nlist; j++) + if (list1[j] != list2[j]) { + status = -1; + break; + } + if (status != -1) return i+1; + } + } + return -1; +} + +/* ---------------------------------------------------------------------- + return -1 if number of parsed strings is not equal to ntypes input +------------------------------------------------------------------------- */ + +int LabelMap::parse_typelabel(int ntypes, std::string label, std::vector &types) +{ + std::vector out; + size_t start = label.find_first_not_of('-'); + + while (start != std::string::npos) { + size_t end = label.find('-', start); + out.emplace_back(label.substr(start, end - start)); + start = label.find_first_not_of('-', end); + } + if (out.size() != ntypes) return -1; + types = out; + return 1; +} + /* ---------------------------------------------------------------------- proc 0 writes to data file ------------------------------------------------------------------------- */ @@ -520,31 +729,31 @@ void LabelMap::write_map(const std::string &filename) if (typelabel_map.size() > 0) { fputs("labelmap atom", fp); for (int i = 0; i < natomtypes; ++i) - if (!typelabel[i].empty()) utils::print(fp, " {} \"\"\" {} \"\"\"", i + 1, typelabel[i]); + if (!typelabel[i].empty()) utils::print(fp, R"( {} """ {} """)", i + 1, typelabel[i]); fputc('\n', fp); } if (btypelabel_map.size() > 0) { fputs("labelmap bond", fp); for (int i = 0; i < nbondtypes; ++i) - if (!btypelabel[i].empty()) utils::print(fp, " {} \"\"\" {} \"\"\"", i + 1, btypelabel[i]); + if (!btypelabel[i].empty()) utils::print(fp, R"( {} """ {} """)", i + 1, btypelabel[i]); fputc('\n', fp); } if (atypelabel_map.size() > 0) { fputs("labelmap angle", fp); for (int i = 0; i < nangletypes; ++i) - if (!atypelabel[i].empty()) utils::print(fp, " {} \"\"\" {} \"\"\"", i + 1, atypelabel[i]); + if (!atypelabel[i].empty()) utils::print(fp, R"( {} """ {} """)", i + 1, atypelabel[i]); fputc('\n', fp); } if (dtypelabel_map.size() > 0) { fputs("labelmap dihedral", fp); for (int i = 0; i < ndihedraltypes; ++i) - if (!dtypelabel[i].empty()) utils::print(fp, " {} \"\"\" {} \"\"\"", i + 1, dtypelabel[i]); + if (!dtypelabel[i].empty()) utils::print(fp, R"( {} """ {} """)", i + 1, dtypelabel[i]); fputc('\n', fp); } if (itypelabel_map.size() > 0) { fputs("labelmap improper", fp); for (int i = 0; i < nimpropertypes; ++i) - if (!itypelabel[i].empty()) utils::print(fp, " {} \"\"\" {} \"\"\"", i + 1, itypelabel[i]); + if (!itypelabel[i].empty()) utils::print(fp, R"( {} """ {} """)", i + 1, itypelabel[i]); fputc('\n', fp); } fclose(fp); diff --git a/src/label_map.h b/src/label_map.h index be7143ae18e..4b3632fb2d0 100644 --- a/src/label_map.h +++ b/src/label_map.h @@ -38,6 +38,22 @@ class LabelMap : protected Pointers { const std::string &find(int, int) const; // find type label for numeric type bool is_complete(int) const; // check if all types are assigned + // infer interaction types from standard hyphen-delimited format + + int infer_bondtype(int, int); // infer bond type from two atom types + int infer_bondtype(std::vector); // infer bond type from two atom type labels + + int infer_angletype(int, int, int); // infer angle type from three atom types + int infer_angletype(std::vector); // infer angle type from three atom type labels + + int infer_dihedraltype(int, int, int, int); // infer dihedral type from four atom types + int infer_dihedraltype(std::vector); // infer dihedral type from four atom type labels + + int infer_impropertype(int, int, int, int); // infer improper type from four atom types + int infer_impropertype(std::vector); // infer improper type from four atom type labels + + int parse_typelabel(int, std::string, std::vector &); // get strings within hyphen delimiters + // input/output for atom class label map void write_data(FILE *); diff --git a/src/lammps.h b/src/lammps.h index 78febe9bf8b..132d3e3aadc 100644 --- a/src/lammps.h +++ b/src/lammps.h @@ -65,7 +65,7 @@ class LAMMPS { char *suffix, *suffix2; // suffixes to add to input script style names int suffix_enable; // 1 if suffixes are enabled, 0 if disabled int pair_only_flag; // 1 if only force field pair styles are accelerated, 0 if all - const char *non_pair_suffix() const; + [[nodiscard]] const char *non_pair_suffix() const; char *exename; // pointer to argv[0] char ***packargs; // arguments for cmdline package commands diff --git a/src/library.cpp b/src/library.cpp index ae983839347..29cc81867da 100644 --- a/src/library.cpp +++ b/src/library.cpp @@ -803,9 +803,9 @@ void lammps_commands_string(void *handle, const char *str) else cmd = line; - if (utils::strmatch(line, "\"\"\".*\"\"\"")) { + if (utils::strmatch(line, R"(""".*""")")) { triple = false; - } else if (utils::strmatch(line, "\"\"\"")) { + } else if (utils::strmatch(line, R"(""")")) { triple = !triple; } if (triple) cmd += '\n'; @@ -6452,7 +6452,7 @@ namespace LAMMPS_NS { NeighProxy(class LAMMPS *lmp) : Command(lmp), neigh_idx(-1) {}; void command(int, char **) override; - int get_index() const { return neigh_idx; } + [[nodiscard]] int get_index() const { return neigh_idx; } protected: int neigh_idx; }; diff --git a/src/lmppython.h b/src/lmppython.h index 53fc5c38db3..e56446040ac 100644 --- a/src/lmppython.h +++ b/src/lmppython.h @@ -50,7 +50,7 @@ class Python : protected Pointers { int execute_file(char *); bool has_minimum_version(int major, int minor); - bool is_enabled() const; + [[nodiscard]] bool is_enabled() const; void init(); static void finalize(); diff --git a/src/math_const.h b/src/math_const.h index 2c5c65f98f3..96162f0c322 100644 --- a/src/math_const.h +++ b/src/math_const.h @@ -14,9 +14,9 @@ #ifndef LMP_MATH_CONST_H #define LMP_MATH_CONST_H -namespace LAMMPS_NS { -namespace MathConst { + +namespace LAMMPS_NS::MathConst { static constexpr double THIRD = 1.0 / 3.0; static constexpr double TWOTHIRDS = 2.0 / 3.0; static constexpr double MY_PI = 3.14159265358979323846; // pi @@ -34,8 +34,8 @@ namespace MathConst { static constexpr double MY_TWOBYSIXTH = 1.12246204830937298142; // 2^(1/6) // static constexpr double DEG2RAD = MY_PI / 180.0; // degree to radians static constexpr double RAD2DEG = 180.0 / MY_PI; // radians to degree -} // namespace MathConst +} // namespace LAMMPS_NS::MathConst + -} // namespace LAMMPS_NS #endif diff --git a/src/math_special.h b/src/math_special.h index b190a4b622d..1efd8a5f8d7 100644 --- a/src/math_special.h +++ b/src/math_special.h @@ -16,9 +16,9 @@ #include -namespace LAMMPS_NS { -namespace MathSpecial { + +namespace LAMMPS_NS::MathSpecial { /*! Fast tabulated factorial function * @@ -178,7 +178,7 @@ namespace MathSpecial { return yy; } -} // namespace MathSpecial -} // namespace LAMMPS_NS +} // namespace LAMMPS_NS::MathSpecial + #endif diff --git a/src/min_hftn.h b/src/min_hftn.h index f7bf087cd7f..a7a4e61729e 100644 --- a/src/min_hftn.h +++ b/src/min_hftn.h @@ -64,17 +64,17 @@ class MinHFTN : public Min { const double dEnergyAtXin, const double dForce2AtXin, double &dEnergyAtXout, double &dForce2AtXout, int &nStepType, double &dStepLength2, double &dStepLengthInf); - double calc_xinf_using_mpi_() const; - double calc_dot_prod_using_mpi_(const int nIx1, const int nIx2) const; - double calc_grad_dot_v_using_mpi_(const int nIx) const; + [[nodiscard]] double calc_xinf_using_mpi_() const; + [[nodiscard]] double calc_dot_prod_using_mpi_(const int nIx1, const int nIx2) const; + [[nodiscard]] double calc_grad_dot_v_using_mpi_(const int nIx) const; void calc_dhd_dd_using_mpi_(double &dDHD, double &dDD) const; void calc_ppnew_pdold_using_mpi_(double &dPnewDotPnew, double &dPoldDotD) const; void calc_plengths_using_mpi_(double &dStepLength2, double &dStepLengthInf) const; bool step_exceeds_TR_(const double dTrustRadius, const double dPP, const double dPD, const double dDD, double &dTau) const; - bool step_exceeds_DMAX_() const; + [[nodiscard]] bool step_exceeds_DMAX_() const; void adjust_step_to_tau_(const double tau); - double compute_to_tr_(const double dPP, const double dPD, const double dDD, + [[nodiscard]] double compute_to_tr_(const double dPP, const double dPD, const double dDD, const double dTrustRadius, const bool bConsiderBothRoots, const double dDHD, const double dPdotHD, const double dGradDotD) const; void evaluate_dir_der_(const bool bUseForwardDiffs, const int nIxDir, const int nIxResult, diff --git a/src/modify.h b/src/modify.h index eb8e87a4985..4423ae74657 100644 --- a/src/modify.h +++ b/src/modify.h @@ -114,9 +114,9 @@ class Modify : protected Pointers { // deprecated API int find_fix(const std::string &); // new API - Fix *get_fix_by_id(const std::string &) const; - Fix *get_fix_by_index(int idx) const { return ((idx >= 0) && (idx < nfix)) ? fix[idx] : nullptr; } - const std::vector get_fix_by_style(const std::string &) const; + [[nodiscard]] Fix *get_fix_by_id(const std::string &) const; + [[nodiscard]] Fix *get_fix_by_index(int idx) const { return ((idx >= 0) && (idx < nfix)) ? fix[idx] : nullptr; } + [[nodiscard]] const std::vector get_fix_by_style(const std::string &) const; const std::vector &get_fix_list(); int get_fix_mask(Fix *ifix) const { @@ -135,12 +135,12 @@ class Modify : protected Pointers { // deprecated API int find_compute(const std::string &); // new API - Compute *get_compute_by_id(const std::string &) const; - Compute *get_compute_by_index(int idx) const + [[nodiscard]] Compute *get_compute_by_id(const std::string &) const; + [[nodiscard]] Compute *get_compute_by_index(int idx) const { return ((idx >= 0) && (idx < ncompute)) ? compute[idx] : nullptr; } - const std::vector get_compute_by_style(const std::string &) const; + [[nodiscard]] const std::vector get_compute_by_style(const std::string &) const; const std::vector &get_compute_list(); void clearstep_compute(); diff --git a/src/molecule.cpp b/src/molecule.cpp index 372f676ab8b..5a06144795a 100644 --- a/src/molecule.cpp +++ b/src/molecule.cpp @@ -158,7 +158,7 @@ void Molecule::command(int narg, char **arg, int &index) // JSON files must have the extension .json std::string filename = arg[fileiarg]; - if (utils::strmatch(filename, "\\.json$")) { + if (utils::strmatch(filename, R"(\.json$)")) { json moldata; std::vector jsondata; @@ -1805,7 +1805,7 @@ void Molecule::from_json(const std::string &molid, const json &moldata) "Molecule template {}: \"shake\" info is incomplete in JSON data"); if (bodyflag && !rmassflag) error->all(FLERR, Error::NOLASTLINE, - "Molecule template {}: \"body\" JSON section requires \"masses\" section", id); + R"(Molecule template {}: "body" JSON section requires "masses" section)", id); // auto-generate special bonds if needed and not in file @@ -2363,7 +2363,7 @@ void Molecule::read(int flag) // check for units keyword in first line and print warning on mismatch - auto units = Tokenizer(utils::strfind(line, "units = \\w+")).as_vector(); + auto units = Tokenizer(utils::strfind(line, R"(units = \w+)")).as_vector(); if ((flag == 0) && (units.size() > 2)) { if (units[2] != update->unit_style) error->warning(FLERR, "Inconsistent units in data file: current = {}, data file = {}", @@ -2388,7 +2388,7 @@ void Molecule::read(int flag) auto text = utils::trim(utils::trim_comment(line)); if (text.empty()) continue; - if (utils::strmatch(text, "^\\s*#")) continue; + if (utils::strmatch(text, R"(^\s*#)")) continue; // search line for header keywords and set corresponding variable try { @@ -2396,31 +2396,31 @@ void Molecule::read(int flag) int nmatch = values.count(); int nwant = 0; - if (values.matches("^\\s*\\d+\\s+atoms\\s*$")) { + if (values.matches(R"(^\s*\d+\s+atoms\s*$)")) { natoms = values.next_int(); nwant = 2; has_atoms = true; - } else if (values.matches("^\\s*\\d+\\s+bonds\\s*$")) { + } else if (values.matches(R"(^\s*\d+\s+bonds\s*$)")) { nbonds = values.next_int(); nwant = 2; - } else if (values.matches("^\\s*\\d+\\s+angles\\s*$")) { + } else if (values.matches(R"(^\s*\d+\s+angles\s*$)")) { nangles = values.next_int(); nwant = 2; - } else if (values.matches("^\\s*\\d+\\s+dihedrals\\s*$")) { + } else if (values.matches(R"(^\s*\d+\s+dihedrals\s*$)")) { ndihedrals = values.next_int(); nwant = 2; - } else if (values.matches("^\\s*\\d+\\s+impropers\\s*$")) { + } else if (values.matches(R"(^\s*\d+\s+impropers\s*$)")) { nimpropers = values.next_int(); nwant = 2; - } else if (values.matches("^\\s*\\d+\\s+fragments\\s*$")) { + } else if (values.matches(R"(^\s*\d+\s+fragments\s*$)")) { nfragments = values.next_int(); nwant = 2; - } else if (values.matches("^\\s*\\f+\\s+mass\\s*$")) { + } else if (values.matches(R"(^\s*\f+\s+mass\s*$)")) { massflag = massflag_user = 1; masstotal = values.next_double(); nwant = 2; masstotal *= sizescale * sizescale * sizescale; - } else if (values.matches("^\\s*\\f+\\s+\\f+\\s+\\f+\\s+com\\s*$")) { + } else if (values.matches(R"(^\s*\f+\s+\f+\s+\f+\s+com\s*$)")) { comflag = comflag_user = 1; com[0] = values.next_double(); com[1] = values.next_double(); @@ -2431,7 +2431,7 @@ void Molecule::read(int flag) com[2] *= sizescale; if ((domain->dimension == 2) && (com[2] != 0.0)) error->all(FLERR, fileiarg, "Molecule file z center-of-mass must be 0.0 for 2d systems"); - } else if (values.matches("^\\s*\\f+\\s+\\f+\\s+\\f+\\s+\\f+\\s+\\f+\\s+\\f+\\s+inertia\\s*$")) { + } else if (values.matches(R"(^\s*\f+\s+\f+\s+\f+\s+\f+\s+\f+\s+\f+\s+inertia\s*$)")) { inertiaflag = inertiaflag_user = 1; itensor[0] = values.next_double(); itensor[1] = values.next_double(); @@ -2447,20 +2447,20 @@ void Molecule::read(int flag) itensor[3] *= scale5; itensor[4] *= scale5; itensor[5] *= scale5; - } else if (values.matches("^\\s*\\d+\\s+\\d+\\s+body\\s*$")) { + } else if (values.matches(R"(^\s*\d+\s+\d+\s+body\s*$)")) { bodyflag = 1; avec_body = dynamic_cast(atom->style_match("body")); if (!avec_body) error->all(FLERR, fileiarg, "Molecule file requires atom style body"); nibody = values.next_int(); ndbody = values.next_int(); nwant = 3; - } else if (values.matches("^\\s*\\d+\\s+\\S+\\s+types\\s*$")) { + } else if (values.matches(R"(^\s*\d+\s+\S+\s+types\s*$)")) { error->all(FLERR, fileiarg, "Found data file header keyword '{}' in molecule file", text); - } else if (values.matches("^\\s*\\f+\\s+\\f+\\s+[xyz]lo\\s+[xyz]hi\\s*$")) { + } else if (values.matches(R"(^\s*\f+\s+\f+\s+[xyz]lo\s+[xyz]hi\s*$)")) { error->all(FLERR, fileiarg, "Found data file header keyword '{}' in molecule file", text); } else { // unknown header keyword - if (values.matches("^\\s*\\f+\\s+\\S+")) { + if (values.matches(R"(^\s*\f+\s+\S+)")) { error->all(FLERR, fileiarg, "Unknown keyword or incorrectly formatted header line: {}", line); } else diff --git a/src/molecule.h b/src/molecule.h index 743e9b73b28..094bb477b12 100644 --- a/src/molecule.h +++ b/src/molecule.h @@ -133,7 +133,7 @@ class Molecule : protected Pointers { void command(int, char **, int &); void from_json(const std::string &id, const json &); - json to_json() const; + [[nodiscard]] json to_json() const; void compute_center(); void compute_mass(); diff --git a/src/my_page.h b/src/my_page.h index d35658ef916..cce10799864 100644 --- a/src/my_page.h +++ b/src/my_page.h @@ -82,13 +82,13 @@ template class MyPage { * * \return total storage used in bytes */ - double size() const { return (double) npage * pagesize * sizeof(T); } + [[nodiscard]] double size() const { return (double) npage * pagesize * sizeof(T); } /** Return error status * * \return 0 if no error, 1 requested chunk size > maxchunk, 2 if malloc failed */ - int status() const { return errorflag; } + [[nodiscard]] int status() const { return errorflag; } private: T **pages; // list of allocated pages diff --git a/src/my_pool_chunk.h b/src/my_pool_chunk.h index 06264884d17..dcfe04e7d3b 100644 --- a/src/my_pool_chunk.h +++ b/src/my_pool_chunk.h @@ -45,13 +45,13 @@ template class MyPoolChunk { // total memory used in bytes - double size() const; + [[nodiscard]] double size() const; /** Return error status * * \return 0 if no error, 1 if invalid input, 2 if malloc() failed, 3 if chunk > maxchunk */ - int status() const { return errorflag; } + [[nodiscard]] int status() const { return errorflag; } private: int minchunk; // min # of datums per chunk diff --git a/src/neigh_request.h b/src/neigh_request.h index caa9e05ad68..a438527d0d4 100644 --- a/src/neigh_request.h +++ b/src/neigh_request.h @@ -146,8 +146,8 @@ class NeighRequest : protected Pointers { void enable_ghost(); void enable_intel(); - int get_size() const { return size; } - void *get_requestor() const { return requestor; } + [[nodiscard]] int get_size() const { return size; } + [[nodiscard]] void *get_requestor() const { return requestor; } }; } // namespace LAMMPS_NS diff --git a/src/neighbor.h b/src/neighbor.h index fbccb177965..26db649525f 100644 --- a/src/neighbor.h +++ b/src/neighbor.h @@ -142,7 +142,7 @@ class Neighbor : protected Pointers { // report if we have INTEL package neighbor lists - bool has_intel_request() const; + [[nodiscard]] bool has_intel_request() const; int decide(); // decide whether to build or not virtual int check_distance(); // check max distance moved since last build @@ -169,7 +169,7 @@ class Neighbor : protected Pointers { NeighList *find_list(void *, const int id = 0) const; NeighRequest *find_request(void *, const int id = 0) const; - const std::vector get_pair_requests() const; + [[nodiscard]] const std::vector get_pair_requests() const; int any_full(); // check if any old requests had full neighbor lists void build_collection(int); // build peratom collection array starting at the given index diff --git a/src/output.h b/src/output.h index 847de833138..01dc30a5f5e 100644 --- a/src/output.h +++ b/src/output.h @@ -87,8 +87,8 @@ class Output : protected Pointers { Dump *add_dump(int, char **); // add a Dump to Dump list void modify_dump(int, char **); // modify a Dump void delete_dump(const std::string &); // delete a Dump from Dump list - Dump *get_dump_by_id(const std::string &) const; // find a Dump by ID - Dump *get_dump_by_index(int idx) const // find a Dump by index in Dump list + [[nodiscard]] Dump *get_dump_by_id(const std::string &) const; // find a Dump by ID + [[nodiscard]] Dump *get_dump_by_index(int idx) const // find a Dump by index in Dump list { return ((idx >= 0) && (idx < ndump)) ? dump[idx] : nullptr; } diff --git a/src/pair.h b/src/pair.h index 23ea086104e..9b004f27bed 100644 --- a/src/pair.h +++ b/src/pair.h @@ -239,7 +239,7 @@ class Pair : protected Pointers { public: virtual void add_tally_callback(class Compute *); virtual void del_tally_callback(class Compute *); - bool did_tally_callback() const { return did_tally_flag != 0; } + [[nodiscard]] bool did_tally_callback() const { return did_tally_flag != 0; } protected: int instance_me; // which Pair class instantiation I am @@ -274,7 +274,7 @@ class Pair : protected Pointers { // Accessor for the INTEL package to determine virial calc for hybrid - inline int fdotr_is_set() const { return vflag_fdotr; } + [[nodiscard]] int fdotr_is_set() const { return vflag_fdotr; } protected: int vflag_fdotr; @@ -303,7 +303,7 @@ class Pair : protected Pointers { void v_tally_tensor(int, int, int, int, double, double, double, double, double, double); void virial_fdotr_compute(); - inline int sbmask(int j) const { return j >> SBBITS & 3; } + [[nodiscard]] int sbmask(int j) const { return j >> SBBITS & 3; } }; } // namespace LAMMPS_NS diff --git a/src/pair_zbl_const.h b/src/pair_zbl_const.h index 61f05174bee..cc1f893f519 100644 --- a/src/pair_zbl_const.h +++ b/src/pair_zbl_const.h @@ -14,8 +14,8 @@ #ifndef LMP_PAIR_ZBL_CONST_H #define LMP_PAIR_ZBL_CONST_H -namespace LAMMPS_NS { -namespace PairZBLConstants { + +namespace LAMMPS_NS::PairZBLConstants { // ZBL constants @@ -29,6 +29,6 @@ namespace PairZBLConstants { static constexpr double d2 = 0.40290; static constexpr double d3 = 0.94229; static constexpr double d4 = 3.19980; -} // namespace PairZBLConstants -} // namespace LAMMPS_NS +} // namespace LAMMPS_NS::PairZBLConstants + #endif diff --git a/src/platform.h b/src/platform.h index de91cfdfd53..47d08d8c458 100644 --- a/src/platform.h +++ b/src/platform.h @@ -22,369 +22,368 @@ #include #include -namespace LAMMPS_NS { -namespace platform { - - /*! Return the consumed CPU time for the current process in seconds - * - * This is a wrapper around the POSIX function getrusage() and its Windows equivalent. - * It is to be used in a similar fashion as MPI_Wtime(). Its resolution may be rather - * low so it can only be trusted when observing processes consuming CPU time of at least - * a few seconds. - * - * \return used CPU time in seconds */ - - double cputime(); - - /*! Return the wall clock state for the current process in seconds - * - * This clock is counting continuous time and is initialized during - * load of the executable/library. Its absolute value must be considered - * arbitrary and thus elapsed wall times are measured in taking differences. - * It is therefore to be used in a similar fashion as MPI_Wtime() but - * has a different offset, usually leading to better resolution. - * - * \return wall clock time in seconds */ - - double walltime(); - - /*! Suspend execution for a microsecond interval - * - * This emulates the usleep(3) BSD function call also mentioned in POSIX.1-2001. - * This is not a precise delay; it may be longer, but not shorter. - * - * \param usec length of delay in microseconds */ - - void usleep(int usec); - - /*! Return string with the operating system version and architecture info - * - * \return string with info about the OS and the platform is is running on */ - - std::string os_info(); - - /*! Return string with C++ standard version used to compile LAMMPS. - * - * This function uses predefined compiler macros to identify - * the C++ standard version used to compile LAMMPS with. - * - * \return string with the C++ standard version or "unknown" */ - - std::string cxx_standard(); - - /*! Return string with compiler version info - * - * This function uses predefined compiler macros to identify - * Compilers and their version and configuration info. - * - * \return string with the compiler information text */ - - std::string compiler_info(); - - /*! Return string with OpenMP standard version info - * - * This function uses predefined compiler macros to identify - * OpenMP support and the supported version of the standard. - * - * \return string with the openmp information text */ - - std::string openmp_standard(); - - /*! Return string with MPI vendor info - * - * This function uses predefined macros to identify - * the vendor of the MPI library used. - * - * \return string with the MPI vendor information text */ - - std::string mpi_vendor(); - - /*! Return string with MPI version info - * - * This function uses predefined macros and MPI function - * calls to identify the version of the MPI library used. - * - * \param major major version of the MPI standard (set on exit) - * \param minor minor version of the MPI standard (set on exit) - * \return string with the MPI version information text */ - - std::string mpi_info(int &major, int &minor); - - /*! Return string with list of available compression types and executables - * - * This function tests which of the supported compression executables - * are available for reading or writing compressed files where supported. - * - * \return string with list of available compression tools */ - - std::string compress_info(); - - /*! Add variable to the environment - * - * \param vardef variable name or variable definition (NAME=value) - * \return -1 if failure otherwise 0 */ - - int putenv(const std::string &vardef); - - /*! Delete variable from the environment - * - * \param variable variable name - * \return -1 if failure otherwise 0 */ - - int unsetenv(const std::string &variable); - - /*! Get list of entries in a path environment variable - * - * This provides a list of strings of the entries in an environment - * variable that is containing a "path" like "PATH" or "LD_LIBRARY_PATH". - * - * \param var name of the environment variable - * \return vector with strings of all entries in that path variable */ - - std::vector list_pathenv(const std::string &var); - - /*! Open a shared object file or library - * - * \param fname name or path of the shared object - * \return handle to the shared object or null */ - - void *dlopen(const std::string &fname); - - /*! Obtain error diagnostic info after dynamic linking function calls - * - * Return a human-readable string describing the most recent error that - * occurred when using one of the functions for dynamic loading objects - * the last call to this function. If there was no error, the string is empty. - * - * \return string with error message or empty */ - - std::string dlerror(); - - /*! Close a shared object - * - * This releases the object corresponding to the provided handle. - * Resolved symbols associated with this handle may not be used - * after this call - * - * \param handle handle to an opened shared object - * \return 0 if successful, non-zero of not */ - - int dlclose(void *handle); - - /*! Resolve a symbol in shared object - * - * \param handle handle to an opened shared object - * \param symbol name of the symbol to extract - * \return pointer to the resolved symbol or null */ - - void *dlsym(void *handle, const std::string &symbol); - - /*! Platform specific file path component separator - * - * This is a string with the character that separates directories and filename in paths on - * a platform. If multiple are characters are provided, the first is the preferred one. */ +namespace LAMMPS_NS::platform { + +/*! Return the consumed CPU time for the current process in seconds + * + * This is a wrapper around the POSIX function getrusage() and its Windows equivalent. + * It is to be used in a similar fashion as MPI_Wtime(). Its resolution may be rather + * low so it can only be trusted when observing processes consuming CPU time of at least + * a few seconds. + * + * \return used CPU time in seconds */ + +double cputime(); + +/*! Return the wall clock state for the current process in seconds + * + * This clock is counting continuous time and is initialized during + * load of the executable/library. Its absolute value must be considered + * arbitrary and thus elapsed wall times are measured in taking differences. + * It is therefore to be used in a similar fashion as MPI_Wtime() but + * has a different offset, usually leading to better resolution. + * + * \return wall clock time in seconds */ + +double walltime(); + +/*! Suspend execution for a microsecond interval + * + * This emulates the usleep(3) BSD function call also mentioned in POSIX.1-2001. + * This is not a precise delay; it may be longer, but not shorter. + * + * \param usec length of delay in microseconds */ + +void usleep(int usec); + +/*! Return string with the operating system version and architecture info + * + * \return string with info about the OS and the platform is is running on */ + +std::string os_info(); + +/*! Return string with C++ standard version used to compile LAMMPS. + * + * This function uses predefined compiler macros to identify + * the C++ standard version used to compile LAMMPS with. + * + * \return string with the C++ standard version or "unknown" */ + +std::string cxx_standard(); + +/*! Return string with compiler version info + * + * This function uses predefined compiler macros to identify + * Compilers and their version and configuration info. + * + * \return string with the compiler information text */ + +std::string compiler_info(); + +/*! Return string with OpenMP standard version info + * + * This function uses predefined compiler macros to identify + * OpenMP support and the supported version of the standard. + * + * \return string with the openmp information text */ + +std::string openmp_standard(); + +/*! Return string with MPI vendor info + * + * This function uses predefined macros to identify + * the vendor of the MPI library used. + * + * \return string with the MPI vendor information text */ + +std::string mpi_vendor(); + +/*! Return string with MPI version info + * + * This function uses predefined macros and MPI function + * calls to identify the version of the MPI library used. + * + * \param major major version of the MPI standard (set on exit) + * \param minor minor version of the MPI standard (set on exit) + * \return string with the MPI version information text */ + +std::string mpi_info(int &major, int &minor); + +/*! Return string with list of available compression types and executables + * + * This function tests which of the supported compression executables + * are available for reading or writing compressed files where supported. + * + * \return string with list of available compression tools */ + +std::string compress_info(); + +/*! Add variable to the environment + * + * \param vardef variable name or variable definition (NAME=value) + * \return -1 if failure otherwise 0 */ + +int putenv(const std::string &vardef); + +/*! Delete variable from the environment + * + * \param variable variable name + * \return -1 if failure otherwise 0 */ + +int unsetenv(const std::string &variable); + +/*! Get list of entries in a path environment variable + * + * This provides a list of strings of the entries in an environment + * variable that is containing a "path" like "PATH" or "LD_LIBRARY_PATH". + * + * \param var name of the environment variable + * \return vector with strings of all entries in that path variable */ + +std::vector list_pathenv(const std::string &var); + +/*! Open a shared object file or library + * + * \param fname name or path of the shared object + * \return handle to the shared object or null */ + +void *dlopen(const std::string &fname); + +/*! Obtain error diagnostic info after dynamic linking function calls + * + * Return a human-readable string describing the most recent error that + * occurred when using one of the functions for dynamic loading objects + * the last call to this function. If there was no error, the string is empty. + * + * \return string with error message or empty */ + +std::string dlerror(); + +/*! Close a shared object + * + * This releases the object corresponding to the provided handle. + * Resolved symbols associated with this handle may not be used + * after this call + * + * \param handle handle to an opened shared object + * \return 0 if successful, non-zero of not */ + +int dlclose(void *handle); + +/*! Resolve a symbol in shared object + * + * \param handle handle to an opened shared object + * \param symbol name of the symbol to extract + * \return pointer to the resolved symbol or null */ + +void *dlsym(void *handle, const std::string &symbol); + +/*! Platform specific file path component separator + * + * This is a string with the character that separates directories and filename in paths on + * a platform. If multiple are characters are provided, the first is the preferred one. */ #if !defined(_WIN32) - constexpr char filepathsep[] = "/"; +constexpr char filepathsep[] = "/"; #else - constexpr char filepathsep[] = "\\/"; +constexpr char filepathsep[] = "\\/"; #endif - /*! Platform specific path environment variable component separator - * - * This is the character that separates entries in "PATH"-style environment variables. */ +/*! Platform specific path environment variable component separator + * + * This is the character that separates entries in "PATH"-style environment variables. */ #if !defined(_WIN32) - constexpr char pathvarsep = ':'; +constexpr char pathvarsep = ':'; #else - constexpr char pathvarsep = ';'; +constexpr char pathvarsep = ';'; #endif - /*! Try to detect pathname from FILE pointer - * - * Currently only supported on Linux, MacOS, and Windows. Otherwise will report "(unknown)". - * - * \param fp FILE pointer struct from STDIO library for which we want to detect the name - * \param buf storage buffer for pathname. output will be truncated if not large enough - * \param len size of storage buffer. output will be truncated to this length - 1 - * \return pointer to the storage buffer with path or a NULL pointer if buf is invalid - * or the buffer size is too small */ +/*! Try to detect pathname from FILE pointer + * + * Currently only supported on Linux, MacOS, and Windows. Otherwise will report "(unknown)". + * + * \param fp FILE pointer struct from STDIO library for which we want to detect the name + * \param buf storage buffer for pathname. output will be truncated if not large enough + * \param len size of storage buffer. output will be truncated to this length - 1 + * \return pointer to the storage buffer with path or a NULL pointer if buf is invalid + * or the buffer size is too small */ + +const char *guesspath(FILE *fp, char *buf, int len); + +/*! Check if a file pointer may be connected to a console + * + * \param fp file pointer + * \return true if the file pointer is flagged as a TTY */ + +bool is_console(FILE *fp); + +/*! Get list of entries in a directory + * + * This provides a list of strings of the entries in the directory + * without the leading path name while also skipping over ".." and ".". + * + * \param dir path to directory + * \return vector with strings of all directory entries */ + +std::vector list_directory(const std::string &dir); + +/*! Find pathname of an executable in the standard search path + * + * This function will traverse the list of directories in the PATH + * environment variable and look for the executable *cmd*. If the + * file exists and is executable the full path is returned as string, + * otherwise an empty string is returned. + * + * On Windows the *cmd* string must not include an extension as + * this function will automatically append the extensions ".exe", + * ".com" and ".bat" and look for those paths. On Windows also the + * current directory is checked (and first), but otherwise is not checked + * unless "." exists in the PATH environment variable. + * + * Because of the nature of the check, this will not detect shell functions + * built-in command or aliases. + * + * \param cmd name of command + * \return vector with strings of all directory entries */ + +std::string find_exe_path(const std::string &cmd); + +/*! Change current directory + * + * \param path new current working directory path + * \return -1 if unsuccessful, otherwise >= 0 */ + +int chdir(const std::string &path); + +/*! Create a directory + * + * Unlike the the ``mkdir()`` or ``_mkdir()`` functions of the + * C library, this function will also try to create non-existing sub-directories + * in case they don't exist, and thus behaves like the ``mkdir -p`` command rather + * than plain ``mkdir`` or ``md`. + * + * \param path directory path + * \return -1 if unsuccessful, otherwise >= 0 */ + +int mkdir(const std::string &path); + +/*! Delete a directory + * + * Unlike the the ``rmdir()`` or ``_rmdir()`` functions of the + * C library, this function will check for the contents of the + * folder and recurse into any sub-folders, if necessary, and + * delete all contained folders and their contents before + * deleting the folder *path*. + * + * \param path directory path + * \return -1 if unsuccessful, otherwise >= 0 */ + +int rmdir(const std::string &path); + +/*! Delete a file + * + * \param path path to file to be deleted + * \return 0 on success, -1 on error */ + +int unlink(const std::string &path); + +/*! Get current file position + * + * \param fp FILE pointer of the given file + * \return current FILE pointer position cast to a bigint */ + +bigint ftell(FILE *fp); + +/*! constant to seek to the end of the file */ +constexpr bigint END_OF_FILE = -1; + +/*! Set absolute file position + * + * If the absolute position is END_OF_FILE, then position at the end of the file. + * + * \param fp FILE pointer of the given file + * \param pos new position of the FILE pointer + * \return 0 if successful, otherwise -1 */ + +int fseek(FILE *fp, bigint pos); + +/*! Truncate file to a given length and re-position file pointer + * + * \param fp FILE pointer of the given file + * \param length length to which the file is being truncated to + * \return 0 if successful, otherwise -1 */ + +int ftruncate(FILE *fp, bigint length); + +/*! Open a pipe to a command for reading or writing + * + * \param cmd command for the pipe + * \param mode "r" for reading from *cmd* or "w" for writing to *cmd* + * \return file pointer to the pipe if successful or null */ + +FILE *popen(const std::string &cmd, const std::string &mode); + +/*! Close a previously opened pipe + * + * \param fp FILE pointer for the pipe + * \return exit status of the pipe command or -1 in case of errors */ + +int pclose(FILE *fp); + +/*! Strip off leading part of path, return just the filename + * + * \param path file path + * \return file name */ + +std::string path_basename(const std::string &path); + +/*! Return the directory part of a path. Return "." if empty + * + * \param path file path + * \return directory name */ + +std::string path_dirname(const std::string &path); + +/*! Join two pathname segments + * + * This uses the forward slash '/' character unless LAMMPS is compiled + * for Windows where it uses the backward slash '\\' + * + * \param a first path + * \param b second path + * \return combined path */ + +std::string path_join(const std::string &a, const std::string &b); + +/*! Check if file exists and is readable + * + * \param path file path + * \return true if file exists and is readable */ + +bool file_is_readable(const std::string &path); + +/*! Check if file can be opened for writing + * + * \param path file path + * \return true if file can be opened for writing */ + +bool file_is_writable(const std::string &path); + +/*! Report a time stamp when a file was last written to + * + * For increased accuracy and portability, the time stamp is relative + * to an arbitrary offset created when loading the LAMMPS library or + * launching the executable. This allows to report the time difference + * as a floating point number and not some platform or architecture + * specific type requiring to include additional headers. + * + * When two timestamps are the same, the file has not been written to. + * + * \param path file path + * \return time stamp when file was last written to */ - const char *guesspath(FILE *fp, char *buf, int len); - - /*! Check if a file pointer may be connected to a console - * - * \param fp file pointer - * \return true if the file pointer is flagged as a TTY */ - - bool is_console(FILE *fp); - - /*! Get list of entries in a directory - * - * This provides a list of strings of the entries in the directory - * without the leading path name while also skipping over ".." and ".". - * - * \param dir path to directory - * \return vector with strings of all directory entries */ - - std::vector list_directory(const std::string &dir); - - /*! Find pathname of an executable in the standard search path - * - * This function will traverse the list of directories in the PATH - * environment variable and look for the executable *cmd*. If the - * file exists and is executable the full path is returned as string, - * otherwise an empty string is returned. - * - * On Windows the *cmd* string must not include an extension as - * this function will automatically append the extensions ".exe", - * ".com" and ".bat" and look for those paths. On Windows also the - * current directory is checked (and first), but otherwise is not checked - * unless "." exists in the PATH environment variable. - * - * Because of the nature of the check, this will not detect shell functions - * built-in command or aliases. - * - * \param cmd name of command - * \return vector with strings of all directory entries */ - - std::string find_exe_path(const std::string &cmd); - - /*! Change current directory - * - * \param path new current working directory path - * \return -1 if unsuccessful, otherwise >= 0 */ - - int chdir(const std::string &path); - - /*! Create a directory - * - * Unlike the the ``mkdir()`` or ``_mkdir()`` functions of the - * C library, this function will also try to create non-existing sub-directories - * in case they don't exist, and thus behaves like the ``mkdir -p`` command rather - * than plain ``mkdir`` or ``md`. - * - * \param path directory path - * \return -1 if unsuccessful, otherwise >= 0 */ - - int mkdir(const std::string &path); - - /*! Delete a directory - * - * Unlike the the ``rmdir()`` or ``_rmdir()`` functions of the - * C library, this function will check for the contents of the - * folder and recurse into any sub-folders, if necessary, and - * delete all contained folders and their contents before - * deleting the folder *path*. - * - * \param path directory path - * \return -1 if unsuccessful, otherwise >= 0 */ - - int rmdir(const std::string &path); - - /*! Delete a file - * - * \param path path to file to be deleted - * \return 0 on success, -1 on error */ - - int unlink(const std::string &path); - - /*! Get current file position - * - * \param fp FILE pointer of the given file - * \return current FILE pointer position cast to a bigint */ - - bigint ftell(FILE *fp); - - /*! constant to seek to the end of the file */ - constexpr bigint END_OF_FILE = -1; - - /*! Set absolute file position - * - * If the absolute position is END_OF_FILE, then position at the end of the file. - * - * \param fp FILE pointer of the given file - * \param pos new position of the FILE pointer - * \return 0 if successful, otherwise -1 */ - - int fseek(FILE *fp, bigint pos); - - /*! Truncate file to a given length and re-position file pointer - * - * \param fp FILE pointer of the given file - * \param length length to which the file is being truncated to - * \return 0 if successful, otherwise -1 */ - - int ftruncate(FILE *fp, bigint length); - - /*! Open a pipe to a command for reading or writing - * - * \param cmd command for the pipe - * \param mode "r" for reading from *cmd* or "w" for writing to *cmd* - * \return file pointer to the pipe if successful or null */ - - FILE *popen(const std::string &cmd, const std::string &mode); - - /*! Close a previously opened pipe - * - * \param fp FILE pointer for the pipe - * \return exit status of the pipe command or -1 in case of errors */ - - int pclose(FILE *fp); - - /*! Strip off leading part of path, return just the filename - * - * \param path file path - * \return file name */ - - std::string path_basename(const std::string &path); - - /*! Return the directory part of a path. Return "." if empty - * - * \param path file path - * \return directory name */ - - std::string path_dirname(const std::string &path); - - /*! Join two pathname segments - * - * This uses the forward slash '/' character unless LAMMPS is compiled - * for Windows where it uses the backward slash '\\' - * - * \param a first path - * \param b second path - * \return combined path */ - - std::string path_join(const std::string &a, const std::string &b); - - /*! Check if file exists and is readable - * - * \param path file path - * \return true if file exists and is readable */ - - bool file_is_readable(const std::string &path); - - /*! Check if file can be opened for writing - * - * \param path file path - * \return true if file can be opened for writing */ - - bool file_is_writable(const std::string &path); - - /*! Report a time stamp when a file was last written to - * - * For increased accuracy and portability, the time stamp is relative - * to an arbitrary offset created when loading the LAMMPS library or - * launching the executable. This allows to report the time difference - * as a floating point number and not some platform or architecture - * specific type requiring to include additional headers. - * - * When two timestamps are the same, the file has not been written to. - * - * \param path file path - * \return time stamp when file was last written to */ - - double file_write_time(const std::string &path); +double file_write_time(const std::string &path); /*! Return free disk space in bytes of file system pointed to by path * @@ -393,31 +392,30 @@ namespace platform { * \param path file or folder path in file system * \return */ - double disk_free(const std::string &path); +double disk_free(const std::string &path); - /*! Check if a file name ends in a known extension for a compressed file format - * - * Currently supported file extensions are: .gz, .bz2, .zst, .xz, .lzma, .lz4, .br, and .7z - * - * \param file name of the file to check - * \return true if the file has a known extension, otherwise false */ +/*! Check if a file name ends in a known extension for a compressed file format + * + * Currently supported file extensions are: .gz, .bz2, .zst, .xz, .lzma, .lz4, .br, and .7z + * + * \param file name of the file to check + * \return true if the file has a known extension, otherwise false */ - bool has_compress_extension(const std::string &file); +bool has_compress_extension(const std::string &file); - /*! Open pipe to compressed text file for reading - * - * \param file name of the file to open - * \return FILE pointer to pipe using for reading the compressed file. */ +/*! Open pipe to compressed text file for reading + * + * \param file name of the file to open + * \return FILE pointer to pipe using for reading the compressed file. */ - FILE *compressed_read(const std::string &file); +FILE *compressed_read(const std::string &file); - /*! Open pipe to compressed text file for writing - * - * \param file name of the file to open - * \return FILE pointer to pipe using for reading the compressed file. */ +/*! Open pipe to compressed text file for writing + * + * \param file name of the file to open + * \return FILE pointer to pipe using for reading the compressed file. */ - FILE *compressed_write(const std::string &file); +FILE *compressed_write(const std::string &file); -} // namespace platform -} // namespace LAMMPS_NS +} // namespace LAMMPS_NS::platform #endif diff --git a/src/potential_file_reader.h b/src/potential_file_reader.h index 534457a2f83..8723b855bb1 100644 --- a/src/potential_file_reader.h +++ b/src/potential_file_reader.h @@ -59,7 +59,7 @@ class PotentialFileReader : protected Pointers { std::string next_string(); // unit conversion info - int get_unit_convert() const { return unit_convert; } + [[nodiscard]] int get_unit_convert() const { return unit_convert; } }; } // namespace LAMMPS_NS diff --git a/src/read_data.cpp b/src/read_data.cpp index b09e5a984a8..d86ee82092b 100644 --- a/src/read_data.cpp +++ b/src/read_data.cpp @@ -1285,7 +1285,7 @@ void ReadData::header(int firstpass) // check for units keyword in first line and print warning on mismatch - auto units = Tokenizer(utils::strfind(line, "units = \\w+")).as_vector(); + auto units = Tokenizer(utils::strfind(line, R"(units = \w+)")).as_vector(); if (units.size() > 2) { if (units[2] != update->unit_style) error->warning(FLERR, "Inconsistent units in data file: current = {}, data file = {}", @@ -1340,14 +1340,14 @@ void ReadData::header(int firstpass) int extra_flag_value = 0; auto words = utils::split_words(line); - if (utils::strmatch(line, "^\\s*\\d+\\s+atoms\\s")) { + if (utils::strmatch(line, R"(^\s*\d+\s+atoms\s)")) { natoms = utils::bnumeric(FLERR, words[0], false, lmp); if (addflag == NONE) atom->natoms = natoms; else if (firstpass) atom->natoms += natoms; - } else if (utils::strmatch(line, "^\\s*\\d+\\s+ellipsoids\\s")) { + } else if (utils::strmatch(line, R"(^\s*\d+\s+ellipsoids\s)")) { if (!avec_ellipsoid) error->all(FLERR, "No ellipsoids allowed with this atom style"); nellipsoids = utils::bnumeric(FLERR, words[0], false, lmp); if (addflag == NONE) @@ -1355,7 +1355,7 @@ void ReadData::header(int firstpass) else if (firstpass) atom->nellipsoids += nellipsoids; - } else if (utils::strmatch(line, "^\\s*\\d+\\s+lines\\s")) { + } else if (utils::strmatch(line, R"(^\s*\d+\s+lines\s)")) { if (!avec_line) error->all(FLERR, "No lines allowed with this atom style"); nlines = utils::bnumeric(FLERR, words[0], false, lmp); if (addflag == NONE) @@ -1363,7 +1363,7 @@ void ReadData::header(int firstpass) else if (firstpass) atom->nlines += nlines; - } else if (utils::strmatch(line, "^\\s*\\d+\\s+triangles\\s")) { + } else if (utils::strmatch(line, R"(^\s*\d+\s+triangles\s)")) { if (!avec_tri) error->all(FLERR, "No triangles allowed with this atom style"); ntris = utils::bnumeric(FLERR, words[0], false, lmp); if (addflag == NONE) @@ -1371,7 +1371,7 @@ void ReadData::header(int firstpass) else if (firstpass) atom->ntris += ntris; - } else if (utils::strmatch(line, "^\\s*\\d+\\s+bodies\\s")) { + } else if (utils::strmatch(line, R"(^\s*\d+\s+bodies\s)")) { if (!avec_body) error->all(FLERR, "No bodies allowed with this atom style"); nbodies = utils::bnumeric(FLERR, words[0], false, lmp); if (addflag == NONE) @@ -1379,28 +1379,28 @@ void ReadData::header(int firstpass) else if (firstpass) atom->nbodies += nbodies; - } else if (utils::strmatch(line, "^\\s*\\d+\\s+bonds\\s")) { + } else if (utils::strmatch(line, R"(^\s*\d+\s+bonds\s)")) { nbonds = utils::bnumeric(FLERR, words[0], false, lmp); if (addflag == NONE) atom->nbonds = nbonds; else if (firstpass) atom->nbonds += nbonds; - } else if (utils::strmatch(line, "^\\s*\\d+\\s+angles\\s")) { + } else if (utils::strmatch(line, R"(^\s*\d+\s+angles\s)")) { nangles = utils::bnumeric(FLERR, words[0], false, lmp); if (addflag == NONE) atom->nangles = nangles; else if (firstpass) atom->nangles += nangles; - } else if (utils::strmatch(line, "^\\s*\\d+\\s+dihedrals\\s")) { + } else if (utils::strmatch(line, R"(^\s*\d+\s+dihedrals\s)")) { ndihedrals = utils::bnumeric(FLERR, words[0], false, lmp); if (addflag == NONE) atom->ndihedrals = ndihedrals; else if (firstpass) atom->ndihedrals += ndihedrals; - } else if (utils::strmatch(line, "^\\s*\\d+\\s+impropers\\s")) { + } else if (utils::strmatch(line, R"(^\s*\d+\s+impropers\s)")) { nimpropers = utils::bnumeric(FLERR, words[0], false, lmp); if (addflag == NONE) atom->nimpropers = nimpropers; @@ -1409,23 +1409,23 @@ void ReadData::header(int firstpass) // Atom class type settings are only set by first data file - } else if (utils::strmatch(line, "^\\s*\\d+\\s+atom\\s+types\\s")) { + } else if (utils::strmatch(line, R"(^\s*\d+\s+atom\s+types\s)")) { ntypes = utils::inumeric(FLERR, words[0], false, lmp); if (addflag == NONE) atom->ntypes = ntypes + extra_atom_types; - } else if (utils::strmatch(line, "\\s*\\d+\\s+bond\\s+types\\s")) { + } else if (utils::strmatch(line, R"(\s*\d+\s+bond\s+types\s)")) { nbondtypes = utils::inumeric(FLERR, words[0], false, lmp); if (addflag == NONE) atom->nbondtypes = nbondtypes + extra_bond_types; - } else if (utils::strmatch(line, "^\\s*\\d+\\s+angle\\s+types\\s")) { + } else if (utils::strmatch(line, R"(^\s*\d+\s+angle\s+types\s)")) { nangletypes = utils::inumeric(FLERR, words[0], false, lmp); if (addflag == NONE) atom->nangletypes = nangletypes + extra_angle_types; - } else if (utils::strmatch(line, "^\\s*\\d+\\s+dihedral\\s+types\\s")) { + } else if (utils::strmatch(line, R"(^\s*\d+\s+dihedral\s+types\s)")) { ndihedraltypes = utils::inumeric(FLERR, words[0], false, lmp); if (addflag == NONE) atom->ndihedraltypes = ndihedraltypes + extra_dihedral_types; - } else if (utils::strmatch(line, "^\\s*\\d+\\s+improper\\s+types\\s")) { + } else if (utils::strmatch(line, R"(^\s*\d+\s+improper\s+types\s)")) { nimpropertypes = utils::inumeric(FLERR, words[0], false, lmp); if (addflag == NONE) atom->nimpropertypes = nimpropertypes + extra_improper_types; @@ -1453,46 +1453,46 @@ void ReadData::header(int firstpass) // local copy of box info // so can treat differently for first vs subsequent data files - } else if (utils::strmatch(line, "^\\s*\\f+\\s+\\f+\\s+xlo\\s+xhi\\s")) { + } else if (utils::strmatch(line, R"(^\s*\f+\s+\f+\s+xlo\s+xhi\s)")) { xloxhi_flag = 1; boxlo[0] = utils::numeric(FLERR, words[0], false, lmp); boxhi[0] = utils::numeric(FLERR, words[1], false, lmp); - } else if (utils::strmatch(line, "^\\s*\\f+\\s+\\f+\\s+ylo\\s+yhi\\s")) { + } else if (utils::strmatch(line, R"(^\s*\f+\s+\f+\s+ylo\s+yhi\s)")) { yloyhi_flag = 1; boxlo[1] = utils::numeric(FLERR, words[0], false, lmp); boxhi[1] = utils::numeric(FLERR, words[1], false, lmp); - } else if (utils::strmatch(line, "^\\s*\\f+\\s+\\f+\\s+zlo\\s+zhi\\s")) { + } else if (utils::strmatch(line, R"(^\s*\f+\s+\f+\s+zlo\s+zhi\s)")) { zlozhi_flag = 1; boxlo[2] = utils::numeric(FLERR, words[0], false, lmp); boxhi[2] = utils::numeric(FLERR, words[1], false, lmp); - } else if (utils::strmatch(line, "^\\s*\\f+\\s+\\f+\\s+\\f+\\s+xy\\s+xz\\s+yz\\s")) { + } else if (utils::strmatch(line, R"(^\s*\f+\s+\f+\s+\f+\s+xy\s+xz\s+yz\s)")) { tilt_flag = 1; xy = utils::numeric(FLERR, words[0], false, lmp); xz = utils::numeric(FLERR, words[1], false, lmp); yz = utils::numeric(FLERR, words[2], false, lmp); - } else if (utils::strmatch(line, "^\\s*\\f+\\s+\\f+\\s+\\f+\\s+\\avec\\s")) { + } else if (utils::strmatch(line, R"(^\s*\f+\s+\f+\s+\f+\s+\avec\s)")) { avec_flag = 1; avec[0] = utils::numeric(FLERR, words[0], false, lmp); avec[1] = utils::numeric(FLERR, words[1], false, lmp); avec[2] = utils::numeric(FLERR, words[2], false, lmp); - } else if (utils::strmatch(line, "^\\s*\\f+\\s+\\f+\\s+\\f+\\s+\\bvec\\s")) { + } else if (utils::strmatch(line, R"(^\s*\f+\s+\f+\s+\f+\s+\bvec\s)")) { bvec_flag = 1; bvec[0] = utils::numeric(FLERR, words[0], false, lmp); bvec[1] = utils::numeric(FLERR, words[1], false, lmp); bvec[2] = utils::numeric(FLERR, words[2], false, lmp); - } else if (utils::strmatch(line, "^\\s*\\f+\\s+\\f+\\s+\\f+\\s+\\cvec\\s")) { + } else if (utils::strmatch(line, R"(^\s*\f+\s+\f+\s+\f+\s+\cvec\s)")) { cvec_flag = 1; cvec[0] = utils::numeric(FLERR, words[0], false, lmp); cvec[1] = utils::numeric(FLERR, words[1], false, lmp); cvec[2] = utils::numeric(FLERR, words[2], false, lmp); - } else if (utils::strmatch(line, "^\\s*\\f+\\s+\\f+\\s+\\f+\\s+\\abc\\s+origin\\s")) { + } else if (utils::strmatch(line, R"(^\s*\f+\s+\f+\s+\f+\s+\abc\s+origin\s)")) { abc_origin_flag = 1; abc_origin[0] = utils::numeric(FLERR, words[0], false, lmp); abc_origin[1] = utils::numeric(FLERR, words[1], false, lmp); diff --git a/src/read_restart.cpp b/src/read_restart.cpp index 671bbc7f105..8cb2e392c25 100644 --- a/src/read_restart.cpp +++ b/src/read_restart.cpp @@ -89,7 +89,7 @@ void ReadRestart::command(int narg, char **arg) if (strchr(arg[0],'%')) multiproc = 1; else multiproc = 0; - if (utils::strmatch(arg[0],"\\.mpiio")) + if (utils::strmatch(arg[0],R"(\.mpiio)")) error->all(FLERR,"MPI-IO files are no longer supported by LAMMPS"); // open single restart file or base file for multiproc case @@ -534,14 +534,14 @@ std::string ReadRestart::file_search(const std::string &inpfile) error->one(FLERR, "Filename part before '*' is too long to find restart with largest step"); // convert pattern to equivalent regexp - pattern.replace(loc,1,"\\d+"); + pattern.replace(loc,1,R"(\d+)"); if (!std::filesystem::is_directory(dirname)) error->one(FLERR,"Cannot open directory {} to search for restart file: {}",dirname); for (const auto &candidate : platform::list_directory(dirname)) { if (utils::strmatch(candidate,pattern)) { - auto num = (bigint) std::stoll(utils::strfind(candidate.substr(loc),"\\d+")); + auto num = (bigint) std::stoll(utils::strfind(candidate.substr(loc),R"(\d+)")); if (num > maxnum) maxnum = num; } } diff --git a/src/reader_native.cpp b/src/reader_native.cpp index 6defe944c14..c8352a297a3 100644 --- a/src/reader_native.cpp +++ b/src/reader_native.cpp @@ -87,13 +87,13 @@ int ReaderNative::read_time(bigint &ntimestep) // skip over unit and time information, if present. - if (utils::strmatch(line,"^\\s*ITEM: UNITS\\s*$")) + if (utils::strmatch(line, R"(^\s*ITEM: UNITS\s*$)")) read_lines(2); - if (utils::strmatch(line,"^\\s*ITEM: TIME\\s*$")) + if (utils::strmatch(line, R"(^\s*ITEM: TIME\s*$)")) read_lines(2); - if (!utils::strmatch(line,"^\\s*ITEM: TIMESTEP\\s*$")) + if (!utils::strmatch(line, R"(^\s*ITEM: TIMESTEP\s*$)")) error->one(FLERR,"Dump file is incorrectly formatted"); read_lines(1); @@ -254,11 +254,11 @@ bigint ReaderNative::read_header(double box[3][3], int &boxinfo, int &triclinic, triclinic = 0; box[0][2] = box[1][2] = box[2][2] = 0.0; read_lines(1); - if (utils::strmatch(line,"ITEM: BOX BOUNDS.*abc\\s+origin")) { + if (utils::strmatch(line, R"(ITEM: BOX BOUNDS.*abc\s+origin)")) { error->one(FLERR, Error::NOLASTLINE, "Dump files in general triclinic format are not (yet) supported"); } - if (utils::strmatch(line,"ITEM: BOX BOUNDS.*xy\\s+xz\\s+yz")) triclinic = 1; + if (utils::strmatch(line, R"(ITEM: BOX BOUNDS.*xy\s+xz\s+yz)")) triclinic = 1; try { read_lines(1); diff --git a/src/reader_native.h b/src/reader_native.h index 55a434ed144..a78f8acf7df 100644 --- a/src/reader_native.h +++ b/src/reader_native.h @@ -65,7 +65,7 @@ class ReaderNative : public Reader { void read_double_chunk(size_t); void skip_buf(size_t); void skip_reading_magic_str(); - bool is_known_magic_str() const; + [[nodiscard]] bool is_known_magic_str() const; std::string read_binary_str(size_t); }; diff --git a/src/suffix.h b/src/suffix.h index 8df694157f5..66c992e6799 100644 --- a/src/suffix.h +++ b/src/suffix.h @@ -14,11 +14,11 @@ #ifndef LMP_SUFFIX_H #define LMP_SUFFIX_H -namespace LAMMPS_NS { -namespace Suffix { + +namespace LAMMPS_NS::Suffix { enum { NONE = 0, OPT = 1 << 0, GPU = 1 << 1, OMP = 1 << 2, INTEL = 1 << 3, KOKKOS = 1 << 4 }; } -} // namespace LAMMPS_NS + #endif diff --git a/src/tabular_function.h b/src/tabular_function.h index 3531a1972ba..8c81c117187 100644 --- a/src/tabular_function.h +++ b/src/tabular_function.h @@ -45,8 +45,8 @@ class TabularFunction { if (ny1) y1 = (ys6[ks] * ps + ys5[ks]) * ps + ys4[ks]; } - double get_xmax() const { return xmax; } - double get_xmaxsq() const { return xmaxsq; } + [[nodiscard]] double get_xmax() const { return xmax; } + [[nodiscard]] double get_xmaxsq() const { return xmaxsq; } double get_vmax() { return vmax; } }; } // namespace LAMMPS_NS diff --git a/src/text_file_reader.h b/src/text_file_reader.h index f22885963ca..010c77a2b49 100644 --- a/src/text_file_reader.h +++ b/src/text_file_reader.h @@ -60,7 +60,7 @@ class FileReaderException : public std::exception { public: FileReaderException(const std::string &msg) : message(msg) {} - const char *what() const noexcept override { return message.c_str(); } + [[nodiscard]] const char *what() const noexcept override { return message.c_str(); } }; class EOFException : public FileReaderException { diff --git a/src/thermo.cpp b/src/thermo.cpp index 81668f64628..3e9ff646818 100644 --- a/src/thermo.cpp +++ b/src/thermo.cpp @@ -745,7 +745,7 @@ void Thermo::modify_params(int narg, char **arg) format_int_user.replace(found, 1, std::string(BIGINT_FORMAT).substr(1)); } else if (strcmp(arg[iarg + 1], "float") == 0) { format_float_user = arg[iarg + 2]; - } else if (utils::strmatch(arg[iarg + 1], "^\\d*\\*\\d*$")) { + } else if (utils::strmatch(arg[iarg + 1], R"(^\d*\*\d*$)")) { // handles cases such as 2*6; currently doesn't allow negatives int nlo, nhi; utils::bounds(FLERR, arg[iarg + 1], 1, nfield_initial, nlo, nhi, error); diff --git a/src/thermo.h b/src/thermo.h index 2043c6d23bc..e2ef7de2669 100644 --- a/src/thermo.h +++ b/src/thermo.h @@ -46,13 +46,13 @@ class Thermo : protected Pointers { // for accessing cached thermo and related data void lock_cache(); void unlock_cache(); - const int *get_line() const { return &nline; } - const char *get_image_fname() const { return image_fname.c_str(); } + [[nodiscard]] const int *get_line() const { return &nline; } + [[nodiscard]] const char *get_image_fname() const { return image_fname.c_str(); } - const int *get_nfield() const { return &nfield; } - const bigint *get_timestep() const { return &ntimestep; } - const std::vector &get_fields() const { return field_data; } - const std::vector &get_keywords() const { return keyword; } + [[nodiscard]] const int *get_nfield() const { return &nfield; } + [[nodiscard]] const bigint *get_timestep() const { return &ntimestep; } + [[nodiscard]] const std::vector &get_fields() const { return field_data; } + [[nodiscard]] const std::vector &get_keywords() const { return keyword; } void set_line(int _nline) { nline = _nline; } void set_image_fname(const std::string &fname) { image_fname = fname; } diff --git a/src/timer.cpp b/src/timer.cpp index 684e71cf0d7..3ba84d3b1a6 100644 --- a/src/timer.cpp +++ b/src/timer.cpp @@ -130,7 +130,7 @@ void Timer::barrier_stop() /* ---------------------------------------------------------------------- */ -double Timer::cpu(enum ttype which) +double Timer::cpu(enum ttype which) const { double current_cpu = platform::cputime(); return (current_cpu - cpu_array[which]); @@ -138,7 +138,7 @@ double Timer::cpu(enum ttype which) /* ---------------------------------------------------------------------- */ -double Timer::elapsed(enum ttype which) +double Timer::elapsed(enum ttype which) const { if (_level == OFF) return 0.0; double current_wall = platform::walltime(); diff --git a/src/timer.h b/src/timer.h index 2f3ddf2a5ea..0fb44c0ee93 100644 --- a/src/timer.h +++ b/src/timer.h @@ -59,20 +59,20 @@ class Timer : protected Pointers { // accessor methods for supported level of detail - bool has_loop() const { return (_level >= LOOP); } - bool has_normal() const { return (_level >= NORMAL); } - bool has_full() const { return (_level >= FULL); } - bool has_sync() const { return (_sync != OFF); } - bool has_timeout() const { return (_timeout >= 0.0); } + [[nodiscard]] bool has_loop() const { return (_level >= LOOP); } + [[nodiscard]] bool has_normal() const { return (_level >= NORMAL); } + [[nodiscard]] bool has_full() const { return (_level >= FULL); } + [[nodiscard]] bool has_sync() const { return (_sync != OFF); } + [[nodiscard]] bool has_timeout() const { return (_timeout >= 0.0); } // flag if wallclock time is expired - bool is_timeout() const { return (_timeout == 0.0); } + [[nodiscard]] bool is_timeout() const { return (_timeout == 0.0); } - double elapsed(enum ttype); - double cpu(enum ttype); + [[nodiscard]] double elapsed(enum ttype) const; + [[nodiscard]] double cpu(enum ttype) const; - double get_cpu(enum ttype which) const { return cpu_array[which]; }; - double get_wall(enum ttype which) const { return wall_array[which]; }; + [[nodiscard]] double get_cpu(enum ttype which) const { return cpu_array[which]; }; + [[nodiscard]] double get_wall(enum ttype which) const { return wall_array[which]; }; void set_wall(enum ttype, double); @@ -93,7 +93,7 @@ class Timer : protected Pointers { // check for timeout. inline wrapper around internal // function to reduce overhead in case there is no check. - bool check_timeout(int step) + [[nodiscard]] bool check_timeout(int step) { if (_timeout == 0.0) return true; if (_nextcheck != step) diff --git a/src/tokenizer.h b/src/tokenizer.h index 2283b4ee84c..676d188706e 100644 --- a/src/tokenizer.h +++ b/src/tokenizer.h @@ -44,9 +44,9 @@ class Tokenizer { void reset(); void skip(int n = 1); - bool has_next() const; - bool contains(const std::string &str) const; - bool matches(const std::string &str) const; + [[nodiscard]] bool has_next() const; + [[nodiscard]] bool contains(const std::string &str) const; + [[nodiscard]] bool matches(const std::string &str) const; std::string next(); size_t count(); @@ -74,7 +74,7 @@ class TokenizerException : public std::exception { * exception is caught. * * \return String with error message */ - const char *what() const noexcept override { return message.c_str(); } + [[nodiscard]] const char *what() const noexcept override { return message.c_str(); } }; /** Exception thrown by ValueTokenizer when trying to convert an invalid integer string */ @@ -122,9 +122,9 @@ class ValueTokenizer { int next_int(); double next_double(); - bool has_next() const; - bool contains(const std::string &value) const; - bool matches(const std::string &str) const; + [[nodiscard]] bool has_next() const; + [[nodiscard]] bool contains(const std::string &value) const; + [[nodiscard]] bool matches(const std::string &str) const; void skip(int ntokens = 1); size_t count(); diff --git a/src/utils.cpp b/src/utils.cpp index 5b5465ca5fb..45e65c4b328 100644 --- a/src/utils.cpp +++ b/src/utils.cpp @@ -915,7 +915,7 @@ int utils::expand_args(const char *file, int line, int narg, char **arg, int mod // match grids - if (strmatch(word, "^[cf]_\\w+:\\w+:\\w+\\[\\d*\\*\\d*\\]")) { + if (strmatch(word, R"(^[cf]_\w+:\w+:\w+\[\d*\*\d*\])")) { auto gridid = utils::parse_grid_id(file, line, word, lmp->error); size_t first = gridid[2].find('['); @@ -986,8 +986,8 @@ int utils::expand_args(const char *file, int line, int narg, char **arg, int mod // match compute, fix, or custom property array reference with a '*' wildcard // number range in the first pair of square brackets - } else if (strmatch(word, "^[cfv]_\\w+\\[\\d*\\*\\d*\\]") || - strmatch(word, "^[id]2_\\w+\\[\\d*\\*\\d*\\]")) { + } else if (strmatch(word, R"(^[cfv]_\w+\[\d*\*\d*\])") || + strmatch(word, R"(^[id]2_\w+\[\d*\*\d*\])")) { // split off the compute/fix/property ID, the wildcard and trailing text @@ -1374,8 +1374,8 @@ std::string utils::uppercase(const std::string &text) std::string utils::trim(const std::string &line) { - int beg = re_match(line.c_str(), "\\S+"); - int end = re_match(line.c_str(), "\\s+$"); + int beg = re_match(line.c_str(), R"(\S+)"); + int end = re_match(line.c_str(), R"(\s+$)"); if (beg < 0) beg = 0; if (end < 0) end = line.size(); @@ -1693,7 +1693,7 @@ bool utils::is_integer(const std::string &str) { if (str.empty()) return false; - return strmatch(str, "^[+-]?\\d+$"); + return strmatch(str, R"(^[+-]?\d+$)"); } /* ---------------------------------------------------------------------- @@ -1704,9 +1704,9 @@ bool utils::is_double(const std::string &str) { if (str.empty()) return false; - return strmatch(str, "^[+-]?\\d+\\.?\\d*$") || - strmatch(str, "^[+-]?\\d+\\.?\\d*[eE][+-]?\\d+$") || strmatch(str, "^[+-]?\\d*\\.?\\d+$") || - strmatch(str, "^[+-]?\\d*\\.?\\d+[eE][+-]?\\d+$"); + return strmatch(str, R"(^[+-]?\d+\.?\d*$)") || + strmatch(str, R"(^[+-]?\d+\.?\d*[eE][+-]?\d+$)") || strmatch(str, R"(^[+-]?\d*\.?\d+$)") || + strmatch(str, R"(^[+-]?\d*\.?\d+[eE][+-]?\d+$)"); } /* ---------------------------------------------------------------------- diff --git a/src/utils.h b/src/utils.h index 5ad6785a570..c1388a6e5fc 100644 --- a/src/utils.h +++ b/src/utils.h @@ -30,19 +30,20 @@ namespace LAMMPS_NS { class Error; class Input; class LAMMPS; +} // namespace LAMMPS_NS -namespace utils { +namespace LAMMPS_NS::utils { - /*! Match text against a simplified regex pattern - * - * \param text the text to be matched against the pattern - * \param pattern the search pattern, which may contain regexp markers - * \return true if the pattern matches, false if not */ +/*! Match text against a simplified regex pattern + * + * \param text the text to be matched against the pattern + * \param pattern the search pattern, which may contain regexp markers + * \return true if the pattern matches, false if not */ - bool strmatch(const std::string &text, const std::string &pattern); +bool strmatch(const std::string &text, const std::string &pattern); - /*! Compare two string while ignoring whitespace - * +/*! Compare two string while ignoring whitespace + * \verbatim embed:rst .. versionadded:: 4Feb2025 @@ -51,15 +52,15 @@ This function compares two strings while skipping over any kind of whitespace (blank, tab, newline, carriage return, etc.). \endverbatim - * - * \param text1 the first text to be compared - * \param text2 the second text to be compared - * \return true if the non-whitespace part of the two strings matches, false if not */ + * + * \param text1 the first text to be compared + * \param text2 the second text to be compared + * \return true if the non-whitespace part of the two strings matches, false if not */ - bool strsame(const std::string &text1, const std::string &text2); +bool strsame(const std::string &text1, const std::string &text2); - /*! Compress whitespace in a string - * +/*! Compress whitespace in a string + * \verbatim embed:rst .. versionadded:: 4Feb2025 @@ -67,33 +68,33 @@ This function compares two strings while skipping over any kind of whitespace This function compresses whitespace in a string to just a single blank. \endverbatim - * - * \param text the text to be compressed - * \return string with whitespace compressed to single blanks */ + * + * \param text the text to be compressed + * \return string with whitespace compressed to single blanks */ - std::string strcompress(const std::string &text); +std::string strcompress(const std::string &text); - /*! Find sub-string that matches a simplified regex pattern - * - * \param text the text to be matched against the pattern - * \param pattern the search pattern, which may contain regexp markers - * \return the string that matches the pattern or an empty one */ +/*! Find sub-string that matches a simplified regex pattern + * + * \param text the text to be matched against the pattern + * \param pattern the search pattern, which may contain regexp markers + * \return the string that matches the pattern or an empty one */ - std::string strfind(const std::string &text, const std::string &pattern); +std::string strfind(const std::string &text, const std::string &pattern); - /*! Print error message about missing arguments for command - * - * This function simplifies the repetitive reporting missing arguments to a command. - * - * \param file name of source file for error message - * \param line line number in source file for error message - * \param cmd name of the failing command - * \param error pointer to Error class instance (for abort) or nullptr */ +/*! Print error message about missing arguments for command + * + * This function simplifies the repetitive reporting missing arguments to a command. + * + * \param file name of source file for error message + * \param line line number in source file for error message + * \param cmd name of the failing command + * \param error pointer to Error class instance (for abort) or nullptr */ - void missing_cmd_args(const std::string &file, int line, const std::string &cmd, Error *error); +void missing_cmd_args(const std::string &file, int line, const std::string &cmd, Error *error); - /*! Create string with last command and optionally pointing to arg with error - * +/*! Create string with last command and optionally pointing to arg with error + * \verbatim embed:rst .. versionadded:: 4Feb2025 @@ -106,341 +107,341 @@ as indicated by the *failed* argument. Any whitespace in the lines with the com output are compressed to a single blank by calling :cpp:func:`strcompress()` \endverbatim - * - * \param input pointer to the Input class instance (for access to last command args) - * \param failed index of the faulty argument (-1 to point to the command itself) - * \return string with two or three lines to follow error messages */ - std::string point_to_error(Input *input, int failed); + * + * \param input pointer to the Input class instance (for access to last command args) + * \param failed index of the faulty argument (-1 to point to the command itself) + * \return string with two or three lines to follow error messages */ +std::string point_to_error(Input *input, int failed); - /*! Internal function handling the argument list for logmesg(). */ +/*! Internal function handling the argument list for logmesg(). */ - void fmtargs_logmesg(LAMMPS *lmp, fmt::string_view format, fmt::format_args args); +void fmtargs_logmesg(LAMMPS *lmp, fmt::string_view format, fmt::format_args args); - /*! Send formatted message to screen and logfile, if available - * - * This function simplifies the repetitive task of outputting some - * message to both the screen and/or the log file. The template - * wrapper with {fmt} formatting and argument processing allows - * this function to work similar to :cpp:func:`utils::print() `. - * - * \param lmp pointer to LAMMPS class instance - * \param format format string of message to be printed - * \param args arguments to format string */ +/*! Send formatted message to screen and logfile, if available + * + * This function simplifies the repetitive task of outputting some + * message to both the screen and/or the log file. The template + * wrapper with {fmt} formatting and argument processing allows + * this function to work similar to :cpp:func:`utils::print() `. + * + * \param lmp pointer to LAMMPS class instance + * \param format format string of message to be printed + * \param args arguments to format string */ - template void logmesg(LAMMPS *lmp, const std::string &format, Args &&...args) - { - fmtargs_logmesg(lmp, format, fmt::make_format_args(args...)); - } +template void logmesg(LAMMPS *lmp, const std::string &format, Args &&...args) +{ + fmtargs_logmesg(lmp, format, fmt::make_format_args(args...)); +} - /*! \overload - * - * \param lmp pointer to LAMMPS class instance - * \param mesg string with message to be printed */ +/*! \overload + * + * \param lmp pointer to LAMMPS class instance + * \param mesg string with message to be printed */ - void logmesg(LAMMPS *lmp, const std::string &mesg); +void logmesg(LAMMPS *lmp, const std::string &mesg); - /*! Internal function handling the argument list for print(). */ +/*! Internal function handling the argument list for print(). */ - void fmtargs_print(FILE *fp, fmt::string_view format, fmt::format_args args); +void fmtargs_print(FILE *fp, fmt::string_view format, fmt::format_args args); - /*! Write formatted message to file - * +/*! Write formatted message to file + * \verbatim embed:rst .. versionadded:: 4Feb2025 \endverbatim - * - * This function implements a version of (f)printf() that uses {fmt} formatting - * - * \param fp stdio FILE pointer - * \param format format string of message to be printed - * \param args arguments to format string */ - - template void print(FILE *fp, const std::string &format, Args &&...args) - { - fmtargs_print(fp, format, fmt::make_format_args(args...)); - } - - /*! \overload - * - * Print to stdout without specifying the FILE pointer. - * - * \param format format string of message to be printed - * \param args arguments to format string - */ - template void print(const std::string &format, Args &&...args) - { - fmtargs_print(stdout, format, fmt::make_format_args(args...)); - } - - /*! \overload - * - * Print string message without format - * - * \param fp stdio FILE pointer - * \param mesg string with message to be printed */ - - void print(FILE *fp, const std::string &mesg); - - /*! \overload - * - * Print string message without format to stdout - * - * \param mesg string with message to be printed */ - - void print(const std::string &mesg); - - /*! Return text redirecting the user to a specific paragraph in the manual - * - * The LAMMPS manual contains detailed explanations for errors and - * warnings where a simple error message may not be sufficient. These can - * be reached through URLs with a numeric code > 0. This function creates the - * corresponding text to be included into the error message that redirects - * the user to that URL. Using an error code of 0 returns a message - * pointing to a URL discussing error messages in general. - * - * \param errorcode non-negative number pointing to a paragraph in the manual */ - - std::string errorurl(int errorcode); - - /*! Flush output buffers - * - * This function calls fflush() on screen and logfile FILE pointers - * if available and thus tells the operating system to output all - * currently buffered data. This is local operation and independent - * from buffering by a file system or an MPI library. - */ - - void flush_buffers(LAMMPS *lmp); - - /*! Return a string representing the current system error status - * - * This is a wrapper around calling strerror(errno). - * - * \return error string */ - - std::string getsyserror(); - - /*! Wrapper around fgets() which reads whole lines but truncates the - * data to the buffer size and ensures a newline char at the end. - * - * This function is useful for reading line based text files with - * possible comments that should be parsed later. This applies to - * data files, potential files, atomfile variable files and so on. - * It is used instead of fgets() by utils::read_lines_from_file(). - * - * \param s buffer for storing the result of fgets() - * \param size size of buffer s (max number of bytes returned) - * \param fp file pointer used by fgets() */ - - char *fgets_trunc(char *s, int size, FILE *fp); - - /*! Safe wrapper around fgets() which aborts on errors - * or EOF and prints a suitable error message to help debugging. - * - * Use nullptr as the error parameter to avoid the abort on EOF or error. - * - * \param srcname name of the calling source file (from FLERR macro) - * \param srcline line in the calling source file (from FLERR macro) - * \param s buffer for storing the result of fgets() - * \param size size of buffer s (max number of bytes read by fgets()) - * \param fp file pointer used by fgets() - * \param filename file name associated with fp (may be a null pointer; then LAMMPS will try to detect) - * \param error pointer to Error class instance (for abort) or nullptr */ - - void sfgets(const char *srcname, int srcline, char *s, int size, FILE *fp, const char *filename, - Error *error); - - /*! Safe wrapper around fread() which aborts on errors - * or EOF and prints a suitable error message to help debugging. - * - * Use nullptr as the error parameter to avoid the abort on EOF or error. - * - * \param srcname name of the calling source file (from FLERR macro) - * \param srcline line in the calling source file (from FLERR macro) - * \param s buffer for storing the result of fread() - * \param size size of data elements read by fread() - * \param num number of data elements read by fread() - * \param fp file pointer used by fread() - * \param filename file name associated with fp (may be a null pointer; then LAMMPS will try to detect) - * \param error pointer to Error class instance (for abort) or nullptr */ - - void sfread(const char *srcname, int srcline, void *s, size_t size, size_t num, FILE *fp, - const char *filename, Error *error); - - /*! Read N lines of text from file into buffer and broadcast them - * - * This function uses repeated calls to fread() to fill a buffer with - * newline terminated text. If a line does not end in a newline (e.g. - * at the end of a file), it is added. The caller has to allocate an - * nlines by nmax sized buffer for storing the text data. - * Reading is done by MPI rank 0 of the given communicator only, and - * thus only MPI rank 0 needs to provide a valid file pointer. - * - * \param fp file pointer used by fread - * \param nlines number of lines to be read - * \param nmax maximum length of a single line - * \param buffer buffer for storing the data. - * \param me MPI rank of calling process in MPI communicator - * \param comm MPI communicator for broadcast - * \return 1 if the read was short, 0 if read was successful */ - - int read_lines_from_file(FILE *fp, int nlines, int nmax, char *buffer, int me, MPI_Comm comm); - - /*! Report if a requested style is in a package or may have a typo - * - * \param style type of style that is to be checked for - * \param name name of style that was not found - * \param lmp pointer to top-level LAMMPS class instance - * \return string usable for error messages */ - - std::string check_packages_for_style(const std::string &style, const std::string &name, - LAMMPS *lmp); - - /*! Convert a string to a boolean while checking whether it is a valid boolean term. - * Valid terms are 'yes', 'no', 'true', 'false', 'on', 'off', and '1', '0'. Only - * lower case is accepted. - * - * \param file name of source file for error message - * \param line line number in source file for error message - * \param str string to be converted to logical - * \param do_abort determines whether to call Error::one() or Error::all() - * \param lmp pointer to top-level LAMMPS class instance - * \return 1 if string resolves to "true", otherwise 0 */ - - int logical(const char *file, int line, const std::string &str, bool do_abort, LAMMPS *lmp); - - /*! \overload - * - * \param file name of source file for error message - * \param line line number in source file for error message - * \param str string to be converted to logical - * \param do_abort determines whether to call Error::one() or Error::all() - * \param lmp pointer to top-level LAMMPS class instance - * \return 1 if string resolves to "true", otherwise 0 */ - - int logical(const char *file, int line, const char *str, bool do_abort, LAMMPS *lmp); - - /*! Convert a string to a floating point number while checking - * if it is a valid floating point or integer number - * - * \param file name of source file for error message - * \param line line number in source file for error message - * \param str string to be converted to number - * \param do_abort determines whether to call Error::one() or Error::all() - * \param lmp pointer to top-level LAMMPS class instance - * \return double precision floating point number */ - - double numeric(const char *file, int line, const std::string &str, bool do_abort, LAMMPS *lmp); - - /*! \overload - * - * \param file name of source file for error message - * \param line line number in source file for error message - * \param str string to be converted to number - * \param do_abort determines whether to call Error::one() or Error::all() - * \param lmp pointer to top-level LAMMPS class instance - * \return double precision floating point number */ - - double numeric(const char *file, int line, const char *str, bool do_abort, LAMMPS *lmp); - - /*! Convert a string to an integer number while checking - * if it is a valid integer number (regular int) - * - * \param file name of source file for error message - * \param line line number in source file for error message - * \param str string to be converted to number - * \param do_abort determines whether to call Error::one() or Error::all() - * \param lmp pointer to top-level LAMMPS class instance - * \return integer number (regular int) */ - - int inumeric(const char *file, int line, const std::string &str, bool do_abort, LAMMPS *lmp); - - /*! \overload - * - * \param file name of source file for error message - * \param line line number in source file for error message - * \param str string to be converted to number - * \param do_abort determines whether to call Error::one() or Error::all() - * \param lmp pointer to top-level LAMMPS class instance - * \return double precision floating point number */ - - int inumeric(const char *file, int line, const char *str, bool do_abort, LAMMPS *lmp); - - /*! Convert a string to an integer number while checking - * if it is a valid integer number (bigint) - * - * \param file name of source file for error message - * \param line line number in source file for error message - * \param str string to be converted to number - * \param do_abort determines whether to call Error::one() or Error::all() - * \param lmp pointer to top-level LAMMPS class instance - * \return integer number (bigint) */ - - bigint bnumeric(const char *file, int line, const std::string &str, bool do_abort, LAMMPS *lmp); - - /*! \overload - * - * \param file name of source file for error message - * \param line line number in source file for error message - * \param str string to be converted to number - * \param do_abort determines whether to call Error::one() or Error::all() - * \param lmp pointer to top-level LAMMPS class instance - * \return double precision floating point number */ - - bigint bnumeric(const char *file, int line, const char *str, bool do_abort, LAMMPS *lmp); - - /*! Convert a string to an integer number while checking - * if it is a valid integer number (tagint) - * - * \param file name of source file for error message - * \param line line number in source file for error message - * \param str string to be converted to number - * \param do_abort determines whether to call Error::one() or Error::all() - * \param lmp pointer to top-level LAMMPS class instance - * \return integer number (tagint) */ - - tagint tnumeric(const char *file, int line, const std::string &str, bool do_abort, LAMMPS *lmp); - - /*! \overload - * - * \param file name of source file for error message - * \param line line number in source file for error message - * \param str string to be converted to number - * \param do_abort determines whether to call Error::one() or Error::all() - * \param lmp pointer to top-level LAMMPS class instance - * \return double precision floating point number */ - - tagint tnumeric(const char *file, int line, const char *str, bool do_abort, LAMMPS *lmp); - - /*! Compute index bounds derived from a string with a possible wildcard - * - * This functions processes the string in *str* and set the values of *nlo* - * and *nhi* according to the following five cases: - * - * - a single number, i: nlo = i; nhi = i; - * - a single asterisk, \*: nlo = nmin; nhi = nmax; - * - a single number followed by an asterisk, i\*: nlo = i; nhi = nmax; - * - a single asterisk followed by a number, \*i: nlo = nmin; nhi = i; - * - two numbers with an asterisk in between. i\*j: nlo = i; nhi = j; - * - * \param file name of source file for error message - * \param line line number in source file for error message - * \param str string to be processed - * \param nmin smallest possible lower bound - * \param nmax largest allowed upper bound - * \param nlo lower bound - * \param nhi upper bound - * \param error pointer to Error class for out-of-bounds messages - * \param failed argument index with failed expansion (optional) */ - - template - void bounds(const char *file, int line, const std::string &str, bigint nmin, bigint nmax, - TYPE &nlo, TYPE &nhi, Error *error, int failed = -2); // -2 = Error::NOPOINTER - - /*! Same as utils::bounds(), but string may be a typelabel - * + * + * This function implements a version of (f)printf() that uses {fmt} formatting + * + * \param fp stdio FILE pointer + * \param format format string of message to be printed + * \param args arguments to format string */ + +template void print(FILE *fp, const std::string &format, Args &&...args) +{ + fmtargs_print(fp, format, fmt::make_format_args(args...)); +} + +/*! \overload + * + * Print to stdout without specifying the FILE pointer. + * + * \param format format string of message to be printed + * \param args arguments to format string + */ +template void print(const std::string &format, Args &&...args) +{ + fmtargs_print(stdout, format, fmt::make_format_args(args...)); +} + +/*! \overload + * + * Print string message without format + * + * \param fp stdio FILE pointer + * \param mesg string with message to be printed */ + +void print(FILE *fp, const std::string &mesg); + +/*! \overload + * + * Print string message without format to stdout + * + * \param mesg string with message to be printed */ + +void print(const std::string &mesg); + +/*! Return text redirecting the user to a specific paragraph in the manual + * + * The LAMMPS manual contains detailed explanations for errors and + * warnings where a simple error message may not be sufficient. These can + * be reached through URLs with a numeric code > 0. This function creates the + * corresponding text to be included into the error message that redirects + * the user to that URL. Using an error code of 0 returns a message + * pointing to a URL discussing error messages in general. + * + * \param errorcode non-negative number pointing to a paragraph in the manual */ + +std::string errorurl(int errorcode); + +/*! Flush output buffers + * + * This function calls fflush() on screen and logfile FILE pointers + * if available and thus tells the operating system to output all + * currently buffered data. This is local operation and independent + * from buffering by a file system or an MPI library. + */ + +void flush_buffers(LAMMPS *lmp); + +/*! Return a string representing the current system error status + * + * This is a wrapper around calling strerror(errno). + * + * \return error string */ + +std::string getsyserror(); + +/*! Wrapper around fgets() which reads whole lines but truncates the + * data to the buffer size and ensures a newline char at the end. + * + * This function is useful for reading line based text files with + * possible comments that should be parsed later. This applies to + * data files, potential files, atomfile variable files and so on. + * It is used instead of fgets() by utils::read_lines_from_file(). + * + * \param s buffer for storing the result of fgets() + * \param size size of buffer s (max number of bytes returned) + * \param fp file pointer used by fgets() */ + +char *fgets_trunc(char *s, int size, FILE *fp); + +/*! Safe wrapper around fgets() which aborts on errors + * or EOF and prints a suitable error message to help debugging. + * + * Use nullptr as the error parameter to avoid the abort on EOF or error. + * + * \param srcname name of the calling source file (from FLERR macro) + * \param srcline line in the calling source file (from FLERR macro) + * \param s buffer for storing the result of fgets() + * \param size size of buffer s (max number of bytes read by fgets()) + * \param fp file pointer used by fgets() + * \param filename file name associated with fp (may be a null pointer; then LAMMPS will try to detect) + * \param error pointer to Error class instance (for abort) or nullptr */ + +void sfgets(const char *srcname, int srcline, char *s, int size, FILE *fp, const char *filename, + Error *error); + +/*! Safe wrapper around fread() which aborts on errors + * or EOF and prints a suitable error message to help debugging. + * + * Use nullptr as the error parameter to avoid the abort on EOF or error. + * + * \param srcname name of the calling source file (from FLERR macro) + * \param srcline line in the calling source file (from FLERR macro) + * \param s buffer for storing the result of fread() + * \param size size of data elements read by fread() + * \param num number of data elements read by fread() + * \param fp file pointer used by fread() + * \param filename file name associated with fp (may be a null pointer; then LAMMPS will try to detect) + * \param error pointer to Error class instance (for abort) or nullptr */ + +void sfread(const char *srcname, int srcline, void *s, size_t size, size_t num, FILE *fp, + const char *filename, Error *error); + +/*! Read N lines of text from file into buffer and broadcast them + * + * This function uses repeated calls to fread() to fill a buffer with + * newline terminated text. If a line does not end in a newline (e.g. + * at the end of a file), it is added. The caller has to allocate an + * nlines by nmax sized buffer for storing the text data. + * Reading is done by MPI rank 0 of the given communicator only, and + * thus only MPI rank 0 needs to provide a valid file pointer. + * + * \param fp file pointer used by fread + * \param nlines number of lines to be read + * \param nmax maximum length of a single line + * \param buffer buffer for storing the data. + * \param me MPI rank of calling process in MPI communicator + * \param comm MPI communicator for broadcast + * \return 1 if the read was short, 0 if read was successful */ + +int read_lines_from_file(FILE *fp, int nlines, int nmax, char *buffer, int me, MPI_Comm comm); + +/*! Report if a requested style is in a package or may have a typo + * + * \param style type of style that is to be checked for + * \param name name of style that was not found + * \param lmp pointer to top-level LAMMPS class instance + * \return string usable for error messages */ + +std::string check_packages_for_style(const std::string &style, const std::string &name, + LAMMPS *lmp); + +/*! Convert a string to a boolean while checking whether it is a valid boolean term. + * Valid terms are 'yes', 'no', 'true', 'false', 'on', 'off', and '1', '0'. Only + * lower case is accepted. + * + * \param file name of source file for error message + * \param line line number in source file for error message + * \param str string to be converted to logical + * \param do_abort determines whether to call Error::one() or Error::all() + * \param lmp pointer to top-level LAMMPS class instance + * \return 1 if string resolves to "true", otherwise 0 */ + +int logical(const char *file, int line, const std::string &str, bool do_abort, LAMMPS *lmp); + +/*! \overload + * + * \param file name of source file for error message + * \param line line number in source file for error message + * \param str string to be converted to logical + * \param do_abort determines whether to call Error::one() or Error::all() + * \param lmp pointer to top-level LAMMPS class instance + * \return 1 if string resolves to "true", otherwise 0 */ + +int logical(const char *file, int line, const char *str, bool do_abort, LAMMPS *lmp); + +/*! Convert a string to a floating point number while checking + * if it is a valid floating point or integer number + * + * \param file name of source file for error message + * \param line line number in source file for error message + * \param str string to be converted to number + * \param do_abort determines whether to call Error::one() or Error::all() + * \param lmp pointer to top-level LAMMPS class instance + * \return double precision floating point number */ + +double numeric(const char *file, int line, const std::string &str, bool do_abort, LAMMPS *lmp); + +/*! \overload + * + * \param file name of source file for error message + * \param line line number in source file for error message + * \param str string to be converted to number + * \param do_abort determines whether to call Error::one() or Error::all() + * \param lmp pointer to top-level LAMMPS class instance + * \return double precision floating point number */ + +double numeric(const char *file, int line, const char *str, bool do_abort, LAMMPS *lmp); + +/*! Convert a string to an integer number while checking + * if it is a valid integer number (regular int) + * + * \param file name of source file for error message + * \param line line number in source file for error message + * \param str string to be converted to number + * \param do_abort determines whether to call Error::one() or Error::all() + * \param lmp pointer to top-level LAMMPS class instance + * \return integer number (regular int) */ + +int inumeric(const char *file, int line, const std::string &str, bool do_abort, LAMMPS *lmp); + +/*! \overload + * + * \param file name of source file for error message + * \param line line number in source file for error message + * \param str string to be converted to number + * \param do_abort determines whether to call Error::one() or Error::all() + * \param lmp pointer to top-level LAMMPS class instance + * \return double precision floating point number */ + +int inumeric(const char *file, int line, const char *str, bool do_abort, LAMMPS *lmp); + +/*! Convert a string to an integer number while checking + * if it is a valid integer number (bigint) + * + * \param file name of source file for error message + * \param line line number in source file for error message + * \param str string to be converted to number + * \param do_abort determines whether to call Error::one() or Error::all() + * \param lmp pointer to top-level LAMMPS class instance + * \return integer number (bigint) */ + +bigint bnumeric(const char *file, int line, const std::string &str, bool do_abort, LAMMPS *lmp); + +/*! \overload + * + * \param file name of source file for error message + * \param line line number in source file for error message + * \param str string to be converted to number + * \param do_abort determines whether to call Error::one() or Error::all() + * \param lmp pointer to top-level LAMMPS class instance + * \return double precision floating point number */ + +bigint bnumeric(const char *file, int line, const char *str, bool do_abort, LAMMPS *lmp); + +/*! Convert a string to an integer number while checking + * if it is a valid integer number (tagint) + * + * \param file name of source file for error message + * \param line line number in source file for error message + * \param str string to be converted to number + * \param do_abort determines whether to call Error::one() or Error::all() + * \param lmp pointer to top-level LAMMPS class instance + * \return integer number (tagint) */ + +tagint tnumeric(const char *file, int line, const std::string &str, bool do_abort, LAMMPS *lmp); + +/*! \overload + * + * \param file name of source file for error message + * \param line line number in source file for error message + * \param str string to be converted to number + * \param do_abort determines whether to call Error::one() or Error::all() + * \param lmp pointer to top-level LAMMPS class instance + * \return double precision floating point number */ + +tagint tnumeric(const char *file, int line, const char *str, bool do_abort, LAMMPS *lmp); + +/*! Compute index bounds derived from a string with a possible wildcard + * + * This functions processes the string in *str* and set the values of *nlo* + * and *nhi* according to the following five cases: + * + * - a single number, i: nlo = i; nhi = i; + * - a single asterisk, \*: nlo = nmin; nhi = nmax; + * - a single number followed by an asterisk, i\*: nlo = i; nhi = nmax; + * - a single asterisk followed by a number, \*i: nlo = nmin; nhi = i; + * - two numbers with an asterisk in between. i\*j: nlo = i; nhi = j; + * + * \param file name of source file for error message + * \param line line number in source file for error message + * \param str string to be processed + * \param nmin smallest possible lower bound + * \param nmax largest allowed upper bound + * \param nlo lower bound + * \param nhi upper bound + * \param error pointer to Error class for out-of-bounds messages + * \param failed argument index with failed expansion (optional) */ + +template +void bounds(const char *file, int line, const std::string &str, bigint nmin, bigint nmax, TYPE &nlo, + TYPE &nhi, Error *error, int failed = -2); // -2 = Error::NOPOINTER + +/*! Same as utils::bounds(), but string may be a typelabel + * \verbatim embed:rst .. versionadded:: 27June2024 @@ -451,466 +452,464 @@ This functions adds the following case to :cpp:func:`utils::bounds() - void bounds_typelabel(const char *file, int line, const std::string &str, bigint nmin, - bigint nmax, TYPE &nlo, TYPE &nhi, LAMMPS *lmp, int mode); - - /*! Expand list of arguments when containing fix/compute wildcards - * - * This function searches the list of arguments in *arg* for strings - * of the kind c_ID[*], f_ID[*], v_ID[*], i2_ID[*], d2_ID[*], or - * c_ID:gname:dname[*] referring to computes, fixes, vector style - * variables, custom per-atom arrays, or grids, respectively. - * Any such strings are replaced by one or more strings with the - * '*' character replaced by the corresponding possible numbers as - * determined from the fix, compute, variable, property, or grid instance. - * Unrecognized strings are just copied. If the *mode* parameter - * is set to 0, expand global vectors, but not global arrays; if it is - * set to 1, expand global arrays (by column) but not global vectors. - * - * If any expansion happens, the earg list and all its - * strings are new allocations and must be freed explicitly by the - * caller. Otherwise arg and earg will point to the same address - * and no explicit de-allocation is needed by the caller. - * - * The *argmap* pointer to an int pointer may be used to accept an array - * of integers mapping the arguments after the expansion to their original - * index. If this pointer is NULL (the default) than this map is not created. - * Otherwise, it must be deallocated by the calling code. - * - * \param file name of source file for error message - * \param line line number in source file for error message - * \param narg number of arguments in current list - * \param arg argument list, possibly containing wildcards - * \param mode select between global vectors(=0) and arrays (=1) - * \param earg new argument list with wildcards expanded - * \param lmp pointer to top-level LAMMPS class instance - * \param argmap pointer to integer pointer for mapping expanded indices to input (optional) - * \return number of arguments in expanded list */ - - int expand_args(const char *file, int line, int narg, char **arg, int mode, char **&earg, - LAMMPS *lmp, int **argmap = nullptr); - - /*! Expand type label string into its equivalent numeric type - * - * This function checks if a given string may be a type label and - * then searches the labelmap type indicated by the *mode* argument - * for the corresponding numeric type. If this is found, a copy of - * the numeric type string is made and returned. Otherwise a null - * pointer is returned. - * If a string is returned, the calling code must free it with delete[]. - * - * \param file name of source file for error message - * \param line line number in source file for error message - * \param str type string to be expanded - * \param mode select labelmap using constants from Atom class - * \param lmp pointer to top-level LAMMPS class instance - * \return pointer to expanded string or null pointer */ - - char *expand_type(const char *file, int line, const std::string &str, int mode, LAMMPS *lmp); - - /*! Expand type label string into its equivalent integer-valued numeric type - * - * This function has the same arguments as expand_type() but returns an integer value */ - - int expand_type_int(const char *file, int line, const std::string &str, int mode, LAMMPS *lmp, - bool verify = false); - - /*! Check grid reference for valid Compute or Fix which produces per-grid data - * - * This function checks if a command argument in the input script - * is a valid reference to per-grid data produced by a Compute or Fix. - * If it is, the ID of the compute/fix is returned which the caller must - * free with delete []. It also returns igrid/idata/index integers - * which allow the caller to access the per-grid data. - * A flag is also returned to indicate compute vs fix vs error. - * - * \param errstr name of calling command, e.g. "Fix ave/grid" - * \param ref per-grid reference from input script, e.g. "c_10:grid:data[2]" - * \param nevery frequency at which caller will access fix for per-grid info, - * ignored when reference is to a compute - * \param id ID of Compute or Fix - * \param igrid which grid is referenced (0 to N-1) - * \param idata which data on grid is referenced (0 to N-1) - * \param index which column of data is referenced (0 for vec, 1-N for array) - * \param lmp pointer to top-level LAMMPS class instance - * \return ArgINFO::COMPUTE or FIX or UNKNOWN or NONE */ - - int check_grid_reference(char *errstr, char *ref, int nevery, char *&id, int &igrid, int &idata, - int &index, LAMMPS *lmp); - - /*! Parse grid reference into 3 sub-strings - * - * Format of grid ID reference = id:gname:dname. - * Return vector with the 3 sub-strings. - * - * \param file name of source file for error message - * \param line line number in source file for error message - * \param name complete grid ID - * \param error pointer to Error class - * \return std::vector containing the 3 sub-strings */ - - std::vector parse_grid_id(const char *file, int line, const std::string &name, - Error *error); - - /*! Make C-style copy of string in new storage - * - * This allocates a storage buffer and copies the C-style or - * C++ style string into it. The buffer is allocated with "new" - * and thus needs to be deallocated with "delete[]". - * - * \param text string that should be copied - * \return new buffer with copy of string */ - - char *strdup(const std::string &text); - - /*! Convert string to lowercase - * - * \param line string that should be converted - * \return new string with all lowercase characters */ - - std::string lowercase(const std::string &line); - - /*! Convert string to uppercase - * - * \param line string that should be converted - * \return new string with all uppercase characters */ - - std::string uppercase(const std::string &line); - - /*! Trim leading and trailing whitespace. Like TRIM() in Fortran. - * - * \param line string that should be trimmed - * \return new string without whitespace (string) */ - - std::string trim(const std::string &line); - - /*! Return string with anything from the first '#' character onward removed - * - * \param line string that should be trimmed - * \return new string without comment (string) */ - - std::string trim_comment(const std::string &line); - - /*! Replace first '*' character in a string with a number, optionally zero-padded - * - * If there is no '*' character in the string, return the original string. - * If the number requires more characters than the value of the *pad* - * argument, do not add zeros; otherwise add as many zeroes as needed to - * the left to make the the number representation *pad* characters wide. - * - * \param name string with file containing a '*' (or not) - * \param step step number to replace the (first) '*' - * \param pad zero-padding (may be zero) - * \return processed string */ - - std::string star_subst(const std::string &name, bigint step, int pad); - - /*! Remove style suffix from string if suffix flag is active - * - * + * \param file name of source file for error message + * \param line line number in source file for error message + * \param str string to be processed + * \param nmin smallest possible lower bound + * \param nmax largest allowed upper bound + * \param nlo lower bound + * \param nhi upper bound + * \param lmp pointer to top-level LAMMPS class instance + * \param mode select labelmap using constants from Atom class */ + +template +void bounds_typelabel(const char *file, int line, const std::string &str, bigint nmin, bigint nmax, + TYPE &nlo, TYPE &nhi, LAMMPS *lmp, int mode); + +/*! Expand list of arguments when containing fix/compute wildcards + * + * This function searches the list of arguments in *arg* for strings + * of the kind c_ID[*], f_ID[*], v_ID[*], i2_ID[*], d2_ID[*], or + * c_ID:gname:dname[*] referring to computes, fixes, vector style + * variables, custom per-atom arrays, or grids, respectively. + * Any such strings are replaced by one or more strings with the + * '*' character replaced by the corresponding possible numbers as + * determined from the fix, compute, variable, property, or grid instance. + * Unrecognized strings are just copied. If the *mode* parameter + * is set to 0, expand global vectors, but not global arrays; if it is + * set to 1, expand global arrays (by column) but not global vectors. + * + * If any expansion happens, the earg list and all its + * strings are new allocations and must be freed explicitly by the + * caller. Otherwise arg and earg will point to the same address + * and no explicit de-allocation is needed by the caller. + * + * The *argmap* pointer to an int pointer may be used to accept an array + * of integers mapping the arguments after the expansion to their original + * index. If this pointer is NULL (the default) than this map is not created. + * Otherwise, it must be deallocated by the calling code. + * + * \param file name of source file for error message + * \param line line number in source file for error message + * \param narg number of arguments in current list + * \param arg argument list, possibly containing wildcards + * \param mode select between global vectors(=0) and arrays (=1) + * \param earg new argument list with wildcards expanded + * \param lmp pointer to top-level LAMMPS class instance + * \param argmap pointer to integer pointer for mapping expanded indices to input (optional) + * \return number of arguments in expanded list */ + +int expand_args(const char *file, int line, int narg, char **arg, int mode, char **&earg, + LAMMPS *lmp, int **argmap = nullptr); + +/*! Expand type label string into its equivalent numeric type + * + * This function checks if a given string may be a type label and + * then searches the labelmap type indicated by the *mode* argument + * for the corresponding numeric type. If this is found, a copy of + * the numeric type string is made and returned. Otherwise a null + * pointer is returned. + * If a string is returned, the calling code must free it with delete[]. + * + * \param file name of source file for error message + * \param line line number in source file for error message + * \param str type string to be expanded + * \param mode select labelmap using constants from Atom class + * \param lmp pointer to top-level LAMMPS class instance + * \return pointer to expanded string or null pointer */ + +char *expand_type(const char *file, int line, const std::string &str, int mode, LAMMPS *lmp); + +/*! Expand type label string into its equivalent integer-valued numeric type + * + * This function has the same arguments as expand_type() but returns an integer value */ + +int expand_type_int(const char *file, int line, const std::string &str, int mode, LAMMPS *lmp, + bool verify = false); + +/*! Check grid reference for valid Compute or Fix which produces per-grid data + * + * This function checks if a command argument in the input script + * is a valid reference to per-grid data produced by a Compute or Fix. + * If it is, the ID of the compute/fix is returned which the caller must + * free with delete []. It also returns igrid/idata/index integers + * which allow the caller to access the per-grid data. + * A flag is also returned to indicate compute vs fix vs error. + * + * \param errstr name of calling command, e.g. "Fix ave/grid" + * \param ref per-grid reference from input script, e.g. "c_10:grid:data[2]" + * \param nevery frequency at which caller will access fix for per-grid info, + * ignored when reference is to a compute + * \param id ID of Compute or Fix + * \param igrid which grid is referenced (0 to N-1) + * \param idata which data on grid is referenced (0 to N-1) + * \param index which column of data is referenced (0 for vec, 1-N for array) + * \param lmp pointer to top-level LAMMPS class instance + * \return ArgINFO::COMPUTE or FIX or UNKNOWN or NONE */ + +int check_grid_reference(char *errstr, char *ref, int nevery, char *&id, int &igrid, int &idata, + int &index, LAMMPS *lmp); + +/*! Parse grid reference into 3 sub-strings + * + * Format of grid ID reference = id:gname:dname. + * Return vector with the 3 sub-strings. + * + * \param file name of source file for error message + * \param line line number in source file for error message + * \param name complete grid ID + * \param error pointer to Error class + * \return std::vector containing the 3 sub-strings */ + +std::vector parse_grid_id(const char *file, int line, const std::string &name, + Error *error); + +/*! Make C-style copy of string in new storage + * + * This allocates a storage buffer and copies the C-style or + * C++ style string into it. The buffer is allocated with "new" + * and thus needs to be deallocated with "delete[]". + * + * \param text string that should be copied + * \return new buffer with copy of string */ + +char *strdup(const std::string &text); + +/*! Convert string to lowercase + * + * \param line string that should be converted + * \return new string with all lowercase characters */ + +std::string lowercase(const std::string &line); + +/*! Convert string to uppercase + * + * \param line string that should be converted + * \return new string with all uppercase characters */ + +std::string uppercase(const std::string &line); + +/*! Trim leading and trailing whitespace. Like TRIM() in Fortran. + * + * \param line string that should be trimmed + * \return new string without whitespace (string) */ + +std::string trim(const std::string &line); + +/*! Return string with anything from the first '#' character onward removed + * + * \param line string that should be trimmed + * \return new string without comment (string) */ + +std::string trim_comment(const std::string &line); + +/*! Replace first '*' character in a string with a number, optionally zero-padded + * + * If there is no '*' character in the string, return the original string. + * If the number requires more characters than the value of the *pad* + * argument, do not add zeros; otherwise add as many zeroes as needed to + * the left to make the the number representation *pad* characters wide. + * + * \param name string with file containing a '*' (or not) + * \param step step number to replace the (first) '*' + * \param pad zero-padding (may be zero) + * \return processed string */ + +std::string star_subst(const std::string &name, bigint step, int pad); + +/*! Remove style suffix from string if suffix flag is active + * + * \verbatim embed:rst This will try to undo the effect from using the :doc:`suffix command ` or the *-suffix/-sf* command-line flag and return correspondingly modified string. \endverbatim - * - * \param style string of style name - * \param lmp pointer to the LAMMPS class (has suffix_flag and suffix strings) - * \return processed string */ - - std::string strip_style_suffix(const std::string &style, LAMMPS *lmp); - - /*! Check if a string will likely have UTF-8 encoded characters - * - * UTF-8 uses the 7-bit standard ASCII table for the first 127 characters and - * all other characters are encoded as multiple bytes. For the multi-byte - * characters the first byte has either the highest two, three, or four bits - * set followed by a zero bit and followed by one, two, or three more bytes, - * respectively, where the highest bit is set and the second highest bit set - * to 0. The remaining bits combined are the character code, which is thus - * limited to 21-bits. - * - * For the sake of efficiency this test only checks if a character in the string - * has the highest bit set and thus is very likely an UTF-8 character. It will - * not be able to tell this this is a valid UTF-8 character or whether it is a - * 2-byte, 3-byte, or 4-byte character. - * + * + * \param style string of style name + * \param lmp pointer to the LAMMPS class (has suffix_flag and suffix strings) + * \return processed string */ + +std::string strip_style_suffix(const std::string &style, LAMMPS *lmp); + +/*! Check if a string will likely have UTF-8 encoded characters + * + * UTF-8 uses the 7-bit standard ASCII table for the first 127 characters and + * all other characters are encoded as multiple bytes. For the multi-byte + * characters the first byte has either the highest two, three, or four bits + * set followed by a zero bit and followed by one, two, or three more bytes, + * respectively, where the highest bit is set and the second highest bit set + * to 0. The remaining bits combined are the character code, which is thus + * limited to 21-bits. + * + * For the sake of efficiency this test only checks if a character in the string + * has the highest bit set and thus is very likely an UTF-8 character. It will + * not be able to tell this this is a valid UTF-8 character or whether it is a + * 2-byte, 3-byte, or 4-byte character. + * \verbatim embed:rst *See also* :cpp:func:`utils::utf8_subst` \endverbatim - * \param line string that should be checked - * \return true if string contains UTF-8 encoded characters (bool) */ - - inline bool has_utf8(const std::string &line) - { - for (auto c : line) - if (c & 0x80U) return true; - return false; - } - - /*! Replace known UTF-8 characters with ASCII equivalents - * + * \param line string that should be checked + * \return true if string contains UTF-8 encoded characters (bool) */ + +inline bool has_utf8(const std::string &line) +{ + for (auto c : line) + if (c & 0x80U) return true; + return false; +} + +/*! Replace known UTF-8 characters with ASCII equivalents + * \verbatim embed:rst *See also* :cpp:func:`utils::has_utf8` \endverbatim - * \param line string that should be converted - * \return new string with ascii replacements (string) */ - - std::string utf8_subst(const std::string &line); - - /*! Count words in string with custom choice of separating characters - * - * \param text string that should be searched - * \param separators string containing characters that will be treated as whitespace - * \return number of words found */ - - size_t count_words(const std::string &text, const std::string &separators); - - /*! Count words in string, ignore any whitespace matching " \t\r\n\f" - * - * \param text string that should be searched - * \return number of words found */ - - size_t count_words(const std::string &text); - - /*! Count words in C-string, ignore any whitespace matching " \t\r\n\f" - * - * \param text string that should be searched - * \return number of words found */ - - size_t count_words(const char *text); - - /*! Count words in a single line, trim anything from '#' onward - * - * \param text string that should be trimmed and searched - * \param separators string containing characters that will be treated as whitespace - * \return number of words found */ - - size_t trim_and_count_words(const std::string &text, const std::string &separators = " \t\r\n\f"); - - /*! Take list of words and join them with a given separator text. - * - * This is the inverse operation of what the split_words() function - * Tokenizer classes do. - * - * \param words STL vector with strings - * \param sep separator string (may be empty) - * \return string with the concatenated words and separators */ - - std::string join_words(const std::vector &words, const std::string &sep); - - /*! Take text and split into non-whitespace words. - * - * This can handle strings with single and double quotes, escaped quotes, - * and escaped codes within quotes, but due to using an STL container and - * STL strings is rather slow because of making copies. Designed for - * parsing command-lines and similar text and not for time critical - * processing. Use a tokenizer class if performance matters. - * + * \param line string that should be converted + * \return new string with ascii replacements (string) */ + +std::string utf8_subst(const std::string &line); + +/*! Count words in string with custom choice of separating characters + * + * \param text string that should be searched + * \param separators string containing characters that will be treated as whitespace + * \return number of words found */ + +size_t count_words(const std::string &text, const std::string &separators); + +/*! Count words in string, ignore any whitespace matching " \t\r\n\f" + * + * \param text string that should be searched + * \return number of words found */ + +size_t count_words(const std::string &text); + +/*! Count words in C-string, ignore any whitespace matching " \t\r\n\f" + * + * \param text string that should be searched + * \return number of words found */ + +size_t count_words(const char *text); + +/*! Count words in a single line, trim anything from '#' onward + * + * \param text string that should be trimmed and searched + * \param separators string containing characters that will be treated as whitespace + * \return number of words found */ + +size_t trim_and_count_words(const std::string &text, const std::string &separators = " \t\r\n\f"); + +/*! Take list of words and join them with a given separator text. + * + * This is the inverse operation of what the split_words() function + * Tokenizer classes do. + * + * \param words STL vector with strings + * \param sep separator string (may be empty) + * \return string with the concatenated words and separators */ + +std::string join_words(const std::vector &words, const std::string &sep); + +/*! Take text and split into non-whitespace words. + * + * This can handle strings with single and double quotes, escaped quotes, + * and escaped codes within quotes, but due to using an STL container and + * STL strings is rather slow because of making copies. Designed for + * parsing command-lines and similar text and not for time critical + * processing. Use a tokenizer class if performance matters. + * \verbatim embed:rst *See also* :cpp:class:`Tokenizer`, :cpp:class:`ValueTokenizer` \endverbatim - * \param text string that should be split - * \return STL vector with the words */ - - std::vector split_words(const std::string &text); - - /*! Take multi-line text and split into lines - * - * \param text string that should be split - * \return STL vector with the lines */ - std::vector split_lines(const std::string &text); - - /*! Check if string can be converted to valid integer - * - * \param str string that should be checked - * \return true, if string contains valid a integer, false otherwise */ - - bool is_integer(const std::string &str); - - /*! Check if string can be converted to valid floating-point number - * - * \param str string that should be checked - * \return true, if string contains valid number, false otherwise */ - - bool is_double(const std::string &str); - - /*! Check if string is a valid ID - * ID strings may contain only letters, numbers, and underscores. - * - * \param str string that should be checked - * \return true, if string contains valid id, false otherwise */ - - bool is_id(const std::string &str); - - /*! Check if string is a valid type label, or numeric type, or numeric type range. - * Numeric type or type range may only contain digits or the '*' character. - * Type label strings may not contain a digit, or a '*', or a '#' character as the - * first character to distinguish them from comments and numeric types or type ranges. - * They also may not contain any whitespace. If the string is a valid numeric type - * or type range the function returns 0, if it is a valid type label the function - * returns 1, otherwise it returns -1. - * - * \param str string that should be checked - * \return 0, 1, or -1, depending on whether the string is valid numeric type, valid type label or neither, respectively */ - - int is_type(const std::string &str); - - /*! Determine full path of potential file. If file is not found in current directory, - * search directories listed in LAMMPS_POTENTIALS environment variable - * - * \param path file path - * \return full path to potential file */ - - std::string get_potential_file_path(const std::string &path); - - /*! Read potential file and return DATE field if it is present - * - * \param path file path - * \param potential_name name of potential that is being read - * \return DATE field if present */ - - std::string get_potential_date(const std::string &path, const std::string &potential_name); - - /*! Read potential file and return UNITS field if it is present - * - * \param path file path - * \param potential_name name of potential that is being read - * \return UNITS field if present */ - - std::string get_potential_units(const std::string &path, const std::string &potential_name); - - enum { NOCONVERT = 0, METAL2REAL = 1, REAL2METAL = 1 << 1 }; - enum { UNKNOWN = 0, ENERGY }; - - /*! Return bitmask of available conversion factors for a given property - * - * \param property property to be converted - * \return bitmask indicating available conversions */ - - int get_supported_conversions(const int property); - - /*! Return unit conversion factor for given property and selected from/to units - * - * \param property property to be converted - * \param conversion constant indicating the conversion - * \return conversion factor */ - - double get_conversion_factor(const int property, const int conversion); - - /*! Open a potential file as specified by *name* - * - * If opening the file directly fails, the function will search for - * it in the list of folder pointed to by the environment variable - * ``LAMMPS_POTENTIALS`` (if it is set). - * - * If the potential file has a ``UNITS`` tag in the first line, the - * tag's value is compared to the current unit style setting. - * The behavior of the function then depends on the value of the - * *auto_convert* parameter. If it is a null pointer, then the unit - * values must match or else the open will fail with an error. Otherwise - * the bitmask that *auto_convert* points to is used check for - * compatibility with possible automatic conversions by the calling - * function. If compatible, the bitmask is set to the required - * conversion or ``utils::NOCONVERT``. - * - * \param name file- or pathname of the potential file - * \param lmp pointer to top-level LAMMPS class instance - * \param auto_convert pointer to unit conversion bitmask or ``nullptr`` - * \return FILE pointer of the opened potential file or ``nullptr`` */ - - FILE *open_potential(const std::string &name, LAMMPS *lmp, int *auto_convert); - - /*! Convert a time string to seconds - * - * The strings "off" and "unlimited" result in -1 - * - * \param timespec a string in the following format: ([[HH:]MM:]SS) - * \return total in seconds */ - - double timespec2seconds(const std::string ×pec); - - /*! Convert a LAMMPS version date to a number - * - * This will generate a number YYYYMMDD from a date string - * (with or without blanks) that is suitable for numerical - * comparisons, i.e. later dates will generate a larger number. - * - * The day may or may not have a leading zero, the month - * is identified by the first 3 letters (so there may be more) - * and the year may be 2 or 4 digits (the missing 2 digits will - * be assumed as 20. That is 04 corresponds to 2004). - * - * No check is made whether the date is valid. - * - * \param date string in the format (Day Month Year) - * \return date code */ - - int date2num(const std::string &date); - - /*! Return current date as string - * - * This will generate a string containing the current date in YYYY-MM-DD format. - * - * \return string with current date */ - - std::string current_date(); - - /*! Binary search in a vector of ascending doubles of length N - * - * If the value is smaller than the smallest value in the vector, 0 is returned. - * If the value is larger or equal than the largest value in the vector, N-1 is returned. - * Otherwise the index that satisfies the condition - * - * haystack[index] <= value < haystack[index+1] - * - * is returned, i.e. a value from 1 to N-2. Note that if there are tied values in the - * haystack, always the larger index is returned as only that satisfied the condition. - * - * \param needle search value for which are are looking for the closest index - * \param n size of the haystack array - * \param haystack array with data in ascending order. - * \return index of value in the haystack array smaller or equal to needle */ - int binary_search(const double needle, const int n, const double *haystack); - - /*! Custom merge sort implementation - * - * This function provides a custom upward hybrid merge sort - * implementation with support to pass an opaque pointer to - * the comparison function, e.g. for access to class members. - * This avoids having to use global variables. For improved - * performance, it uses an in-place insertion sort on initial - * chunks of up to 64 elements and switches to merge sort from - * then on. - * - * \param index Array with indices to be sorted - * \param num Length of the index array - * \param ptr Pointer to opaque object passed to comparison function - * \param comp Pointer to comparison function */ - - void merge_sort(int *index, int num, void *ptr, int (*comp)(int, int, void *)); -} // namespace utils -} // namespace LAMMPS_NS - + * \param text string that should be split + * \return STL vector with the words */ + +std::vector split_words(const std::string &text); + +/*! Take multi-line text and split into lines + * + * \param text string that should be split + * \return STL vector with the lines */ +std::vector split_lines(const std::string &text); + +/*! Check if string can be converted to valid integer + * + * \param str string that should be checked + * \return true, if string contains valid a integer, false otherwise */ + +bool is_integer(const std::string &str); + +/*! Check if string can be converted to valid floating-point number + * + * \param str string that should be checked + * \return true, if string contains valid number, false otherwise */ + +bool is_double(const std::string &str); + +/*! Check if string is a valid ID + * ID strings may contain only letters, numbers, and underscores. + * + * \param str string that should be checked + * \return true, if string contains valid id, false otherwise */ + +bool is_id(const std::string &str); + +/*! Check if string is a valid type label, or numeric type, or numeric type range. + * Numeric type or type range may only contain digits or the '*' character. + * Type label strings may not contain a digit, or a '*', or a '#' character as the + * first character to distinguish them from comments and numeric types or type ranges. + * They also may not contain any whitespace. If the string is a valid numeric type + * or type range the function returns 0, if it is a valid type label the function + * returns 1, otherwise it returns -1. + * + * \param str string that should be checked + * \return 0, 1, or -1, depending on whether the string is valid numeric type, valid type label or neither, respectively */ + +int is_type(const std::string &str); + +/*! Determine full path of potential file. If file is not found in current directory, + * search directories listed in LAMMPS_POTENTIALS environment variable + * + * \param path file path + * \return full path to potential file */ + +std::string get_potential_file_path(const std::string &path); + +/*! Read potential file and return DATE field if it is present + * + * \param path file path + * \param potential_name name of potential that is being read + * \return DATE field if present */ + +std::string get_potential_date(const std::string &path, const std::string &potential_name); + +/*! Read potential file and return UNITS field if it is present + * + * \param path file path + * \param potential_name name of potential that is being read + * \return UNITS field if present */ + +std::string get_potential_units(const std::string &path, const std::string &potential_name); + +enum { NOCONVERT = 0, METAL2REAL = 1, REAL2METAL = 1 << 1 }; +enum { UNKNOWN = 0, ENERGY }; + +/*! Return bitmask of available conversion factors for a given property + * + * \param property property to be converted + * \return bitmask indicating available conversions */ + +int get_supported_conversions(const int property); + +/*! Return unit conversion factor for given property and selected from/to units + * + * \param property property to be converted + * \param conversion constant indicating the conversion + * \return conversion factor */ + +double get_conversion_factor(const int property, const int conversion); + +/*! Open a potential file as specified by *name* + * + * If opening the file directly fails, the function will search for + * it in the list of folder pointed to by the environment variable + * ``LAMMPS_POTENTIALS`` (if it is set). + * + * If the potential file has a ``UNITS`` tag in the first line, the + * tag's value is compared to the current unit style setting. + * The behavior of the function then depends on the value of the + * *auto_convert* parameter. If it is a null pointer, then the unit + * values must match or else the open will fail with an error. Otherwise + * the bitmask that *auto_convert* points to is used check for + * compatibility with possible automatic conversions by the calling + * function. If compatible, the bitmask is set to the required + * conversion or ``utils::NOCONVERT``. + * + * \param name file- or pathname of the potential file + * \param lmp pointer to top-level LAMMPS class instance + * \param auto_convert pointer to unit conversion bitmask or ``nullptr`` + * \return FILE pointer of the opened potential file or ``nullptr`` */ + +FILE *open_potential(const std::string &name, LAMMPS *lmp, int *auto_convert); + +/*! Convert a time string to seconds + * + * The strings "off" and "unlimited" result in -1 + * + * \param timespec a string in the following format: ([[HH:]MM:]SS) + * \return total in seconds */ + +double timespec2seconds(const std::string ×pec); + +/*! Convert a LAMMPS version date to a number + * + * This will generate a number YYYYMMDD from a date string + * (with or without blanks) that is suitable for numerical + * comparisons, i.e. later dates will generate a larger number. + * + * The day may or may not have a leading zero, the month + * is identified by the first 3 letters (so there may be more) + * and the year may be 2 or 4 digits (the missing 2 digits will + * be assumed as 20. That is 04 corresponds to 2004). + * + * No check is made whether the date is valid. + * + * \param date string in the format (Day Month Year) + * \return date code */ + +int date2num(const std::string &date); + +/*! Return current date as string + * + * This will generate a string containing the current date in YYYY-MM-DD format. + * + * \return string with current date */ + +std::string current_date(); + +/*! Binary search in a vector of ascending doubles of length N + * + * If the value is smaller than the smallest value in the vector, 0 is returned. + * If the value is larger or equal than the largest value in the vector, N-1 is returned. + * Otherwise the index that satisfies the condition + * + * haystack[index] <= value < haystack[index+1] + * + * is returned, i.e. a value from 1 to N-2. Note that if there are tied values in the + * haystack, always the larger index is returned as only that satisfied the condition. + * + * \param needle search value for which are are looking for the closest index + * \param n size of the haystack array + * \param haystack array with data in ascending order. + * \return index of value in the haystack array smaller or equal to needle */ +int binary_search(const double needle, const int n, const double *haystack); + +/*! Custom merge sort implementation + * + * This function provides a custom upward hybrid merge sort + * implementation with support to pass an opaque pointer to + * the comparison function, e.g. for access to class members. + * This avoids having to use global variables. For improved + * performance, it uses an in-place insertion sort on initial + * chunks of up to 64 elements and switches to merge sort from + * then on. + * + * \param index Array with indices to be sorted + * \param num Length of the index array + * \param ptr Pointer to opaque object passed to comparison function + * \param comp Pointer to comparison function */ + +void merge_sort(int *index, int num, void *ptr, int (*comp)(int, int, void *)); +} // namespace LAMMPS_NS::utils #endif diff --git a/unittest/commands/test_kim_commands.cpp b/unittest/commands/test_kim_commands.cpp index 991eb7e2274..17dc8dba060 100644 --- a/unittest/commands/test_kim_commands.cpp +++ b/unittest/commands/test_kim_commands.cpp @@ -554,7 +554,7 @@ TEST_F(KimCommandsTest, kim_query) "one or more comma-separated items.*", command(squery);); - squery = "kim query a0 get_lattice_constant_cubic crystal=[\"fcc\"] species=[\"Al\"]"; + squery = R"(kim query a0 get_lattice_constant_cubic crystal=["fcc"] species=["Al"])"; TEST_FAILURE(".*ERROR: Illegal query format.\nMust use 'kim init' before " "'kim query' or must provide the model name after query " "function with the format of 'model=\\[model_name\\]'.*", diff --git a/unittest/commands/test_labelmap.cpp b/unittest/commands/test_labelmap.cpp index f570facbe80..1025b46e84f 100644 --- a/unittest/commands/test_labelmap.cpp +++ b/unittest/commands/test_labelmap.cpp @@ -166,7 +166,7 @@ TEST_F(LabelMapTest, Atoms) BEGIN_HIDE_OUTPUT(); command("labelmap clear"); - command("labelmap atom 1 \"C1'\" 2 'C2\"' 3 \"\"\"C1'-C2\" \"\"\" 4 \"\"\" C2\"-C1'\"\"\""); + command(R"(labelmap atom 1 "C1'" 2 'C2"' 3 """C1'-C2" """ 4 """ C2"-C1'""")"); END_HIDE_OUTPUT(); EXPECT_TRUE(atom->lmap->is_complete(Atom::ATOM)); EXPECT_EQ(atom->lmap->find("C1'", Atom::ATOM), 1); @@ -207,7 +207,7 @@ TEST_F(LabelMapTest, Topology) BEGIN_HIDE_OUTPUT(); command("labelmap atom 2 \"N2'\""); command("labelmap bond 1 C1-N2 2 [C1][C1] 3 N2=N2"); - command("labelmap angle 1 C1-N2-C1 2 \"\"\" N2'-C1\"-N2' \"\"\""); + command(R"(labelmap angle 1 C1-N2-C1 2 """ N2'-C1"-N2' """)"); command("labelmap dihedral 1 'C1-N2-C1-N2'"); command("labelmap improper 1 \"C1-N2-C1-N2\""); command("mass C1 12.0"); diff --git a/unittest/commands/test_variables.cpp b/unittest/commands/test_variables.cpp index 9bdc67f14df..a2c03b3b9ab 100644 --- a/unittest/commands/test_variables.cpp +++ b/unittest/commands/test_variables.cpp @@ -480,7 +480,7 @@ TEST_F(VariableTest, IfCommand) ASSERT_THAT(text, ContainsRegex(".*bingo!.*")); BEGIN_CAPTURE_OUTPUT(); - command("if 1>2 then 'print \"bingo!\"' else 'print \"nope?\"'"); + command(R"(if 1>2 then 'print "bingo!"' else 'print "nope?"')"); text = END_CAPTURE_OUTPUT(); ASSERT_THAT(text, ContainsRegex(".*nope\?.*")); @@ -490,27 +490,27 @@ TEST_F(VariableTest, IfCommand) ASSERT_THAT(text, ContainsRegex(".*bingo!.*")); BEGIN_CAPTURE_OUTPUT(); - command("if 2<1 then 'print \"bingo!\"' else 'print \"nope?\"'"); + command(R"(if 2<1 then 'print "bingo!"' else 'print "nope?"')"); text = END_CAPTURE_OUTPUT(); ASSERT_THAT(text, ContainsRegex(".*nope\?.*")); BEGIN_CAPTURE_OUTPUT(); - command("if (1<=0) then 'print \"bingo!\"' else 'print \"nope?\"'"); + command(R"(if (1<=0) then 'print "bingo!"' else 'print "nope?"')"); text = END_CAPTURE_OUTPUT(); ASSERT_THAT(text, ContainsRegex(".*nope\?.*")); BEGIN_CAPTURE_OUTPUT(); - command("if (0<=0) then 'print \"bingo!\"' else 'print \"nope?\"'"); + command(R"(if (0<=0) then 'print "bingo!"' else 'print "nope?"')"); text = END_CAPTURE_OUTPUT(); ASSERT_THAT(text, ContainsRegex(".*bingo!.*")); BEGIN_CAPTURE_OUTPUT(); - command("if (0>=1) then 'print \"bingo!\"' else 'print \"nope?\"'"); + command(R"(if (0>=1) then 'print "bingo!"' else 'print "nope?"')"); text = END_CAPTURE_OUTPUT(); ASSERT_THAT(text, ContainsRegex(".*nope\?.*")); BEGIN_CAPTURE_OUTPUT(); - command("if (1>=1) then 'print \"bingo!\"' else 'print \"nope?\"'"); + command(R"(if (1>=1) then 'print "bingo!"' else 'print "nope?"')"); text = END_CAPTURE_OUTPUT(); ASSERT_THAT(text, ContainsRegex(".*bingo!.*")); @@ -525,17 +525,17 @@ TEST_F(VariableTest, IfCommand) ASSERT_THAT(text, ContainsRegex(".*bingo!.*")); BEGIN_CAPTURE_OUTPUT(); - command("if !((${one}!=1.0)||(2|^1)) then 'print \"missed\"' else 'print \"bingo!\"'"); + command(R"(if !((${one}!=1.0)||(2|^1)) then 'print "missed"' else 'print "bingo!"')"); text = END_CAPTURE_OUTPUT(); ASSERT_THAT(text, ContainsRegex(".*bingo!.*")); BEGIN_CAPTURE_OUTPUT(); - command("if (1>=2)&&(0&&1) then 'print \"missed\"' else 'print \"bingo!\"'"); + command(R"(if (1>=2)&&(0&&1) then 'print "missed"' else 'print "bingo!"')"); text = END_CAPTURE_OUTPUT(); ASSERT_THAT(text, ContainsRegex(".*bingo!.*")); BEGIN_CAPTURE_OUTPUT(); - command("if !1 then 'print \"missed\"' else 'print \"bingo!\"'"); + command(R"(if !1 then 'print "missed"' else 'print "bingo!"')"); text = END_CAPTURE_OUTPUT(); ASSERT_THAT(text, ContainsRegex(".*bingo!.*")); @@ -680,7 +680,7 @@ TEST_F(VariableTest, LabelMapMolecular) command("labelmap atom 1 C1"); command("labelmap atom 2 \"N2'\""); command("labelmap bond 1 C1-N2 2 [C1][C1] 3 N2=N2"); - command("labelmap angle 1 C1-N2-C1 2 \"\"\" N2'-C1\"-N2' \"\"\""); + command(R"(labelmap angle 1 C1-N2-C1 2 """ N2'-C1"-N2' """)"); command("labelmap dihedral 1 'C1-N2-C1-N2'"); command("labelmap improper 1 \"C1-N2-C1-N2\""); command("variable t1 equal label2type(atom,C1)"); diff --git a/unittest/force-styles/error_stats.h b/unittest/force-styles/error_stats.h index 987a0585ae1..3fd085a6f11 100644 --- a/unittest/force-styles/error_stats.h +++ b/unittest/force-styles/error_stats.h @@ -25,11 +25,11 @@ class ErrorStats { void reset(); void add(const double &val); - double avg() const; - double dev() const; - double max() const { return maxerr; } - double idx() const { return maxidx; } - bool has_data() const { return num > 0; } + [[nodiscard]] double avg() const; + [[nodiscard]] double dev() const; + [[nodiscard]] double max() const { return maxerr; } + [[nodiscard]] double idx() const { return maxidx; } + [[nodiscard]] bool has_data() const { return num > 0; } private: double sum, sumsq, maxerr; diff --git a/unittest/force-styles/test_config.h b/unittest/force-styles/test_config.h index 303f48ce734..e295293e26d 100644 --- a/unittest/force-styles/test_config.h +++ b/unittest/force-styles/test_config.h @@ -101,7 +101,7 @@ class TestConfig { TestConfig(const TestConfig &) = delete; TestConfig &operator=(const TestConfig &) = delete; - std::string tags_line() const + [[nodiscard]] std::string tags_line() const { if (tags.size() > 0) { std::stringstream line; diff --git a/unittest/force-styles/yaml_reader.h b/unittest/force-styles/yaml_reader.h index 97d83fc1c43..73b8d01c0ba 100644 --- a/unittest/force-styles/yaml_reader.h +++ b/unittest/force-styles/yaml_reader.h @@ -44,7 +44,7 @@ template class YamlReader { YamlReader() {} virtual ~YamlReader() {} - std::string get_basename() const { return basename; } + [[nodiscard]] std::string get_basename() const { return basename; } int parse_file(const std::string &infile) { diff --git a/unittest/utils/fft_test_helpers.h b/unittest/utils/fft_test_helpers.h index d4f84153a67..12a91a90003 100644 --- a/unittest/utils/fft_test_helpers.h +++ b/unittest/utils/fft_test_helpers.h @@ -163,11 +163,11 @@ class FFTBuffer { // Accessors FFT_SCALAR *data() { return data_; } - const FFT_SCALAR *data() const { return data_; } - int size() const { return size_; } - int nfast() const { return nfast_; } - int nmid() const { return nmid_; } - int nslow() const { return nslow_; } + [[nodiscard]] const FFT_SCALAR *data() const { return data_; } + [[nodiscard]] int size() const { return size_; } + [[nodiscard]] int nfast() const { return nfast_; } + [[nodiscard]] int nmid() const { return nmid_; } + [[nodiscard]] int nslow() const { return nslow_; } // Zero all data void zero() { std::fill(data_, data_ + size_, 0.0); } @@ -249,7 +249,7 @@ class DataGenerator { } // Check if input is purely real (for Hermitian symmetry tests) - virtual bool is_real_input() const = 0; + [[nodiscard]] virtual bool is_real_input() const = 0; }; // ============================================================================= @@ -272,7 +272,7 @@ class DeltaFunctionGenerator : public DataGenerator { set_complex(data, 0, 0, 0, nfast, nmid, std::complex(amplitude_, 0.0)); } - bool is_real_input() const override { return true; } + [[nodiscard]] bool is_real_input() const override { return true; } private: FFT_SCALAR amplitude_; @@ -296,7 +296,7 @@ class ConstantGenerator : public DataGenerator { } } - bool is_real_input() const override { return true; } + [[nodiscard]] bool is_real_input() const override { return true; } private: FFT_SCALAR value_; @@ -334,7 +334,7 @@ class SineWaveGenerator : public DataGenerator { } } - bool is_real_input() const override { return true; } + [[nodiscard]] bool is_real_input() const override { return true; } private: int kx_, ky_, kz_; @@ -376,7 +376,7 @@ class GaussianGenerator : public DataGenerator { } } - bool is_real_input() const override { return true; } + [[nodiscard]] bool is_real_input() const override { return true; } private: FFT_SCALAR sigma_; @@ -409,7 +409,7 @@ class RandomComplexGenerator : public DataGenerator { } } - bool is_real_input() const override { return false; } + [[nodiscard]] bool is_real_input() const override { return false; } private: unsigned int seed_; @@ -471,9 +471,9 @@ class MixedModesGenerator : public DataGenerator { } } - bool is_real_input() const override { return true; } + [[nodiscard]] bool is_real_input() const override { return true; } - const std::vector &get_modes() const { return modes_; } + [[nodiscard]] const std::vector &get_modes() const { return modes_; } private: std::vector modes_; @@ -504,7 +504,7 @@ class Validator { virtual bool validate() = 0; // Get error statistics from last validation - virtual const ErrorStats &get_error_stats() const { return error_stats_; } + [[nodiscard]] virtual const ErrorStats &get_error_stats() const { return error_stats_; } // Enable/disable verbose output void set_verbose(bool verbose) { verbose_ = verbose; } diff --git a/unittest/utils/test_json.cpp b/unittest/utils/test_json.cpp index 15a0598fae1..0a78a844166 100644 --- a/unittest/utils/test_json.cpp +++ b/unittest/utils/test_json.cpp @@ -45,7 +45,7 @@ TEST(JSON, serialize_deserialize) j1["name"] = "Niels"; j1["nothing"] = nullptr; - std::string expected = "{\"pi\":3.141,\"happy\":true,\"name\":\"Niels\",\"nothing\":null}"; + std::string expected = R"({"pi":3.141,"happy":true,"name":"Niels","nothing":null})"; std::string dumped = j1.dump(-1); ASSERT_THAT(expected, Eq(dumped)); diff --git a/unittest/utils/test_lepton.cpp b/unittest/utils/test_lepton.cpp index 2e9453b9a7a..bc436daddd1 100644 --- a/unittest/utils/test_lepton.cpp +++ b/unittest/utils/test_lepton.cpp @@ -128,7 +128,7 @@ TEST(LeptonCustomFunction, zbl) */ class ExampleFunction : public Lepton::CustomFunction { - int getNumArguments() const override { return 2; } + [[nodiscard]] int getNumArguments() const override { return 2; } double evaluate(const double *arguments) const override { return 2.0 * arguments[0] * arguments[1]; @@ -144,7 +144,7 @@ class ExampleFunction : public Lepton::CustomFunction { if (derivOrder[1] == 1 && derivOrder[0] == 0) return 2.0 * arguments[0]; return 0.0; } - Lepton::CustomFunction *clone() const override { return new ExampleFunction(); } + [[nodiscard]] Lepton::CustomFunction *clone() const override { return new ExampleFunction(); } }; /** diff --git a/unittest/utils/test_tokenizer.cpp b/unittest/utils/test_tokenizer.cpp index e5f947118b6..519bc0eee2d 100644 --- a/unittest/utils/test_tokenizer.cpp +++ b/unittest/utils/test_tokenizer.cpp @@ -162,7 +162,7 @@ TEST(Tokenizer, unix_paths) TEST(Tokenizer, windows_paths) { - Tokenizer t("c:\\one;\\two\\three;d:four;", ";"); + Tokenizer t(R"(c:\one;\two\three;d:four;)", ";"); ASSERT_EQ(t.count(), 3); ASSERT_THAT(t.next(), Eq("c:\\one")); ASSERT_EQ(t.has_next(), true); diff --git a/unittest/utils/test_utils.cpp b/unittest/utils/test_utils.cpp index 39287827367..c1ed137511b 100644 --- a/unittest/utils/test_utils.cpp +++ b/unittest/utils/test_utils.cpp @@ -227,7 +227,7 @@ TEST(Utils, split_words_trailing_whitespace) TEST(Utils, split_words_heredoc) { - auto list = utils::split_words("one two three \"\"\""); + auto list = utils::split_words(R"(one two three """)"); ASSERT_EQ(list.size(), 4); ASSERT_THAT(list[0], StrEq("one")); ASSERT_THAT(list[1], StrEq("two")); @@ -237,7 +237,7 @@ TEST(Utils, split_words_heredoc) TEST(Utils, split_words_heredoc_whitespace) { - auto list = utils::split_words("one two three \"\"\" "); + auto list = utils::split_words(R"(one two three """ )"); ASSERT_EQ(list.size(), 4); ASSERT_THAT(list[0], StrEq("one")); ASSERT_THAT(list[1], StrEq("two")); @@ -256,7 +256,7 @@ TEST(Utils, split_words_quoted) TEST(Utils, split_words_partially_quoted) { - auto list = utils::split_words("one \'two \"three\""); + auto list = utils::split_words(R"(one 'two "three")"); ASSERT_EQ(list.size(), 2); ASSERT_THAT(list[0], StrEq("one")); ASSERT_THAT(list[1], StrEq("two \"three\"")); @@ -264,7 +264,7 @@ TEST(Utils, split_words_partially_quoted) TEST(Utils, split_words_partially_escaped) { - auto list = utils::split_words("one \\'two \"three\""); + auto list = utils::split_words(R"(one \'two "three")"); ASSERT_EQ(list.size(), 3); ASSERT_THAT(list[0], StrEq("one")); ASSERT_THAT(list[1], StrEq("\\'two")); @@ -273,7 +273,7 @@ TEST(Utils, split_words_partially_escaped) TEST(Utils, split_words_escaped) { - auto list = utils::split_words("1\\' '\"two\"' 3\\\""); + auto list = utils::split_words(R"(1\' '"two"' 3\")"); ASSERT_EQ(list.size(), 3); ASSERT_THAT(list[0], StrEq("1\\'")); ASSERT_THAT(list[1], StrEq("\"two\"")); @@ -282,7 +282,7 @@ TEST(Utils, split_words_escaped) TEST(Utils, split_words_quote_in_quoted) { - auto list = utils::split_words("one 't\\'wo' \"th\\\"ree\""); + auto list = utils::split_words(R"(one 't\'wo' "th\"ree")"); ASSERT_EQ(list.size(), 3); ASSERT_THAT(list[0], StrEq("one")); ASSERT_THAT(list[1], StrEq("t\\'wo"));