chfl_topology
type¶chfl_topology
¶A chfl_topology
contains the definition of all the atoms in the
system, and the liaisons between the atoms (bonds, angles, dihedrals,
…). It will also contain all the residues information if it is available.
The initialization routine for chfl_topology
are:
Type fields: |
|
---|
chfl_topology%
init
([status])¶Initialize this topology with a new empty topology.
Options: | status [integer,optional, kind=chfl_status] :: status code of the
operation. If it is not equal to CHFL_SUCCESS , you can learn more
about the error by using chfl_last_error . |
---|
chfl_topology%
from_frame
(frame[, status])¶Initialize this topology with a copy of the topology of frame
.
Parameters: | frame [chfl_frame] :: the frame |
---|---|
Options: | status [integer,optional, kind=chfl_status] :: status code of the
operation. If it is not equal to CHFL_SUCCESS , you can learn more
about the error by using chfl_last_error . |
chfl_topology%
copy
(topology[, status])¶Initialize this topology with a copy of topology
.
Parameters: | topology [chfl_topology] :: topology to copy |
---|---|
Options: | status [integer,optional, kind=chfl_status] :: status code of the
operation. If it is not equal to CHFL_SUCCESS , you can learn more
about the error by using chfl_last_error . |
chfl_topology%
atoms_count
(natoms[, status])¶Get the number of atoms in the topology in natoms
.
Parameters: | natoms [integer] :: number of atoms in the topology |
---|---|
Options: | status [integer,optional, kind=chfl_status] :: status code of the
operation. If it is not equal to CHFL_SUCCESS , you can learn more
about the error by using chfl_last_error . |
chfl_topology%
resize
(natoms[, status])¶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.
Parameters: | natoms [integer] :: new size of the topology |
---|---|
Options: | status [integer,optional, kind=chfl_status] :: status code of the
operation. If it is not equal to CHFL_SUCCESS , you can learn more
about the error by using chfl_last_error . |
chfl_topology%
add_atom
(atom[, status])¶Add a copy of atom
at the end of the topology.
Parameters: | atom [chfl_atom] :: atom to be added |
---|---|
Options: | status [integer,optional, kind=chfl_status] :: status code of the
operation. If it is not equal to CHFL_SUCCESS , you can learn more
about the error by using chfl_last_error . |
chfl_topology%
remove
(i[, status])¶Remove the atom at index i
from the topology.
This shifts all the atoms indexes after i
by 1 (n becomes n-1).
Parameters: | i [integer] :: index of the atom to remove |
---|---|
Options: | status [integer,optional, kind=chfl_status] :: status code of the
operation. If it is not equal to CHFL_SUCCESS , you can learn more
about the error by using chfl_last_error . |
chfl_topology%
bonds_count
(nbonds[, status])¶Get the number of bonds in the topology in nbonds
.
Parameters: | nbonds [integer] :: number of bonds |
---|---|
Options: | status [integer,optional, kind=chfl_status] :: status code of the
operation. If it is not equal to CHFL_SUCCESS , you can learn more
about the error by using chfl_last_error . |
chfl_topology%
angles_count
(nangles[, status])¶Get the number of angles in the topology in nangles
.
Parameters: | nangles [integer] :: number of angles |
---|---|
Options: | status [integer,optional, kind=chfl_status] :: status code of the
operation. If it is not equal to CHFL_SUCCESS , you can learn more
about the error by using chfl_last_error . |
chfl_topology%
dihedrals_count
(ndihedrals[, status])¶Get the number of dihedral angles in the topology in ndihedrals
.
Parameters: | ndihedrals [integer] :: number of dihedral angles |
---|---|
Options: | status [integer,optional, kind=chfl_status] :: status code of the
operation. If it is not equal to CHFL_SUCCESS , you can learn more
about the error by using chfl_last_error . |
chfl_topology%
impropers_count
(nimpropers[, status])¶Get the number of improper dihedral angles in the topology in nimpropers
.
Parameters: | nimpropers [integer] :: number of improper dihedral angles |
---|---|
Options: | status [integer,optional, kind=chfl_status] :: status code of the
operation. If it is not equal to CHFL_SUCCESS , you can learn more
about the error by using chfl_last_error . |
chfl_topology%
bonds
(data, nbonds[, status])¶Get the list of bonds in the topology in the pre-allocated array data
of size 2 x nbonds
.
data
size must be passed in the nbonds
parameter, and be equal to
the result of chfl_topology%bonds_count()
.
Parameters: |
|
---|---|
Options: | status [integer,optional, kind=chfl_status] :: status code of the
operation. If it is not equal to |
chfl_topology%
angles
(data, nangles[, status])¶Get the list of angles in the topology
in the pre-allocated array
data
of size 3 x nangles
.
data
size must be passed in the nangles
parameter, and be equal to the
result of chfl_topology%angles_count()
.
Parameters: |
|
---|---|
Options: | status [integer,optional, kind=chfl_status] :: status code of the
operation. If it is not equal to |
chfl_topology%
dihedrals
(data, ndihedrals[, status])¶Get the list of dihedral angles in the topology in the pre-allocated array
data
of size 4 x ndihedrals
.
data
size must be passed in the ndihedrals
parameter, and be equal
to the result of chfl_topology%dihedrals_count()
.
Parameters: |
|
---|---|
Options: | status [integer,optional, kind=chfl_status] :: status code of the
operation. If it is not equal to |
chfl_topology%
impropers
(data, nimpropers[, status])¶Get the list of improper dihedral angles in the topology in the
pre-allocated array data
of size 4 x nimpropers
.
data
size must be passed in the nimpropers
parameter, and be equal
to the result of chfl_topology%impropers_count()
.
Parameters: |
|
---|---|
Options: | status [integer,optional, kind=chfl_status] :: status code of the
operation. If it is not equal to |
chfl_topology%
add_bond
(i, j[, status])¶Add a bond between the atoms at indexes i
and j
in the topology
Parameters: |
|
---|---|
Options: | status [integer,optional, kind=chfl_status] :: status code of the
operation. If it is not equal to |
chfl_topology%
remove_bond
(i, j[, status])¶Remove any existing bond between the atoms at indexes i
and j
in the
topology.
This function does nothing if there is no bond between i
and j
.
Parameters: |
|
---|---|
Options: | status [integer,optional, kind=chfl_status] :: status code of the
operation. If it is not equal to |
chfl_topology%
residues_count
(natoms[, status])¶Get the number of residues in the topology in nresidues
.
Parameters: | natoms [integer] :: number of residues |
---|---|
Options: | status [integer,optional, kind=chfl_status] :: status code of the
operation. If it is not equal to CHFL_SUCCESS , you can learn more
about the error by using chfl_last_error . |
chfl_topology%
add_residue
(residue[, status])¶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.
Parameters: | residue [chfl_residue] :: residue to add in the topology |
---|---|
Options: | status [integer,optional, kind=chfl_status] :: status code of the
operation. If it is not equal to CHFL_SUCCESS , you can learn more
about the error by using chfl_last_error . |
chfl_topology%
residues_linked
(first, second, are_linked[, status])¶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, and store the result in result
.
Parameters: |
|
---|---|
Options: | status [integer,optional, kind=chfl_status] :: status code of the
operation. If it is not equal to |
chfl_topology%
free
([status])¶Destroy a topology, and free the associated memory
Options: | status [integer,optional, kind=chfl_status] :: status code of the
operation. If it is not equal to CHFL_SUCCESS , you can learn more
about the error by using chfl_last_error . |
---|