parmed.topologyobjects.AtomType¶
-
class
parmed.topologyobjects.
AtomType
(name, number, mass, atomic_number=- 1, bond_type=None, charge=0.0)[source]¶ Atom types can either be compared by indexes or names. Can be assigned with a string, integer, (string is not automatically cast) or with both.
- Parameters
- name
str
The name of the atom type
- number
int
The serial index of the atom type
- mass
float
The mass of the atom type
- atomic_number
int
, optional The atomic number of the element of the atom type. Default -1
- bond_type
str
, optional If defined, this is the type name used to look up bonded parameters. Default is None (which falls back to
name
)- charge
float
, optional If defined, this is the partial atomic charge in elementary charge units. Default is None
- name
Notes
This object is primarily used to build parameter databases from parameter files. Also, sigma is related to Rmin, but rmin is Rmin/2, so there is an extra factor of 2 in the sigma for this reason.
Examples
>>> at = AtomType('HA', 1, 1.008, 1) >>> at.name, at.number ('HA', 1) >>> at2 = AtomType('CA', 2, 12.01, 6) >>> at2.name, at2.number ('CA', 2) >>> print("%s: %d" % (str(at), int(at))) HA: 1
- Attributes
Methods
add_nbfix
(typename, rmin, epsilon[, rmin14, …])Adds a new NBFIX exclusion for this atom type
set_lj_params
(eps, rmin[, eps14, rmin14])Sets Lennard-Jones parameters on this atom type
-
__init__
(name, number, mass, atomic_number=- 1, bond_type=None, charge=0.0)[source]¶ Initialize self. See help(type(self)) for accurate signature.
Methods
__init__
(name, number, mass[, …])Initialize self.
add_nbfix
(typename, rmin, epsilon[, rmin14, …])Adds a new NBFIX exclusion for this atom type
set_lj_params
(eps, rmin[, eps14, rmin14])Sets Lennard-Jones parameters on this atom type
Attributes
Sigma is Rmin / 2^(1/6)
Sigma is Rmin / 2^(1/6)