atomset Package¶
atomset
Module¶
-
class
AdaptivePELE.atomset.atomset.
Atom
¶ Bases:
object
Create an atom from a pdb line
- Parameters
atomContent (basestring) – Line of the pdb from which the atom will be created
-
atomSerial
¶
-
equivalentResname
()¶
-
getAtomCoords
()¶ Get the coordinates of the atom
- Returns
numpy.Array – Array with the coordinate of the atom
-
id
¶
-
isHeavyAtom
()¶ Check if Atom is a heavy atom
- Returns
bool – True if Atom is heavy atom, false otherwise
-
isHeteroAtom
()¶ Check if Atom is an hetero atom
- Returns
bool – True if Atom is an hetero atom, false otherwise
-
isProtein
()¶ Check if Atom is a protein atom
- Returns
bool – True if Atom is a protein atom, false otherwise
-
mass
¶
-
name
¶
-
printAtom
()¶ Print Atom information
-
protein
¶
-
resChain
¶
-
resname
¶
-
resnum
¶
-
set_properties
()¶
-
squaredDistance
()¶ Calculate the squared distance between two atoms
- Parameters
atom2 (Atom) – Second Atom to whom the distance will be calculated
- Returns
float – The distance between the atoms
-
type
¶
-
x
¶
-
y
¶
-
z
¶
-
class
AdaptivePELE.atomset.atomset.
PDB
¶ Bases:
object
Object that will contain the information of a PDB file. Has to call the initialise method to load the file
-
ATOM_LINE_TEMPLATE
= '%s%s %s %s %s%s%s %.3f%.3f%.3f%.2f%.2f %s '¶
-
CMAtoms
= {'ALA': 'empty', 'ARG': 'NE', 'ASN': 'empty', 'ASP': 'OD1', 'CYS': 'empty', 'GLN': 'empty', 'GLU': 'OE1', 'GLY': 'empty', 'HID': 'CE1', 'HIE': 'CE1', 'HIP': 'CE1', 'HIS': 'CE1', 'ILE': 'empty', 'LEU': 'empty', 'LYS': 'NZ', 'MET': 'empty', 'PHE': 'CZ', 'PRO': 'empty', 'SER': 'empty', 'THR': 'empty', 'TRP': 'CH2', 'TYR': 'OH', 'VAL': 'empty'}¶
-
atomList
¶
-
atoms
¶
-
centroid
¶
-
com
¶
-
computeTotalMass
()¶ Calculate the total mass of the PDB
-
countContacts
()¶ Count the number of alpha carbons that are in contact with the protein (i.e. less than contactThresholdDistance Amstrogms away)
- Parameters
ligandResname (basestring) – Residue name of the ligand in the PDB
contactThresholdDistance (int) – Maximum distance at which two atoms are considered in contanct (in Angstroms)
- Returns
int – The number of alpha carbons in contact with the ligand
-
extractCOM
()¶ Calculate the PDB’s center of mass
- Returns
list – List with the center of mass coordinates
-
extractCentroid
()¶ Calculate the PDB centroid
- Returns
List – List with the centroid coordinates
-
getAtom
()¶ Get an Atom in the PDB by its id
- Parameters
atomId (basestring) – Id of the Atom (in the format “atomserial:atomName:resname”)
- Returns
int – Number of atoms in the PDB
- Raises
KeyError if the id is not in the PDB
-
getCOM
()¶ Get the PDB’s center of mass
- Returns
list – List with the center of mass coordinates
-
getCentroid
()¶ Get the PDB’s centroid
- Returns
list – List with the centroid coordinates
-
getNumberOfAtoms
()¶ Get the number of Atoms in the PDB
- Returns
int – Number of atoms in the PDB
-
get_pdb_string
()¶
-
initialise
()¶ Wrapper function
-
isfromPDBFile
()¶
-
ispdb
¶
-
join_PDB_lines
()¶
-
pdb
¶
-
printAtoms
()¶ Print Atom information for all the atoms in the PDB
-
totalMass
¶
-
updateCoords
()¶
-
writePDB
()¶ Write the pdb contents of the file from wich the PDB object was created
- Parameters
path (basestring) – Path of the file where to write the pdb
-
-
AdaptivePELE.atomset.atomset.
computeCOMDifference
()¶ Compute the difference between the center of mass of two PDB
-
AdaptivePELE.atomset.atomset.
computeCOMSquaredDifference
()¶ Compute the squared difference between the center of mass of two PDB
-
AdaptivePELE.atomset.atomset.
computeSquaredCentroidDifference
()¶ Compute the centroid squared difference between two PDBs
-
AdaptivePELE.atomset.atomset.
readPDB
()¶ Helper function, parses a string with PDB content or the path of a pdb file into a string
- Parameters
pdbfile (basestring) – A string with PDB content or the path of a pdb file
- Returns
basestring – A string with PDB content
-
class
AdaptivePELE.atomset.RMSDCalculator.
RMSDCalculator
¶ Bases:
object
- Parameters
symmetries (list) – List of dictionaries with gropus of symmetric atoms atomId:symmetricalAtomId corresponding with the symmetrical atoms
-
computeNonSymmAtoms
()¶
-
computeRMSD
()¶ Compute the RMSD between two PDB
-
computeRMSD2
()¶ Compute the squared RMSD between two PDB
-
nonSymmetricalAtomsSet
¶
-
symmetries
¶
-
class
AdaptivePELE.atomset.SymmetryContactMapEvaluator.
SymmetryContactMapEvaluator
¶ Bases:
object
- Parameters
symmetries (list) – List of dictionaries with gropus of symmetric atoms atomId:symmetricalAtomId corresponding with the symmetrical atoms
-
buildContactMap
()¶ Create the contact map of the protein and ligand. The contact map is a boolean matrix that has as many rows as the number of ligand heavy atoms and as many columns as the number of alpha carbons. The value is one if the ligand atom and the alpha carbons are less than contactThresholdDistance Amstrongs away
- Parameters
PDBobj (PDB) – PDB object that contains the conformation’s info
ligandResname (basestring) – Residue name of the ligand in the PDB
ligandResnum (int) – Integer containing the residue number of the ligand in the pdb
ligandResChain (basestring) – String containing the chain name of the ligand in the pdb
contactThresholdDistance (int) – Maximum distance at which two atoms are considered in contanct (in Angstroms)
- Returns
numpy.Array – The contact map of the ligand and the protein
- Returns
int – The number of alpha carbons in contact with the ligand
-
buildContactMapWithRowMap
()¶ Create a map that relates symmetric atoms in the ligand to row indices in the contactMap matrix and the contact map of the protein and ligand. The contact map is a boolean matrix that has as many rows as the number of ligand heavy atoms and as many columns as the number of alpha carbons. The value is one if the ligand atom and the alpha carbons are less than contactThresholdDistance Amstrongs away
- Parameters
PDBobj (PDB) – PDB object that contains the conformation’s info
ligandResname (basestring) – Residue name of the ligand in the PDB
ligandResnum (int) – Integer containing the residue number of the ligand in the pdb
ligandResChain (basestring) – String containing the chain name of the ligand in the pdb
contactThresholdDistance (int) – Maximum distance at which two atoms are considered in contanct (in Angstroms)
- Returns
numpy.Array – The contact map of the ligand and the protein
- Returns
int – The number of alpha carbons in contact with the ligand
-
buildOptimalPermutationContactMap
()¶ Build a permutated version of the contactMap which maximizes the similarity between the two contactMaps :param contactMap: contactMap of the conformation to compare :type contactMap: numpy.Array :param clusterContactMap: cluster contactMap to which we are comparing :type cluster: numpy.Array :returns: numpy.Array – The permutated contact map
-
createContactMap
()¶ Create the contact map of the protein and ligand. The contact map is a boolean matrix that has as many rows as the number of ligand heavy atoms and as many columns as the number of alpha carbons. The value is one if the ligand atom and the alpha carbons are less than contactThresholdDistance Amstrongs away
- Parameters
ligandResname (basestring) – Residue name of the ligand in the PDB
ligandResnum (int) – Integer containing the residue number of the ligand in the pdb
ligandResChain (basestring) – String containing the chain name of the ligand in the pdb
contactThresholdDistance (int) – Maximum distance at which two atoms are considered in contanct (in Angstroms)
- Returns
numpy.Array – The contact map of the ligand and the protein
- Returns
int – The number of alpha carbons in contact with the ligand
-
evaluateCorrelation
()¶
-
evaluateDifferenceDistance
()¶
-
evaluateJaccard
()¶
-
ligandList
¶
-
proteinList
¶
-
symToRowMap
¶
-
symmetricAtoms
¶
-
symmetries
¶
-
AdaptivePELE.atomset.SymmetryContactMapEvaluator.
calculateCorrelationContactMaps
()¶ Calculate the correlation of two contactMaps