deeprank2.molstruct submodules
deeprank2.molstruct.aminoacid
- class deeprank2.molstruct.aminoacid.Polarity(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
Enum
One-hot encoding of the amino acid polarity.
- NONPOLAR = 0
- POLAR = 1
- NEGATIVE = 2
- POSITIVE = 3
- property onehot: numpy.typing.NDArray
- class deeprank2.molstruct.aminoacid.AminoAcid(name: str, three_letter_code: str, one_letter_code: str, charge: int, polarity: Polarity, size: int, mass: float, pI: float, hydrogen_bond_donors: int, hydrogen_bond_acceptors: int, index: int)[source]
Bases:
object
An amino acid represents the type of Residue in a PDBStructure.
- Parameters
name – Full name of the amino acid.
three_letter_code – Three-letter code of the amino acid (as in PDB).
one_letter_code – One-letter of the amino acid (as in fasta).
charge – Charge of the amino acid.
polarity – The polarity of the amino acid.
size – The number of non-hydrogen atoms in the side chain.
mass – Average residue mass (i.e. mass of amino acid - H20) in Daltons.
pI – Isolectric point; pH at which the molecule has no net electric charge.
hydrogen_bond_donors – Number of hydrogen bond donors.
hydrogen_bond_acceptors – Number of hydrogen bond acceptors.
index – The rank of the amino acid, used for computing one-hot encoding.
- property onehot: numpy.typing.NDArray
deeprank2.molstruct.atom
- class deeprank2.molstruct.atom.AtomicElement(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
Enum
One-hot encoding of the atomic element (or atom type).
- C = 1
- O = 2
- N = 3
- S = 4
- P = 5
- H = 6
- property onehot: numpy.array
- class deeprank2.molstruct.atom.Atom(residue: Residue, name: str, element: AtomicElement, position: NDArray, occupancy: float)[source]
Bases:
object
One atom in a PDBStructure.
- Parameters
residue – The residue that this atom belongs to.
name – Pdb atom name.
element – The chemical element.
position – Pdb position xyz of this atom.
occupancy – Pdb occupancy value. This represents the proportion of structures where the atom is detected at a given position. Sometimes a single atom can be detected at multiple positions. In that case separate structures exist where sum(occupancy) == 1. Note that only the highest occupancy atom is used by deeprank2 (see tools.pdb._add_atom_to_residue).
- change_altloc(alternative_atom: Atom) None [source]
Replace the atom’s location by another atom’s location.
- property element: AtomicElement
- property position: NDArray
deeprank2.molstruct.pair
- class deeprank2.molstruct.pair.Pair(item1: Any, item2: Any)[source]
Bases:
object
A hashable, comparable object for any set of two inputs where order doesn’t matter.
- Parameters
item1 – The pair’s first object, must be convertable to string.
item2 – The pair’s second object, must be convertable to string.
- class deeprank2.molstruct.pair.Contact(item1: Any, item2: Any)[source]
-
Parent class to bind ResidueContact and AtomicContact objects.
deeprank2.molstruct.residue
- class deeprank2.molstruct.residue.Residue(chain: Chain, number: int, amino_acid: AminoAcid | None = None, insertion_code: str | None = None)[source]
Bases:
object
One protein residue in a PDBStructure.
A Residue is the basic building block of proteins and protein complex, here represented by PDBStructures. Each Residue is of a certain AminoAcid type and consists of multiple `Atom`s.
- Parameters
chain – The chain that this residue belongs to.
number – the residue number
amino_acid – The residue’s amino acid (if it’s part of a protein). Defaults to None.
insertion_code – The pdb insertion code, if any. Defaults to None.
- property position: numpy.array
- class deeprank2.molstruct.residue.SingleResidueVariant(residue: Residue, variant_amino_acid: AminoAcid)[source]
Bases:
object
A single residue mutation of a PDBStrcture.
- Parameters
residue – the Residue object from the PDBStructure that is mutated.
variant_amino_acid – the amino acid that the Residue is mutated into.
deeprank2.molstruct.structure
- class deeprank2.molstruct.structure.PDBStructure(id_: str | None = None)[source]
Bases:
object
A proitein or protein complex structure.
A PDBStructure can contain one or multiple Chains, i.e. separate molecular entities (individual proteins). One PDBStructure consists of a number of Residue`s, each of which is of a particular `AminoAcid type and in turn consists of a number of `Atom`s.
- Parameters
id – An unique identifier for this structure, can be the pdb accession code. Defaults to None.
- property chains: list[deeprank2.molstruct.structure.Chain]
- class deeprank2.molstruct.structure.Chain(model: PDBStructure, id_: str | None)[source]
Bases:
object
One chain of a PDBStructure.
Args: model: The model that this chain is part of. id_: The pdb identifier of this chain.
- property model: PDBStructure
- property pssm: PssmRow