Residue
Chemfiles.Residue — TypeA Residue is a group of atoms belonging to the same logical unit. They can be small molecules, amino-acids in a protein, monomers in polymers, etc.
Chemfiles.Residue — TypeResidue(name::String) -> Residue
Residue(name::String, id::Any) -> Residue
Create a new residue with the given name and optional residue identifier id.
Chemfiles.Residue — MethodResidue(topology::Topology, index::Integer) -> Residue
Get a copy of the residue at index from a topology.
The residue index in the topology is not always the same as the residue identifier.
Base.contains — Methodcontains(residue::Residue, index::Integer) -> Bool
Check if the atom at the given index is in the residue.
Base.deepcopy — Methoddeepcopy(residue::Residue) -> Residue
Make a deep copy of a residue.
Base.size — Methodsize(residue::Residue) -> Int64
Get the number of atoms in a residue.
Chemfiles.add_atom! — Methodadd_atom!(residue::Residue, index::Integer)
Add the atom at the given index in the residue.
Chemfiles.atoms — Methodatoms(residue::Residue) -> Array{UInt64,1}
Get the atoms in a $residue$. This function returns a list of indexes.
Chemfiles.id — Methodid(residue::Residue) -> Int64
Get the identifier of a residue in the initial topology.
Chemfiles.list_properties — Methodlist_properties(residue::Residue) -> Array{String,1}
Get the names of all properties associated with a residue.
Chemfiles.name — Methodname(residue::Residue) -> String
Get the name of a residue.
Chemfiles.properties_count — Methodproperties_count(residue::Residue) -> Int64
Get the number of properties associated with a residue.
Chemfiles.property — Methodproperty(residue::Residue, name::String) -> Any
Get a named property for the given residue.
Chemfiles.residue_for_atom — Methodresidue_for_atom(topology::Topology, index::Integer) -> Union{Nothing, Residue}
Get a copy of the residue containing the atom at index in the topology.
This function will return nothing if the atom is not in a residue, or if the index is bigger than the number of atoms in the topology.
Chemfiles.set_property! — Methodset_property!(residue::Residue, name::String, value::Union{Bool, Float64, Array{Float64,1}, String})
Set a named property for the given residue.