Contacts Module¶
Contacts¶
- class PANDORA.Contacts.Contacts.Contacts(PDB, output_file=False, anchors=False, pept_contacts=False, M_only=list(range(1, 182)), N_only=list(range(1, 92)), cutoff=5)[source]¶
Bases:
object- Calculate atom contacts between different chains of a protein or between peptide anchor residues and the
rest of the MHC structure.
- Parameters:
PDB – (String) or (Bio.PDB) Accepts either the path to the pdb file or a Bio.PDB object
output_file – (String) Path to output file. If anchors are provided, only write the anchors output
anchors – (list) list of anchor positions. If this is provided, the atom contacts between the anchor residues of the peptide and the rest of the structure are calculated
cutoff – Cutoff that considers two atoms contacting. Is 5 Angstrom by default
- find_chain_contacts(PDB, cutoff=5)[source]¶
Calculate atom distances in a pdb object.
- Parameters:
pdb – Bio.PDB object
cutoff – (int) Distance cutoff that determines atom contact, standard is 5 Angstrom
all – (Bool) Calculate all atom contacts or just between chains
specific_chain – (String) Only consider contacts between one specific chain and the rest.
anchors – (list) list of anchor positions. If such a list is given, only the contacts between the atoms of the peptide anchor residues and the rest of the structure are calculated.
- Returns:
list of tuples of: Res 1, Chain 1, Resnr 1, Atom 1, Res 2, Chainm 2, Resnr 2, Atom 2, Distance 1_2
- find_pept_chain_contacts(PDB, M_only=list(range(1, 182)), N_only=list(range(1, 92)), cutoff=5)[source]¶
Calculate atom distances in a pdb object.
- Parameters:
pdb – Bio.PDB object
cutoff – (int) Distance cutoff that determines atom contact, standard is 5 Angstrom
all – (Bool) Calculate all atom contacts or just between chains
specific_chain – (String) Only consider contacts between one specific chain and the rest.
anchors – (list) list of anchor positions. If such a list is given, only the contacts between the atoms of the peptide anchor residues and the rest of the structure are calculated.
- Returns:
list of tuples of: Res 1, Chain 1, Resnr 1, Atom 1, Res 2, Chainm 2, Resnr 2, Atom 2, Distance 1_2