fix property/global command

fix property/atom command

Syntax

fix id group property/atom variablename style restartvalue comm_ghost_value comm_reverse_ghost_value defaultvalue(s)...
fix id group property/global variablename style stylearg type type_value (warn_out_of_bounds val) defaultvalue(s)...
  • ID, group-ID are documented in fix command

  • property/global or property/atom = style name of this fix command

  • variablename = a valid C++ string

fix property/global:

  • style = scalar or vector or peratomtype or atomtype or matrix or atomtypepair or peratomtypepair

stylearg for scalar/vector: none
stylearg for matrix/atomtypepair: nCols
  • type = optional keyword, if available must be followed by:

  • type_value = constant or lookup

  • warn_out_of_bounds = optional keyword for type lookup

  • val = yes or no

fix property/atom:

  • style = scalar or vector

  • restartvalue = yes or no

  • communicate_ghost_value = yes or no

  • communicate_reverse_ghost_value = yes or no

Examples

fix m3 all property/global coefficientRestitution peratomtypepair 1 0.3
fix m5 all property/global characteristicVelocity scalar 2.
fix m5 all property/global initialTemperature peratomtype type lookup type1.csv type2.csv
fix uf all property/atom uf vector yes no no  0. 0. 0.

Description

Fix property/atom reserves per-atom properties to be accessed by the user or other fixes. Style scalar reserves one value per atom, style vector multiple values per atoms, where the number of defaultvalues (that are assigned to the atoms at creation) determines the length of the vector. The group of atoms the fix is applied to is always “all”, irrespective of which group is used for the fix command . If you want to assign different values for different groups, you can use the set command with keyword ‘property/atom’. Keyword restartvalues determines whether information about the values stored by this fix is written to binary restart files. Keyword communicate_ghost_value determines whether information about the values stored by this fix can be communicated to ghost particles (forward communication). The exact location during a time-step when this happens depends on the model that uses this fix. Keyword communicate_reverse_ghost_value determines whether information about the values stored by this fix can be communicated from ghost particles to owned particles (reverse communication). The exact location during a time-step when this happens depends on the model that uses this fix.

Fix property/global reserves global properties to be accessed by the user or other fixes or pair styles. The number of defaultvalues determines the length of the vector / the number of matrix components. For style vector, peratomtype or atomtype, the user provides the number of vector components. For style matrix, peratomtypepair or atomtypepair, the user provides the number of matrix columns (nCols).

Example: nCols*= 2 and *defaultvalues = 1 2 3 4 5 6 would be mapped into a matrix like

\begin{pmatrix}
 1 & 2 \\
 3 & 4 \\
 5 & 6
\end{pmatrix}

Note that the number of default values must thus be a multiple of nCols. Note that vector and peratomtype do the same thing, peratomtype is just provided to make input scripts more readable . Note that matrix and peratomtypepair both refer to a matrix of global values. However, a matrix defined via peratomtypepair is required to be symmetric.

The default values are floating point numbers by default. If the type keyword is used, then they are either floating point numbers or filenames if type_value is constant or lookup, respectively. The lookup type allows to specify a property that is a function of another variable. The function is specified pointwise in a file and a linear interpolation is performed between the points specified in the file. The file is structured as follows:

# Lines starting with '#' are ignored, e.g. for comments
0. 1.
1. 3.
2. 1.
6. 0.

Note that the entries in the first column must be listed in ascending order. This specific type can only be used in combination with specialized models. If the keyword warn_out_of_bounds is set to on, the fix issues a warning every time a function value is requested for an argument smaller than the first entry or larger than the last entry of the function file (in the above example: < 0 or > 6). This is useful if you are tuning parameters and don’t exactly know which range to expect.

Note that the group of atoms the fix is applied to is ignored (as the fix is not applied to atoms, but defines values of global scope).

Restart, fix_modify, output, run start/stop

Information about this fix is written to binary restart files if you set restartvalue to ‘yes’.

The style property/atom allows to use the fix_modify command in order to set limits to the values in the data arrays. The potential arguments for setting limits are:

fix_modify ID style index idx value-keyword value-entries
    style = set_lower_limit or set_lower_limit_per_type or set_upper_limit or set_upper_limit_per_type
    index = required keyword
    idx = index of the entry which is to be set, for scalar it can only be 0, for vector it's the component
    value-keyword = required keyword value or values, the latter only iff a _per_type limit is used
    value-entries = limit value(s) either a single one or one for each type, the latter only iff a _per_type limit is used

Examples:

fix_modify my_fix_property_scalar set_lower_limit index 0 value -1.0
fix_modify my_fix_property_vector set_upper_limit_per_type index 2 values -1 0 10 # in a simulation with 3 types

These limits can also be removed the syntax for this is:

fix_modify ID style index idx
    style = unset_lower_limit or unset_upper_limit
    index, idx = as above

Example:

fix_modify my_fix_property_vector unset_upper_limit index 2

Furthermore, an automated parallel communication behavior can be set for property/atom. This is useful if the fix is used in any user-written API model.

fix_modify ID style keyword value
    style = set_auto_forward_comm or set_auto_reverse_comm
    value = pre_force or post_force or off

Here, pre_force means communication before force calculation, and post_force means communication after the force loop. off disables automated parallel communication. Note that the command sequence

fix_modify my_fix_property_vector set_auto_forward_comm pre_force
fix_modify my_fix_property_vector set_auto_forward_comm post_force

will enable forward communication before and after force calculation.

Restrictions

none

Default

type_value = constant