fix ID group-ID renum/mol Nevery keyword values ...
rmax cutoff cutoff = If atoms of the correct type which lie within a distance "cutoff" from each other, they are considered in contact and their moleculeIDs will be merged, even if they are not bonded together. (cutoff=0 by default) type itype jtype itype = Only atoms pairs of the the correct type can be considered jtype = in contact, even if they are bonded or lie within cutoff distance. itype and jtype can be integers (or ranges of integers such as * or 1*3) mergedown When two atoms (i,j) are bonded together, (or sufficiently close together), the molecule-IDs for both atoms is set to the minimum of their molecule-IDs. (default behavior) mergeup Molecule-IDs for two atoms (i,j) bonded together (or sufficiently nearby), are set to the maximum of their molecule-IDs. complete Each atom's molecule-ID number is initially reset to a unique value before merging begins. This causes the the molecule-IDs to be recalculated from scratch with every iteration (default behavoir). partial Molecule-ID numbers are merged down (or up) only. (This method is faster, but do not use partial if you expect bonds to break, or molecular subunits to dissociate.) ignorebonds Do not merge the moleculeIDs of atoms which are bonded together. Only merge atoms which are nearby. (Note that if you select this option, bonded atoms will not be considered even if they lie within the distance cutoff.) either MolRange Only merge the molecule-IDs of atoms i and j if either the molecule-ID of atom i lies in MolRange OR molecule-ID of atom j lies in MolRange (This only applies to atom pairs not connected by bonds.) neither MolRange Only merge the molecule-IDs of atoms i and j if the molecule-ID of atom i does not lie in MolRange AND molecule-ID of atom j does not lie in MolRange (This only applies to atom pairs not connected by bonds.) both ImolRange JmolRange Only merge the molecule-IDs of atoms i and j if the molecule-ID of atom i lies in ImolRange AND molecule-ID of atom j lies in JmolRange (or visa-versa) (This only applies to atom pairs not connected by bonds.) nboth ImolRange JmolRange Only merge the molecule-IDs of atoms i and j if the molecule-ID of atom i does NOT lie in ImolRange OR molecule-ID of atom j does NOT lie in JmolRange (and visa-versa) (This only applies to atom pairs not connected by bonds.) nucleate MolRange This is equivalent to "either MolRange" Use this together with pair_style lj/charmm/coul/charmm/inter nucleate MolRange (and typically "MolRange" is "1" when used in this way.)(Note: "MolRange", "ImolRange", "JmolRange" can be integers, or ranges of integers with wildcards *. See below.)
fix 1 all renum/mol 500 fix 1 all renum/mol 500 type 1*3 3*6 fix 1 all renum/mol 500 rmax 2.0 fix 1 all renum/mol 1000 rmax 3.0 ignorebonds fix 1 all renum/mol 1000 rmax 6.0 type 1 * partial mergeup fix 1 solutes renum/mol 1000 rmax 4.0 nucleate 1 fix 1 all renum/mol 1000 rmax 4.0 type 4* 4* nucleate 1
This fix renumbers all of the molecule-IDs for all the atoms in the system at regular intervals. Each molecule is given a unique molecule ID equal which is (by default) the lowest atomID of the atoms which belong to it. By default, two atoms are assigned to the same molecule if they are connected by one or more bonds. Additionally, atoms can be assigned to the same molcule whenever they lie within a certain distance of each other, (AND if the satisfy the optional atom-type requirements). (Note: The resulting molecule-ID numbers are often not contiguous.)
This fix can be a useful way to keep track of molecule size distribution during simulations of polymer growth or cross-linking (for example using fix bond_create command). This fix can also be used to keep track of membership in clusters that form during aggregation. When used together with pair_style lj/charmm/coul/charmm/inter this fix can be used to help prevent multiple clusters from forming and merging in simulations of nucleation and self-assembly at high concentrations.
A check for possible bonds or contact between molecules is performed Nevery timesteps. If two atoms I,J are connected to each other by bonds (as a result of fix bond_create, for example), and if they are both in the specified fix group, then their molecule ID numbers will be set equal to each other. Additionally if the rmax paramter is specified, then the atoms will be assigned to the same molecule whenever two atoms I,J are within a distance cutoff of each other. If atom-type requirements were specified (by using the "type" keyword), then this only happens if I is of atom type itype, and if J is of atom type jtype.
Computationally, at each timestep this fix operates, it loops over all bond pairs and neighbor lists. If "rmax" was specified, this fix computes distances between pairs of atoms in the neighbor-list. By default (unless the "partial" keyword is specified), this fix repeats this loop for a number of times proportional to the number of atoms in the molecule. For example, if there are 5000 atoms in the largest molecule in your simulation, then your simulation might be noticably slower if you invoke this fix much more frequently than once every 5000 timesteps.
The "partial" keyword can be used to speed up the renumbering process. This keyword tells LAMMPS not to erase the molecule-ID numbers and start from scratch at every interval. However this only works if you can guarantee that the process of aggregation and growth in your simulation is irreversible. (IE if bonds never break, and clusters never fall apart.)
Restart, fix_modify, output, run start/stop, minimize info:
No information about this fix is written to binary restart files. None of the fix_modify options are relevant to this fix.
No parameter of this fix can be used with the start/stop keywords of the run command. This fix is not invoked during energy minimization.
This fix is part of the USER-MISC package. It is only enabled if LAMMPS was built with that package. See the Making LAMMPS section for more info.
The option defaults are rmax=0.0, itype=*, jtype=*