Class: | ParameterRef |
Parent: | Object |
The class ParameterRef points to a parameter at a particular index in a Parameter object. ParameterRef does not implement initialize nor new methods; i.e. a ParameterRef object cannot be created explicitly by calling a constructor method. Instead, a ParameterRef object is implicitly created as a return value of ParEnumerable#[], or its equivalent methods of Parameter, namely Parameter#angle(idx), Parameter#bond(idx), Parameter#dihedral(idx), Parameter#element(idx), Parameter#improper(idx), Parameter#vdw(idx), Parameter#vdw_cutoff(idx), and Parameter#vdw_pair(idx). A ParameterRef is also given as a block argument in ParEnumerable#each and ParEnumerable#reverse_each.
A parameter has one of the following types:
A parameter consists of a number of attributes. Some of them are common to all kind of parameters, and others are specific to certain types. The common attributes are index, par_type, source, and comment. Type-specific parameters are as follows:
type | attributes |
---|---|
bond | atom_types, k, r0 |
angle | atom_types, k, a0 |
dihedral improper | atom_types, mult, k, period, phi0 |
vdw | atom_type, atomic_number, r_eq, eps, r_eq14, eps14, weight |
vdw_pair | atom_types, r_eq, eps, r_eq14, eps14 |
vdw_cutoff | atom_types, cutoff |
element | atomic_number, name, fullname, radius, color, weight |
Get/set the equilibrium bond angle (in degree). This attribute if available for angle parameters.
Get/set the atom types to define the parameter. The atom types are represented as a String with the format described in AtomRef#atom_type. For the vdw parameter, only one atom type is required. For other parameters, two or more atom types are required, in which case the argument should be an array of atom type strings.
The methods atom_type and atom_types are actually the same, so a code like pr.atom_type = ["ca", "c3"]
is accepted. However, this is a lousy coding style, so it is better to avoid it.
This attribute is available for all types except for the element type.
Get/set the atomic number. This attribute is available for vdw and element parameters. For vdw parameters, changing the atomic number automatically causes change of the weight attribute. (This is not the case for the element parameters.)
Get/set the color for element parameters. This is used only for screen display. The red, green, blue components are given as floats, with 1.0 for saturation.
Get/set the cutoff distance (in Å) for the vdw_cutoff parameters.
Get/set the minimum potential for the vdw and vdw_pair parameters. The unit is kcal/mol.
Get/set the 1-4 speicific minimum potential for the vdw and vdw_pair parameters. The unit is kcal/mol.
Get/set the fullname attribute for the element parameters, like "hydrogen". If you want the element symbol like "H", use name instead.
Get/set the force constant. This attribute is available for bond, angle, dihedral, and improper parameters. The unit is kcal/mol/Å2 for bond parameters, and kcal/mol/radian2 for angle parameters as well as dihedral and improper parameters with periodicity == 0. For dihedral and improper parameters with periodicity > 0, the unit is kcal/mol.
For harmonic potentials (i.e. bond, angle, and dihedrals with periodicity == 0), the potential energy is defined as E = k (x - x0)2. That is, the 1/2 factor usually associated with this term is included within the force constant k.
Get/set the multiplicity of the dihedral parameters. This attribute if available for dihedral and improper parameters. Currently only mult = 1 is implemented.
Get/set the name attribute for the element parameters. The name is actually the element symbol, like "H" and "He". If you want the real element name like "hydrogen", use fullname instead.
Get/set the periodicity of the dihedral parameters. This attribute is available for dihedral and improper parameters. A dihedral (improper) parameter record with periodicity p has p energy minima within the range of 0-360 degree.
Get/set the phase shift or equilibrium dihedral angle (in degree). This attribute is available for dihedral and improper parameters.
Get/set the equilibrium bond length (in Å). This attribute if available for bond parameters.
Get/set the van der Waals radius for the vdw parameters, or the equilibrium interatomic distance for the vdw_pair parameters. The unit is Å. Note that, for the vdw parameters, the value is half of the interatomic distance at the potential minimum.