CHFL_TOPOLOGYΒΆchfl_topology(void)Create a new empty topology.
chfl_topology_from_frame(const CHFL_FRAME * frame)Get a copy of the topology of a frame.
frame - The frame
chfl_topology_atoms_count(const CHFL_TOPOLOGY * topology, size_t * natoms)Get the current number of atoms in the topology.
topology - The topology to analyse
natoms - Will contain the number of atoms in the frame
chfl_topology_append(CHFL_TOPOLOGY * topology, const CHFL_ATOM * atom)Add an atom at the end of a topology.
topology - The topology
atom - The atom to be added
chfl_topology_remove(CHFL_TOPOLOGY * topology, size_t i)Remove an atom from a topology by index. This modify all the other atoms indexes.
topology - The topology
i - The atomic index
chfl_topology_isbond(const CHFL_TOPOLOGY * topology, size_t i, size_t j, bool * result)Tell if the atoms i and j are bonded together.
topology - The topology
i - index of the first atom in the topology
j - index of the second atom in the topology
result - true if the atoms are bonded, false otherwise
chfl_topology_isangle(const CHFL_TOPOLOGY * topology, size_t i, size_t j, size_t k, bool * result)Tell if the atoms i, j and k constitues an angle.
topology - The topology
i - index of the first atom in the topology
j - index of the second atom in the topology
k - index of the third atom in the topology
result - true if the atoms constitues an angle, false otherwise
chfl_topology_isdihedral(const CHFL_TOPOLOGY * topology, size_t i, size_t j, size_t k, size_t m, bool * result)Tell if the atoms i, j, k and m constitues a dihedral angle.
topology - The topology
i - index of the first atom in the topology
j - index of the second atom in the topology
k - index of the third atom in the topology
m - index of the fourth atom in the topology
result - true if the atoms constitues a dihedral angle, false otherwise
chfl_topology_bonds_count(const CHFL_TOPOLOGY * topology, size_t * nbonds)Get the number of bonds in the system.
topology - The topology
nbonds - After the call, contains the number of bond
chfl_topology_angles_count(const CHFL_TOPOLOGY * topology, size_t * nangles)Get the number of angles in the system.
topology - The topology
nangles - After the call, contains the number of angles
chfl_topology_dihedrals_count(const CHFL_TOPOLOGY * topology, size_t * ndihedrals)Get the number of dihedral angles in the system.
topology - The topology
ndihedrals - After the call, contains the number of dihedral angles
chfl_topology_bonds(const CHFL_TOPOLOGY * topology, size_t(*) data[2], size_t nbonds)Get the list of bonds in the system.
topology - The topology
data - A nbonds x 2 array to be filled with the bonds in the system
nbonds - The size of the array. This should equal the value given by the chfl_topology_bonds_count function
chfl_topology_angles(const CHFL_TOPOLOGY * topology, size_t(*) data[3], size_t nangles)Get the list of angles in the system.
topology - The topology
data - A nangles x 3 array to be filled with the angles in the system
nangles - The size of the array. This should equal the value given by the chfl_topology_angles_count function
chfl_topology_dihedrals(const CHFL_TOPOLOGY * topology, size_t(*) data[4], size_t ndihedrals)Get the list of dihedral angles in the system.
topology - The topology
data - A ndihedrals x 4 array to be filled with the dihedral angles in the system
ndihedrals - The size of the array. This should equal the value given by the chfl_topology_dihedrals_count function
chfl_topology_add_bond(CHFL_TOPOLOGY * topology, size_t i, size_t j)Add a bond between the atoms i and j in the system.
topology - The topology
i - index of the first atom in the topology
j - index of the second atom in the topology
chfl_topology_remove_bond(CHFL_TOPOLOGY * topology, size_t i, size_t j)Remove any existing bond between the atoms i and j in the system.
topology - The topology
i - index of the first atom in the topology
j - index of the second atom in the topology
chfl_topology_free(CHFL_TOPOLOGY * topology)Destroy a topology, and free the associated memory.
topology - The topology to destroy