Package schrodinger :: Package application :: Module prepwizard
[hide private]
[frames] | no frames]

Module prepwizard

Shared functionality between PrepWizard GUI and command-line PrepWizard.

Copyright Schrodinger, LLC. All rights reserved.

Classes [hide private]
  _CommonProblemsFixer
Class for fixing common structure problems.
Functions [hide private]
 
_count_bonds(a)
Count number of bonds to the given StructureAtom (double bonds = 2 bonds), zero-order bonds are not counted.
 
fix_common_structure_mistakes(st)
Fixes common problems in structures and returns a list of correction strings that are to be reported to the user.
 
check_st_valences(st)
Will raise a RuntimeError if any atom in the specified structure has more bonds than is allowed for that element.
 
atomsasl(atoms)
Generates an ASL expression for the specified atoms.
 
create_disulfide_bonds(st, dist=3.2, verbose=False)
Create bonds between proximal Sulfurs, deleting any hydrogens on them.
 
convert_selenomethionines(st)
Convert MSE residues to METs.
 
_set_oxygen_orders(st, mainatom, double, single, charge)
Sets the orders of phosphate-oxygen or sulfate-oxygen bonds.
 
_generate_phosphate_states(st, atoms)
Returns a list of structures (expanded states)
 
_generate_sulfate_states(st, atoms)
Returns a list of structures (expanded states)
 
count_phosphates_and_sulfurs(st)
 
extend_phosphate_states(st)
For specified structure, generates phosphate states, and returns list of output structures.
 
extend_sulfate_states(st)
For specified structure, generates sulfate states, and returns list of output structures.
 
get_chain_sequences(st, remove_tails=True)
Will read the PDB sequences from the sequence block, and will return a dictionary (keys: chain names; values: sequence strings).
 
write_sequences_to_fasta(pdbid, sequences_dict, fastafile)
 
_run_prime_job(st, keywords, prime_jobname, app=None)
Run the Prime job specified by the keywords on the <st> with jobname <prime_jobname>.
 
fill_missing_loops(st, fasta_file, prime_jobname, build_tail=False, app=None)
st - Input Structure object fasta_file - Associated .fasta file prime_jobname - Job name to use for the Prime job.
 
does_res_have_missing_side_chains(residue)
Given a _Residue object, returns True if the residue is missing side-chain atoms.
 
do_any_residues_have_missing_side_chains(st)
Returns True if at least one of the residue in the given structure has missing side-chain atoms (backbone atoms are ignored).
 
fill_missing_side_chains(st, prime_jobname, app=None)
st - Input Structure object prime_jobname - Job name to use for the Prime job.
 
fix_sulfur_charges(st)
Post process by fixing the charge on zero-order-bonded Sulfurs Gives -1 or -2 charge to Sulfurs as appropriate.
 
prepare_for_epik(st, het_asls, app=None)
Will modify the original st, so pass a copy.
 
_generate_metal_states(st)
Ionize the metal atom in st (only one, if exists) and return a list of ionized sts
 
generate_special_states(sts, app=None)
 
_find_waters(st)
Return a list of water atoms.
 
get_bridging_waters(st, min_hbonds=3)
Return a list of all waters in the specified structure that make at least <min_hbonds> number of H-bonds (H-bonds to other waters excluded).
Variables [hide private]
  maestro = None
hash(x)
  maxvalence = [0, 1, 1, 1, 2, 6, 4, 4, 2, 1, 1, 1, 2, 8, 8, 8, ...
  EPIK_EXCLUSION_LIST = ['HEM', 'HEC']
  PDBNAME_ELEMENT_DICT = {}
  metal_charges = {11: [1], 12: [2], 19: [1], 20: [2], 25: [2, 3...
Function Details [hide private]

check_st_valences(st)

 

Will raise a RuntimeError if any atom in the specified structure has more bonds than is allowed for that element. Het groups in the PDB sometimes have this issue.

create_disulfide_bonds(st, dist=3.2, verbose=False)

 

Create bonds between proximal Sulfurs, deleting any hydrogens on them. If verbose is True, prints log info to the termnal. Returns a list of (atom1, atom2) for ever added bond.

convert_selenomethionines(st)

 

Convert MSE residues to METs. Returns a list of residue strings that were converted.

_set_oxygen_orders(st, mainatom, double, single, charge)

 

Sets the orders of phosphate-oxygen or sulfate-oxygen bonds.

mainatom - atom number of the phosphate or sulfur

double - list of atom numbers of the oxygens to double-bond to

single - list of atom numbers of oxygens to single-bond to, and set charge to <charge>.

extend_phosphate_states(st)

 

For specified structure, generates phosphate states, and returns list of output structures. Ev:78688

NOTE: Output structure has no hydrogens.

extend_sulfate_states(st)

 

For specified structure, generates sulfate states, and returns list of output structures. Ev:82634

get_chain_sequences(st, remove_tails=True)

 

Will read the PDB sequences from the sequence block, and will return a dictionary (keys: chain names; values: sequence strings).

If remove_tails is True, will chop off tails that are not existent in the CT, but will leave in the missing loop sections.

Will raise RuntimeError on an error, or mmerror on mmct failure.

_run_prime_job(st, keywords, prime_jobname, app=None)

 

Run the Prime job specified by the keywords on the <st> with jobname <prime_jobname>. If app is not None, the job is ran in background without freezing the GUI.

fill_missing_loops(st, fasta_file, prime_jobname, build_tail=False, app=None)

 

st - Input Structure object fasta_file - Associated .fasta file prime_jobname - Job name to use for the Prime job. build_tail - whether to build tails.

Will return a fixed Structure on success, and will raise a RuntimeError on failure.

does_res_have_missing_side_chains(residue)

 

Given a _Residue object, returns True if the residue is missing side-chain atoms. If at least one backbone atom is (also) missing, False is returned.

Basically only residues for which Prime missing-side-chains job can be run will return True.

fill_missing_side_chains(st, prime_jobname, app=None)

 

st - Input Structure object prime_jobname - Job name to use for the Prime job.

Will return a fixed Structure on success, and will raise a RuntimeError on failure.

fix_sulfur_charges(st)

 

Post process by fixing the charge on zero-order-bonded Sulfurs Gives -1 or -2 charge to Sulfurs as appropriate. Deletes a hydrogen from Sulfurs coordinating with metals (Ev:61622)

_find_waters(st)

 

Return a list of water atoms. Each item in the list is a tuple of 3 water atoms.

get_bridging_waters(st, min_hbonds=3)

 

Return a list of all waters in the specified structure that make at least <min_hbonds> number of H-bonds (H-bonds to other waters excluded). The list contains both oxygen and hydrogen atoms (if present).


Variables Details [hide private]

maxvalence

Value:
[0, 1, 1, 1, 2, 6, 4, 4, 2, 1, 1, 1, 2, 8, 8, 8, 8, 1, 1, 1, 2, 9, 9, \
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 8, 8, 1, 1, 1, 2, 9, 9, 9, 9, 9, 9, 9, 9\
, 9, 9, 9, 9, 9, 8, 1, 1, 1, 2, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,\
 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 1, 1, 9, 9, 9, 9, 9, 9, \
9, 9, 9, 9, 9, 9, 9, 9, 9, 9]

metal_charges

Value:
{11: [1], 12: [2], 19: [1], 20: [2], 25: [2, 3, 4, 5, 6, 7], 26: [2, 3\
], 27: [2, 3], 28: [2, 3], 29: [1, 2, 3], 30: [2],}