Package schrodinger :: Package application :: Package bioluminate :: Module protein :: Class Refiner
[hide private]
[frames] | no frames]

Class Refiner

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')
Instance Methods [hide private]
 
__init__(self, struct, residues=None, local=False)
 
setResidues(self, residues)
Set the residues to refine.
 
_createJobDir(self)
Private method to create a directory to run the refinement jobs from.
 
clean(self)
Remove all files created from the refinement job
None
writePrimeInput(self, refine_type, input_file, st_filename, **kwargs)
Writes the input file for a Prime refinement job.
schrodinger.structure.Structure object
refinePrime(self, refine_type, jobname, wait=True, **kwargs)
Run a Prime refinement job through job control and return the refined output structure.
 
runPrimeMinimization(self, jobname)
Shortcut to run a Prime minimization job
 
runPrimeResidue(self, jobname)
Shortcut to run a Prime residue refinement job
 
runPrimeSidechain(self, jobname)
Shortcut to run a Prime sidechain refinement job
 
runPrimeSidechainCBeta(self, jobname)
Shortcut to run a Prime sidechain refinement job with CA-CB vector sampling.
 
runPrimeSidechainBB(self, jobname)
Shortcut to run a Prime sidechain refinement job with backbone sampling.
 
runPrimeLoopPrediction(self, jobname, start_res=None, end_res=None)
Shortcut to run a Prime loop prediction refinement job..
schrodinger.structure.Structure object
runPythonMinimize(self, jobname)
Shortcut to run a schrodinger.structutils.minimize.Minimizer job.
schrodinger.structure.Structure object
runRefinement(self, refine_type, jobname, **kwargs)
Shortcut to run any of the available refinement jobs.
Class Variables [hide private]
  PYTHON_MINIMIZE = 'python_minimize'
  PRIME_MINIMIZE = 'prime_minimize'
  PRIME_RESIDUE = 'prime_residue'
  PRIME_SIDECHAIN = 'prime_sidechain'
  PRIME_SIDECHAIN_CBETA = 'prime_sidechain_cbeta'
  PRIME_SIDECHAIN_BB = 'prime_sidechain_bb'
  PRIME_LOOP_PRED = 'prime_loop_prediction'
  PRIME_ANTIB_LOOP_PRED = 'prime_antibody_loop_prediction'
Method Details [hide private]

__init__(self, struct, residues=None, local=False)
(Constructor)

 
Parameters:

setResidues(self, residues)

 

Set the residues to refine. This is a list of integers refering to the residue indices for the structure.

_createJobDir(self)

 

Private method to create a directory to run the refinement jobs from. The name is "refinement_job_<n>" where n is either 1 or the next increment of a previously found directory. For exampe if there is a directory named "refinement_job_5" the new directory will be "refinement_job_6".

writePrimeInput(self, refine_type, input_file, st_filename, **kwargs)

 

Writes the input file for a Prime refinement job.

Parameters:
  • refine_type (str) - The type of Prime refinement to run (see class variables)
  • input_file (str) - Name of the input file for the refinement job
  • st_filename (str) - Filename of the structure to be refined
Returns: None
Raises:
  • RuntimeError - If refine_type is not supported

refinePrime(self, refine_type, jobname, wait=True, **kwargs)

 

Run a Prime refinement job through job control and return the refined output structure.

Parameters:
  • refine_type (str) - The type of Prime refinement to run (see class variables)
  • jobname (str) - Jobname to use
Returns: schrodinger.structure.Structure object
Refined structure
Raises:
  • RuntimeError - If refine_type is not supported
  • RuntimeError - If launching the refinement job fails
  • RuntimeError - If the refinement job fails

runPrimeMinimization(self, jobname)

 

Shortcut to run a Prime minimization job

See Also: Refiner.refinePrime documentation

runPrimeResidue(self, jobname)

 

Shortcut to run a Prime residue refinement job

See Also: Refiner.refinePrime documentation

runPrimeSidechain(self, jobname)

 

Shortcut to run a Prime sidechain refinement job

See Also: Refiner.refinePrime documentation

runPrimeSidechainCBeta(self, 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 Also: Refiner.refinePrime documentation

runPrimeSidechainBB(self, 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 Also: Refiner.refinePrime documentation

runPrimeLoopPrediction(self, jobname, start_res=None, end_res=None)

 

Shortcut to run a Prime loop prediction refinement job..

See Also: Refiner.refinePrime documentation

runPythonMinimize(self, jobname)

 

Shortcut to run a schrodinger.structutils.minimize.Minimizer job.

Parameters:
  • jobname (str) - Jobname to use
Returns: schrodinger.structure.Structure object
Minimized structure

runRefinement(self, refine_type, jobname, **kwargs)

 

Shortcut to run any of the available refinement jobs.

Parameters:
  • refine_type (str) - The type of Prime refinement to run (see class variables)
  • jobname (str) - Jobname to use
Returns: schrodinger.structure.Structure object
Refined structure
Raises:
  • RuntimeError - If refine_type is not supported
  • RuntimeError - If the refinement job fails