Merge remote-tracking branch 'github/develop' into collected-small-fixes

This commit is contained in:
Axel Kohlmeyer
2025-03-25 14:16:04 -04:00
37 changed files with 1089 additions and 920 deletions

View File

@ -2,14 +2,18 @@ Moltemplate Tutorial
==================== ====================
In this tutorial, we are going to use the tool :ref:`Moltemplate In this tutorial, we are going to use the tool :ref:`Moltemplate
<moltemplate>` to set up a classical molecular dynamic simulation using <Moltemplate1>` from https://moltemplate.org/ to set up a classical
the :ref:`OPLS-AA force field <OPLSAA96>`. The first molecular dynamic simulation using the :ref:`OPLS-AA force field
task is to describe an organic compound and create a complete input deck <oplsaa2024>`. The first task is to describe an organic compound and
for LAMMPS. The second task is to map the OPLS-AA force field to a create a complete input deck for LAMMPS. The second task is to use
molecular sample created with an external tool, e.g. PACKMOL, and moltemplate to build a polymer. The third task is to map the OPLS-AA
exported as a PDB file. The files used in this tutorial can be found force field to a molecular sample created with an external tool,
in the ``tools/moltemplate/tutorial-files`` folder of the LAMMPS e.g. PACKMOL, and exported as a PDB file. The files used in this
source code distribution. tutorial can be found in the ``tools/moltemplate/tutorial-files`` folder
of the LAMMPS source code distribution.
Many more examples can be found here: https://moltemplate.org/examples.html
Simulating an organic solvent Simulating an organic solvent
""""""""""""""""""""""""""""" """""""""""""""""""""""""""""
@ -17,14 +21,13 @@ Simulating an organic solvent
This example aims to create a cubic box of the organic solvent This example aims to create a cubic box of the organic solvent
formamide. formamide.
The first step is to create a molecular topology in the The first step is to create a molecular topology in the LAMMPS-template
LAMMPS-template (LT) file format representing a single molecule, which (LT) file format representing a single molecule, which will be
will be stored in a Moltemplate object called ``_FAM inherits OPLSAA {}``. stored in a Moltemplate object called ``_FAM inherits OPLSAA {}``.
This command states that the object ``_FAM`` is based on an existing This command states that the object ``_FAM`` is based on an existing
object called ``OPLSAA``, which contains OPLS-AA parameters, atom type object called ``OPLSAA``, which contains OPLS-AA parameters, atom type
definitions, partial charges, masses and bond-angle rules for many organic definitions, partial charges, masses and bond-angle rules for many organic
and biological compounds. and biological compounds.
The atomic structure is the starting point to populate the command The atomic structure is the starting point to populate the command
``write('Data Atoms') {}``, which will write the ``Atoms`` section in the ``write('Data Atoms') {}``, which will write the ``Atoms`` section in the
LAMMPS data file. The OPLS-AA force field uses the ``atom_style full``, LAMMPS data file. The OPLS-AA force field uses the ``atom_style full``,
@ -36,21 +39,23 @@ to the ``molID``, except that the same variable is used for the whole
molecule. The atom types are assigned using ``@``-type variables. The molecule. The atom types are assigned using ``@``-type variables. The
assignment of atom types (e.g. ``@atom:177``, ``@atom:178``) is done using assignment of atom types (e.g. ``@atom:177``, ``@atom:178``) is done using
the OPLS-AA atom types defined in the "In Charges" section of the file the OPLS-AA atom types defined in the "In Charges" section of the file
``oplsaa.lt``, looking for a reasonable match with the description of the atom. ``oplsaa2024.lt``, looking for a reasonable match with the description of the atom.
The resulting file (``formamide.lt``) follows: The resulting file (``formamide.lt``) follows:
.. code-block:: bash .. code-block:: bash
import /usr/local/moltemplate/moltemplate/force_fields/oplsaa2024.lt # defines OPLSAA
_FAM inherits OPLSAA { _FAM inherits OPLSAA {
# atomID molID atomType charge coordX coordY coordZ # atomID molID atomType charge coordX coordY coordZ
write('Data Atoms') { write('Data Atoms') {
$atom:C00 $mol @atom:177 0.00 0.100 0.490 0.0 $atom:C00 $mol @atom:235 0.00 0.100 0.490 0.0
$atom:O01 $mol @atom:178 0.00 1.091 -0.250 0.0 $atom:O01 $mol @atom:236 0.00 1.091 -0.250 0.0
$atom:N02 $mol @atom:179 0.00 -1.121 -0.181 0.0 $atom:N02 $mol @atom:237 0.00 -1.121 -0.181 0.0
$atom:H03 $mol @atom:182 0.00 -2.013 0.272 0.0 $atom:H03 $mol @atom:240 0.00 -2.013 0.272 0.0
$atom:H04 $mol @atom:182 0.00 -1.056 -1.190 0.0 $atom:H04 $mol @atom:240 0.00 -1.056 -1.190 0.0
$atom:H05 $mol @atom:221 0.00 0.144 1.570 0.0 $atom:H05 $mol @atom:279 0.00 0.144 1.570 0.0
} }
# A list of the bonds in the molecule: # A list of the bonds in the molecule:
@ -64,16 +69,17 @@ The resulting file (``formamide.lt``) follows:
} }
} }
You don't have to specify the charge in this example because they will You don't have to specify the charge in this example because the OPLSAA
be assigned according to the atom type. Analogously, only a force-field assigns charge according to the atom type. (This is not true
"Data Bond List" section is needed as the atom type will determine the when using other force fields.) A "Data Bond List" section is needed as
bond type. The other bonded interactions (e.g. angles, the atom type will determine the bond type. The other bonded interactions
dihedrals, and impropers) will be automatically generated by (e.g. angles, dihedrals, and impropers) will be automatically generated by
Moltemplate. Moltemplate.
If the simulation is non-neutral, or Moltemplate complains that you have If the simulation is not charge-neutral, or Moltemplate complains that
missing bond, angle, or dihedral types, this means at least one of your you have missing bond, angle, or dihedral types, this probably means that
atom types is incorrect. at least one of your atom types is incorrect (or that perhaps there is no
suitable atom type currently defined in the ``oplsaa2024.lt`` file).
The second step is to create a master file with instructions to build a The second step is to create a master file with instructions to build a
starting structure and the LAMMPS commands to run an NPT simulation. The starting structure and the LAMMPS commands to run an NPT simulation. The
@ -81,11 +87,9 @@ master file (``solv_01.lt``) follows:
.. code-block:: bash .. code-block:: bash
# Import the force field. import formamide.lt # Defines "_FAM" and OPLSAA
import /usr/local/moltemplate/moltemplate/force_fields/oplsaa.lt
import formamide.lt # after oplsaa.lt, as it depends on it.
# Create the input sample. # Distribute the molecules on a 5x5x5 cubic grid with spacing 4.6
solv = new _FAM [5].move( 4.6, 0, 0) solv = new _FAM [5].move( 4.6, 0, 0)
[5].move( 0, 4.6, 0) [5].move( 0, 4.6, 0)
[5].move( 0, 0, 4.6) [5].move( 0, 0, 4.6)
@ -98,8 +102,11 @@ master file (``solv_01.lt``) follows:
-11.5 11.5 zlo zhi -11.5 11.5 zlo zhi
} }
# Create an input deck for LAMMPS. # Note: The lines below in the "In Run" section are often omitted.
write_once("In Init"){
write_once("In Run"){
# Create an input deck for LAMMPS.
# Run an NPT simulation.
# Input variables. # Input variables.
variable run string solv_01 # output name variable run string solv_01 # output name
variable ts equal 1 # timestep variable ts equal 1 # timestep
@ -109,12 +116,6 @@ master file (``solv_01.lt``) follows:
variable equi equal 5000 # Equilibration steps variable equi equal 5000 # Equilibration steps
variable prod equal 30000 # Production steps variable prod equal 30000 # Production steps
# PBC (set them before the creation of the box).
boundary p p p
}
# Run an NPT simulation.
write_once("In Run"){
# Derived variables. # Derived variables.
variable tcouple equal \$\{ts\}*100 variable tcouple equal \$\{ts\}*100
variable pcouple equal \$\{ts\}*1000 variable pcouple equal \$\{ts\}*1000
@ -143,7 +144,7 @@ master file (``solv_01.lt``) follows:
unfix NPT unfix NPT
} }
The first two commands insert the content of files ``oplsaa.lt`` and The first two commands insert the content of files ``oplsaa2024.lt`` and
``formamide.lt`` into the master file. At this point, we can use the ``formamide.lt`` into the master file. At this point, we can use the
command ``solv = new _FAM [N]`` to create N copies of a molecule of type command ``solv = new _FAM [N]`` to create N copies of a molecule of type
``_FAM``. In this case, we create an array of 5*5*5 molecules on a cubic ``_FAM``. In this case, we create an array of 5*5*5 molecules on a cubic
@ -153,21 +154,37 @@ the sample was created from scratch, we also specify the simulation box
size in the "Data Boundary" section. size in the "Data Boundary" section.
The LAMMPS setting for the force field are specified in the file The LAMMPS setting for the force field are specified in the file
``oplsaa.lt`` and are written automatically in the input deck. We also ``oplsaa2024.lt`` and are written automatically in the input deck. We also
specify the boundary conditions and a set of variables in specify the boundary conditions and a set of variables in
the "In Init" section. The remaining commands to run an NPT simulation the "In Init" section.
The remaining commands to run an NPT simulation
are written in the "In Run" section. Note that in this script, LAMMPS are written in the "In Run" section. Note that in this script, LAMMPS
variables are protected with the escape character ``\`` to distinguish variables are protected with the escape character ``\`` to distinguish
them from Moltemplate variables, e.g. ``\$\{run\}`` is a LAMMPS them from Moltemplate variables, e.g. ``\$\{run\}`` is a LAMMPS
variable that is written in the input deck as ``${run}``. variable that is written in the input deck as ``${run}``.
(Note: Moltemplate can be slow to run, so you need to change you run
settings frequently, I recommended moving those commands (from "In Run")
out of your .lt files and into a separate file. Moltemplate creates a
file named ``run.in.EXAMPLE`` for this purpose. You can put your run
settings and fixes that file and then invoke LAMMPS using
``mpirun -np 4 lmp -in run.in.EXAMPLE`` instead.)
Compile the master file with: Compile the master file with:
.. code-block:: bash .. code-block:: bash
moltemplate.sh -overlay-all solv_01.lt moltemplate.sh solv_01.lt
cleanup_moltemplate.sh # <-- optional: see below
And execute the simulation with the following: (Note: The optional "cleanup_moltemplate.sh" command deletes
unused atom types, which sometimes makes LAMMPS run faster.
But it does not work with many-body pair styles or dreiding-style h-bonds.
Fortunately most force fields, including OPLSAA, don't use those features.)
Then execute the simulation with the following:
.. code-block:: bash .. code-block:: bash
@ -180,15 +197,116 @@ And execute the simulation with the following:
Snapshot of the sample at the beginning and end of the simulation. Snapshot of the sample at the beginning and end of the simulation.
Rendered with Ovito. Rendered with Ovito.
Building a simple polymer
"""""""""""""""""""""""""
Moltemplate is particularly useful for building polymers (and other molecules
with sub-units). As an simple example, consider butane:
.. figure:: JPG/butane.jpg
The ``butane.lt`` file below defines Butane as a polymer containing
4 monomers (of type ``CH3``, ``CH2``, ``CH2``, ``CH3``).
.. code-block:: bash
import /usr/local/moltemplate/moltemplate/force_fields/oplsaa2024.lt # defines OPLSAA
CH3 inherits OPLSAA {
# atomID molID atomType charge coordX coordY coordZ
write("Data Atoms") {
$atom:c $mol:... @atom:54 0.0 0.000000 0.4431163 0.000000
$atom:h1 $mol:... @atom:60 0.0 0.000000 1.0741603 0.892431
$atom:h2 $mol:... @atom:60 0.0 0.000000 1.0741603 -0.892431
$atom:h3 $mol:... @atom:60 0.0 -0.892431 -0.1879277 0.000000
}
# (Using "$mol:..." indicates this object ("CH3") is part of a larger
# molecule. Moltemplate will share the molecule-ID with that molecule.)
# A list of the bonds within the "CH3" molecular sub-unit:
# BondID AtomID1 AtomID2
write('Data Bond List') {
$bond:ch1 $atom:c $atom:h1
$bond:ch2 $atom:c $atom:h2
$bond:ch3 $atom:c $atom:h3
}
}
CH2 inherits OPLSAA {
# atomID molID atomType charge coordX coordY coordZ
write("Data Atoms") {
$atom:c $mol:... @atom:57 0.0 0.000000 0.4431163 0.000000
$atom:h1 $mol:... @atom:60 0.0 0.000000 1.0741603 0.892431
$atom:h2 $mol:... @atom:60 0.0 0.000000 1.0741603 -0.892431
}
# A list of the bonds within the "CH2" molecular sub-unit:
# BondID AtomID1 AtomID2
write('Data Bond List') {
$bond:ch1 $atom:c $atom:h1
$bond:ch2 $atom:c $atom:h2
}
}
Butane inherits OPLSAA {
create_var {$mol} # optional:force all monomers to share the same molecule-ID
# - Create 4 monomers
# - Move them along the X axis using ".move()",
# - Rotate them 180 degrees with respect to the previous monomer
monomer1 = new CH3
monomer2 = new CH2.rot(180,1,0,0).move(1.2533223,0,0)
monomer3 = new CH2.move(2.5066446,0,0)
monomer4 = new CH3.rot(180,0,0,1).move(3.7599669,0,0)
# A list of the bonds connecting different monomers together:
write('Data Bond List') {
$bond:b1 $atom:monomer1/c $atom:monomer2/c
$bond:b2 $atom:monomer2/c $atom:monomer3/c
$bond:b3 $atom:monomer3/c $atom:monomer4/c
}
}
Again, you don't have to specify the charge in this example because OPLSAA
assigns charges according to the atom type.
This ``Butane`` object is a molecule which can be used anywhere other molecules
can be used. (You can arrange ``Butane`` molecules on a lattice, as we did previously.
You can also modify individual butane molecules by adding or deleting atoms or bonds.
You can add bonds between specific butane molecules or use ``Butane`` as a
subunit to define even larger molecules. See the moltemplate manual for details.)
How to build a complex polymer
""""""""""""""""""""""""""""""""""""""""""
A similar procedure can be used to create more complicated polymers,
such as the NIPAM polymer example shown below. For details, see:
https://github.com/jewettaij/moltemplate/tree/master/examples/all_atom/force_field_OPLSAA/NIPAM_polymer+water+ions
Mapping an existing structure Mapping an existing structure
""""""""""""""""""""""""""""" """""""""""""""""""""""""""""
Another helpful way to use Moltemplate is mapping an existing molecular Another helpful way to use Moltemplate is mapping an existing molecular
sample to a force field. This is useful when a complex sample is sample to a force field. This is useful when a complex sample is assembled
assembled from different simulations or created with specialized from different simulations or created with specialized software (e.g. PACKMOL).
software (e.g. PACKMOL). As in the previous example, all molecular (Note: The previous link shows how to build this entire system from scratch
species in the sample must be defined using single-molecule Moltemplate using only moltemplate. However here we will assume instead that we obtained
objects. For this example, we use a short polymer in a box containing a PDB file for this system using PACKMOL.)
As in the previous examples, all molecular species in the sample
are defined using single-molecule Moltemplate objects.
For this example, we use a short polymer in a box containing
water molecules and ions in the PDB file ``model.pdb``. water molecules and ions in the PDB file ``model.pdb``.
It is essential to understand that the order of atoms in the PDB file It is essential to understand that the order of atoms in the PDB file
@ -246,25 +364,25 @@ The resulting master LT file defining short annealing at a fixed volume
.. code-block:: bash .. code-block:: bash
# Use the OPLS-AA force field for all species. # Use the OPLS-AA force field for all species.
import /usr/local/moltemplate/moltemplate/force_fields/oplsaa.lt import /usr/local/moltemplate/moltemplate/force_fields/oplsaa2024.lt
import PolyNIPAM.lt import PolyNIPAM.lt
# Define the SPC water and ions as in the OPLS-AA # Define the SPC water and ions as in the OPLS-AA
Ca inherits OPLSAA { Ca inherits OPLSAA {
write("Data Atoms"){ write("Data Atoms"){
$atom:a1 $mol:. @atom:354 0.0 0.00000 0.00000 0.000000 $atom:a1 $mol:. @atom:412 0.0 0.00000 0.00000 0.000000
} }
} }
Cl inherits OPLSAA { Cl inherits OPLSAA {
write("Data Atoms"){ write("Data Atoms"){
$atom:a1 $mol:. @atom:344 0.0 0.00000 0.00000 0.000000 $atom:a1 $mol:. @atom:401 0.0 0.00000 0.00000 0.000000
} }
} }
SPC inherits OPLSAA { SPC inherits OPLSAA {
write("Data Atoms"){ write("Data Atoms"){
$atom:O $mol:. @atom:76 0. 0.0000000 0.00000 0.000000 $atom:O $mol:. @atom:9991 0. 0.0000000 0.00000 0.0000000
$atom:H1 $mol:. @atom:77 0. 0.8164904 0.00000 0.5773590 $atom:H1 $mol:. @atom:9990 0. 0.8164904 0.00000 0.5773590
$atom:H2 $mol:. @atom:77 0. -0.8164904 0.00000 0.5773590 $atom:H2 $mol:. @atom:9990 0. -0.8164904 0.00000 0.5773590
} }
write("Data Bond List") { write("Data Bond List") {
$bond:OH1 $atom:O $atom:H1 $bond:OH1 $atom:O $atom:H1
@ -285,8 +403,15 @@ The resulting master LT file defining short annealing at a fixed volume
0 26 zlo zhi 0 26 zlo zhi
} }
# Define the input variables.
write_once("In Init"){ write_once("In Init"){
boundary p p p # "p p p" is the default. This line is optional.
neighbor 3 bin # (This line is also optional in this example.)
}
# Note: The lines below in the "In Run" section are often omitted.
# Run an NVT simulation.
write_once("In Run"){
# Input variables. # Input variables.
variable run string sample01 # output name variable run string sample01 # output name
variable ts equal 2 # timestep variable ts equal 2 # timestep
@ -294,13 +419,6 @@ The resulting master LT file defining short annealing at a fixed volume
variable p equal 1. # equilibrium pressure variable p equal 1. # equilibrium pressure
variable equi equal 30000 # equilibration steps variable equi equal 30000 # equilibration steps
# PBC (set them before the creation of the box).
boundary p p p
neighbor 3 bin
}
# Run an NVT simulation.
write_once("In Run"){
# Set the output. # Set the output.
thermo 1000 thermo 1000
thermo_style custom step etotal evdwl ecoul elong ebond eangle & thermo_style custom step etotal evdwl ecoul elong ebond eangle &
@ -314,8 +432,8 @@ The resulting master LT file defining short annealing at a fixed volume
write_data \$\{run\}.min write_data \$\{run\}.min
# Set the constrains. # Set the constrains.
group watergroup type @atom:76 @atom:77 group watergroup type @atom:9991 @atom:9990
fix 0 watergroup shake 0.0001 10 0 b @bond:042_043 a @angle:043_042_043 fix 0 watergroup shake 0.0001 10 0 b @bond:spcO_spcH a @angle:spcH_spcO_spcH
# Short annealing. # Short annealing.
timestep \$\{ts\} timestep \$\{ts\}
@ -327,7 +445,7 @@ The resulting master LT file defining short annealing at a fixed volume
In this example, the water model is SPC and it is defined in the In this example, the water model is SPC and it is defined in the
``oplsaa.lt`` file with atom types ``@atom:76`` and ``@atom:77``. For ``oplsaa2024.lt`` file with atom types ``@atom:9991`` and ``@atom:9990``. For
water we also use the ``group`` and ``fix shake`` commands with water we also use the ``group`` and ``fix shake`` commands with
Moltemplate ``@``-type variables, to ensure consistency with the Moltemplate ``@``-type variables, to ensure consistency with the
numerical values assigned during compilation. To identify the bond and numerical values assigned during compilation. To identify the bond and
@ -336,19 +454,20 @@ are:
.. code-block:: bash .. code-block:: bash
replace{ @atom:76 @atom:76_b042_a042_d042_i042 } replace{ @atom:9991 @atom:9991_bspcO_aspcO_dspcO_ispcO }
replace{ @atom:77 @atom:77_b043_a043_d043_i043 } replace{ @atom:9990 @atom:9990_bspcH_aspcH_dspcH_ispcH }
From which we can identify the following "Data Bonds By Type": From which we can identify the following "Data Bonds By Type":
``@bond:042_043 @atom:*_b042*_a*_d*_i* @atom:*_b043*_a*_d*_i*`` and ``@bond:spcO_spcH @atom:*_bspcO*_a*_d*_i* @atom:*_bspcH*_a*_d*_i*``
"Data Angles By Type": ``@angle:043_042_043 @atom:*_b*_a043*_d*_i* and "Data Angles By Type":
@atom:*_b*_a042*_d*_i* @atom:*_b*_a043*_d*_i*`` ``@angle:spcH_spcO_spcH @atom:*_b*_aspcH*_d*_i* @atom:*_b*_aspcO*_d*_i* @atom:*_b*_aspcH*_d*_i*``
Compile the master file with: Compile the master file with:
.. code-block:: bash .. code-block:: bash
moltemplate.sh -overlay-all -pdb model.pdb sample01.lt moltemplate.sh -pdb model.pdb sample01.lt
cleanup_moltemplate.sh
And execute the simulation with the following: And execute the simulation with the following:
@ -363,8 +482,13 @@ And execute the simulation with the following:
Sample visualized with Ovito loading the trajectory into the DATA Sample visualized with Ovito loading the trajectory into the DATA
file written after minimization. file written after minimization.
------------ ------------
.. _OPLSAA96: .. _oplsaa2024:
**(OPLS-AA)** Jorgensen, Maxwell, Tirado-Rives, J Am Chem Soc, 118(45), 11225-11236 (1996). **(OPLS-AA)** Jorgensen, W.L., Ghahremanpour, M.M., Saar, A., Tirado-Rives, J., J. Phys. Chem. B, 128(1), 250-262 (2024).
.. _Moltemplate1:
**(Moltemplate)** Jewett et al., J. Mol. Biol., 433(11), 166841 (2021)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 94 KiB

BIN
doc/src/JPG/butane.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

View File

@ -1337,6 +1337,7 @@ Gflop
gfortran gfortran
ghostneigh ghostneigh
ghostwhite ghostwhite
Ghahremanpour
Giacomo Giacomo
GiB GiB
gif gif

View File

@ -15,12 +15,12 @@ Masses
PairIJ Coeffs # dpd/coul/slater/long PairIJ Coeffs # dpd/coul/slater/long
1 1 78 4.5 yes 1 1 1 78 4.5 no 1
1 2 78 4.5 yes 1 1 2 78 4.5 no 1
1 3 78 4.5 yes 1 1 3 78 4.5 no 1
2 2 78 4.5 no 1 2 2 78 4.5 yes 1
2 3 78 4.5 no 1 2 3 78 4.5 yes 1
3 3 78 4.5 no 1 3 3 78 4.5 yes 1
Atoms # full Atoms # full

View File

@ -10,49 +10,47 @@ variable cut_coul equal 2.0
# Initialize LAMMPS run for 3-d periodic # Initialize LAMMPS run for 3-d periodic
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
units lj units lj
boundary p p p # periodic at all axes boundary p p p # periodic at all axes
atom_style full atom_style full
dimension 3 dimension 3
bond_style none bond_style none
angle_style none angle_style none
dihedral_style none dihedral_style none
improper_style none improper_style none
newton on newton on
comm_modify vel yes # store info of ghost atoms btw processors comm_modify vel yes # store info of ghost atoms btw processors
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
# Box creation and configuration # Box creation and configuration
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
# Define pair style and coefficients # Define pair style and coefficients
pair_style dpd/coul/slater/long ${T} ${cut_DPD} ${seed} ${lambda} ${cut_coul} pair_style dpd/coul/slater/long ${T} ${cut_DPD} ${seed} ${lambda} ${cut_coul}
read_data data.dpd_coul_slater_long
# Enable long range electrostatics solver # Enable long range electrostatics solver
kspace_style pppm 1e-04 kspace_style pppm 1e-04
read_data data.dpd_coul_slater_long
# Construct neighbors every steps # Construct neighbors every steps
neighbor 1.0 bin neighbor 1.0 bin
neigh_modify every 1 delay 0 check yes neigh_modify every 1 delay 0 check yes
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
# Run the simulation # Run the simulation
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
thermo_style custom step temp press vol evdwl ecoul elong pe ke fnorm fmax thermo_style custom step temp press vol evdwl ecoul elong pe ke fnorm fmax
thermo_modify norm no thermo_modify norm no
thermo 100 thermo 100
timestep 0.01 timestep 0.01
run_style verlet run_style verlet
fix 1 all nve fix 1 all nve
run 1000 run 1000
unfix 1

View File

@ -1,147 +0,0 @@
LAMMPS (17 Apr 2024 - Development - patch_17Apr2024-262-g0aff26705c-modified)
OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98)
using 1 OpenMP thread(s) per MPI task
# DPD Ionic Fluid
variable T equal 1.0
variable cut_DPD equal 1.0
variable seed equal 165412
variable lambda equal 0.25
variable cut_coul equal 2.0
#-------------------------------------------------------------------------------
# Initialize LAMMPS run for 3-d periodic
#-------------------------------------------------------------------------------
units lj
boundary p p p # periodic at all axes
atom_style full
dimension 3
bond_style none
angle_style none
dihedral_style none
improper_style none
newton on
comm_modify vel yes # store info of ghost atoms btw processors
#-------------------------------------------------------------------------------
# Box creation and configuration
#-------------------------------------------------------------------------------
# Define pair style and coefficients
pair_style dpd/coul/slater/long ${T} ${cut_DPD} ${seed} ${lambda} ${cut_coul}
pair_style dpd/coul/slater/long 1 ${cut_DPD} ${seed} ${lambda} ${cut_coul}
pair_style dpd/coul/slater/long 1 1 ${seed} ${lambda} ${cut_coul}
pair_style dpd/coul/slater/long 1 1 165412 ${lambda} ${cut_coul}
pair_style dpd/coul/slater/long 1 1 165412 0.25 ${cut_coul}
pair_style dpd/coul/slater/long 1 1 165412 0.25 2
read_data data.dpd_coul_slater_long
Reading data file ...
orthogonal box = (0 0 0) to (5 5 5)
1 by 1 by 1 MPI processor grid
reading atoms ...
375 atoms
reading velocities ...
375 velocities
Finding 1-2 1-3 1-4 neighbors ...
special bond factors lj: 0 0 0
special bond factors coul: 0 0 0
0 = max # of 1-2 neighbors
0 = max # of 1-3 neighbors
0 = max # of 1-4 neighbors
1 = max # of special neighbors
special bonds CPU = 0.000 seconds
read_data CPU = 0.003 seconds
# Enable long range electrostatics solver
kspace_style pppm 1e-04
# Construct neighbors every steps
neighbor 1.0 bin
neigh_modify every 1 delay 0 check yes
#-------------------------------------------------------------------------------
# Run the simulation
#-------------------------------------------------------------------------------
thermo_style custom step temp press vol evdwl ecoul elong pe ke fnorm fmax
thermo_modify norm no
thermo 100
timestep 0.01
run_style verlet
fix 1 all nve
run 1000
PPPM initialization ...
using 12-bit tables for long-range coulomb (src/kspace.cpp:342)
G vector (1/distance) = 1.4828454
grid = 20 20 20
stencil order = 5
estimated absolute RMS force accuracy = 7.7240141e-05
estimated relative force accuracy = 7.7240141e-05
using double precision FFTW3
3d grid and FFT values/proc = 24389 8000
Generated 0 of 3 mixed pair_coeff terms from 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 = 3
ghost atom cutoff = 3
binsize = 1.5, bins = 4 4 4
1 neighbor lists, perpetual/occasional/extra = 1 0 0
(1) pair dpd/coul/slater/long, perpetual
attributes: half, newton on
pair build: half/bin/newton
stencil: half/bin/3d
bin: standard
Per MPI rank memory allocation (min/avg/max) = 8.359 | 8.359 | 8.359 Mbytes
Step Temp Press Volume E_vdwl E_coul E_long PotEng KinEng Fnorm Fmax
0 0.9849949 69.271905 125 4673.0443 0 -30.365103 4642.6792 552.58214 646.76798 65.851035
100 1.0614027 69.794624 125 4659.0139 0 -31.906319 4627.1075 595.44692 612.94396 60.338653
200 0.9422517 68.721098 125 4687.8862 0 -33.81531 4654.0709 528.6032 620.25627 62.726994
300 0.8956649 69.323482 125 4721.0824 0 -33.854275 4687.2281 502.46801 670.22699 73.087908
400 0.99584547 69.670416 125 4713.9086 0 -30.783633 4683.125 558.66931 607.65881 59.224652
500 1.0565931 69.497816 125 4701.2584 0 -26.80545 4674.4529 592.74873 646.18907 71.398122
600 1.0071523 70.26222 125 4659.2061 0 -29.98909 4629.217 565.01243 630.00244 58.264115
700 1.0507355 67.920078 125 4695.255 0 -32.649209 4662.6058 589.46259 651.80459 70.573524
800 0.98561942 68.279591 125 4745.7603 0 -28.98491 4716.7754 552.9325 627.14371 67.196483
900 0.96470105 70.742864 125 4706.3605 0 -30.271633 4676.0889 541.19729 644.43036 79.474998
1000 1.0204819 70.164419 125 4654.6077 0 -27.797433 4626.8103 572.49035 624.19728 71.825307
Loop time of 2.10153 on 1 procs for 1000 steps with 375 atoms
Performance: 411128.483 tau/day, 475.843 timesteps/s, 178.441 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 | 1.1779 | 1.1779 | 1.1779 | 0.0 | 56.05
Bond | 6.507e-05 | 6.507e-05 | 6.507e-05 | 0.0 | 0.00
Kspace | 0.74636 | 0.74636 | 0.74636 | 0.0 | 35.51
Neigh | 0.12903 | 0.12903 | 0.12903 | 0.0 | 6.14
Comm | 0.039726 | 0.039726 | 0.039726 | 0.0 | 1.89
Output | 0.00027587 | 0.00027587 | 0.00027587 | 0.0 | 0.01
Modify | 0.0037596 | 0.0037596 | 0.0037596 | 0.0 | 0.18
Other | | 0.004451 | | | 0.21
Nlocal: 375 ave 375 max 375 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Nghost: 3613 ave 3613 max 3613 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Neighs: 62354 ave 62354 max 62354 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Total # of neighbors = 62354
Ave neighs/atom = 166.27733
Ave special neighs/atom = 0
Neighbor list builds = 65
Dangerous builds = 0
unfix 1
Total wall time: 0:00:02

View File

@ -1,147 +0,0 @@
LAMMPS (17 Apr 2024 - Development - patch_17Apr2024-262-g0aff26705c-modified)
OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98)
using 1 OpenMP thread(s) per MPI task
# DPD Ionic Fluid
variable T equal 1.0
variable cut_DPD equal 1.0
variable seed equal 165412
variable lambda equal 0.25
variable cut_coul equal 2.0
#-------------------------------------------------------------------------------
# Initialize LAMMPS run for 3-d periodic
#-------------------------------------------------------------------------------
units lj
boundary p p p # periodic at all axes
atom_style full
dimension 3
bond_style none
angle_style none
dihedral_style none
improper_style none
newton on
comm_modify vel yes # store info of ghost atoms btw processors
#-------------------------------------------------------------------------------
# Box creation and configuration
#-------------------------------------------------------------------------------
# Define pair style and coefficients
pair_style dpd/coul/slater/long ${T} ${cut_DPD} ${seed} ${lambda} ${cut_coul}
pair_style dpd/coul/slater/long 1 ${cut_DPD} ${seed} ${lambda} ${cut_coul}
pair_style dpd/coul/slater/long 1 1 ${seed} ${lambda} ${cut_coul}
pair_style dpd/coul/slater/long 1 1 165412 ${lambda} ${cut_coul}
pair_style dpd/coul/slater/long 1 1 165412 0.25 ${cut_coul}
pair_style dpd/coul/slater/long 1 1 165412 0.25 2
read_data data.dpd_coul_slater_long
Reading data file ...
orthogonal box = (0 0 0) to (5 5 5)
1 by 2 by 2 MPI processor grid
reading atoms ...
375 atoms
reading velocities ...
375 velocities
Finding 1-2 1-3 1-4 neighbors ...
special bond factors lj: 0 0 0
special bond factors coul: 0 0 0
0 = max # of 1-2 neighbors
0 = max # of 1-3 neighbors
0 = max # of 1-4 neighbors
1 = max # of special neighbors
special bonds CPU = 0.000 seconds
read_data CPU = 0.003 seconds
# Enable long range electrostatics solver
kspace_style pppm 1e-04
# Construct neighbors every steps
neighbor 1.0 bin
neigh_modify every 1 delay 0 check yes
#-------------------------------------------------------------------------------
# Run the simulation
#-------------------------------------------------------------------------------
thermo_style custom step temp press vol evdwl ecoul elong pe ke fnorm fmax
thermo_modify norm no
thermo 100
timestep 0.01
run_style verlet
fix 1 all nve
run 1000
PPPM initialization ...
using 12-bit tables for long-range coulomb (src/kspace.cpp:342)
G vector (1/distance) = 1.4828454
grid = 20 20 20
stencil order = 5
estimated absolute RMS force accuracy = 7.7240141e-05
estimated relative force accuracy = 7.7240141e-05
using double precision FFTW3
3d grid and FFT values/proc = 10469 2000
Generated 0 of 3 mixed pair_coeff terms from 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 = 3
ghost atom cutoff = 3
binsize = 1.5, bins = 4 4 4
1 neighbor lists, perpetual/occasional/extra = 1 0 0
(1) pair dpd/coul/slater/long, perpetual
attributes: half, newton on
pair build: half/bin/newton
stencil: half/bin/3d
bin: standard
Per MPI rank memory allocation (min/avg/max) = 7.208 | 7.208 | 7.209 Mbytes
Step Temp Press Volume E_vdwl E_coul E_long PotEng KinEng Fnorm Fmax
0 0.9849949 69.076433 125 4673.0443 0 -30.365103 4642.6792 552.58214 613.18374 70.700582
100 0.95374867 69.110009 125 4681.1097 0 -31.260804 4649.8489 535.053 629.95109 62.05418
200 1.0076152 69.824904 125 4670.7458 0 -28.382203 4642.3636 565.27213 656.8501 72.049813
300 1.0014752 69.666331 125 4696.454 0 -26.943577 4669.5105 561.8276 631.49861 74.737274
400 0.98863876 69.731774 125 4700.7552 0 -23.816077 4676.9391 554.62634 637.74742 68.928573
500 0.95782852 68.588075 125 4698.588 0 -29.249543 4669.3385 537.3418 646.31897 68.800569
600 0.97443232 70.864079 125 4674.8821 0 -26.415644 4648.4664 546.65653 606.50755 78.664429
700 0.98783988 68.908299 125 4692.5536 0 -28.092022 4664.4616 554.17817 638.98401 69.691814
800 0.98000145 69.83977 125 4706.6365 0 -29.648365 4676.9881 549.78082 626.84362 73.133934
900 1.0526251 69.466078 125 4671.9648 0 -30.941117 4641.0237 590.52269 618.1049 62.333546
1000 0.98340746 69.527121 125 4728.2894 0 -31.869907 4696.4195 551.69159 630.14208 61.392611
Loop time of 0.928543 on 4 procs for 1000 steps with 375 atoms
Performance: 930490.137 tau/day, 1076.956 timesteps/s, 403.859 katom-step/s
98.9% 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.30761 | 0.34974 | 0.38864 | 4.9 | 37.67
Bond | 8.4633e-05 | 9.0539e-05 | 9.9184e-05 | 0.0 | 0.01
Kspace | 0.39038 | 0.42976 | 0.47215 | 4.4 | 46.28
Neigh | 0.033986 | 0.035576 | 0.036791 | 0.5 | 3.83
Comm | 0.10247 | 0.10324 | 0.10481 | 0.3 | 11.12
Output | 0.00024145 | 0.00027404 | 0.00036867 | 0.0 | 0.03
Modify | 0.0022402 | 0.0025068 | 0.0026343 | 0.3 | 0.27
Other | | 0.007356 | | | 0.79
Nlocal: 93.75 ave 96 max 93 min
Histogram: 3 0 0 0 0 0 0 0 0 1
Nghost: 2289.75 ave 2317 max 2271 min
Histogram: 1 1 0 0 1 0 0 0 0 1
Neighs: 15590.2 ave 16765 max 14540 min
Histogram: 1 0 1 0 0 1 0 0 0 1
Total # of neighbors = 62361
Ave neighs/atom = 166.296
Ave special neighs/atom = 0
Neighbor list builds = 64
Dangerous builds = 0
unfix 1
Total wall time: 0:00:00

View File

@ -0,0 +1,145 @@
LAMMPS (4 Feb 2025 - Development - patch_4Feb2025-468-gd830412228-modified)
OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:99)
using 1 OpenMP thread(s) per MPI task
# DPD Ionic Fluid
variable T equal 1.0
variable cut_DPD equal 1.0
variable seed equal 165412
variable lambda equal 0.25
variable cut_coul equal 2.0
#-------------------------------------------------------------------------------
# Initialize LAMMPS run for 3-d periodic
#-------------------------------------------------------------------------------
units lj
boundary p p p # periodic at all axes
atom_style full
dimension 3
bond_style none
angle_style none
dihedral_style none
improper_style none
newton on
comm_modify vel yes # store info of ghost atoms btw processors
#-------------------------------------------------------------------------------
# Box creation and configuration
#-------------------------------------------------------------------------------
# Define pair style and coefficients
pair_style dpd/coul/slater/long ${T} ${cut_DPD} ${seed} ${lambda} ${cut_coul}
pair_style dpd/coul/slater/long 1 ${cut_DPD} ${seed} ${lambda} ${cut_coul}
pair_style dpd/coul/slater/long 1 1 ${seed} ${lambda} ${cut_coul}
pair_style dpd/coul/slater/long 1 1 165412 ${lambda} ${cut_coul}
pair_style dpd/coul/slater/long 1 1 165412 0.25 ${cut_coul}
pair_style dpd/coul/slater/long 1 1 165412 0.25 2
# Enable long range electrostatics solver
kspace_style pppm 1e-04
read_data data.dpd_coul_slater_long
Reading data file ...
orthogonal box = (0 0 0) to (5 5 5)
1 by 1 by 1 MPI processor grid
reading atoms ...
375 atoms
reading velocities ...
375 velocities
Finding 1-2 1-3 1-4 neighbors ...
special bond factors lj: 0 0 0
special bond factors coul: 0 0 0
0 = max # of 1-2 neighbors
0 = max # of 1-3 neighbors
0 = max # of 1-4 neighbors
1 = max # of special neighbors
special bonds CPU = 0.001 seconds
read_data CPU = 0.004 seconds
# Construct neighbors every steps
neighbor 1.0 bin
neigh_modify every 1 delay 0 check yes
#-------------------------------------------------------------------------------
# Run the simulation
#-------------------------------------------------------------------------------
thermo_style custom step temp press vol evdwl ecoul elong pe ke fnorm fmax
thermo_modify norm no
thermo 100
timestep 0.01
run_style verlet
fix 1 all nve
run 1000
PPPM initialization ...
using 12-bit tables for long-range coulomb (src/kspace.cpp:342)
G vector (1/distance) = 1.4828454
grid = 20 20 20
stencil order = 5
estimated absolute RMS force accuracy = 7.7240141e-05
estimated relative force accuracy = 7.7240141e-05
using double precision KISS FFT
3d grid and FFT values/proc = 24389 8000
Generated 0 of 3 mixed pair_coeff terms from 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 = 3
ghost atom cutoff = 3
binsize = 1.5, bins = 4 4 4
1 neighbor lists, perpetual/occasional/extra = 1 0 0
(1) pair dpd/coul/slater/long, perpetual
attributes: half, newton on
pair build: half/bin/newton
stencil: half/bin/3d
bin: standard
Per MPI rank memory allocation (min/avg/max) = 8.359 | 8.359 | 8.359 Mbytes
Step Temp Press Volume E_vdwl E_coul E_long PotEng KinEng Fnorm Fmax
0 0.9849949 69.242343 125 4673.0443 -3.2653869 -30.365103 4639.4138 552.58214 646.89929 65.851035
100 1.023885 69.716134 125 4676.9465 -4.9878506 -34.092864 4637.8658 574.39949 663.35845 94.350026
200 1.0286646 69.674249 125 4636.201 -4.6314926 -33.406897 4598.1626 577.08087 614.52805 62.295431
300 0.9745797 69.689534 125 4679.9157 -4.3964184 -30.560567 4644.9588 546.73921 603.46282 60.56253
400 0.99487931 69.17085 125 4678.0362 -4.9518269 -34.446596 4638.6378 558.12729 656.99738 88.090014
500 0.97732377 69.551562 125 4684.3709 -5.0851581 -33.863212 4645.4226 548.27864 647.12533 75.851935
600 0.95396337 68.358297 125 4706.824 -4.269168 -33.634096 4668.9207 535.17345 604.31276 63.41042
700 0.99397324 68.365109 125 4669.1062 -4.700146 -35.014001 4629.3921 557.61899 633.29262 74.300913
800 1.0157864 69.263686 125 4664.1398 -4.0142381 -34.372669 4625.7529 569.85616 595.81462 67.046561
900 0.9925779 70.008922 125 4652.3023 -2.7845751 -33.095293 4616.4224 556.8362 620.13154 82.785317
1000 0.97336501 68.973657 125 4688.8002 -5.5239266 -36.42345 4646.8529 546.05777 625.66451 64.948859
Loop time of 0.755094 on 1 procs for 1000 steps with 375 atoms
Performance: 1144228.093 tau/day, 1324.338 timesteps/s, 496.627 katom-step/s
99.5% CPU use with 1 MPI tasks x 1 OpenMP threads
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 0.14421 | 0.14421 | 0.14421 | 0.0 | 19.10
Bond | 3.8885e-05 | 3.8885e-05 | 3.8885e-05 | 0.0 | 0.01
Kspace | 0.53292 | 0.53292 | 0.53292 | 0.0 | 70.58
Neigh | 0.056741 | 0.056741 | 0.056741 | 0.0 | 7.51
Comm | 0.017676 | 0.017676 | 0.017676 | 0.0 | 2.34
Output | 0.00024925 | 0.00024925 | 0.00024925 | 0.0 | 0.03
Modify | 0.0016688 | 0.0016688 | 0.0016688 | 0.0 | 0.22
Other | | 0.001588 | | | 0.21
Nlocal: 375 ave 375 max 375 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Nghost: 3570 ave 3570 max 3570 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Neighs: 19729 ave 19729 max 19729 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Total # of neighbors = 19729
Ave neighs/atom = 52.610667
Ave special neighs/atom = 0
Neighbor list builds = 66
Dangerous builds = 0
Total wall time: 0:00:00

View File

@ -0,0 +1,145 @@
LAMMPS (4 Feb 2025 - Development - patch_4Feb2025-468-gd830412228-modified)
OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:99)
using 1 OpenMP thread(s) per MPI task
# DPD Ionic Fluid
variable T equal 1.0
variable cut_DPD equal 1.0
variable seed equal 165412
variable lambda equal 0.25
variable cut_coul equal 2.0
#-------------------------------------------------------------------------------
# Initialize LAMMPS run for 3-d periodic
#-------------------------------------------------------------------------------
units lj
boundary p p p # periodic at all axes
atom_style full
dimension 3
bond_style none
angle_style none
dihedral_style none
improper_style none
newton on
comm_modify vel yes # store info of ghost atoms btw processors
#-------------------------------------------------------------------------------
# Box creation and configuration
#-------------------------------------------------------------------------------
# Define pair style and coefficients
pair_style dpd/coul/slater/long ${T} ${cut_DPD} ${seed} ${lambda} ${cut_coul}
pair_style dpd/coul/slater/long 1 ${cut_DPD} ${seed} ${lambda} ${cut_coul}
pair_style dpd/coul/slater/long 1 1 ${seed} ${lambda} ${cut_coul}
pair_style dpd/coul/slater/long 1 1 165412 ${lambda} ${cut_coul}
pair_style dpd/coul/slater/long 1 1 165412 0.25 ${cut_coul}
pair_style dpd/coul/slater/long 1 1 165412 0.25 2
# Enable long range electrostatics solver
kspace_style pppm 1e-04
read_data data.dpd_coul_slater_long
Reading data file ...
orthogonal box = (0 0 0) to (5 5 5)
1 by 2 by 2 MPI processor grid
reading atoms ...
375 atoms
reading velocities ...
375 velocities
Finding 1-2 1-3 1-4 neighbors ...
special bond factors lj: 0 0 0
special bond factors coul: 0 0 0
0 = max # of 1-2 neighbors
0 = max # of 1-3 neighbors
0 = max # of 1-4 neighbors
1 = max # of special neighbors
special bonds CPU = 0.000 seconds
read_data CPU = 0.004 seconds
# Construct neighbors every steps
neighbor 1.0 bin
neigh_modify every 1 delay 0 check yes
#-------------------------------------------------------------------------------
# Run the simulation
#-------------------------------------------------------------------------------
thermo_style custom step temp press vol evdwl ecoul elong pe ke fnorm fmax
thermo_modify norm no
thermo 100
timestep 0.01
run_style verlet
fix 1 all nve
run 1000
PPPM initialization ...
using 12-bit tables for long-range coulomb (src/kspace.cpp:342)
G vector (1/distance) = 1.4828454
grid = 20 20 20
stencil order = 5
estimated absolute RMS force accuracy = 7.7240141e-05
estimated relative force accuracy = 7.7240141e-05
using double precision KISS FFT
3d grid and FFT values/proc = 10469 2000
Generated 0 of 3 mixed pair_coeff terms from 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 = 3
ghost atom cutoff = 3
binsize = 1.5, bins = 4 4 4
1 neighbor lists, perpetual/occasional/extra = 1 0 0
(1) pair dpd/coul/slater/long, perpetual
attributes: half, newton on
pair build: half/bin/newton
stencil: half/bin/3d
bin: standard
Per MPI rank memory allocation (min/avg/max) = 7.208 | 7.208 | 7.209 Mbytes
Step Temp Press Volume E_vdwl E_coul E_long PotEng KinEng Fnorm Fmax
0 0.9849949 69.04687 125 4673.0443 -3.2653869 -30.365103 4639.4138 552.58214 613.14254 70.700582
100 1.0206537 69.308834 125 4676.3153 -4.5693306 -33.647673 4638.0983 572.58672 630.70953 76.020236
200 0.99990746 68.572978 125 4707.1556 -3.4977853 -33.275671 4670.3821 560.94809 633.00167 77.040049
300 0.91055241 69.390592 125 4685.5268 -2.9764038 -29.986737 4652.5637 510.8199 614.61006 62.799933
400 1.0080135 69.442971 125 4677.3078 -4.8740989 -32.908722 4639.525 565.49557 649.20121 61.033612
500 0.99500653 68.275189 125 4718.6774 -4.2475783 -35.206868 4679.223 558.19867 657.3073 74.738502
600 1.052925 70.601712 125 4703.6749 -2.8511316 -34.085418 4666.7383 590.69094 641.70441 59.043346
700 0.96467445 69.502018 125 4720.4257 -4.3345734 -34.310005 4681.7811 541.18237 656.24965 72.433637
800 1.0657358 70.960958 125 4685.5637 -5.8903418 -35.207202 4644.4661 597.87781 595.54446 61.462159
900 1.0273388 68.735518 125 4693.5106 -2.4175829 -28.602387 4662.4906 576.33707 598.80294 71.747886
1000 0.9702835 69.885576 125 4701.4385 -3.6513555 -29.487331 4668.2999 544.32904 666.55262 73.231425
Loop time of 0.270344 on 4 procs for 1000 steps with 375 atoms
Performance: 3195929.791 tau/day, 3698.993 timesteps/s, 1.387 Matom-step/s
99.3% 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.031268 | 0.035485 | 0.039491 | 1.6 | 13.13
Bond | 3.3378e-05 | 3.4848e-05 | 3.5667e-05 | 0.0 | 0.01
Kspace | 0.18632 | 0.19083 | 0.19556 | 0.8 | 70.59
Neigh | 0.012413 | 0.012991 | 0.013598 | 0.4 | 4.81
Comm | 0.028195 | 0.028407 | 0.028626 | 0.1 | 10.51
Output | 0.00013369 | 0.00015738 | 0.00022498 | 0.0 | 0.06
Modify | 0.00055373 | 0.00059062 | 0.00068807 | 0.0 | 0.22
Other | | 0.001846 | | | 0.68
Nlocal: 93.75 ave 95 max 92 min
Histogram: 1 0 0 0 0 0 2 0 0 1
Nghost: 2286 ave 2307 max 2269 min
Histogram: 1 0 1 0 0 1 0 0 0 1
Neighs: 4945 ave 5443 max 4513 min
Histogram: 1 0 1 0 0 1 0 0 0 1
Total # of neighbors = 19780
Ave neighs/atom = 52.746667
Ave special neighs/atom = 0
Neighbor list builds = 66
Dangerous builds = 0
Total wall time: 0:00:00

View File

@ -287,16 +287,16 @@ __kernel void k_dpd_coul_slater_long(const __global numtyp4 *restrict x_,
// apply Slater electrostatic force if distance below Slater cutoff // apply Slater electrostatic force if distance below Slater cutoff
// and the two species have a slater coeff // and the two species have a slater coeff
// cutsq[mtype].z -> Coulombic squared cutoff // cutsq[mtype].z -> Slater cutoff
if ( cutsq[mtype].z != 0.0 && rsq < cutsq[mtype].z){ // extra[j].x -> q[j] ; particle j charge
if ( rsq < cutsq[mtype].z ){
numtyp r2inv=ucl_recip(rsq); numtyp r2inv=ucl_recip(rsq);
numtyp _erfc; numtyp _erfc;
numtyp grij = g_ewald * r; numtyp grij = g_ewald * r;
numtyp expm2 = ucl_exp(-grij*grij); numtyp expm2 = ucl_exp(-grij*grij);
numtyp t = ucl_recip((numtyp)1.0 + EWALD_P*grij); numtyp t = ucl_recip((numtyp)1.0 + EWALD_P*grij);
_erfc = t * (A1+t*(A2+t*(A3+t*(A4+t*A5)))) * expm2; _erfc = t * (A1+t*(A2+t*(A3+t*(A4+t*A5)))) * expm2;
numtyp prefactor = extra[j].x; numtyp prefactor = qqrd2e * extra[j].x * qtmp / r;
prefactor *= qqrd2e * cutsq[mtype].z * qtmp/r;
numtyp rlamdainv = r * lamdainv; numtyp rlamdainv = r * lamdainv;
numtyp exprlmdainv = ucl_exp((numtyp)-2.0*rlamdainv); numtyp exprlmdainv = ucl_exp((numtyp)-2.0*rlamdainv);
numtyp slater_term = exprlmdainv*((numtyp)1.0 + ((numtyp)2.0*rlamdainv*((numtyp)1.0+rlamdainv))); numtyp slater_term = exprlmdainv*((numtyp)1.0 + ((numtyp)2.0*rlamdainv*((numtyp)1.0+rlamdainv)));
@ -306,9 +306,9 @@ __kernel void k_dpd_coul_slater_long(const __global numtyp4 *restrict x_,
if (EVFLAG && eflag) { if (EVFLAG && eflag) {
numtyp e_slater = ((numtyp)1.0 + rlamdainv)*exprlmdainv; numtyp e_slater = ((numtyp)1.0 + rlamdainv)*exprlmdainv;
numtyp e = prefactor*(_erfc-e_slater); numtyp e_sf = prefactor*(_erfc-e_slater);
if (factor_coul > (numtyp)0) e -= factor_coul*prefactor*((numtyp)1.0 - e_slater); if (factor_coul > (numtyp)0) e_sf -= factor_coul*prefactor*((numtyp)1.0 - e_slater);
e_coul += e; e_coul += e_sf;
} }
} // if cut_coulsq } // if cut_coulsq
@ -471,16 +471,16 @@ __kernel void k_dpd_coul_slater_long_fast(const __global numtyp4 *restrict x_,
// apply Slater electrostatic force if distance below Slater cutoff // apply Slater electrostatic force if distance below Slater cutoff
// and the two species have a slater coeff // and the two species have a slater coeff
// cutsq[mtype].z -> Coulombic squared cutoff // cutsq[mtype].z -> Slater cutoff
if ( cutsq[mtype].z != 0.0 && rsq < cutsq[mtype].z){ // extra[j].x -> q[j] ; particle j charge
if ( rsq < cutsq[mtype].z ){
numtyp r2inv=ucl_recip(rsq); numtyp r2inv=ucl_recip(rsq);
numtyp _erfc; numtyp _erfc;
numtyp grij = g_ewald * r; numtyp grij = g_ewald * r;
numtyp expm2 = ucl_exp(-grij*grij); numtyp expm2 = ucl_exp(-grij*grij);
numtyp t = ucl_recip((numtyp)1.0 + EWALD_P*grij); numtyp t = ucl_recip((numtyp)1.0 + EWALD_P*grij);
_erfc = t * (A1+t*(A2+t*(A3+t*(A4+t*A5)))) * expm2; _erfc = t * (A1+t*(A2+t*(A3+t*(A4+t*A5)))) * expm2;
numtyp prefactor = extra[j].x; numtyp prefactor = qqrd2e * extra[j].x * qtmp / r;
prefactor *= qqrd2e * cutsq[mtype].z * qtmp/r;
numtyp rlamdainv = r * lamdainv; numtyp rlamdainv = r * lamdainv;
numtyp exprlmdainv = ucl_exp((numtyp)-2.0*rlamdainv); numtyp exprlmdainv = ucl_exp((numtyp)-2.0*rlamdainv);
numtyp slater_term = exprlmdainv*((numtyp)1.0 + ((numtyp)2.0*rlamdainv*((numtyp)1.0+rlamdainv))); numtyp slater_term = exprlmdainv*((numtyp)1.0 + ((numtyp)2.0*rlamdainv*((numtyp)1.0+rlamdainv)));

View File

@ -65,7 +65,7 @@ class DPDCoulSlaterLong : public BaseDPD<numtyp, acctyp> {
/// coeff.x = a0, coeff.y = gamma, coeff.z = sigma, coeff.w = cut_dpd /// coeff.x = a0, coeff.y = gamma, coeff.z = sigma, coeff.w = cut_dpd
UCL_D_Vec<numtyp4> coeff; UCL_D_Vec<numtyp4> coeff;
/// cutsq.x = cutsq, cutsq.y = cut_dpdsq, cutsq.w = cut_slatersq /// cutsq.x = cutsq, cutsq.y = cut_dpdsq, cutsq.z = cut_slatersq
UCL_D_Vec<numtyp4> cutsq; UCL_D_Vec<numtyp4> cutsq;
/// Special LJ values /// Special LJ values

View File

@ -473,7 +473,8 @@ void PairDPDCoulSlaterLong::read_restart_settings(FILE *fp)
void PairDPDCoulSlaterLong::write_data(FILE *fp) void PairDPDCoulSlaterLong::write_data(FILE *fp)
{ {
for (int i = 1; i <= atom->ntypes; i++) for (int i = 1; i <= atom->ntypes; i++)
fprintf(fp,"%d %g %g\n",i,a0[i][i],gamma[i][i]); fprintf(fp,"%d %g %g %s %g\n",i,a0[i][i],gamma[i][i],
(cut_slatersq[i][i] == 0.0) ? "no" : "yes", cut_dpd[i][i]);
} }
/* ---------------------------------------------------------------------- /* ----------------------------------------------------------------------
@ -485,7 +486,7 @@ void PairDPDCoulSlaterLong::write_data_all(FILE *fp)
for (int i = 1; i <= atom->ntypes; i++) for (int i = 1; i <= atom->ntypes; i++)
for (int j = i; j <= atom->ntypes; j++) for (int j = i; j <= atom->ntypes; j++)
fprintf(fp,"%d %d %g %g %s %g\n",i,j,a0[i][j],gamma[i][j], fprintf(fp,"%d %d %g %g %s %g\n",i,j,a0[i][j],gamma[i][j],
(cut_slatersq[i][j] == 0.0) ? "yes" : "no", cut_dpd[i][j]); (cut_slatersq[i][j] == 0.0) ? "no" : "yes", cut_dpd[i][j]);
} }
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */

View File

@ -2301,7 +2301,7 @@ void Atom::first_reorder()
// nfirst = index of first atom not in firstgroup // nfirst = index of first atom not in firstgroup
// when find firstgroup atom out of place, swap it with atom nfirst // when find firstgroup atom out of place, swap it with atom nfirst
int bitmask = group->bitmask[firstgroup]; const int bitmask = group->get_bitmask_by_id(FLERR, firstgroupname, "Atom::first_reorder");
nfirst = 0; nfirst = 0;
while (nfirst < nlocal && mask[nfirst] & bitmask) nfirst++; while (nfirst < nlocal && mask[nfirst] & bitmask) nfirst++;

View File

@ -52,9 +52,7 @@ void ChangeBox::command(int narg, char **arg)
// group // group
int igroup = group->find(arg[0]); int groupbit = group->get_bitmask_by_id(FLERR, arg[0], "change_box");
if (igroup == -1) error->all(FLERR,"Could not find change_box group ID {}", arg[0]);
int groupbit = group->bitmask[igroup];
// parse operation arguments // parse operation arguments
// allocate ops to max possible length // allocate ops to max possible length

View File

@ -48,11 +48,11 @@ Compute::Compute(LAMMPS *lmp, int narg, char **arg) :
id = utils::strdup(arg[0]); id = utils::strdup(arg[0]);
if (!utils::is_id(id)) if (!utils::is_id(id))
error->all(FLERR,"Compute ID must be alphanumeric or underscore characters"); error->all(FLERR,"Compute ID {} must only have alphanumeric or underscore characters", id);
groupbit = group->get_bitmask_by_id(FLERR, arg[1], fmt::format("compute {}", arg[2]));
igroup = group->find(arg[1]); igroup = group->find(arg[1]);
if (igroup == -1) error->all(FLERR,"Could not find compute group ID"); if (igroup == -1) error->all(FLERR,"Could not find compute group ID {}", arg[1]);
groupbit = group->bitmask[igroup];
style = utils::strdup(arg[2]); style = utils::strdup(arg[2]);

View File

@ -39,8 +39,7 @@ ComputeCoordAtom::ComputeCoordAtom(LAMMPS *lmp, int narg, char **arg) :
{ {
if (narg < 5) error->all(FLERR, "Illegal compute coord/atom command"); if (narg < 5) error->all(FLERR, "Illegal compute coord/atom command");
jgroup = group->find("all"); jgroupbit = group->get_bitmask_by_id(FLERR, "all", "compute coord/atom");
jgroupbit = group->bitmask[jgroup];
cstyle = NONE; cstyle = NONE;
if (strcmp(arg[3], "cutoff") == 0) { if (strcmp(arg[3], "cutoff") == 0) {
@ -50,11 +49,10 @@ ComputeCoordAtom::ComputeCoordAtom(LAMMPS *lmp, int narg, char **arg) :
int iarg = 5; int iarg = 5;
if ((narg > 6) && (strcmp(arg[5], "group") == 0)) { if ((narg > 6) && (strcmp(arg[5], "group") == 0)) {
delete[] group2;
group2 = utils::strdup(arg[6]); group2 = utils::strdup(arg[6]);
iarg += 2; iarg += 2;
jgroup = group->find(group2); jgroupbit = group->get_bitmask_by_id(FLERR, group2, "compute coord/atom");
if (jgroup == -1) error->all(FLERR, "Compute coord/atom group2 ID does not exist");
jgroupbit = group->bitmask[jgroup];
} }
ncol = narg - iarg + 1; ncol = narg - iarg + 1;

View File

@ -46,7 +46,7 @@ class ComputeCoordAtom : public Compute {
double **carray; double **carray;
char *group2; char *group2;
int jgroup, jgroupbit; int jgroupbit;
class ComputeOrientOrderAtom *c_orientorder; class ComputeOrientOrderAtom *c_orientorder;
char *id_orientorder; char *id_orientorder;

View File

@ -54,9 +54,7 @@ ComputeGroupGroup::ComputeGroupGroup(LAMMPS *lmp, int narg, char **arg) :
extvector = 1; extvector = 1;
group2 = utils::strdup(arg[3]); group2 = utils::strdup(arg[3]);
jgroup = group->find(group2); jgroupbit = group->get_bitmask_by_id(FLERR, group2, "compute group/group");
if (jgroup == -1) error->all(FLERR, "Compute group/group group ID does not exist");
jgroupbit = group->bitmask[jgroup];
pairflag = 1; pairflag = 1;
kspaceflag = 0; kspaceflag = 0;
@ -147,9 +145,7 @@ void ComputeGroupGroup::init()
// recheck that group 2 has not been deleted // recheck that group 2 has not been deleted
jgroup = group->find(group2); jgroupbit = group->get_bitmask_by_id(FLERR, group2, "compute group/group");
if (jgroup == -1) error->all(FLERR, "Compute group/group group ID does not exist");
jgroupbit = group->bitmask[jgroup];
// need an occasional half neighbor list // need an occasional half neighbor list

View File

@ -35,7 +35,7 @@ class ComputeGroupGroup : public Compute {
private: private:
char *group2; char *group2;
int jgroup, jgroupbit, othergroupbit; int jgroupbit;
double **cutsq; double **cutsq;
double e_self, e_correction; double e_self, e_correction;
int pairflag, kspaceflag, boundaryflag, molflag; int pairflag, kspaceflag, boundaryflag, molflag;

View File

@ -59,12 +59,8 @@ void CreateBonds::command(int narg, char **arg)
if (strcmp(arg[0], "many") == 0) { if (strcmp(arg[0], "many") == 0) {
style = MANY; style = MANY;
if (narg != 6) error->all(FLERR, "No optional keywords allowed with create_bonds many"); if (narg != 6) error->all(FLERR, "No optional keywords allowed with create_bonds many");
igroup = group->find(arg[1]); group1bit = group->get_bitmask_by_id(FLERR, arg[1], "create_bonds");
if (igroup == -1) error->all(FLERR, "Cannot find create_bonds first group ID {}", arg[1]); group2bit = group->get_bitmask_by_id(FLERR, arg[2], "create_bonds");
group1bit = group->bitmask[igroup];
igroup = group->find(arg[2]);
if (igroup == -1) error->all(FLERR, "Cannot find create_bonds second group ID {}", arg[2]);
group2bit = group->bitmask[igroup];
btype = utils::inumeric(FLERR, arg[3], false, lmp); btype = utils::inumeric(FLERR, arg[3], false, lmp);
rmin = utils::numeric(FLERR, arg[4], false, lmp); rmin = utils::numeric(FLERR, arg[4], false, lmp);
rmax = utils::numeric(FLERR, arg[5], false, lmp); rmax = utils::numeric(FLERR, arg[5], false, lmp);

View File

@ -30,7 +30,7 @@ class CreateBonds : public Command {
void command(int, char **) override; void command(int, char **) override;
private: private:
int igroup, group1bit, group2bit; int group1bit, group2bit;
int btype, atype, dtype; int btype, atype, dtype;
tagint batom1, batom2, aatom1, aatom2, aatom3, datom1, datom2, datom3, datom4; tagint batom1, batom2, aatom1, aatom2, aatom3, datom1, datom2, datom3, datom4;
double rmin, rmax; double rmin, rmax;

View File

@ -87,8 +87,8 @@ void DeleteAtoms::command(int narg, char **arg)
error->all(FLERR, "Unknown delete_atoms sub-command: {}", arg[0]); error->all(FLERR, "Unknown delete_atoms sub-command: {}", arg[0]);
if (allflag) { if (allflag) {
int igroup = group->find("all"); int igroupbit = group->get_bitmask_by_id(FLERR, "all", "delete_atoms");
if ((igroup >= 0) && modify->check_rigid_group_overlap(group->bitmask[igroup])) if (modify->check_rigid_group_overlap(igroupbit))
error->warning(FLERR, "Attempting to delete atoms in rigid bodies"); error->warning(FLERR, "Attempting to delete atoms in rigid bodies");
} else { } else {
if (modify->check_rigid_list_overlap(dlist)) if (modify->check_rigid_list_overlap(dlist))
@ -216,8 +216,7 @@ void DeleteAtoms::delete_group(int narg, char **arg)
{ {
if (narg < 2) utils::missing_cmd_args(FLERR, "delete_atoms group", error); if (narg < 2) utils::missing_cmd_args(FLERR, "delete_atoms group", error);
int igroup = group->find(arg[1]); int groupbit = group->get_bitmask_by_id(FLERR, arg[1], "delete_atoms");
if (igroup == -1) error->all(FLERR, "Could not find delete_atoms group ID {}", arg[1]);
options(narg - 2, &arg[2]); options(narg - 2, &arg[2]);
// check for special case of group = all // check for special case of group = all
@ -234,8 +233,6 @@ void DeleteAtoms::delete_group(int narg, char **arg)
for (int i = 0; i < nlocal; i++) dlist[i] = 0; for (int i = 0; i < nlocal; i++) dlist[i] = 0;
int *mask = atom->mask; int *mask = atom->mask;
int groupbit = group->bitmask[igroup];
for (int i = 0; i < nlocal; i++) for (int i = 0; i < nlocal; i++)
if (mask[i] & groupbit) dlist[i] = 1; if (mask[i] & groupbit) dlist[i] = 1;
} }
@ -281,18 +278,11 @@ void DeleteAtoms::delete_overlap(int narg, char **arg)
const double cut = utils::numeric(FLERR, arg[1], false, lmp); const double cut = utils::numeric(FLERR, arg[1], false, lmp);
const double cutsq = cut * cut; const double cutsq = cut * cut;
const int group1bit = group->get_bitmask_by_id(FLERR, arg[2], "delete_atoms");
const int group2bit = group->get_bitmask_by_id(FLERR, arg[3], "delete_atoms");
int igroup1 = group->find(arg[2]);
if (igroup1 < 0)
error->all(FLERR, "Could not find delete_atoms overlap first group ID {}", arg[2]);
int igroup2 = group->find(arg[3]);
if (igroup2 < 0)
error->all(FLERR, "Could not find delete_atoms overlap second group ID {}", arg[3]);
options(narg - 4, &arg[4]); options(narg - 4, &arg[4]);
const int group1bit = group->bitmask[igroup1];
const int group2bit = group->bitmask[igroup2];
if (comm->me == 0) utils::logmesg(lmp, "System init for delete_atoms ...\n"); if (comm->me == 0) utils::logmesg(lmp, "System init for delete_atoms ...\n");
// request a full neighbor list for use by this command // request a full neighbor list for use by this command
@ -454,9 +444,7 @@ void DeleteAtoms::delete_random(int narg, char **arg)
error->all(FLERR, "Unknown delete_atoms random style: {}", arg[1]); error->all(FLERR, "Unknown delete_atoms random style: {}", arg[1]);
} }
int igroup = group->find(arg[4]); int groupbit = group->get_bitmask_by_id(FLERR, arg[4], "delete_atoms");
if (igroup == -1) error->all(FLERR, "Could not find delete_atoms random group ID {}", arg[4]);
auto region = domain->get_region_by_id(arg[5]); auto region = domain->get_region_by_id(arg[5]);
if (!region && (strcmp(arg[5], "NULL") != 0)) if (!region && (strcmp(arg[5], "NULL") != 0))
error->all(FLERR, "Could not find delete_atoms random region ID {}", arg[5]); error->all(FLERR, "Could not find delete_atoms random region ID {}", arg[5]);
@ -477,7 +465,6 @@ void DeleteAtoms::delete_random(int narg, char **arg)
double **x = atom->x; double **x = atom->x;
int *mask = atom->mask; int *mask = atom->mask;
int groupbit = group->bitmask[igroup];
if (region) region->prematch(); if (region) region->prematch();
// delete approximate fraction of atoms in both group and region // delete approximate fraction of atoms in both group and region

View File

@ -56,11 +56,9 @@ void DeleteBonds::command(int narg, char **arg)
if (comm->me == 0) utils::logmesg(lmp,"Deleting bonds ...\n"); if (comm->me == 0) utils::logmesg(lmp,"Deleting bonds ...\n");
// identify group // get group bitmask
int igroup = group->find(arg[0]); int groupbit = group->get_bitmask_by_id(FLERR, arg[0], "delete_bonds");
if (igroup == -1) error->all(FLERR,"Cannot find delete_bonds group ID");
int groupbit = group->bitmask[igroup];
// set style and which = type value // set style and which = type value

View File

@ -74,8 +74,7 @@ void DisplaceAtoms::command(int narg, char **arg)
// group and style // group and style
igroup = group->find(arg[0]); igroup = group->find(arg[0]);
if (igroup == -1) error->all(FLERR,"Could not find displace_atoms group ID"); groupbit = group->get_bitmask_by_id(FLERR, arg[0], "displace_atoms");
groupbit = group->bitmask[igroup];
if (modify->check_rigid_group_overlap(groupbit)) if (modify->check_rigid_group_overlap(groupbit))
error->warning(FLERR,"Attempting to displace atoms in rigid bodies"); error->warning(FLERR,"Attempting to displace atoms in rigid bodies");

View File

@ -58,7 +58,7 @@ Dump::Dump(LAMMPS *lmp, int /*narg*/, char **arg) :
id = utils::strdup(arg[0]); id = utils::strdup(arg[0]);
igroup = group->find(arg[1]); igroup = group->find(arg[1]);
groupbit = group->bitmask[igroup]; groupbit = group->get_bitmask_by_id(FLERR, arg[1], fmt::format("dump {}", arg[2]));
style = utils::strdup(arg[2]); style = utils::strdup(arg[2]);
@ -311,6 +311,7 @@ void Dump::init()
int Dump::count() int Dump::count()
{ {
// group all
if (igroup == 0) return atom->nlocal; if (igroup == 0) return atom->nlocal;
int *mask = atom->mask; int *mask = atom->mask;

View File

@ -48,8 +48,8 @@ Fix::Fix(LAMMPS *lmp, int /*narg*/, char **arg) :
error->all(FLERR,"Fix ID must be alphanumeric or underscore characters"); error->all(FLERR,"Fix ID must be alphanumeric or underscore characters");
igroup = group->find(arg[1]); igroup = group->find(arg[1]);
if (igroup == -1) error->all(FLERR,"Could not find fix group ID"); if (igroup == -1) error->all(FLERR,"Could not find fix {} group ID {}", arg[2], arg[1]);
groupbit = group->bitmask[igroup]; groupbit = group->get_bitmask_by_id(FLERR, arg[1], fmt::format("fix {}",arg[2]));
style = utils::strdup(arg[2]); style = utils::strdup(arg[2]);

View File

@ -271,7 +271,7 @@ FixNH::FixNH(LAMMPS *lmp, int narg, char **arg) :
delete[] id_dilate; delete[] id_dilate;
id_dilate = utils::strdup(arg[iarg+1]); id_dilate = utils::strdup(arg[iarg+1]);
int idilate = group->find(id_dilate); int idilate = group->find(id_dilate);
if (idilate == -1) if (idilate < 0)
error->all(FLERR,"Fix {} dilate group ID {} does not exist", style, id_dilate); error->all(FLERR,"Fix {} dilate group ID {} does not exist", style, id_dilate);
} }
iarg += 2; iarg += 2;
@ -629,12 +629,8 @@ void FixNH::init()
{ {
// recheck that dilate group has not been deleted // recheck that dilate group has not been deleted
if (allremap == 0) { if (allremap == 0)
int idilate = group->find(id_dilate); dilate_group_bit = group->get_bitmask_by_id(FLERR, id_dilate, fmt::format("fix {}", style));
if (idilate == -1)
error->all(FLERR,"Fix {} dilate group ID {} does not exist", style, id_dilate);
dilate_group_bit = group->bitmask[idilate];
}
// ensure no conflict with fix deform // ensure no conflict with fix deform

View File

@ -41,7 +41,7 @@ enum{BOX,LATTICE,FRACTION};
FixRecenter::FixRecenter(LAMMPS *lmp, int narg, char **arg) : FixRecenter::FixRecenter(LAMMPS *lmp, int narg, char **arg) :
Fix(lmp, narg, arg) Fix(lmp, narg, arg)
{ {
if (narg < 6) error->all(FLERR,"Illegal fix recenter command"); if (narg < 6) utils::missing_cmd_args(FLERR,"fix recenter", error);
xcom = ycom = zcom = 0.0; xcom = ycom = zcom = 0.0;
xflag = yflag = zflag = 1; xflag = yflag = zflag = 1;
@ -74,17 +74,15 @@ FixRecenter::FixRecenter(LAMMPS *lmp, int narg, char **arg) :
int iarg = 6; int iarg = 6;
while (iarg < narg) { while (iarg < narg) {
if (strcmp(arg[iarg],"shift") == 0) { if (strcmp(arg[iarg],"shift") == 0) {
int igroup2 = group->find(arg[iarg+1]); group2bit = group->get_bitmask_by_id(FLERR, arg[iarg+1], "fix recenter");
if (igroup2 < 0) error->all(FLERR,"Could not find fix recenter group ID");
group2bit = group->bitmask[igroup2];
iarg += 2; iarg += 2;
} else if (strcmp(arg[iarg],"units") == 0) { } else if (strcmp(arg[iarg],"units") == 0) {
if (strcmp(arg[iarg+1],"box") == 0) scaleflag = BOX; if (strcmp(arg[iarg+1],"box") == 0) scaleflag = BOX;
else if (strcmp(arg[iarg+1],"lattice") == 0) scaleflag = LATTICE; else if (strcmp(arg[iarg+1],"lattice") == 0) scaleflag = LATTICE;
else if (strcmp(arg[iarg+1],"fraction") == 0) scaleflag = FRACTION; else if (strcmp(arg[iarg+1],"fraction") == 0) scaleflag = FRACTION;
else error->all(FLERR,"Illegal fix recenter command"); else error->all(FLERR,"Unknown fix recenter units argument {}", arg[iarg+1]);
iarg += 2; iarg += 2;
} else error->all(FLERR,"Illegal fix recenter command"); } else error->all(FLERR,"Unknown fix recenter keyword {}", arg[iarg]);
} }
// scale xcom,ycom,zcom // scale xcom,ycom,zcom
@ -103,8 +101,7 @@ FixRecenter::FixRecenter(LAMMPS *lmp, int narg, char **arg) :
// cannot have 0 atoms in group // cannot have 0 atoms in group
if (group->count(igroup) == 0) if (group->count(igroup) == 0) error->all(FLERR,"Fix recenter group {} has no atoms", arg[1]);
error->all(FLERR,"Fix recenter group has no atoms");
} }
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */

View File

@ -73,11 +73,9 @@ FixSpring::FixSpring(LAMMPS *lmp, int narg, char **arg) :
group2 = utils::strdup(arg[4]); group2 = utils::strdup(arg[4]);
igroup2 = group->find(arg[4]); igroup2 = group->find(arg[4]);
if (igroup2 == -1)
error->all(FLERR,"Fix spring couple group ID does not exist");
if (igroup2 == igroup) if (igroup2 == igroup)
error->all(FLERR,"Two groups cannot be the same in fix spring couple"); error->all(FLERR,"The two groups cannot be the same in fix spring couple");
group2bit = group->bitmask[igroup2]; group2bit = group->get_bitmask_by_id(FLERR, arg[4], "fix spring");
k_spring = utils::numeric(FLERR,arg[5],false,lmp); k_spring = utils::numeric(FLERR,arg[5],false,lmp);
xflag = yflag = zflag = 1; xflag = yflag = zflag = 1;
@ -121,9 +119,7 @@ void FixSpring::init()
if (group2) { if (group2) {
igroup2 = group->find(group2); igroup2 = group->find(group2);
if (igroup2 == -1) group2bit = group->get_bitmask_by_id(FLERR, group2, "fix spring");
error->all(FLERR,"Fix spring couple group ID does not exist");
group2bit = group->bitmask[igroup2];
} }
masstotal = group->mass(igroup); masstotal = group->mass(igroup);

View File

@ -649,6 +649,19 @@ int Group::find_unused()
return -1; return -1;
} }
/* ----------------------------------------------------------------------
return group bitmask for given group id. Error out if group is not found.
------------------------------------------------------------------------- */
int Group::get_bitmask_by_id(const std::string &file, int line, const std::string &name,
const std::string &caller)
{
int igroup = find(name);
if (igroup < 0)
error->all(file, line, "Group ID {} requested by {} does not exist", name, caller);
return bitmask[igroup];
}
/* ---------------------------------------------------------------------- /* ----------------------------------------------------------------------
add atoms to group that are in same molecules as atoms already in group add atoms to group that are in same molecules as atoms already in group
do not include molID = 0 do not include molID = 0

View File

@ -31,11 +31,13 @@ class Group : protected Pointers {
Group(class LAMMPS *); Group(class LAMMPS *);
~Group() override; ~Group() override;
void assign(int, char **); // assign atoms to a group void assign(int, char **); // assign atoms to a group
void assign(const std::string &); // convenience function void assign(const std::string &); // convenience function
void create(const std::string &, int *); // add flagged atoms to a group void create(const std::string &, int *); // add flagged atoms to a group
int find(const std::string &); // lookup name in list of groups int find(const std::string &); // lookup name in list of groups
int find_or_create(const char *); // lookup name or create new group int find_or_create(const char *); // lookup name or create new group
int get_bitmask_by_id(const std::string &, int, const std::string &, const std::string &);
void write_restart(FILE *); void write_restart(FILE *);
void read_restart(FILE *); void read_restart(FILE *);

View File

@ -1,393 +1,419 @@
# The oplsaa2023.lt file contains force-field parameters, atom type definitions,
# partial charges, masses and bond-angle rules for the atoms in your system.
import /usr/local/moltemplate/moltemplate/force_fields/oplsaa2024.lt
# It defines these atom types:
# atom-type charge mass btype epsilon sigma description
# @atom:54 -0.18 12.011 CT 0.066 3.5 "n-CH3 all-atom C: alkanes"
# @atom:57 -0.12 12.011 CT 0.066 3.51 "CH2 all-atom C: alkanes"
# @atom:58 -0.06 12.011 CT 0.066 3.50 "CH all-atom C: alkanes"
# @atom:60 0.06 1.008 HC 0.026 2.48 "H all-atom H: alkanes"
# @atom:229 0.14 12.011 CT 0.066 3.50 "C on N: secondary N-CHR2 amide"
# @atom:235 0.5 12.011 C~ 0.105 3.75 "C: C=O in amide. Acyl R in amides"
# @atom:236 -0.5 15.999 O~ 0.21 2.96 "O: C=O in amide. is neutral - use"
# @atom:238 -0.5 14.007 N~ 0.17 3.25 "N: secondary amide 279 for formyl H"
# @atom:241 0.3 1.008 H~ 0 0 "H on N: secondary amide"
# (Note: Future versions of OPLSAA might use different @atom type numbers.)
PolyNIPAM inherits OPLSAA { PolyNIPAM inherits OPLSAA {
# Charges will be overwritten. # Charges will be overwritten.
write("Data Atoms") { write("Data Atoms") {
$atom:81_1 $mol @atom:81 0.0 -2.357 -0.245 0.629 $atom:57_1 $mol:. @atom:57 0.0 -2.357 -0.245 0.629
$atom:81_2 $mol @atom:81 0.0 -1.194 0.752 0.778 $atom:57_2 $mol:. @atom:57 0.0 -1.194 0.752 0.778
$atom:85_1 $mol @atom:85 0.0 -2.027 -1.242 0.957 $atom:60_1 $mol:. @atom:60 0.0 -2.027 -1.242 0.957
$atom:177_1 $mol @atom:177 0.0 -1.743 2.168 0.640 $atom:235_1 $mol:. @atom:235 0.0 -1.743 2.168 0.640
$atom:85_2 $mol @atom:85 0.0 -0.366 0.490 0.103 $atom:60_2 $mol:. @atom:60 0.0 -0.366 0.490 0.103
$atom:180_1 $mol @atom:180 0.0 -1.147 2.943 -0.274 $atom:238_1 $mol:. @atom:238 0.0 -1.147 2.943 -0.274
$atom:178_1 $mol @atom:178 0.0 -2.700 2.545 1.293 $atom:236_1 $mol:. @atom:236 0.0 -2.700 2.545 1.293
$atom:171_1 $mol @atom:171 0.0 -1.602 4.322 -0.446 $atom:229_1 $mol:. @atom:229 0.0 -1.602 4.322 -0.446
$atom:183_1 $mol @atom:183 0.0 -0.241 2.724 -0.647 $atom:241_1 $mol:. @atom:241 0.0 -0.241 2.724 -0.647
$atom:80_1 $mol @atom:80 0.0 -2.662 4.430 -1.547 $atom:54_1 $mol:. @atom:54 0.0 -2.662 4.430 -1.547
$atom:80_2 $mol @atom:80 0.0 -0.400 5.227 -0.741 $atom:54_2 $mol:. @atom:54 0.0 -0.400 5.227 -0.741
$atom:85_3 $mol @atom:85 0.0 -2.053 4.672 0.501 $atom:60_3 $mol:. @atom:60 0.0 -2.053 4.672 0.501
$atom:85_4 $mol @atom:85 0.0 -3.539 3.796 -1.342 $atom:60_4 $mol:. @atom:60 0.0 -3.539 3.796 -1.342
$atom:85_5 $mol @atom:85 0.0 -2.245 4.148 -2.526 $atom:60_5 $mol:. @atom:60 0.0 -2.245 4.148 -2.526
$atom:85_6 $mol @atom:85 0.0 -3.006 5.475 -1.612 $atom:60_6 $mol:. @atom:60 0.0 -3.006 5.475 -1.612
$atom:85_7 $mol @atom:85 0.0 0.080 4.944 -1.690 $atom:60_7 $mol:. @atom:60 0.0 0.080 4.944 -1.690
$atom:85_8 $mol @atom:85 0.0 0.355 5.185 0.060 $atom:60_8 $mol:. @atom:60 0.0 0.355 5.185 0.060
$atom:85_9 $mol @atom:85 0.0 -0.737 6.273 -0.826 $atom:60_9 $mol:. @atom:60 0.0 -0.737 6.273 -0.826
$atom:85_10 $mol @atom:85 0.0 -3.156 0.050 1.336 $atom:60_10 $mol:. @atom:60 0.0 -3.156 0.050 1.336
$atom:85_11 $mol @atom:85 0.0 -0.808 0.718 1.811 $atom:60_11 $mol:. @atom:60 0.0 -0.808 0.718 1.811
$atom:81_3 $mol @atom:81 0.0 -4.482 -0.662 -0.732 $atom:57_3 $mol:. @atom:57 0.0 -4.482 -0.662 -0.732
$atom:82_1 $mol @atom:82 0.0 -2.984 -0.308 -0.783 $atom:58_1 $mol:. @atom:58 0.0 -2.984 -0.308 -0.783
$atom:85_12 $mol @atom:85 0.0 -4.918 0.018 0.014 $atom:60_12 $mol:. @atom:60 0.0 -4.918 0.018 0.014
$atom:177_2 $mol @atom:177 0.0 -2.344 -1.080 -1.873 $atom:235_2 $mol:. @atom:235 0.0 -2.344 -1.080 -1.873
$atom:180_2 $mol @atom:180 0.0 -1.131 -1.604 -1.620 $atom:238_2 $mol:. @atom:238 0.0 -1.131 -1.604 -1.620
$atom:178_2 $mol @atom:178 0.0 -2.876 -1.219 -2.965 $atom:236_2 $mol:. @atom:236 0.0 -2.876 -1.219 -2.965
$atom:171_2 $mol @atom:171 0.0 -0.391 -2.304 -2.661 $atom:229_2 $mol:. @atom:229 0.0 -0.391 -2.304 -2.661
$atom:183_2 $mol @atom:183 0.0 -0.690 -1.494 -0.727 $atom:241_2 $mol:. @atom:241 0.0 -0.690 -1.494 -0.727
$atom:80_3 $mol @atom:80 0.0 0.802 -3.029 -2.033 $atom:54_3 $mol:. @atom:54 0.0 0.802 -3.029 -2.033
$atom:80_4 $mol @atom:80 0.0 0.094 -1.373 -3.777 $atom:54_4 $mol:. @atom:54 0.0 0.094 -1.373 -3.777
$atom:85_13 $mol @atom:85 0.0 -1.054 -3.067 -3.111 $atom:60_13 $mol:. @atom:60 0.0 -1.054 -3.067 -3.111
$atom:85_14 $mol @atom:85 0.0 0.481 -3.774 -1.288 $atom:60_14 $mol:. @atom:60 0.0 0.481 -3.774 -1.288
$atom:85_15 $mol @atom:85 0.0 1.485 -2.319 -1.542 $atom:60_15 $mol:. @atom:60 0.0 1.485 -2.319 -1.542
$atom:85_16 $mol @atom:85 0.0 1.368 -3.558 -2.817 $atom:60_16 $mol:. @atom:60 0.0 1.368 -3.558 -2.817
$atom:85_17 $mol @atom:85 0.0 0.761 -0.594 -3.382 $atom:60_17 $mol:. @atom:60 0.0 0.761 -0.594 -3.382
$atom:85_18 $mol @atom:85 0.0 -0.738 -0.879 -4.300 $atom:60_18 $mol:. @atom:60 0.0 -0.738 -0.879 -4.300
$atom:85_19 $mol @atom:85 0.0 0.653 -1.964 -4.521 $atom:60_19 $mol:. @atom:60 0.0 0.653 -1.964 -4.521
$atom:85_20 $mol @atom:85 0.0 -4.937 -0.363 -1.697 $atom:60_20 $mol:. @atom:60 0.0 -4.937 -0.363 -1.697
$atom:85_21 $mol @atom:85 0.0 -2.967 0.717 -1.203 $atom:60_21 $mol:. @atom:60 0.0 -2.967 0.717 -1.203
$atom:81_4 $mol @atom:81 0.0 -6.422 -2.235 -0.754 $atom:57_4 $mol:. @atom:57 0.0 -6.422 -2.235 -0.754
$atom:82_2 $mol @atom:82 0.0 -4.928 -2.114 -0.469 $atom:58_2 $mol:. @atom:58 0.0 -4.928 -2.114 -0.469
$atom:85_22 $mol @atom:85 0.0 -6.565 -1.832 -1.770 $atom:60_22 $mol:. @atom:60 0.0 -6.565 -1.832 -1.770
$atom:177_3 $mol @atom:177 0.0 -4.663 -2.569 0.992 $atom:235_3 $mol:. @atom:235 0.0 -4.663 -2.569 0.992
$atom:180_3 $mol @atom:180 0.0 -3.960 -3.716 1.081 $atom:238_3 $mol:. @atom:238 0.0 -3.960 -3.716 1.081
$atom:178_3 $mol @atom:178 0.0 -4.967 -1.904 1.963 $atom:236_3 $mol:. @atom:236 0.0 -4.967 -1.904 1.963
$atom:171_3 $mol @atom:171 0.0 -3.354 -4.204 2.319 $atom:229_3 $mol:. @atom:229 0.0 -3.354 -4.204 2.319
$atom:183_3 $mol @atom:183 0.0 -4.127 -4.397 0.356 $atom:241_3 $mol:. @atom:241 0.0 -4.127 -4.397 0.356
$atom:80_5 $mol @atom:80 0.0 -4.295 -4.572 3.473 $atom:54_5 $mol:. @atom:54 0.0 -4.295 -4.572 3.473
$atom:80_6 $mol @atom:80 0.0 -2.271 -3.244 2.828 $atom:54_6 $mol:. @atom:54 0.0 -2.271 -3.244 2.828
$atom:85_23 $mol @atom:85 0.0 -2.826 -5.135 2.038 $atom:60_23 $mol:. @atom:60 0.0 -2.826 -5.135 2.038
$atom:85_24 $mol @atom:85 0.0 -4.973 -5.396 3.211 $atom:60_24 $mol:. @atom:60 0.0 -4.973 -5.396 3.211
$atom:85_25 $mol @atom:85 0.0 -4.909 -3.718 3.794 $atom:60_25 $mol:. @atom:60 0.0 -4.909 -3.718 3.794
$atom:85_26 $mol @atom:85 0.0 -3.683 -4.896 4.331 $atom:60_26 $mol:. @atom:60 0.0 -3.683 -4.896 4.331
$atom:85_27 $mol @atom:85 0.0 -2.695 -2.272 3.123 $atom:60_27 $mol:. @atom:60 0.0 -2.695 -2.272 3.123
$atom:85_28 $mol @atom:85 0.0 -1.484 -3.073 2.079 $atom:60_28 $mol:. @atom:60 0.0 -1.484 -3.073 2.079
$atom:85_29 $mol @atom:85 0.0 -1.791 -3.686 3.717 $atom:60_29 $mol:. @atom:60 0.0 -1.791 -3.686 3.717
$atom:85_30 $mol @atom:85 0.0 -6.661 -3.312 -0.799 $atom:60_30 $mol:. @atom:60 0.0 -6.661 -3.312 -0.799
$atom:85_31 $mol @atom:85 0.0 -4.422 -2.764 -1.206 $atom:60_31 $mol:. @atom:60 0.0 -4.422 -2.764 -1.206
$atom:81_5 $mol @atom:81 0.0 -8.861 -2.101 -0.226 $atom:57_5 $mol:. @atom:57 0.0 -8.861 -2.101 -0.226
$atom:82_3 $mol @atom:82 0.0 -7.457 -1.604 0.194 $atom:58_3 $mol:. @atom:58 0.0 -7.457 -1.604 0.194
$atom:85_32 $mol @atom:85 0.0 -8.826 -3.186 -0.048 $atom:60_32 $mol:. @atom:60 0.0 -8.826 -3.186 -0.048
$atom:177_4 $mol @atom:177 0.0 -7.425 -0.036 0.256 $atom:235_4 $mol:. @atom:235 0.0 -7.425 -0.036 0.256
$atom:180_4 $mol @atom:180 0.0 -6.870 0.431 1.405 $atom:238_4 $mol:. @atom:238 0.0 -6.870 0.431 1.405
$atom:178_4 $mol @atom:178 0.0 -8.004 0.653 -0.558 $atom:236_4 $mol:. @atom:236 0.0 -8.004 0.653 -0.558
$atom:171_4 $mol @atom:171 0.0 -7.168 1.765 1.912 $atom:229_4 $mol:. @atom:229 0.0 -7.168 1.765 1.912
$atom:183_4 $mol @atom:183 0.0 -6.797 -0.317 2.080 $atom:241_4 $mol:. @atom:241 0.0 -6.797 -0.317 2.080
$atom:80_7 $mol @atom:80 0.0 -8.664 2.017 2.147 $atom:54_7 $mol:. @atom:54 0.0 -8.664 2.017 2.147
$atom:80_8 $mol @atom:80 0.0 -6.545 2.857 1.036 $atom:54_8 $mol:. @atom:54 0.0 -6.545 2.857 1.036
$atom:85_33 $mol @atom:85 0.0 -6.669 1.831 2.899 $atom:60_33 $mol:. @atom:60 0.0 -6.669 1.831 2.899
$atom:85_34 $mol @atom:85 0.0 -9.114 1.252 2.800 $atom:60_34 $mol:. @atom:60 0.0 -9.114 1.252 2.800
$atom:85_35 $mol @atom:85 0.0 -9.236 2.024 1.205 $atom:60_35 $mol:. @atom:60 0.0 -9.236 2.024 1.205
$atom:85_36 $mol @atom:85 0.0 -8.786 3.001 2.625 $atom:60_36 $mol:. @atom:60 0.0 -8.786 3.001 2.625
$atom:85_37 $mol @atom:85 0.0 -7.002 2.900 0.037 $atom:60_37 $mol:. @atom:60 0.0 -7.002 2.900 0.037
$atom:85_38 $mol @atom:85 0.0 -5.460 2.706 0.913 $atom:60_38 $mol:. @atom:60 0.0 -5.460 2.706 0.913
$atom:85_39 $mol @atom:85 0.0 -6.693 3.836 1.521 $atom:60_39 $mol:. @atom:60 0.0 -6.693 3.836 1.521
$atom:85_40 $mol @atom:85 0.0 -9.602 -1.708 0.496 $atom:60_40 $mol:. @atom:60 0.0 -9.602 -1.708 0.496
$atom:85_41 $mol @atom:85 0.0 -7.328 -2.030 1.207 $atom:60_41 $mol:. @atom:60 0.0 -7.328 -2.030 1.207
$atom:81_6 $mol @atom:81 0.0 -10.877 -2.392 -1.741 $atom:57_6 $mol:. @atom:57 0.0 -10.877 -2.392 -1.741
$atom:82_4 $mol @atom:82 0.0 -9.440 -1.848 -1.636 $atom:58_4 $mol:. @atom:58 0.0 -9.440 -1.848 -1.636
$atom:85_42 $mol @atom:85 0.0 -11.441 -2.051 -0.857 $atom:60_42 $mol:. @atom:60 0.0 -11.441 -2.051 -0.857
$atom:177_5 $mol @atom:177 0.0 -8.631 -2.553 -2.770 $atom:235_5 $mol:. @atom:235 0.0 -8.631 -2.553 -2.770
$atom:180_5 $mol @atom:180 0.0 -8.499 -1.785 -3.863 $atom:238_5 $mol:. @atom:238 0.0 -8.499 -1.785 -3.863
$atom:178_5 $mol @atom:178 0.0 -8.181 -3.684 -2.688 $atom:236_5 $mol:. @atom:236 0.0 -8.181 -3.684 -2.688
$atom:171_5 $mol @atom:171 0.0 -7.938 -2.258 -5.119 $atom:229_5 $mol:. @atom:229 0.0 -7.938 -2.258 -5.119
$atom:183_5 $mol @atom:183 0.0 -9.049 -0.943 -3.902 $atom:241_5 $mol:. @atom:241 0.0 -9.049 -0.943 -3.902
$atom:80_9 $mol @atom:80 0.0 -8.792 -3.342 -5.780 $atom:54_9 $mol:. @atom:54 0.0 -8.792 -3.342 -5.780
$atom:80_10 $mol @atom:80 0.0 -6.470 -2.687 -5.003 $atom:54_10 $mol:. @atom:54 0.0 -6.470 -2.687 -5.003
$atom:85_43 $mol @atom:85 0.0 -7.963 -1.383 -5.795 $atom:60_43 $mol:. @atom:60 0.0 -7.963 -1.383 -5.795
$atom:85_44 $mol @atom:85 0.0 -9.825 -2.995 -5.943 $atom:60_44 $mol:. @atom:60 0.0 -9.825 -2.995 -5.943
$atom:85_45 $mol @atom:85 0.0 -8.838 -4.264 -5.179 $atom:60_45 $mol:. @atom:60 0.0 -8.838 -4.264 -5.179
$atom:85_46 $mol @atom:85 0.0 -8.360 -3.594 -6.761 $atom:60_46 $mol:. @atom:60 0.0 -8.360 -3.594 -6.761
$atom:85_47 $mol @atom:85 0.0 -6.361 -3.605 -4.407 $atom:60_47 $mol:. @atom:60 0.0 -6.361 -3.605 -4.407
$atom:85_48 $mol @atom:85 0.0 -5.850 -1.903 -4.541 $atom:60_48 $mol:. @atom:60 0.0 -5.850 -1.903 -4.541
$atom:85_49 $mol @atom:85 0.0 -6.071 -2.887 -6.011 $atom:60_49 $mol:. @atom:60 0.0 -6.071 -2.887 -6.011
$atom:85_50 $mol @atom:85 0.0 -11.356 -1.921 -2.619 $atom:60_50 $mol:. @atom:60 0.0 -11.356 -1.921 -2.619
$atom:85_51 $mol @atom:85 0.0 -9.494 -0.756 -1.795 $atom:60_51 $mol:. @atom:60 0.0 -9.494 -0.756 -1.795
$atom:81_7 $mol @atom:81 0.0 -12.476 -4.326 -2.296 $atom:57_7 $mol:. @atom:57 0.0 -12.476 -4.326 -2.296
$atom:82_5 $mol @atom:82 0.0 -11.042 -3.918 -1.914 $atom:58_5 $mol:. @atom:58 0.0 -11.042 -3.918 -1.914
$atom:85_52 $mol @atom:85 0.0 -12.606 -4.028 -3.347 $atom:60_52 $mol:. @atom:60 0.0 -12.606 -4.028 -3.347
$atom:177_6 $mol @atom:177 0.0 -10.631 -4.675 -0.614 $atom:235_6 $mol:. @atom:235 0.0 -10.631 -4.675 -0.614
$atom:180_6 $mol @atom:180 0.0 -9.796 -5.703 -0.861 $atom:238_6 $mol:. @atom:238 0.0 -9.796 -5.703 -0.861
$atom:178_6 $mol @atom:178 0.0 -11.127 -4.453 0.474 $atom:236_6 $mol:. @atom:236 0.0 -11.127 -4.453 0.474
$atom:171_6 $mol @atom:171 0.0 -9.186 -6.529 0.183 $atom:229_6 $mol:. @atom:229 0.0 -9.186 -6.529 0.183
$atom:183_6 $mol @atom:183 0.0 -9.206 -5.554 -1.669 $atom:241_6 $mol:. @atom:241 0.0 -9.206 -5.554 -1.669
$atom:80_11 $mol @atom:80 0.0 -10.225 -7.315 0.995 $atom:54_11 $mol:. @atom:54 0.0 -10.225 -7.315 0.995
$atom:80_12 $mol @atom:80 0.0 -8.204 -5.783 1.100 $atom:54_12 $mol:. @atom:54 0.0 -8.204 -5.783 1.100
$atom:85_53 $mol @atom:85 0.0 -8.602 -7.290 -0.368 $atom:60_53 $mol:. @atom:60 0.0 -8.602 -7.290 -0.368
$atom:85_54 $mol @atom:85 0.0 -10.889 -7.898 0.339 $atom:60_54 $mol:. @atom:60 0.0 -10.889 -7.898 0.339
$atom:85_55 $mol @atom:85 0.0 -10.843 -6.658 1.625 $atom:60_55 $mol:. @atom:60 0.0 -10.843 -6.658 1.625
$atom:85_56 $mol @atom:85 0.0 -9.699 -8.020 1.659 $atom:60_56 $mol:. @atom:60 0.0 -9.699 -8.020 1.659
$atom:85_57 $mol @atom:85 0.0 -8.739 -5.060 1.735 $atom:60_57 $mol:. @atom:60 0.0 -8.739 -5.060 1.735
$atom:85_58 $mol @atom:85 0.0 -7.431 -5.245 0.530 $atom:60_58 $mol:. @atom:60 0.0 -7.431 -5.245 0.530
$atom:85_59 $mol @atom:85 0.0 -7.700 -6.510 1.757 $atom:60_59 $mol:. @atom:60 0.0 -7.700 -6.510 1.757
$atom:85_60 $mol @atom:85 0.0 -12.525 -5.430 -2.285 $atom:60_60 $mol:. @atom:60 0.0 -12.525 -5.430 -2.285
$atom:85_61 $mol @atom:85 0.0 -10.438 -4.244 -2.777 $atom:60_61 $mol:. @atom:60 0.0 -10.438 -4.244 -2.777
$atom:81_8 $mol @atom:81 0.0 -14.920 -4.584 -1.600 $atom:57_8 $mol:. @atom:57 0.0 -14.920 -4.584 -1.600
$atom:82_6 $mol @atom:82 0.0 -13.632 -3.752 -1.465 $atom:58_6 $mol:. @atom:58 0.0 -13.632 -3.752 -1.465
$atom:85_62 $mol @atom:85 0.0 -14.649 -5.586 -1.247 $atom:60_62 $mol:. @atom:60 0.0 -14.649 -5.586 -1.247
$atom:177_7 $mol @atom:177 0.0 -13.893 -2.285 -1.914 $atom:235_7 $mol:. @atom:235 0.0 -13.893 -2.285 -1.914
$atom:180_7 $mol @atom:180 0.0 -13.965 -1.422 -0.889 $atom:238_7 $mol:. @atom:238 0.0 -13.965 -1.422 -0.889
$atom:178_7 $mol @atom:178 0.0 -13.974 -1.956 -3.082 $atom:236_7 $mol:. @atom:236 0.0 -13.974 -1.956 -3.082
$atom:171_7 $mol @atom:171 0.0 -14.239 0.001 -1.025 $atom:229_7 $mol:. @atom:229 0.0 -14.239 0.001 -1.025
$atom:183_7 $mol @atom:183 0.0 -13.577 -1.708 -0.004 $atom:241_7 $mol:. @atom:241 0.0 -13.577 -1.708 -0.004
$atom:80_13 $mol @atom:80 0.0 -15.680 0.246 -1.480 $atom:54_13 $mol:. @atom:54 0.0 -15.680 0.246 -1.480
$atom:80_14 $mol @atom:80 0.0 -13.267 0.807 -1.893 $atom:54_14 $mol:. @atom:54 0.0 -13.267 0.807 -1.893
$atom:85_63 $mol @atom:85 0.0 -14.156 0.414 -0.002 $atom:60_63 $mol:. @atom:60 0.0 -14.156 0.414 -0.002
$atom:85_64 $mol @atom:85 0.0 -16.408 -0.251 -0.821 $atom:60_64 $mol:. @atom:60 0.0 -16.408 -0.251 -0.821
$atom:85_65 $mol @atom:85 0.0 -15.849 -0.114 -2.507 $atom:60_65 $mol:. @atom:60 0.0 -15.849 -0.114 -2.507
$atom:85_66 $mol @atom:85 0.0 -15.890 1.327 -1.461 $atom:60_66 $mol:. @atom:60 0.0 -15.890 1.327 -1.461
$atom:85_67 $mol @atom:85 0.0 -13.268 0.469 -2.940 $atom:60_67 $mol:. @atom:60 0.0 -13.268 0.469 -2.940
$atom:85_68 $mol @atom:85 0.0 -12.239 0.760 -1.513 $atom:60_68 $mol:. @atom:60 0.0 -12.239 0.760 -1.513
$atom:85_69 $mol @atom:85 0.0 -13.597 1.859 -1.881 $atom:60_69 $mol:. @atom:60 0.0 -13.597 1.859 -1.881
$atom:85_70 $mol @atom:85 0.0 -15.637 -4.195 -0.859 $atom:60_70 $mol:. @atom:60 0.0 -15.637 -4.195 -0.859
$atom:85_71 $mol @atom:85 0.0 -13.362 -3.817 -0.395 $atom:60_71 $mol:. @atom:60 0.0 -13.362 -3.817 -0.395
$atom:81_9 $mol @atom:81 0.0 -17.064 -5.395 -2.685 $atom:57_9 $mol:. @atom:57 0.0 -17.064 -5.395 -2.685
$atom:82_7 $mol @atom:82 0.0 -15.684 -4.733 -2.934 $atom:58_7 $mol:. @atom:58 0.0 -15.684 -4.733 -2.934
$atom:85_72 $mol @atom:85 0.0 -17.540 -4.759 -1.921 $atom:60_72 $mol:. @atom:60 0.0 -17.540 -4.759 -1.921
$atom:177_8 $mol @atom:177 0.0 -14.870 -5.540 -3.996 $atom:235_8 $mol:. @atom:235 0.0 -14.870 -5.540 -3.996
$atom:180_8 $mol @atom:180 0.0 -14.373 -4.756 -4.977 $atom:238_8 $mol:. @atom:238 0.0 -14.373 -4.756 -4.977
$atom:178_8 $mol @atom:178 0.0 -14.748 -6.750 -3.981 $atom:236_8 $mol:. @atom:236 0.0 -14.748 -6.750 -3.981
$atom:171_8 $mol @atom:171 0.0 -13.393 -5.268 -5.940 $atom:229_8 $mol:. @atom:229 0.0 -13.393 -5.268 -5.940
$atom:183_8 $mol @atom:183 0.0 -14.174 -3.807 -4.679 $atom:241_8 $mol:. @atom:241 0.0 -14.174 -3.807 -4.679
$atom:80_15 $mol @atom:80 0.0 -14.106 -6.091 -7.020 $atom:54_15 $mol:. @atom:54 0.0 -14.106 -6.091 -7.020
$atom:80_16 $mol @atom:80 0.0 -12.175 -6.042 -5.407 $atom:54_16 $mol:. @atom:54 0.0 -12.175 -6.042 -5.407
$atom:85_73 $mol @atom:85 0.0 -12.988 -4.367 -6.439 $atom:60_73 $mol:. @atom:60 0.0 -12.988 -4.367 -6.439
$atom:85_74 $mol @atom:85 0.0 -14.926 -5.528 -7.494 $atom:60_74 $mol:. @atom:60 0.0 -14.926 -5.528 -7.494
$atom:85_75 $mol @atom:85 0.0 -14.530 -7.019 -6.606 $atom:60_75 $mol:. @atom:60 0.0 -14.530 -7.019 -6.606
$atom:85_76 $mol @atom:85 0.0 -13.392 -6.372 -7.812 $atom:60_76 $mol:. @atom:60 0.0 -13.392 -6.372 -7.812
$atom:85_77 $mol @atom:85 0.0 -12.467 -7.007 -4.964 $atom:60_77 $mol:. @atom:60 0.0 -12.467 -7.007 -4.964
$atom:85_78 $mol @atom:85 0.0 -11.600 -5.477 -4.663 $atom:60_78 $mol:. @atom:60 0.0 -11.600 -5.477 -4.663
$atom:85_79 $mol @atom:85 0.0 -11.507 -6.251 -6.259 $atom:60_79 $mol:. @atom:60 0.0 -11.507 -6.251 -6.259
$atom:85_80 $mol @atom:85 0.0 -17.675 -5.258 -3.598 $atom:60_80 $mol:. @atom:60 0.0 -17.675 -5.258 -3.598
$atom:85_81 $mol @atom:85 0.0 -15.938 -3.724 -3.313 $atom:60_81 $mol:. @atom:60 0.0 -15.938 -3.724 -3.313
$atom:81_10 $mol @atom:81 0.0 -18.749 -7.194 -2.096 $atom:57_10 $mol:. @atom:57 0.0 -18.749 -7.194 -2.096
$atom:82_8 $mol @atom:82 0.0 -17.248 -6.883 -2.287 $atom:58_8 $mol:. @atom:58 0.0 -17.248 -6.883 -2.287
$atom:85_82 $mol @atom:85 0.0 -19.267 -6.796 -2.989 $atom:60_82 $mol:. @atom:60 0.0 -19.267 -6.796 -2.989
$atom:177_9 $mol @atom:177 0.0 -16.454 -7.269 -0.999 $atom:235_9 $mol:. @atom:235 0.0 -16.454 -7.269 -0.999
$atom:180_9 $mol @atom:180 0.0 -15.335 -7.967 -1.254 $atom:238_9 $mol:. @atom:238 0.0 -15.335 -7.967 -1.254
$atom:178_9 $mol @atom:178 0.0 -16.762 -6.899 0.120 $atom:236_9 $mol:. @atom:236 0.0 -16.762 -6.899 0.120
$atom:171_9 $mol @atom:171 0.0 -14.367 -8.387 -0.248 $atom:229_9 $mol:. @atom:229 0.0 -14.367 -8.387 -0.248
$atom:183_9 $mol @atom:183 0.0 -15.240 -8.331 -2.192 $atom:241_9 $mol:. @atom:241 0.0 -15.240 -8.331 -2.192
$atom:80_17 $mol @atom:80 0.0 -14.904 -9.451 0.715 $atom:54_17 $mol:. @atom:54 0.0 -14.904 -9.451 0.715
$atom:80_18 $mol @atom:80 0.0 -13.725 -7.242 0.549 $atom:54_18 $mol:. @atom:54 0.0 -13.725 -7.242 0.549
$atom:85_83 $mol @atom:85 0.0 -13.545 -8.861 -0.817 $atom:60_83 $mol:. @atom:60 0.0 -13.545 -8.861 -0.817
$atom:85_84 $mol @atom:85 0.0 -15.290 -10.333 0.182 $atom:60_84 $mol:. @atom:60 0.0 -15.290 -10.333 0.182
$atom:85_85 $mol @atom:85 0.0 -15.717 -9.064 1.350 $atom:60_85 $mol:. @atom:60 0.0 -15.717 -9.064 1.350
$atom:85_86 $mol @atom:85 0.0 -14.087 -9.788 1.373 $atom:60_86 $mol:. @atom:60 0.0 -14.087 -9.788 1.373
$atom:85_87 $mol @atom:85 0.0 -14.468 -6.647 1.100 $atom:60_87 $mol:. @atom:60 0.0 -14.468 -6.647 1.100
$atom:85_88 $mol @atom:85 0.0 -13.139 -6.565 -0.089 $atom:60_88 $mol:. @atom:60 0.0 -13.139 -6.565 -0.089
$atom:85_89 $mol @atom:85 0.0 -13.036 -7.679 1.290 $atom:60_89 $mol:. @atom:60 0.0 -13.036 -7.679 1.290
$atom:85_90 $mol @atom:85 0.0 -18.877 -8.292 -2.150 $atom:60_90 $mol:. @atom:60 0.0 -18.877 -8.292 -2.150
$atom:85_91 $mol @atom:85 0.0 -16.939 -7.505 -3.147 $atom:60_91 $mol:. @atom:60 0.0 -16.939 -7.505 -3.147
$atom:80_19 $mol @atom:80 0.0 -20.999 -7.206 -1.036 $atom:54_19 $mol:. @atom:54 0.0 -20.999 -7.206 -1.036
$atom:82_9 $mol @atom:82 0.0 -19.540 -6.757 -0.843 $atom:58_9 $mol:. @atom:58 0.0 -19.540 -6.757 -0.843
$atom:85_92 $mol @atom:85 0.0 -21.046 -8.300 -1.156 $atom:60_92 $mol:. @atom:60 0.0 -21.046 -8.300 -1.156
$atom:85_93 $mol @atom:85 0.0 -21.439 -6.747 -1.936 $atom:60_93 $mol:. @atom:60 0.0 -21.439 -6.747 -1.936
$atom:177_10 $mol @atom:177 0.0 -19.578 -5.207 -0.628 $atom:235_10 $mol:. @atom:235 0.0 -19.578 -5.207 -0.628
$atom:180_10 $mol @atom:180 0.0 -19.061 -4.828 0.557 $atom:238_10 $mol:. @atom:238 0.0 -19.061 -4.828 0.557
$atom:178_10 $mol @atom:178 0.0 -20.185 -4.465 -1.375 $atom:236_10 $mol:. @atom:236 0.0 -20.185 -4.465 -1.375
$atom:171_10 $mol @atom:171 0.0 -18.878 -3.426 0.994 $atom:229_10 $mol:. @atom:229 0.0 -18.878 -3.426 0.994
$atom:183_10 $mol @atom:183 0.0 -18.342 -5.450 0.901 $atom:241_10 $mol:. @atom:241 0.0 -18.342 -5.450 0.901
$atom:80_20 $mol @atom:80 0.0 -19.984 -2.451 0.558 $atom:54_20 $mol:. @atom:54 0.0 -19.984 -2.451 0.558
$atom:80_21 $mol @atom:80 0.0 -17.509 -2.857 0.610 $atom:54_21 $mol:. @atom:54 0.0 -17.509 -2.857 0.610
$atom:85_94 $mol @atom:85 0.0 -18.906 -3.470 2.099 $atom:60_94 $mol:. @atom:60 0.0 -18.906 -3.470 2.099
$atom:85_95 $mol @atom:85 0.0 -20.991 -2.887 0.651 $atom:60_95 $mol:. @atom:60 0.0 -20.991 -2.887 0.651
$atom:85_96 $mol @atom:85 0.0 -19.829 -2.132 -0.485 $atom:60_96 $mol:. @atom:60 0.0 -19.829 -2.132 -0.485
$atom:85_97 $mol @atom:85 0.0 -19.955 -1.550 1.193 $atom:60_97 $mol:. @atom:60 0.0 -19.955 -1.550 1.193
$atom:85_98 $mol @atom:85 0.0 -17.405 -2.773 -0.482 $atom:60_98 $mol:. @atom:60 0.0 -17.405 -2.773 -0.482
$atom:85_99 $mol @atom:85 0.0 -16.684 -3.475 0.993 $atom:60_99 $mol:. @atom:60 0.0 -16.684 -3.475 0.993
$atom:85_100 $mol @atom:85 0.0 -17.407 -1.849 1.043 $atom:60_100 $mol:. @atom:60 0.0 -17.407 -1.849 1.043
$atom:85_101 $mol @atom:85 0.0 -21.621 -6.939 -0.168 $atom:60_101 $mol:. @atom:60 0.0 -21.621 -6.939 -0.168
$atom:85_102 $mol @atom:85 0.0 -19.160 -7.294 0.044 $atom:60_102 $mol:. @atom:60 0.0 -19.160 -7.294 0.044
} }
# Note: You don't have to specify the charge in this example because we are
# using the OPLSAA force-field which assigns charge according to
# atom-type. Just leave these numbers as 0.00 for now.
# Note: LAMMPS expects an integer in the 2nd column (the Molecule-ID number).
# If we put "$mol:." there, moltemplate will generate this integer for you
write("Data Bond List") { write("Data Bond List") {
$bond:id1 $atom:81_1 $atom:81_2 $bond:id1 $atom:57_1 $atom:57_2
$bond:id2 $atom:81_1 $atom:85_1 $bond:id2 $atom:57_1 $atom:60_1
$bond:id3 $atom:81_1 $atom:85_10 $bond:id3 $atom:57_1 $atom:60_10
$bond:id4 $atom:81_1 $atom:82_1 $bond:id4 $atom:57_1 $atom:58_1
$bond:id5 $atom:81_2 $atom:177_1 $bond:id5 $atom:57_2 $atom:235_1
$bond:id6 $atom:81_2 $atom:85_2 $bond:id6 $atom:57_2 $atom:60_2
$bond:id7 $atom:81_2 $atom:85_11 $bond:id7 $atom:57_2 $atom:60_11
$bond:id8 $atom:177_1 $atom:180_1 $bond:id8 $atom:235_1 $atom:238_1
$bond:id9 $atom:177_1 $atom:178_1 $bond:id9 $atom:235_1 $atom:236_1
$bond:id10 $atom:180_1 $atom:171_1 $bond:id10 $atom:238_1 $atom:229_1
$bond:id11 $atom:180_1 $atom:183_1 $bond:id11 $atom:238_1 $atom:241_1
$bond:id12 $atom:171_1 $atom:80_1 $bond:id12 $atom:229_1 $atom:54_1
$bond:id13 $atom:171_1 $atom:80_2 $bond:id13 $atom:229_1 $atom:54_2
$bond:id14 $atom:85_3 $atom:171_1 $bond:id14 $atom:60_3 $atom:229_1
$bond:id15 $atom:85_4 $atom:80_1 $bond:id15 $atom:60_4 $atom:54_1
$bond:id16 $atom:85_5 $atom:80_1 $bond:id16 $atom:60_5 $atom:54_1
$bond:id17 $atom:85_6 $atom:80_1 $bond:id17 $atom:60_6 $atom:54_1
$bond:id18 $atom:85_7 $atom:80_2 $bond:id18 $atom:60_7 $atom:54_2
$bond:id19 $atom:85_8 $atom:80_2 $bond:id19 $atom:60_8 $atom:54_2
$bond:id20 $atom:85_9 $atom:80_2 $bond:id20 $atom:60_9 $atom:54_2
$bond:id21 $atom:81_3 $atom:82_1 $bond:id21 $atom:57_3 $atom:58_1
$bond:id22 $atom:81_3 $atom:85_12 $bond:id22 $atom:57_3 $atom:60_12
$bond:id23 $atom:81_3 $atom:85_20 $bond:id23 $atom:57_3 $atom:60_20
$bond:id24 $atom:81_3 $atom:82_2 $bond:id24 $atom:57_3 $atom:58_2
$bond:id25 $atom:177_2 $atom:82_1 $bond:id25 $atom:235_2 $atom:58_1
$bond:id26 $atom:85_21 $atom:82_1 $bond:id26 $atom:60_21 $atom:58_1
$bond:id27 $atom:177_2 $atom:180_2 $bond:id27 $atom:235_2 $atom:238_2
$bond:id28 $atom:177_2 $atom:178_2 $bond:id28 $atom:235_2 $atom:236_2
$bond:id29 $atom:180_2 $atom:171_2 $bond:id29 $atom:238_2 $atom:229_2
$bond:id30 $atom:180_2 $atom:183_2 $bond:id30 $atom:238_2 $atom:241_2
$bond:id31 $atom:171_2 $atom:80_3 $bond:id31 $atom:229_2 $atom:54_3
$bond:id32 $atom:171_2 $atom:80_4 $bond:id32 $atom:229_2 $atom:54_4
$bond:id33 $atom:85_13 $atom:171_2 $bond:id33 $atom:60_13 $atom:229_2
$bond:id34 $atom:85_14 $atom:80_3 $bond:id34 $atom:60_14 $atom:54_3
$bond:id35 $atom:85_15 $atom:80_3 $bond:id35 $atom:60_15 $atom:54_3
$bond:id36 $atom:85_16 $atom:80_3 $bond:id36 $atom:60_16 $atom:54_3
$bond:id37 $atom:85_17 $atom:80_4 $bond:id37 $atom:60_17 $atom:54_4
$bond:id38 $atom:85_18 $atom:80_4 $bond:id38 $atom:60_18 $atom:54_4
$bond:id39 $atom:85_19 $atom:80_4 $bond:id39 $atom:60_19 $atom:54_4
$bond:id40 $atom:81_4 $atom:82_2 $bond:id40 $atom:57_4 $atom:58_2
$bond:id41 $atom:81_4 $atom:85_22 $bond:id41 $atom:57_4 $atom:60_22
$bond:id42 $atom:81_4 $atom:85_30 $bond:id42 $atom:57_4 $atom:60_30
$bond:id43 $atom:81_4 $atom:82_3 $bond:id43 $atom:57_4 $atom:58_3
$bond:id44 $atom:177_3 $atom:82_2 $bond:id44 $atom:235_3 $atom:58_2
$bond:id45 $atom:85_31 $atom:82_2 $bond:id45 $atom:60_31 $atom:58_2
$bond:id46 $atom:177_3 $atom:180_3 $bond:id46 $atom:235_3 $atom:238_3
$bond:id47 $atom:177_3 $atom:178_3 $bond:id47 $atom:235_3 $atom:236_3
$bond:id48 $atom:180_3 $atom:171_3 $bond:id48 $atom:238_3 $atom:229_3
$bond:id49 $atom:180_3 $atom:183_3 $bond:id49 $atom:238_3 $atom:241_3
$bond:id50 $atom:171_3 $atom:80_5 $bond:id50 $atom:229_3 $atom:54_5
$bond:id51 $atom:171_3 $atom:80_6 $bond:id51 $atom:229_3 $atom:54_6
$bond:id52 $atom:85_23 $atom:171_3 $bond:id52 $atom:60_23 $atom:229_3
$bond:id53 $atom:85_24 $atom:80_5 $bond:id53 $atom:60_24 $atom:54_5
$bond:id54 $atom:85_25 $atom:80_5 $bond:id54 $atom:60_25 $atom:54_5
$bond:id55 $atom:85_26 $atom:80_5 $bond:id55 $atom:60_26 $atom:54_5
$bond:id56 $atom:85_27 $atom:80_6 $bond:id56 $atom:60_27 $atom:54_6
$bond:id57 $atom:85_28 $atom:80_6 $bond:id57 $atom:60_28 $atom:54_6
$bond:id58 $atom:85_29 $atom:80_6 $bond:id58 $atom:60_29 $atom:54_6
$bond:id59 $atom:81_5 $atom:82_3 $bond:id59 $atom:57_5 $atom:58_3
$bond:id60 $atom:81_5 $atom:85_32 $bond:id60 $atom:57_5 $atom:60_32
$bond:id61 $atom:81_5 $atom:85_40 $bond:id61 $atom:57_5 $atom:60_40
$bond:id62 $atom:81_5 $atom:82_4 $bond:id62 $atom:57_5 $atom:58_4
$bond:id63 $atom:177_4 $atom:82_3 $bond:id63 $atom:235_4 $atom:58_3
$bond:id64 $atom:85_41 $atom:82_3 $bond:id64 $atom:60_41 $atom:58_3
$bond:id65 $atom:177_4 $atom:180_4 $bond:id65 $atom:235_4 $atom:238_4
$bond:id66 $atom:177_4 $atom:178_4 $bond:id66 $atom:235_4 $atom:236_4
$bond:id67 $atom:180_4 $atom:171_4 $bond:id67 $atom:238_4 $atom:229_4
$bond:id68 $atom:180_4 $atom:183_4 $bond:id68 $atom:238_4 $atom:241_4
$bond:id69 $atom:171_4 $atom:80_7 $bond:id69 $atom:229_4 $atom:54_7
$bond:id70 $atom:171_4 $atom:80_8 $bond:id70 $atom:229_4 $atom:54_8
$bond:id71 $atom:85_33 $atom:171_4 $bond:id71 $atom:60_33 $atom:229_4
$bond:id72 $atom:85_34 $atom:80_7 $bond:id72 $atom:60_34 $atom:54_7
$bond:id73 $atom:85_35 $atom:80_7 $bond:id73 $atom:60_35 $atom:54_7
$bond:id74 $atom:85_36 $atom:80_7 $bond:id74 $atom:60_36 $atom:54_7
$bond:id75 $atom:85_37 $atom:80_8 $bond:id75 $atom:60_37 $atom:54_8
$bond:id76 $atom:85_38 $atom:80_8 $bond:id76 $atom:60_38 $atom:54_8
$bond:id77 $atom:85_39 $atom:80_8 $bond:id77 $atom:60_39 $atom:54_8
$bond:id78 $atom:81_6 $atom:82_4 $bond:id78 $atom:57_6 $atom:58_4
$bond:id79 $atom:81_6 $atom:85_42 $bond:id79 $atom:57_6 $atom:60_42
$bond:id80 $atom:81_6 $atom:85_50 $bond:id80 $atom:57_6 $atom:60_50
$bond:id81 $atom:81_6 $atom:82_5 $bond:id81 $atom:57_6 $atom:58_5
$bond:id82 $atom:177_5 $atom:82_4 $bond:id82 $atom:235_5 $atom:58_4
$bond:id83 $atom:85_51 $atom:82_4 $bond:id83 $atom:60_51 $atom:58_4
$bond:id84 $atom:177_5 $atom:180_5 $bond:id84 $atom:235_5 $atom:238_5
$bond:id85 $atom:177_5 $atom:178_5 $bond:id85 $atom:235_5 $atom:236_5
$bond:id86 $atom:180_5 $atom:171_5 $bond:id86 $atom:238_5 $atom:229_5
$bond:id87 $atom:180_5 $atom:183_5 $bond:id87 $atom:238_5 $atom:241_5
$bond:id88 $atom:171_5 $atom:80_9 $bond:id88 $atom:229_5 $atom:54_9
$bond:id89 $atom:171_5 $atom:80_10 $bond:id89 $atom:229_5 $atom:54_10
$bond:id90 $atom:85_43 $atom:171_5 $bond:id90 $atom:60_43 $atom:229_5
$bond:id91 $atom:85_44 $atom:80_9 $bond:id91 $atom:60_44 $atom:54_9
$bond:id92 $atom:85_45 $atom:80_9 $bond:id92 $atom:60_45 $atom:54_9
$bond:id93 $atom:85_46 $atom:80_9 $bond:id93 $atom:60_46 $atom:54_9
$bond:id94 $atom:85_47 $atom:80_10 $bond:id94 $atom:60_47 $atom:54_10
$bond:id95 $atom:85_48 $atom:80_10 $bond:id95 $atom:60_48 $atom:54_10
$bond:id96 $atom:85_49 $atom:80_10 $bond:id96 $atom:60_49 $atom:54_10
$bond:id97 $atom:81_7 $atom:82_5 $bond:id97 $atom:57_7 $atom:58_5
$bond:id98 $atom:81_7 $atom:85_52 $bond:id98 $atom:57_7 $atom:60_52
$bond:id99 $atom:81_7 $atom:85_60 $bond:id99 $atom:57_7 $atom:60_60
$bond:id100 $atom:81_7 $atom:82_6 $bond:id100 $atom:57_7 $atom:58_6
$bond:id101 $atom:177_6 $atom:82_5 $bond:id101 $atom:235_6 $atom:58_5
$bond:id102 $atom:85_61 $atom:82_5 $bond:id102 $atom:60_61 $atom:58_5
$bond:id103 $atom:177_6 $atom:180_6 $bond:id103 $atom:235_6 $atom:238_6
$bond:id104 $atom:177_6 $atom:178_6 $bond:id104 $atom:235_6 $atom:236_6
$bond:id105 $atom:180_6 $atom:171_6 $bond:id105 $atom:238_6 $atom:229_6
$bond:id106 $atom:180_6 $atom:183_6 $bond:id106 $atom:238_6 $atom:241_6
$bond:id107 $atom:171_6 $atom:80_11 $bond:id107 $atom:229_6 $atom:54_11
$bond:id108 $atom:171_6 $atom:80_12 $bond:id108 $atom:229_6 $atom:54_12
$bond:id109 $atom:85_53 $atom:171_6 $bond:id109 $atom:60_53 $atom:229_6
$bond:id110 $atom:85_54 $atom:80_11 $bond:id110 $atom:60_54 $atom:54_11
$bond:id111 $atom:85_55 $atom:80_11 $bond:id111 $atom:60_55 $atom:54_11
$bond:id112 $atom:85_56 $atom:80_11 $bond:id112 $atom:60_56 $atom:54_11
$bond:id113 $atom:85_57 $atom:80_12 $bond:id113 $atom:60_57 $atom:54_12
$bond:id114 $atom:85_58 $atom:80_12 $bond:id114 $atom:60_58 $atom:54_12
$bond:id115 $atom:85_59 $atom:80_12 $bond:id115 $atom:60_59 $atom:54_12
$bond:id116 $atom:81_8 $atom:82_6 $bond:id116 $atom:57_8 $atom:58_6
$bond:id117 $atom:81_8 $atom:85_62 $bond:id117 $atom:57_8 $atom:60_62
$bond:id118 $atom:81_8 $atom:85_70 $bond:id118 $atom:57_8 $atom:60_70
$bond:id119 $atom:81_8 $atom:82_7 $bond:id119 $atom:57_8 $atom:58_7
$bond:id120 $atom:177_7 $atom:82_6 $bond:id120 $atom:235_7 $atom:58_6
$bond:id121 $atom:85_71 $atom:82_6 $bond:id121 $atom:60_71 $atom:58_6
$bond:id122 $atom:177_7 $atom:180_7 $bond:id122 $atom:235_7 $atom:238_7
$bond:id123 $atom:177_7 $atom:178_7 $bond:id123 $atom:235_7 $atom:236_7
$bond:id124 $atom:180_7 $atom:171_7 $bond:id124 $atom:238_7 $atom:229_7
$bond:id125 $atom:180_7 $atom:183_7 $bond:id125 $atom:238_7 $atom:241_7
$bond:id126 $atom:171_7 $atom:80_13 $bond:id126 $atom:229_7 $atom:54_13
$bond:id127 $atom:171_7 $atom:80_14 $bond:id127 $atom:229_7 $atom:54_14
$bond:id128 $atom:85_63 $atom:171_7 $bond:id128 $atom:60_63 $atom:229_7
$bond:id129 $atom:85_64 $atom:80_13 $bond:id129 $atom:60_64 $atom:54_13
$bond:id130 $atom:85_65 $atom:80_13 $bond:id130 $atom:60_65 $atom:54_13
$bond:id131 $atom:85_66 $atom:80_13 $bond:id131 $atom:60_66 $atom:54_13
$bond:id132 $atom:85_67 $atom:80_14 $bond:id132 $atom:60_67 $atom:54_14
$bond:id133 $atom:85_68 $atom:80_14 $bond:id133 $atom:60_68 $atom:54_14
$bond:id134 $atom:85_69 $atom:80_14 $bond:id134 $atom:60_69 $atom:54_14
$bond:id135 $atom:81_9 $atom:82_7 $bond:id135 $atom:57_9 $atom:58_7
$bond:id136 $atom:81_9 $atom:85_72 $bond:id136 $atom:57_9 $atom:60_72
$bond:id137 $atom:81_9 $atom:85_80 $bond:id137 $atom:57_9 $atom:60_80
$bond:id138 $atom:81_9 $atom:82_8 $bond:id138 $atom:57_9 $atom:58_8
$bond:id139 $atom:177_8 $atom:82_7 $bond:id139 $atom:235_8 $atom:58_7
$bond:id140 $atom:85_81 $atom:82_7 $bond:id140 $atom:60_81 $atom:58_7
$bond:id141 $atom:177_8 $atom:180_8 $bond:id141 $atom:235_8 $atom:238_8
$bond:id142 $atom:177_8 $atom:178_8 $bond:id142 $atom:235_8 $atom:236_8
$bond:id143 $atom:180_8 $atom:171_8 $bond:id143 $atom:238_8 $atom:229_8
$bond:id144 $atom:180_8 $atom:183_8 $bond:id144 $atom:238_8 $atom:241_8
$bond:id145 $atom:171_8 $atom:80_15 $bond:id145 $atom:229_8 $atom:54_15
$bond:id146 $atom:171_8 $atom:80_16 $bond:id146 $atom:229_8 $atom:54_16
$bond:id147 $atom:85_73 $atom:171_8 $bond:id147 $atom:60_73 $atom:229_8
$bond:id148 $atom:85_74 $atom:80_15 $bond:id148 $atom:60_74 $atom:54_15
$bond:id149 $atom:85_75 $atom:80_15 $bond:id149 $atom:60_75 $atom:54_15
$bond:id150 $atom:85_76 $atom:80_15 $bond:id150 $atom:60_76 $atom:54_15
$bond:id151 $atom:85_77 $atom:80_16 $bond:id151 $atom:60_77 $atom:54_16
$bond:id152 $atom:85_78 $atom:80_16 $bond:id152 $atom:60_78 $atom:54_16
$bond:id153 $atom:85_79 $atom:80_16 $bond:id153 $atom:60_79 $atom:54_16
$bond:id154 $atom:81_10 $atom:82_8 $bond:id154 $atom:57_10 $atom:58_8
$bond:id155 $atom:81_10 $atom:85_82 $bond:id155 $atom:57_10 $atom:60_82
$bond:id156 $atom:81_10 $atom:85_90 $bond:id156 $atom:57_10 $atom:60_90
$bond:id157 $atom:81_10 $atom:82_9 $bond:id157 $atom:57_10 $atom:58_9
$bond:id158 $atom:177_9 $atom:82_8 $bond:id158 $atom:235_9 $atom:58_8
$bond:id159 $atom:85_91 $atom:82_8 $bond:id159 $atom:60_91 $atom:58_8
$bond:id160 $atom:177_9 $atom:180_9 $bond:id160 $atom:235_9 $atom:238_9
$bond:id161 $atom:177_9 $atom:178_9 $bond:id161 $atom:235_9 $atom:236_9
$bond:id162 $atom:180_9 $atom:171_9 $bond:id162 $atom:238_9 $atom:229_9
$bond:id163 $atom:180_9 $atom:183_9 $bond:id163 $atom:238_9 $atom:241_9
$bond:id164 $atom:171_9 $atom:80_17 $bond:id164 $atom:229_9 $atom:54_17
$bond:id165 $atom:171_9 $atom:80_18 $bond:id165 $atom:229_9 $atom:54_18
$bond:id166 $atom:85_83 $atom:171_9 $bond:id166 $atom:60_83 $atom:229_9
$bond:id167 $atom:85_84 $atom:80_17 $bond:id167 $atom:60_84 $atom:54_17
$bond:id168 $atom:85_85 $atom:80_17 $bond:id168 $atom:60_85 $atom:54_17
$bond:id169 $atom:85_86 $atom:80_17 $bond:id169 $atom:60_86 $atom:54_17
$bond:id170 $atom:85_87 $atom:80_18 $bond:id170 $atom:60_87 $atom:54_18
$bond:id171 $atom:85_88 $atom:80_18 $bond:id171 $atom:60_88 $atom:54_18
$bond:id172 $atom:85_89 $atom:80_18 $bond:id172 $atom:60_89 $atom:54_18
$bond:id173 $atom:80_19 $atom:82_9 $bond:id173 $atom:54_19 $atom:58_9
$bond:id174 $atom:85_92 $atom:80_19 $bond:id174 $atom:60_92 $atom:54_19
$bond:id175 $atom:85_93 $atom:80_19 $bond:id175 $atom:60_93 $atom:54_19
$bond:id176 $atom:85_101 $atom:80_19 $bond:id176 $atom:60_101 $atom:54_19
$bond:id177 $atom:177_10 $atom:82_9 $bond:id177 $atom:235_10 $atom:58_9
$bond:id178 $atom:85_102 $atom:82_9 $bond:id178 $atom:60_102 $atom:58_9
$bond:id179 $atom:177_10 $atom:180_10 $bond:id179 $atom:235_10 $atom:238_10
$bond:id180 $atom:177_10 $atom:178_10 $bond:id180 $atom:235_10 $atom:236_10
$bond:id181 $atom:180_10 $atom:171_10 $bond:id181 $atom:238_10 $atom:229_10
$bond:id182 $atom:180_10 $atom:183_10 $bond:id182 $atom:238_10 $atom:241_10
$bond:id183 $atom:171_10 $atom:80_20 $bond:id183 $atom:229_10 $atom:54_20
$bond:id184 $atom:171_10 $atom:80_21 $bond:id184 $atom:229_10 $atom:54_21
$bond:id185 $atom:85_94 $atom:171_10 $bond:id185 $atom:60_94 $atom:229_10
$bond:id186 $atom:85_95 $atom:80_20 $bond:id186 $atom:60_95 $atom:54_20
$bond:id187 $atom:85_96 $atom:80_20 $bond:id187 $atom:60_96 $atom:54_20
$bond:id188 $atom:85_97 $atom:80_20 $bond:id188 $atom:60_97 $atom:54_20
$bond:id189 $atom:85_98 $atom:80_21 $bond:id189 $atom:60_98 $atom:54_21
$bond:id190 $atom:85_99 $atom:80_21 $bond:id190 $atom:60_99 $atom:54_21
$bond:id191 $atom:85_100 $atom:80_21 $bond:id191 $atom:60_100 $atom:54_21
} }
} # end of "PolyNIPAM inherits OPLSAA" type definition } # end of "PolyNIPAM inherits OPLSAA" type definition

View File

@ -1,24 +1,35 @@
# The "oplsaa.lt" file contains force-field parameters, atom type definitions, # The oplsaa2024.lt file contains force-field parameters, atom type definitions,
# partial charges, masses and bond-angle rules for the atoms in your system. # partial charges, masses and bond-angle rules for the atoms in your system.
import /usr/local/moltemplate/moltemplate/force_fields/oplsaa2024.lt
# It defines these atom types:
# atom-type charge mass btype epsilon sigma description
# @atom:235 0.5 12.011 C~ 0.105 3.75 "C: C=O in amide. Acyl R in amides"
# @atom:236 -0.5 15.999 O~ 0.21 2.96 "O: C=O in amide. is neutral - use"
# @atom:237 -0.76 14.007 N~ 0.17 3.25 "N: primary amide. alkane params"
# @atom:240 0.38 1.008 H~ 0 0 "H on N: primary amide"
# @atom:279 0 1.008 HC 0.03 2.42 "AA H-alpha in aldehyde & formamide"
# (Note: Future versions of OPLSAA might use different @atom type numbers.)
_FAM inherits OPLSAA { _FAM inherits OPLSAA {
# atom-id mol-id atom-type charge X Y Z # comment # atomID molID atomType charge coordX coordY coordZ
write('Data Atoms') { write('Data Atoms') {
$atom:C00 $mol @atom:177 0.00 0.100014490 0.490422099 0.0 $atom:C00 $mol @atom:235 0.00 0.100014490 0.490422099 0.0
$atom:O01 $mol @atom:178 0.00 1.091153187 -0.250749643 0.0 $atom:O01 $mol @atom:236 0.00 1.091153187 -0.250749643 0.0
$atom:N02 $mol @atom:179 0.00 -1.121616690 -0.181085754 0.0 $atom:N02 $mol @atom:237 0.00 -1.121616690 -0.181085754 0.0
$atom:H03 $mol @atom:182 0.00 -2.013715893 0.272535813 0.0 $atom:H03 $mol @atom:240 0.00 -2.013715893 0.272535813 0.0
$atom:H04 $mol @atom:182 0.00 -1.056768463 -1.190185868 0.0 $atom:H04 $mol @atom:240 0.00 -1.056768463 -1.190185868 0.0
$atom:H05 $mol @atom:221 0.00 0.144676387 1.570292021 0.0 $atom:H05 $mol @atom:279 0.00 0.144676387 1.570292021 0.0
} }
# Note: You don't have to specify the charge in this example because we are # Note: You don't have to specify the charge in this example because we are
# using the OPLSAA force-field which assigns charge according to # using the OPLSAA force-field which assigns charge according to
# atom-type. Just leave these numbers as 0.00 for now. # atom-type. Just leave these numbers as 0.00 for now.
# Note: LAMMPS expects an integer in the 2nd column (the Molecule-ID number). # Note: LAMMPS expects an integer in the 2nd column (the Molecule-ID number).
# If we put "$mol" there, moltemplate will generate this integer for you # If we put "$mol" there, moltemplate will generate this integer for you
# A list of the bonds in the molecule: # A list of the bonds in the molecule:
# BondID AtomID1 AtomID2 # BondID AtomID1 AtomID2
@ -32,6 +43,6 @@ _FAM inherits OPLSAA {
} }
# In the "Data Bond List" section we don't have to specify the bond type. # In the "Data Bond List" section we don't have to specify the bond type.
# The bond-type will be determined by the atom type (according to "oplsaa.lt") # Bond types will be determined by the atom type (according to oplsaa2024.lt).
} }

View File

@ -1,23 +1,25 @@
# Use the OPLS-AA force field for all species. # Use the OPLS-AA force field for all species.
import /usr/local/moltemplate/moltemplate/force_fields/oplsaa.lt import /usr/local/moltemplate/moltemplate/force_fields/oplsaa2024.lt
import PolyNIPAM.lt import PolyNIPAM.lt
# Define the SPC water and ions as in the OPLS-AA # Define the SPC water and ions as in the OPLS-AA
Ca inherits OPLSAA { Ca inherits OPLSAA {
write("Data Atoms"){ write("Data Atoms"){
$atom:a1 $mol:. @atom:354 0.0 0.00000 0.00000 0.000000 $atom:a1 $mol:. @atom:412 0.0 0.00000 0.00000 0.000000
} }
} }
Cl inherits OPLSAA { Cl inherits OPLSAA {
write("Data Atoms"){ write("Data Atoms"){
$atom:a1 $mol:. @atom:344 0.0 0.00000 0.00000 0.000000 $atom:a1 $mol:. @atom:401 0.0 0.00000 0.00000 0.000000
} }
} }
SPC inherits OPLSAA { SPC inherits OPLSAA {
write("Data Atoms"){ write("Data Atoms"){
$atom:O $mol:. @atom:76 0. 0.0000000 0.00000 0.000000 $atom:O $mol:. @atom:9991 0. 0.0000000 0.00000 0.000000
$atom:H1 $mol:. @atom:77 0. 0.8164904 0.00000 0.5773590 $atom:H1 $mol:. @atom:9990 0. 0.8164904 0.00000 0.5773590
$atom:H2 $mol:. @atom:77 0. -0.8164904 0.00000 0.5773590 $atom:H2 $mol:. @atom:9990 0. -0.8164904 0.00000 0.5773590
} }
write("Data Bond List") { write("Data Bond List") {
$bond:OH1 $atom:O $atom:H1 $bond:OH1 $atom:O $atom:H1
@ -38,37 +40,38 @@ write_once("Data Boundary"){
0 26 zlo zhi 0 26 zlo zhi
} }
# Define the input variables.
write_once("In Init"){ write_once("In Init"){
boundary p p p # "p p p" is the default. This line is optional.
neighbor 3 bin # (This line is also optional in this example.)
}
# Note: The lines below in the "In Run" section are often omitted.
# Run an NVT simulation.
write_once("In Run"){
# Input variables. # Input variables.
variable run string sample01 # output name variable run string sample01 # output name
variable ts equal 2 # timestep variable ts equal 2 # timestep
variable temp equal 298.15 # equilibrium temperature variable temp equal 298.15 # equilibrium temperature
variable p equal 1. # equilibrium pressure variable p equal 1. # equilibrium pressure
variable equi equal 30000 # equilibration steps variable equi equal 30000 # equilibration steps
# PBC (set them before the creation of the box).
boundary p p p
neighbor 3 bin
}
# Run an NVT simulation.
write_once("In Run"){
# Set the output. # Set the output.
thermo 1000 thermo 1000
thermo_style custom step etotal evdwl ecoul elong ebond eangle edihed eimp pe ke temp press atoms vol density cpu thermo_style custom step etotal evdwl ecoul elong ebond eangle &
edihed eimp pe ke temp press atoms vol density cpu
thermo_modify flush yes thermo_modify flush yes
compute pe1 all pe/atom pair compute pe1 all pe/atom pair
dump TRJ all custom 100 \$\{run\}.dump id xu yu zu c_pe1 dump TRJ all custom 100 \$\{run\}.dump id xu yu zu c_pe1
# Minimise the input structure, just in case. # Minimise the input structure, just in case.
minimize .01 .001 1000 100000 minimize .01 .001 1000 100000
write_data \$\{run\}.min write_data \$\{run\}.min
# Set the constrains. # Set the constrains.
group watergroup type @atom:76 @atom:77 group watergroup type @atom:9991 @atom:9990
fix 0 watergroup shake 0.0001 10 0 b @bond:042_043 a @angle:043_042_043 fix 0 watergroup shake 0.0001 10 0 b @bond:spcO_spcH a @angle:spcH_spcO_spcH
# Short annealing. # Short annealing.
timestep \$\{ts\} timestep \$\{ts\}
fix 1 all nvt temp \$\{temp\} \$\{temp\} \$(100*dt) fix 1 all nvt temp \$\{temp\} \$\{temp\} \$(100*dt)
@ -76,3 +79,4 @@ write_once("In Run"){
run \$\{equi\} run \$\{equi\}
unfix 1 unfix 1
} }

View File

@ -1,8 +1,6 @@
# Import the force field. import formamide.lt # Defines "_FAM" and OPLSAA
import /usr/local/moltemplate/moltemplate/force_fields/oplsaa.lt
import formamide.lt # after oplsaa.lt, as it depends on it.
# Create the input sample. # Distribute the molecules on a 5x5x5 cubic grid with spacing 4.6
solv = new _FAM [5].move( 4.6, 0, 0) solv = new _FAM [5].move( 4.6, 0, 0)
[5].move( 0, 4.6, 0) [5].move( 0, 4.6, 0)
[5].move( 0, 0, 4.6) [5].move( 0, 0, 4.6)
@ -15,8 +13,11 @@ write_once("Data Boundary") {
-11.5 11.5 zlo zhi -11.5 11.5 zlo zhi
} }
# Create an input deck for LAMMPS. # Note: The lines below in the "In Run" section are often omitted.
write_once("In Init"){
write_once("In Run"){
# Create an input deck for LAMMPS.
# Run an NPT simulation.
# Input variables. # Input variables.
variable run string solv_01 # output name variable run string solv_01 # output name
variable ts equal 1 # timestep variable ts equal 1 # timestep
@ -26,26 +27,20 @@ write_once("In Init"){
variable equi equal 5000 # Equilibration steps variable equi equal 5000 # Equilibration steps
variable prod equal 30000 # Production steps variable prod equal 30000 # Production steps
# PBC (set them before the creation of the box).
boundary p p p
}
# Run an NPT simulation.
write_once("In Run"){
# Derived variables. # Derived variables.
variable tcouple equal \$\{ts\}*100 variable tcouple equal \$\{ts\}*100
variable pcouple equal \$\{ts\}*1000 variable pcouple equal \$\{ts\}*1000
# Output. # Output.
thermo \$d thermo \$d
thermo_style custom step etotal evdwl ecoul elong ebond eangle edihed eimp & thermo_style custom step etotal evdwl ecoul elong ebond eangle &
ke pe temp press vol density cpu edihed eimp ke pe temp press vol density cpu
thermo_modify flush yes thermo_modify flush yes
# Trajectory. # Trajectory.
dump TRJ all dcd \$d \$\{run\}.dcd dump TRJ all dcd \$d \$\{run\}.dcd
dump_modify TRJ unwrap yes dump_modify TRJ unwrap yes
# Thermalisation and relaxation, NPT ensemble. # Thermalisation and relaxation, NPT ensemble.
timestep \$\{ts\} timestep \$\{ts\}
fix NPT all npt temp \$\{temp\} \$\{temp\} \$\{tcouple\} iso \$p \$p \$\{pcouple\} fix NPT all npt temp \$\{temp\} \$\{temp\} \$\{tcouple\} iso \$p \$p \$\{pcouple\}
@ -59,3 +54,4 @@ write_once("In Run"){
run \$\{prod\} run \$\{prod\}
unfix NPT unfix NPT
} }

View File

@ -256,6 +256,41 @@ TEST_F(GroupTest, Molecular)
command("group three include xxx");); command("group three include xxx"););
} }
TEST_F(GroupTest, Bitmap)
{
atomic_system();
BEGIN_HIDE_OUTPUT();
command("group one region left");
command("group two region right");
command("group three empty");
command("group four region left");
command("group four region right");
command("group six subtract four one");
END_HIDE_OUTPUT();
int bm_one = group->get_bitmask_by_id(FLERR, "one", "unittest 1");
int bm_two = group->get_bitmask_by_id(FLERR, "two", "unittest 2");
int bm_three = group->get_bitmask_by_id(FLERR, "three", "unittest 3");
int bm_four = group->get_bitmask_by_id(FLERR, "four", "unittest 4");
int bm_six = group->get_bitmask_by_id(FLERR, "six", "unittest 6");
int nlocal = lmp->atom->natoms;
auto mask = lmp->atom->mask;
for (int i = 0; i < nlocal; ++i) {
if ((mask[i] & bm_one) && (mask[i] & bm_two)) {
EXPECT_NE((mask[i] & bm_four), 0);
}
if (mask[i] & bm_two) {
EXPECT_NE((mask[i] & bm_six), 0);
}
EXPECT_EQ((mask[i] & bm_three), 0);
}
TEST_FAILURE(".*ERROR: Group ID five requested by unittest 5 does not exist.*",
group->get_bitmask_by_id(FLERR, "five", "unittest 5"););
}
TEST_F(GroupTest, Dynamic) TEST_F(GroupTest, Dynamic)
{ {
atomic_system(); atomic_system();