# Topology

Chemfiles.TopologyType

A Topology describes the organisation of the particles in the system: what their names are, how they are bonded together, etc. A Topology is a list of Atoms in the system, together with the list of bonds between the atoms.

source
Chemfiles.BondOrderType

Possible bond orders in Chemfiles: - Chemfiles.UnknownBond: when the bond order is not specified - Chemfiles.SingleBond: for single bonds - Chemfiles.DoubleBond: for double bonds - Chemfiles.TripleBond: for triple bonds - Chemfiles.QuadrupleBond: for quadruple bonds (present in some metals) - Chemfiles.QintupletBond: for qintuplet bonds (present in some metals) - Chemfiles.AmideBond: for amide bonds - Chemfiles.AromaticBond: for aromatic bonds

source
Base.resize!Method
resize!(topology::Topology, size::Integer)

Resize the topology to hold natoms 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.

source
Base.sizeMethod
size(topology::Topology)

Get the Topology size, i.e. the current number of atoms.

source
Chemfiles.add_bond!Function
add_bond!(topology::Topology, i::Integer, j::Integer, order=nothing)

Add a bond between the atoms i and j in the topology, optionaly setting the bond order.

source
Chemfiles.add_residue!Method
add_residue!(topology::Topology, residue::Residue)

Add a copy of residue to this topology.

The residue id must not already be in the topology, and the residue must contain only atoms that are not already in another residue.

source
Chemfiles.anglesMethod
angles(topology::Topology)

Get the angles in the topology, in a 3 x angles_count(topology) array.

source
Chemfiles.are_linkedMethod
are_linked(topology::Topology, first::Residue, second::Residue)

Check if the two residues first and second from the topology are linked together, i.e. if there is a bond between one atom in the first residue and one atom in the second one.

source
Chemfiles.bond_orderMethod
bond_order(topology::Topology, i::Integer, j::Integer)

Get the BondOrder for the bond between atoms i and j in the topology.

source
Chemfiles.bondsMethod
bonds(topology::Topology)

Get the bonds in the topology, in a 2 x bonds_count(topology) array.

source
Chemfiles.dihedralsMethod
dihedrals(topology::Topology)

Get the dihedral angles in the topology, in a 4 x dihedrals_count(topology) array.

source
Chemfiles.impropersMethod
impropers(topology::Topology)

Get the improper angles in the topology, in a 4 x impropers_count(topology) array.

source
Chemfiles.remove_bond!Method
remove_bond!(topology::Topology, i::Integer, j::Integer)

Remove any existing bond between the atoms i and j in the topology.

source