chemfiles::Atom
An Atom is a particle in the current Frame. It can be used to store and retrieve informations about a particle, such as mass, name, atomic number, etc.
Public Type
An Atom can be of various kind. This is encoded by a value in this enum.
Values:
ELEMENT
= = 0
- Element from the periodic table of elements.
COARSE_GRAINED
= = 1
- Coarse-grained atom are composed of more than one element: CH3 groups, amino-acids are coarse-grained atoms.
DUMMY
= = 2
- Dummy site, with no physical reality.
UNDEFINED
= = 3
- Undefined atom-type.
Public Functions
Atom
(const std::string & name)Create an element from its name
.
Atom
(AtomType type, const std::string & name = "")Create an element from its name
and its type.
Atom
()Default is to create an UNDEFINED atom type with no name.
name
() constGet a const (non-modifiable) reference to the atom name.
mass
() constGet the atom mass.
charge
() constGet the atom charge.
type
() constGet the atom type.
set_name
(const std::string & n)Set the atom name.
set_mass
(float m)Set the atom mass.
set_charge
(float c)Set the atom charge.
set_type
(AtomType t)Set the atom type.
full_name
() constTry to get the full element name, return and empty string if this is impossible.
vdw_radius
() constTry to get the Van der Waals of the atom. Returns -1 if it can not be found.
covalent_radius
() constTry to get the covalent radius of the atom. Returns -1 if it can not be found.
atomic_number
() constTry to get the atomic number, if defined. Returns -1 if it can not be found.