schrodinger.application.bioluminate.protein module¶
Module to gather residue property data for proteins.
Copyright (c) Schrodinger, LLC. All rights reserved
-
class
schrodinger.application.bioluminate.protein.
Consensus
(asl_map, minimum_number, dist_cutoff=2.0)¶ Access the atoms, residues, and molecules (or just their indices) that are considered to be consensus objects for a template structure and query structure. All properties are returned as an
OrderedDict
that maps the template objects to their consensus objects from the query structure.Here is an example of how to get all the consensus waters between two protein structures. We define the cutoff here at 2 Angstroms:
from schrodinger.structure import StructureReader from schrodinger.application.bioluminate import protein pt = maestro.project_table_get() # Create an ASL map for all ligands in the WS asl_map = [] for row in pt.included_rows: st = row.getStructure() ligands = analyze.find_ligands(st) if not ligands: continue indices = [] for ligand in ligands: indices.extend([str(i) for i in ligand.atom_indexes]) asl = 'atom.n %s' % ','.join(indices) asl_map.append((st, asl)) # Create a consensus of all ligands, specifying that at least three # structures must have a ligand atom within 2A from one another. consensus = protein.Consensus(asl_map, 3, dist_cutoff=2) # To get the atom objects consensus_atoms = consensus.atoms # To get the molecule objects molecules = consensus.molecules
-
ASL_IONS
= 'ions'¶
-
ASL_LIGAND
= '(((m.atoms 5-130)) and not ((ions) or (res.pt ACE ACT ACY BCT BME BOG CAC CIT CO3 DMS EDO EGL EPE FES FMT FS3 FS4 GOL HEC HED HEM IOD IPA MES MO6 MPD MYR NAG NCO NH2 NH3 NO3 PG4 PO4 POP SEO SO4 SPD SPM SUC SUL TRS )))'¶
-
ASL_WATER
= 'water and NOT (atom.ele H)'¶
-
atom_indices
¶ Get the map of atom indices of consensus atoms.
Returns: Atom indices of consensus atoms Return type: OrderedDict
of ints where the keys are the template atom indices and their values are the consensus atom indices from the query.
-
atoms
¶ Get the map of
atom objects
of consensus atoms.Returns: Atoms of consensus atoms Return type: OrderedDict
ofatom objects
where the keys are the template atoms and their values are the consensus atoms from the query.
-
getClosest
(ref_atom, mob_atoms)¶ Gets the closest atom to the
ref_atom
frommob_atoms
.
-
molecule_indices
¶ Get the map of molecule indices of consensus atoms.
Returns: Molecule indices of consensus atoms Return type: list of unique consensus molecule indices for each structure in self.asl_map
. (Order is maintained)
-
molecules
¶ Get the map of
molecule objects
of consensus atoms.Returns: Molecules of consensus atoms Return type: list of unique consensus molecule objects
for each structure inself.asl_map
. (Order is maintained)
-
residue_indices
¶ Get the map of residue indices of consensus atoms.
Returns: Residue indices of consensus atoms Return type: list of unique consensus residue indices for each structure in self.asl_map
. (Order is maintained)
-
residues
¶ Get the list of
residue objects
of consensus atoms for each structure inself.asl_map
.Returns: Residues of consensus atoms Return type: list of unique consensus residue objects
for each structure inself.asl_map
. (Order is maintained)
-
-
class
schrodinger.application.bioluminate.protein.
Mutation
(ref_struct, struct, residue_map)¶ Helper class for
Mutator
. This will store a mutated structure and the resides that were mutated.
-
class
schrodinger.application.bioluminate.protein.
Mutator
(ref_struct, mutations, concurrent=1, sequential=False, idealize=True)¶ Mutates a set of residues in a protein structure allowing concurrent mutations as well as the option to limit concurrent mutations to sequential residues only.
Here is an example of a mutation of a Ser residue to: Asp, Glu, Asn, & Gln (one-letter codes are D, E, N, & Q respectively). The Ser residue is in chain A and has a residue number of 22. This example will write a file named ‘mutated_structures.maegz’ that has the reference structure as the first CT and each mutation CT after that. Five total structures will be in the output file:
from schrodinger import structure from schrodinger.application.bioluminate import protein # Get the input structure reference_st = structure.StructureReader('receptor.maegz').next() # Create the writer for the output file and append the reference writer = structure.StructureWriter('mutated_structures.maegz') writer.append(reference_st) # Define the residues and mutations residues = ['A:22'] muts = 'DENQ' # Get a compatible list of mutations. The above turns into # [('A', 22, 'DENQ')] mutations = protein.Mutator.convert_residue_list(residues, muts) # Construct the mutator mutator = protein.Mutator(st, mutations) # Loop over each mutation for mutation in mutator.generate(): # mutated_structure = mutation.struct residue_map = mutation.residue_map res_str = ", ".join(str(res) for res in residue_map.values()) print 'Residues affected by this mutation: %s' % res_str # Do something with the mutated structure (refine maybe) writer.append(mutated_structure)
@todo: Add logging
-
GXG_DATA
= {'GLH': -143.536, 'ILE': -84.13, 'GLN': -136.183, 'GLY': -105.658, 'TYR': -101.858, 'GLU': -143.536, 'CYS': -100.845, 'ASP': -149.255, 'SER': -96.365, 'LYS': -110.759, 'PRO': -66.763, 'HID': -104.977, 'HIE': -104.977, 'LYN': -110.759, 'ASH': -149.255, 'ASN': -137.153, 'HIP': -104.977, 'VAL': -93.493, 'THR': -98.156, 'HIS': -104.977, 'TRP': -105.114, 'PHE': -96.483, 'ALA': -100.736, 'MET': -99.708, 'LEU': -92.4, 'ARG': -118.478, 'ARN': -118.478}¶
-
GXG_DATA_PRIME
= {'GLH': -141.673, 'ILE': -97.541, 'GLN': -152.611, 'GLY': -116.263, 'TYR': -123.497, 'GLU': -141.673, 'CYS': -113.747, 'ASP': -154.559, 'SER': -112.693, 'LYS': -123.751, 'PRO': -81.734, 'HID': -121.6, 'HIE': -121.6, 'LYN': -123.751, 'ASH': -154.559, 'ASN': -156.375, 'HIP': -121.6, 'VAL': -109.017, 'THR': -116.048, 'HIS': -121.6, 'TRP': -122.407, 'PHE': -113.719, 'ALA': -112.635, 'MET': -112.643, 'LEU': -107.106, 'ARG': -142.467, 'ARN': -142.467}¶
-
MUTATIONS_PROPERTY
= 's_bioluminate_Mutations'¶
-
SUPPORTED_BUILD_RESIDUES
= ['ALA', 'ARG', 'ASN', 'ASP', 'CYS', 'GLN', 'GLU', 'GLY', 'HIS', 'HIP', 'HIE', 'ILE', 'LEU', 'LYS', 'MET', 'PHE', 'PRO', 'SER', 'THR', 'TRP', 'TYR', 'VAL']¶
-
UNFOLDED_PROPERTY
= 'r_bioluminate_Unfolded_Contribution'¶
-
UNFOLDED_PROPERTY_PRIME
= 'r_bioluminate_Unfolded_Contribution_Prime'¶
-
calculateMutationsList
()¶ Calculate the mutations that will be performed, based on the input residues and their mutations, and the “concurrent” and “sequential” settings.
-
static
convert_muts_file
(muts_file, regex=<_sre.SRE_Pattern object at 0x3427b00>)¶ Converts lines in filename into a list of mutations to use. Returns a list of tuples where each tuple is ( “chain”, “resnum”, “inscode”, “three-letter resnames for mutation”).
Also supports loop insertion and deletion.
Each line is one mutation (could be multiple residues)
-
classmethod
convert_res_file
(filename, regex=<_sre.SRE_Pattern object at 0x3426e60>)¶ Converts lines in filename into a list of mutations to use. Returns a list of tuples where each tuple is ( “chain”, “resnum”, “inscode”, “three-letter resnames for mutation”).
Each line could be multiple mutations (one residue to multiple mutation states)
Parameters: - filename (str) – Name of file containing the list of mutations.
- regex (regular expression object) – Regular expression for matching residues
Raises: RuntimeError – If any of chain, resnum or mutation is missing
Returns: List of mutations with valid syntax for the class
Return type: list of tuples
-
classmethod
convert_res_list
(reslist, regex=<_sre.SRE_Pattern object at 0x3426e60>)¶ Converts list of residues into a list of mutations to use. Returns a list of tuples where each tuple is ( “chain”, “resnum”, “inscode”, “three-letter resnames for mutation”).
Each residue string could be multiple mutations (one residue to multiple mutation states)
Parameters: - reslist (list of str) – List of residues to convert to mutations
- regex (regular expression object) – Regular expression for matching residues
Returns: List of mutations with valid syntax for the class or None if any item in the list is not valid
Return type: list of tuples or None
-
static
convert_res_to_muts
(res_str, regex=<_sre.SRE_Pattern object at 0x3426e60>, validate=True)¶ - Converts a residue string into a list of mutations to use. Returns a list of tuples of (“chain”, “resnum”, “inscode”, “three-letter resnames for mutation”). Will return None if any item
in the list is not a valid residue string.
A residue string could be multiple mutations (one residue to multiple mutation states)
param res_str: Residue string to convert to mutations type res_str: str param regex: Regular expression for matching residues type regex: regular expression object param validate: Whether to run validation on the mutation type validate: bool return: List of mutations with valid syntax for the class or None if the res_str is not valid. rtype: list tuples or None
-
static
convert_residue_list
(residues, mutations, regex=<_sre.SRE_Pattern object at 0x3426e60>)¶ Convert a list of residues and mutations to a standard list of mutations. Returns a list of tuples where each tuple is ( “chain”, “resnum”, “inscode”, “three-letter resnames for mutation”).
Parameters: residues (list of strings (Syntax: <chain>:<resnum> if no chain use "_")) – Residues that will be mutated. - :param mutations : The three-letter names for the residues that will be
- used in mutation.
Raises: RuntimeError – If any of chain, resnum or mutation is missing or if there is an invalid residue name Returns: List of mutations with valid syntax for the class Return type: list of tuples
-
generate
()¶ Used to loop over all mutations. Each mutation consists of the mutated structure and a residue mapping dict. The structure is raw, that is, unrefined in any way.
Returns: Generator for all mutations defined in self.mutations
Each step of generator yields amutation
.Return type: generator
-
getLoopMutation
(mutated_st, res_str, new_resname)¶ build loop insertion or deletion
-
getMutationFromChanges
(changes)¶
-
mutations
¶ The list of mutations that will be carried out
-
total_mutations
¶ Total number of mutations that will be generated
-
static
validate_mutated_residues
(residues)¶ Method for validating the residues used in mutations passed in to the
MutateProtein
class.Raises: ValueError – If the 3-letter residue name is not supported by the build,mutate
method.- @todo: Convert the return to raise a custom MutateProteinError.
- This will help in letting front-end know why it fails.
@todo: Add validation for assuring chain and resnum are in self.struct
-
static
validate_mutations
(mutations)¶ Private method for validating the mutations passed in to the
MutateProtein
class.Raises: ValueError – If the mutations
passed in is not a list, if each item in the list is not a tuple, if the tuple is not of length 4 (chain, resnum idx, inscode, mutation resnames), if the resnum is not an integer, or any of the 3-letter residue names in “mutation resnames” is not supported by thebuild,mutate
method.- @todo: Convert the return to raise a custom MutateProteinError.
- This will help in letting front-end know why it fails.
@todo: Add validation for assuring chain and resnum are in self.struct
-
-
class
schrodinger.application.bioluminate.protein.
OrderedResidueDict
(residues, default_value=None)¶ Bases:
collections.OrderedDict
Creates an ordered dictionary for residues in a structure
-
class
schrodinger.application.bioluminate.protein.
PrimeConfig
(st_filename, set_defaults=True, **kwargs)¶ Bases:
schrodinger.application.prime.input.Prime
Class containing the methods to write Prime input files. NOTE THAT THIS ALWAYS USES OPLS2005
-
ALL_RESIDUES
= 'all'¶
-
addResidues
(residues=None)¶ Adds residues to consider for refinement. The passed in argument can take the form of:
- ASL expression
- List of
schrodinger.structure._Residue
objects - ‘all’
- None
-
prepActive
(lig_id, residues=None)¶
-
prepAntibodyLoop
(start_res=None, end_res=None, cpus=1, residues=None)¶
-
prepBldStruct
(jobname, dirname)¶
-
prepEnergy
()¶
-
prepLoop
(start_res=None, end_res=None, res_sphere=7.5, maxcalpha=None, protocol='LOOP_BLD', loop2=None, max_jobs=0, residues=None)¶ Parameters: - start_res (string) – loop start residue, e.g. A:15
- end_res (string) – loop start residue, e.g. A:20
- res_sphere (float) – radius of nearby residue refinement
- maxcalpha (float) – CA atom movement constraint
- protocol (string) – loop refinement protocol
- loop2 (list) – the definition of the second loop, e.g. [‘A:4’,’A:6’]
- residues (None) – Unused, kept for API compatibility
- max_jobs (int) – how many processes will be run simultaneously
-
prepMinimize
(residues=None)¶
-
prepResidue
(residues=None)¶
-
prepSidechain
(residues=None)¶
-
prepSidechainBB
(residues=None)¶
-
prepSidechainCBeta
(residues=None)¶
-
-
class
schrodinger.application.bioluminate.protein.
PrimeStructure
(jobname)¶ -
createAlignFile
(reference_seq, template_seq, filename=None)¶ Writes an alignment file for the template. If no filename is supplied the file will be named <jobname>.aln.
Parameters: - reference_seq (
sequence
) – The reference sequence - template_seq (
sequence
) – The template sequence
- reference_seq (
-
createTemplateFile
(template_seq, filename=None)¶ Writes a template PDB file as .ent
-
-
class
schrodinger.application.bioluminate.protein.
PropertyCalculator
(struct, jobname, cleanup=True, nbcutoff=14.0, residues=None, lig_asl=None)¶ Bases:
object
Class for calculating properties of proteins and protein residues.
Here is an example of how to calculate properties for a protein:
from schrodinger import structure from schrodinger.application.bioluminate import protein # Get the input structure st = structure.StructureReader('receptor.maegz').next() # Define the properties to calculate calculations = [ 'e_pot', 'e_internal', 'e_interaction', 'prime_energy', 'pka', 'sasa_polar', 'sasa_nonpolar', 'sasa_total'] # Create the calculator calculator = protein.PropertyCalculator(st, "my_calculator_jobname") # Calculate the properties properties = calculator.calculate(*calculations)
In the example above the
properties
output would look something like this:properties = { 'e_pot' : 1573.4, 'e_internal' : 624.7, 'e_interaction' : 994.8, 'prime_energy' : 744.2, 'pka' : 124.1, 'sasa_polar', : 3122.3, 'sasa_nonpolar' : 271.1, 'sasa_total' : 3393.4 }
-
AGGREGATE_CALCULATIONS
= ['e_pot', 'prime_energy', 'pka', 'sasa_polar', 'sasa_nonpolar', 'sasa_total', 'hydropathy', 'rotatable', 'vdw_surf_comp']¶
-
RESIDUE_CALCULATIONS
= ['e_pot', 'e_internal', 'e_interaction', 'pka', 'sasa_polar', 'sasa_nonpolar', 'sasa_total', 'hydropathy', 'rotatable', 'vdw_surf_comp']¶
-
calculate
(*properties)¶ Helper method to calculate multiple properties for
self.struct
. All results will be returned in a dict where the keys are each of the properties inproperties
, and their values are the values returned from their corresponding method. Here is a list of valid properties to calculate:- e_pot
- sasa_polar
- sasa_nonpolar
- sasa_total
- prime_energy
- pka
- hydropathy
- rotatable
- vdw_surf_comp
Parameters: properties (str (see PropertyCalculator.AGGREGATE_CALCULATIONS)) – Properties to calculate Raises: KeyError – If a property passed in is invalid Returns: Dict where keys are properties passed in and values are the total value of the property for the protein. e.g {‘e_pot’: 1324.3, ‘sasa_total’: 1846.9} Return type: dict
-
calculateOverResidues
(*properties)¶ Helper method that returns a generator which will calculate multiple properties for
self.struct
. All results will be returned in a tuple with the form (structure._Residue
, calc dict ). Here is a list of valid properties to calculate:- e_pot
- e_internal
- e_interaction
- pka
- sasa_polar
- sasa_nonpolar
- sasa_total
- hydropathy
- rotatable
- vdw_surf_comp
Parameters: properties (str (see PropertyCalculator.RESIDUE_CALCULATIONS)) – Properties to calculate Raises: KeyError – If a property passed in is invalid Returns: Generator that yields structure._Residue
and dict where keys are properties passed in and values are the total value of the property for the protein. e.g (_Residue, {‘e_pot’:1324.3})Return type: generator
-
getAtomicNonPolarSASAGenerator
(sidechain=False)¶ Returns a generator that yields the
schrodinger.structure._Residue
object and its calculated SASA for only the nonpolar atoms in each residue inself.struct
.Parameters: sidechain (bool) – Only consider sidechain atoms when calculating SASA Return type: generator
-
getAtomicPolarSASAGenerator
(sidechain=False)¶ Returns a generator that yields the
schrodinger.structure._Residue
object and its calculated SASA for only the polar atoms in each residue inself.struct
.Parameters: sidechain (bool) – Only consider sidechain atoms when calculating SASA Return type: generator
-
getHydropathyGenerator
(sidechain=False)¶ Returns a generator that yields the
schrodinger.structure._Residue
object and its calculated hydropathy for each residue inself.struct
.Parameters: sidechain (bool) – Only consider sidechain atoms when calculating SASA Return type: generator
-
getInteractionEnergyGenerator
()¶ Return a generator that iterates over each residue in
self.struct
. This yields theschrodinger.structure._Residue
object and it’s interaction energy.Return type: generator See: schrodinger.structutils.minimize.Minimizer.getInteractionEnergy
-
getInternalEnergyGenerator
()¶ Return a generator that iterates over each residue in
self.struct
. This yields theschrodinger.structure._Residue
object and it’s internal energy.Return type: generator See: schrodinger.structutils.minimize.Minimizer.getSelfEnergy
-
getPotentialEnergyGenerator
()¶ Return a generator that iterates over each residue in
self.struct
yielding theschrodinger.structure._Residue
object and it’s potential energy.Return type: generator See: schrodinger.structutils.minimize.Minimizer.getSelfEnergy
See: schrodinger.structutils.minimize.Minimizer.getInteractionEnergy
-
getPrimeEnergyByResidues
(residues)¶ Run Prime Minimization on
self.struct
only minimizing the residues inresidues
. This will launch a job using job control. After the job completes the total energy will be taken from the first CT using the “r_psp_Prime_Energy” property.Parameters: residues (list of residues
) – Residues to minimizeReturns: Prime energy of protein Return type: float
-
getResidueAtomicNonPolarSASA
(residue, sidechain=False)¶ Returns SASA for only the nonpolar atoms in residue
Parameters: - residue (
structure._Residue
) – Residue to get atomic nonpolar SASA contribution for - sidechain (bool) – Only consider sidechain atoms when calculating SASA
Return type: float
- residue (
-
getResidueAtomicPolarSASA
(residue, sidechain=False)¶ Returns SASA for all polar atoms in residue
Parameters: - residue (
structure._Residue
) – Residue to get atomic polar SASA contribution for - sidechain (bool) – Only consider sidechain atoms when calculating SASA
Return type: float
- residue (
-
getResidueHydropathy
(residue, sidechain=False)¶ Returns hydropathy value for residue
Parameters: - residue (
structure._Residue
) – Residue to get hydropathy value for - sidechain (bool) – Only consider sidechain atoms when calculating SASA
Return type: float
- residue (
-
getResidueInteractionEnergy
(residue)¶ Return the residue’s interaction energy.
Parameters: residue ( structure._Residue
) – Residue to get interaction energy forReturn type: float See: schrodinger.structutils.minimize.Minimizer.getInteractionEnergy
-
getResidueInternalEnergy
(residue)¶ Return the residue’s internal energy.
Parameters: residue ( structure._Residue
) – Residue to get internal energy forReturn type: float See: schrodinger.structutils.minimize.Minimizer.getSelfEnergy
-
getResiduePotentialEnergy
(residue)¶ Return the potential energy for a residue.
Parameters: residue ( structure._Residue
) – Residue to get potential energy forReturn type: float
-
getResidueRotatableBonds
(residue)¶ Return the number of rotors for a residue.
Parameters: residue ( structure._Residue
) – Residue to get rotor count forReturn type: int
-
getResidueSASA
(residue, sidechain=False)¶ Returns the SASA for residue.
Parameters: - residue (
structure._Residue
) – Residue to get SASA for - sidechain (bool) – Only consider sidechain atoms when calculating SASA
Return type: float
- residue (
-
getResidueSurfComp
(residue)¶ Returns: Median of vdW surface complementarity values for all accounted points on the surface of this residue. Return type: float Parameters: residue ( structure._Residue
) – Residue to get the value for
-
getResiduepKa
(residue)¶ Returns the pKa for specified residue
Parameters: residue ( structure._Residue
) – Residue to get internal energy forReturn type: float
-
getRotatableBondsGenerator
()¶ Returns a generator that yields the
schrodinger.structure._Residue
object and its number of rotors for each residue inself.struct
.Return type: generator
-
getSASAGenerator
(sidechain=False)¶ Returns a generator that yields the
schrodinger.structure._Residue
object and its calculated SASA for each residue inself.struct
.Parameters: sidechain (bool) – Only consider sidechain atoms when calculating SASA Return type: generator
-
getSASANonPolarGenerator
(sidechain=False)¶ Returns a generator that yields the
schrodinger.structure._Residue
object and its calculated SASA for each nonpolar residue inself.struct
.Parameters: sidechain (bool) – Only consider sidechain atoms when calculating SASA Return type: generator
-
getSASAPolarGenerator
(sidechain=False)¶ Returns a generator that yields the
schrodinger.structure._Residue
object and its calculated SASA for each polar residue inself.struct
.Parameters: sidechain (bool) – Only consider sidechain atoms when calculating SASA Return type: generator
-
getTotalAggregation
()¶
-
getTotalComplementarity
()¶
-
getTotalHydropathy
(sidechain=False)¶ Returns the total calculated hydropathy value for all residues.
Parameters: sidechain (bool) – Only consider sidechain atoms when calculating SASA Return type: float
-
getTotalPotentialEnergy
()¶ Get the potential energy of
self.struct
which is calculated usingschrodinger.structutils.minimize.Minimizer
. The potential energy is the sum of the internal energies and the interaction energies.Returns: Total potential energy of all the residues Return type: float See: schrodinger.structutils.minimize.Minimizer.getSelfEnergy
See: schrodinger.structutils.minimize.Minimizer.getInteractionEnergy
-
getTotalPrimeEnergy
()¶ Run Prime Minimization on
self.struct
. This will launch a job using job control. After the job completes the total energy will be taken from the first CT using the “r_psp_Prime_Energy” property.Returns: Prime energy of protein Return type: float
-
getTotalRotatableBonds
()¶ Returns: Sum of rotors for all residues. Return type: float
-
getTotalSASA
(sidechain=False)¶ Returns the total approximate solvent accessible surface area for all residues.
Parameters: sidechain (bool) – Only consider sidechain atoms when calculating SASA Return type: float
-
getTotalSASANonPolar
(sidechain=False)¶ Returns the total approximate solvent accessible surface area for all non-polar residues.
Parameters: sidechain (bool) – Only consider sidechain atoms when calculating SASA Return type: float
-
getTotalSASAPolar
(sidechain=False)¶ Returns the total approximate solvent accessible surface area for all polar residues.
Parameters: sidechain (bool) – Only consider sidechain atoms when calculating SASA Return type: float
-
getTotalSolubility
()¶
-
getTotalSurfComp
()¶ Returns: Median of vdW surface complementarity values for all surface points for all residues. Return type: float
-
getTotalpKa
()¶ Gets the sum of the pKa values for the protein.
Return type: float
-
minimizer
¶ The minimizer used in energy calculations.
-
progress
= None¶ Variable that can be used to get the progress of calculations. This variable is only set in C{self.calculateOverResidues}. Since that method returns a generator, each step can query C{self.progress} to get a description of the progress. This variable is a tuple with the form ( step, total steps ).
-
runpKa
()¶ Runs PROPKA to get the pKa of all residues in the
self.struct
, then setsself.pka_data
.
-
setpKaData
(summary, renum_map=None)¶ Compares residues from the PROPKA summary with the residues in
self.residues
and when matches are found the summary’s pKa is set for that residue inself.pka_data
-
-
exception
schrodinger.application.bioluminate.protein.
PropkaError
¶ Bases:
exceptions.Exception
A custom exception for any propka failures
-
class
schrodinger.application.bioluminate.protein.
Refiner
(struct, residues=None, local=False)¶ Creates input files and runs calculations for protein refinement jobs using Prime and our
schrodinger.structutils.minimize.Minimizer
class.Here is an example of how to refine a protein that just had a residue mutated. In this example only the residues within 7.0 angstroms of the mutated residue will be refined:
from schrodinger.structure import StructureReader from schrodinger.structutils import build from schrodinger.application.bioluminate import protein # Get the structure st = StructureReader('receptor.maegz') # Atom number 30 is the alpha carbon of a GLU ca = st.atom[30] # Mutate GLU -> ASP renum_map = build.mutate(st, ca.index, "ASP") # Get the residue that was mutated mutated_residue = None for res in st.residue: ca_keys = (ca.chain, ca.resnum, ca.inscode) res_keys = (res.chain, res.resnum, res.inscode) if ca_keys == res_keys: mutated_residue = res break # We want to use the reference to gather the residues to refine refine_residues = protein.get_residues_within( st, [mutated_residue], within = 7.0 ) # Create the refiner refiner = protein.Refiner(st, residues=refine_residues) # Run Prime minimization which returns the refined structure refined_struct = refiner.runPrimeMinimization('my_refinement_jobname')
-
PRIME_ANTIB_LOOP_PRED
= 'prime_antibody_loop_prediction'¶
-
PRIME_LOOP_PRED
= 'prime_loop_prediction'¶
-
PRIME_MINIMIZE
= 'prime_minimize'¶
-
PRIME_RESIDUE
= 'prime_residue'¶
-
PRIME_SIDECHAIN
= 'prime_sidechain'¶
-
PRIME_SIDECHAIN_BB
= 'prime_sidechain_bb'¶
-
PRIME_SIDECHAIN_CBETA
= 'prime_sidechain_cbeta'¶
-
PYTHON_MINIMIZE
= 'python_minimize'¶
-
clean
()¶ Remove all files created from the refinement job
-
refinePrime
(refine_type, jobname, wait=True, **kwargs)¶ Run a Prime refinement job through job control and return the refined output structure.
Parameters: Raises: - RuntimeError – If
refine_type
is not supported - RuntimeError – If launching the refinement job fails
- RuntimeError – If the refinement job fails
Returns: Refined structure
Return type: - RuntimeError – If
-
runPrimeLoopPrediction
(jobname, start_res=None, end_res=None)¶ Shortcut to run a Prime loop prediction refinement job..
See: Refiner.refinePrime
documentation
-
runPrimeMinimization
(jobname)¶ Shortcut to run a Prime minimization job
See: Refiner.refinePrime
documentation
-
runPrimeResidue
(jobname)¶ Shortcut to run a Prime residue refinement job
See: Refiner.refinePrime
documentation
-
runPrimeSidechain
(jobname)¶ Shortcut to run a Prime sidechain refinement job
See: Refiner.refinePrime
documentation
-
runPrimeSidechainBB
(jobname)¶ Shortcut to run a Prime sidechain refinement job with backbone sampling. This will sample the backbone by running a loop prediction on a set of 3 residues centered on the residue for which the side chain is being refined.
See: Refiner.refinePrime
documentation
-
runPrimeSidechainCBeta
(jobname)¶ Shortcut to run a Prime sidechain refinement job with CA-CB vector sampling. This will vary the orientation of the CA-CB bond by up to 30 degrees from the initial direction.
See: Refiner.refinePrime
documentation
-
runPythonMinimize
(jobname)¶ Shortcut to run a
schrodinger.structutils.minimize.Minimizer
job.Parameters: jobname (str) – Jobname to use Returns: Minimized structure Return type: schrodinger.structure.Structure
object
-
runRefinement
(refine_type, jobname, **kwargs)¶ Shortcut to run any of the available refinement jobs.
Parameters: Raises: - RuntimeError – If
refine_type
is not supported - RuntimeError – If the refinement job fails
Returns: Refined structure
Return type: - RuntimeError – If
-
setResidues
(residues)¶ Set the residues to refine. This is a list of integers refering to the residue indices for the structure.
-
writePrimeInput
(refine_type, input_file, st_filename, **kwargs)¶ Writes the input file for a Prime refinement job.
Parameters: Raises: RuntimeError – If
refine_type
is not supportedReturn type:
-
-
schrodinger.application.bioluminate.protein.
atom_is_nonpolar
(atom)¶ Returns true if the atom is considered non-polar. Here are the rules for non-polar atoms:
- The atom’s element is a C or S
- The atom’s element is a H and one bonded atom’s element is C or S
-
schrodinger.application.bioluminate.protein.
find_residue_atom
(st, chain, resnum, inscode)¶
-
schrodinger.application.bioluminate.protein.
get_residue_asl
(residue, ca=False)¶ Creates an ASL based on a residue’s chain, residue number and inscode. The ASL can optionally only include the alpha carbon of the residue.
Parameters: residue ( schrodinger.structure._Residue
) – The residue to create an ASL forRaises: RuntimeError – If the passed in residue is incorrect type Returns: ASL expression for residue Return type: str
-
schrodinger.application.bioluminate.protein.
get_residues_asl
(residues, ca=False)¶ Creates an ASL based on a list of residue’s chains, residue numbers and inscodes. The ASL can optionally only include the alpha carbon of the residue.
Parameters: residue (list or tuple of `schrodinger.structure._Residue`s) – The residues to create an ASL for
Raises: - RuntimeError – If residues are not a list or tuple
- RuntimeError – If any passed in residues are incorrect type
Returns: ASL expression for all residues
Return type:
-
schrodinger.application.bioluminate.protein.
get_residues_within
(st, residues, within=0.0, ca=False)¶ Returns a list of residues for
st
that are withinwithin
angstroms of each residue. If theca
keyword is True the within calculation will only look for alpha carbon inresidues
. This means that ifwithin
is set to 5.5 angstroms and there is only a single atom that belongs to a residue at that cutoff, the residue that the atom belongs to will be refined.Parameters: - st (
schrodinger.structure.Structure
) – Structure to evaluate and which allresidues
correspond - residues (list or tuple of `schrodinger.structure._Residue`s) – All residues targeted for refinement
- within (float) – Distance (angstroms) of residues to include in refinement
- ca (bool) – Use only alpha carbons to find residues within
Returns: List of
schrodinger.structure._Residue
objectsReturn type: list
- st (
-
schrodinger.application.bioluminate.protein.
residue_is_nonpolar
(residue)¶ Tests whether a residue is nonpolar
Parameters: residue ( structure._Residue
) – Residue to testReturn type: bool
-
schrodinger.application.bioluminate.protein.
residue_is_polar
(residue)¶ Tests whether a residue is polar
Parameters: residue ( structure._Residue
) – Residue to testReturn type: bool
-
schrodinger.application.bioluminate.protein.
valid_asl
(st, asl)¶ Returns True/False depending on whether the asl is a valid expression or not.