Syntax:
set ID style value
Examples:
set solvent atom 2 set edge bond 4 set half charge 0.5 set 100 x 0.5 set 1492 type 3
Description:
Set an attribute for a single atom or each atom in a group. The context depends on the specified style.
Styles atom, bond, angle, dihedral, improper, charge, and dipole set attributes for all atoms in a group, so the specified ID is a group-ID string.
Styles type, mol, x, y, z, vx, vy, vz, and q set the attribute of a single atom, so the specified ID is an atom-ID number (1-N).
Since atom attributes are assigned by the read_data, read_restart or create_atoms commands, this command changes those assignments. This can be useful for altering pairwise and molecular force interactions, since force-field coefficients are defined in terms of types. It can also be used to change the labeling of atoms when they are output in dump files. It can also be useful for debugging purposes; i.e. positioning an atom at a precise location to compute subsequent forces or energy.
For style atom, the atom type of all atoms in the group is changed to the specified value from 1 to ntypes. Note that ntypes must be within the range the simulation was initialized for. The maximum number of types is set by the create_box command or the atom types field in the header of the data file read by the read_data command.
For style bond, angle, dihedral, or improper, the bond type (angle type, etc) of all bonds (angles, etc) of atoms in the group is changed to the specified value from 1 to nbondtypes (angletypes, etc). All atoms in the bond (angle, etc) must be in the group in order for the change to be made. The maximum number of types is set by the bond types (angle types, etc) field in the header of the data file.
For style charge, the charge of each atom in the group is set to the specified value.
For style dipole, the specified value is used as a random number seed. The dipole moment of each atom in the group is set to a random orientation with a magnitude determined by the dipole command setting for that atom type.
For styles type, mol, x, y, z, vx, vy, vz, or q, the corresponding attribute of a single atom with the specified atom-ID is set to the specified value. E.g. the last example above, sets the atom-type of atom 1492 to 3. If "type" were replaced by "q", the charge on atom 1492 would be set to 3; if it were replaced by "mol", then then the molecule-ID would be set to 3. The values for x,y,z are in distance units, the values for vx,vy,vz are in velocity units, and the value for charge is in charge units, as explained by the units command.
Restrictions:
This command requires inter-processor communication to coordinate the setting of bond types (angle types, etc). This means that your system must be ready to perform a simulation before using this command (force fields setup, atom masses set, etc). This is not necessary to simply reset atom types.
You cannot set the mol or q for an atom if the atom_style does not have those attributes.
Related commands:
create_box, create_atoms, read_data
Default: none