Topology
type¶
- type
Topology
¶ - A
Topology
describes the organisation of the particles in the system: what their names are, how they are bonded together, etc. ATopology
is a list ofAtoms
in the system, together with the list of bonds between the atoms.
- function
Topology
()¶ - Create an empty
Topology
.
- function
Topology
(frame::Frame)¶ - Get a copy of the
Topology
of the givenframe
.
- function
deepcopy
(topology::Topology)¶ - Make a deep copy of a
topology
.
- function
size
(topology::Topology)¶ - Get the
Topology
size, i.e. the current number of atoms.
- function
add_atom!
(topology::Topology, atom::Atom)¶ - Add an
atom
at the end of atopology
.
- function
remove_atom!
(topology::Topology, index::Integer)¶ - Remove the atom at the given
index
from atopology
.
- function
bonds_count
(topology::Topology)¶ - Get the number of bonds in the
topology
.
- function
angles_count
(topology::Topology)¶ - Get the number of angles in the
topology
.
- function
dihedrals_count
(topology::Topology)¶ - Get the number of dihedral angles in the
topology
.
- function
impropers_count
(topology::Topology)¶ - Get the number of improper angles in the
topology
.
- function
bonds
(topology::Topology)¶ - Get the bonds in the
topology
, in a2 x bonds_count(topology)
array.
- function
angles
(topology::Topology)¶ - Get the angles in the
topology
, in a3 x angles_count(topology)
array.
- function
dihedrals
(topology::Topology)¶ - Get the dihedral angles in the
topology
, in a4 x dihedrals_count(topology)
array.
- function
impropers
(topology::Topology)¶ - Get the improper angles in the
topology
, in a4 x impropers_count(topology)
array.
- function
add_bond!
(topology::Topology, i::Integer, j::Integer, order = nothing)¶ - Add a bond between the atoms
i
andj
in thetopology
, optionaly setting the bondorder
.
- function
remove_bond!
(topology::Topology, i::Integer, j::Integer)¶ - Remove any existing bond between the atoms
i
andj
in thetopology
.
- function
bond_order
(topology::Topology, i::Integer, j::Integer)¶ - Get the
BondOrder
for the bond between atomsi
andj
in thetopology
.
- function
bond_orders
(topology::Topology)¶ - Get the
BondOrder
for all the bonds in thetopology
.
- function
add_residue!
(topology::Topology, residue::Residue)¶ Add a copy of
residue
to thistopology
.The residue id must not already be in the topology, and the residue must contain only atoms that are not already in another residue.
- function
count_residues
(topology::Topology)¶ - Get the number of residues in the
topology
.
- function
are_linked
(topology::Topology, first::Residue, second::Residue)¶ - Check if the two residues
first
andsecond
from thetopology
are linked together, i.e. if there is a bond between one atom in the first residue and one atom in the second one.
- function
resize!
(topology::Topology, size::Integer)¶ Resize the
topology
to holdnatoms
atoms. If the new number of atoms is bigger than the current number, new atoms will be created with an empty name and type.If it is lower than the current number of atoms, the last atoms will be removed, together with the associated bonds, angles and dihedrals.