Atom
Chemfiles.Atom
— TypeAn Atom
is a particle in the current Frame
.
An atom stores the following atomic properties:
- atom name
- atom type
- atom mass
- atom charge
The atom name is usually an unique identifier ("H1"
, "C_a"
) while the atom type will be shared among all particles of the same type: "H"
, "Ow"
, "CH3"
.
Chemfiles.Atom
— MethodAtom(frame::Frame, index::Integer) -> Chemfiles.Atom
Get a copy of the atom
at the given index
from a frame
.
Chemfiles.Atom
— MethodAtom(name::String) -> Chemfiles.Atom
Create an atom with the given name
and set the atom type
to be the same as name
.
Chemfiles.Atom
— MethodAtom(topology::Topology, index::Integer) -> Chemfiles.Atom
Get a copy of the atom
at the given index
from a topology
.
AtomsBase.atomic_number
— Methodatomic_number(atom::Chemfiles.Atom) -> UInt64
Get the atomic number of an atom
from the atom type.
If the atomic number can not be found, returns 0.
Base.deepcopy
— Methoddeepcopy(atom::Chemfiles.Atom) -> Chemfiles.Atom
Make a deep copy of an atom
.
Base.fullname
— Methodfullname(atom::Chemfiles.Atom) -> String
Get the full name of an atom
from the atom type.
For example, the full name of an atom with type "He" is "Helium".
Chemfiles.charge
— Methodcharge(atom::Chemfiles.Atom) -> Float64
Get the charge of an atom
in number of the electron charge e.
Chemfiles.covalent_radius
— Methodcovalent_radius(atom::Chemfiles.Atom) -> Float64
Get the covalent radius of an atom
from the atom type.
If the radius can not be found, returns 0.
Chemfiles.list_properties
— Methodlist_properties(atom::Chemfiles.Atom) -> Vector{String}
Get the names of all properties associated with an atom.
Chemfiles.mass
— Methodmass(atom::Chemfiles.Atom) -> Float64
Get the mass of an atom
in atomic mass units.
Chemfiles.name
— Methodname(atom::Chemfiles.Atom) -> String
Get the name of an atom
.
Chemfiles.properties_count
— Methodproperties_count(atom::Chemfiles.Atom) -> Int64
Get the number of properties associated with an atom.
Chemfiles.property
— Methodproperty(atom::Chemfiles.Atom, name::String) -> Any
Get a named property for the given atom.
Chemfiles.set_charge!
— Methodset_charge!(atom::Chemfiles.Atom, charge)
Set the charge of an atom
to charge
.
The charge must be in number of the electron charge e.
Chemfiles.set_mass!
— Methodset_mass!(atom::Chemfiles.Atom, mass)
Set the mass of an atom
to mass
.
The mass must be in atomic mass units.
Chemfiles.set_name!
— Methodset_name!(atom::Chemfiles.Atom, name::String)
Set the name of an atom
to name
.
Chemfiles.set_property!
— Methodset_property!(
atom::Chemfiles.Atom,
name::String,
value::Union{Bool, Float64, String, Vector{Float64}}
)
Set a named property for the given atom.
Chemfiles.set_type!
— Methodset_type!(atom::Chemfiles.Atom, type::String)
Set the type of an atom
to type
.
Chemfiles.type
— Methodtype(atom::Chemfiles.Atom) -> String
Get the type of an atom
.
Chemfiles.vdw_radius
— Methodvdw_radius(atom::Chemfiles.Atom) -> Float64
Get the van der Waals radius of an atom
from the atom type.
If the radius can not be found, this function returns 0.