Atom

Chemfiles.AtomType

An 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".

source
Chemfiles.AtomMethod
Atom(frame::Frame, index::Integer) -> Atom

Get a copy of the atom at the given index from a frame.

source
Chemfiles.AtomMethod
Atom(name::String) -> Atom

Create an atom with the given name and set the atom type to be the same as name.

source
Chemfiles.AtomMethod
Atom(topology::Topology, index::Integer) -> Atom

Get a copy of the atom at the given index from a topology.

source
Base.fullnameMethod
fullname(atom::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".

source
Chemfiles.atomic_numberMethod
atomic_number(atom::Atom) -> UInt64

Get the atomic number of an atom from the atom type.

If the atomic number can not be found, returns 0.

source
Chemfiles.chargeMethod
charge(atom::Atom) -> Float64

Get the charge of an atom in number of the electron charge e.

source
Chemfiles.covalent_radiusMethod
covalent_radius(atom::Atom) -> Float64

Get the covalent radius of an atom from the atom type.

If the radius can not be found, returns 0.

source
Chemfiles.massMethod
mass(atom::Atom) -> Float64

Get the mass of an atom in atomic mass units.

source
Chemfiles.set_charge!Method
set_charge!(atom::Atom, charge::Any)

Set the charge of an atom to charge.

The charge must be in number of the electron charge e.

source
Chemfiles.set_mass!Method
set_mass!(atom::Atom, mass::Any)

Set the mass of an atom to mass.

The mass must be in atomic mass units.

source
Chemfiles.set_property!Method
set_property!(atom::Atom, name::String, value::Union{Bool, Float64, Array{Float64,1}, String})

Set a named property for the given atom.

source
Chemfiles.vdw_radiusMethod
vdw_radius(atom::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.

source