Mapping Functions¶
These functions convert one residue into another. They are primarily used for standard and modified amino acids.
- CopyResidue(src_res, dst_res, editor)¶
This function copies atoms from a source residue to a destination residue. It calls either
CopyConserved()
orCopyNonConserved()
depending on whether the residues are identical or not.- Parameters:
src_res (
ResidueHandle
) – The source residue.dst_res (
ResidueHandle
) – The destination residue.editor (
EntityEditor
) – The editor to use for the copy operation.
- Returns:
The number of atoms copied.
- CopyConserved(src_res, dst_res, editor)¶
This function copies atoms under the assumption that the source and destination residues are identical or that the source is a modified version of the destination. It handles modifications and converts selenium to sulfur for specific residues.
- Parameters:
src_res (
ResidueHandle
) – The source residue.dst_res (
ResidueHandle
) – The destination residue.editor (
EntityEditor
) – The editor to use for the copy operation.
- Returns:
The number of atoms copied.
- CopyNonConserved(src_res, dst_res, editor)¶
This function copies heavy backbone atoms and CBeta from the source to the destination.
- Parameters:
src_res (
ResidueHandle
) – The source residue.dst_res (
ResidueHandle
) – The destination residue.editor (
EntityEditor
) – The editor to use for the copy operation.
- Returns:
The number of atoms copied.