schrodinger.application.prepwizard module¶
Shared functionality between PrepWizard GUI and command-line PrepWizard.
Copyright Schrodinger, LLC. All rights reserved.
- schrodinger.application.prepwizard.serialize_het_states(states_by_het, complex_st)[source]¶
Set JSON string for all given states as a CT-level property.
- schrodinger.application.prepwizard.deserialize_het_states(complex_st)[source]¶
Attempt to read the het states from the CT using the s_ppw_het_states property, if present.
- class schrodinger.application.prepwizard.HetState(hetnum)[source]¶
Bases:
object
Class representing an ionization/tautomeric state of a het (e.g. ligand).
- classmethod initFromEpikOutput(hetnum, state_st)[source]¶
Return a HetState instance for the given Epik output structure.
- classmethod initFromSerializedState(hetnum, serialized_state)[source]¶
Return a HetState instance for the given serialized state.
- applyState(st)[source]¶
Apply this het state to the specified complex structure: modify the bond orders and formal charges to apply the currently selected het state.
Also calculates the score and info_str properties
Raises RuntimeError if any of the het atoms are no longer in the structure, or are not numbered correctly.
- schrodinger.application.prepwizard.fix_common_structure_mistakes(st)[source]¶
Fixes common problems in structures and returns a list of correction strings that are to be reported to the user.
- schrodinger.application.prepwizard.check_st_valences(st)[source]¶
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.
- schrodinger.application.prepwizard.atomsasl(atoms)[source]¶
Generates an ASL expression for the specified atoms.
- schrodinger.application.prepwizard.create_glycosylation_bonds(st, dist=1.8, verbose=True)[source]¶
Create glycosylation bonds for N-linked or O-linked glycosilation events Identfies neutral O or N with implicit or explicit hydrogens and forms bonds to sugars ( ring with 5 aliphatic carbons and one oxygen ) at locations adjacent to the oxygen. :param st: Structure to modify. :type st: Schrodinger.structure
- Parameters
dist (float) – Atoms must be at least this close to consider for for glycosilation
verbose (boolean) – Whether to print formed bonds to stdout
- Rparam
Pairs of atom ( in the output structure ) where bonds were added
- Return type
list of schrodinger atom objects
- schrodinger.application.prepwizard.create_palmitoylation_bonds(st, dist=1.8, verbose=True)[source]¶
Create palmitoylation bonds. Identfies neutral cysteine S with implicit or explicit hydrogens and palmitoyl groups or palmitoyl groups with the OH of the acid replace by a hydrogen :param st: Structure to modify. :type st: Schrodinger.structure
- Parameters
dist (float) – Atoms must be at least this close to consider for for pamitoylation
verbose (boolean) – Whether to print formed bonds to stdout
- Rparam
Pairs of atom ( in the output structure ) where bonds were added
- Return type
list of schrodinger atom objects
- schrodinger.application.prepwizard.create_disulfide_bonds(st, dist=3.2, verbose=False)[source]¶
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.
- schrodinger.application.prepwizard.convert_selenomethionines(st)[source]¶
Convert MSE residues to METs. Returns a list of residue strings that were converted.
- schrodinger.application.prepwizard.extend_phosphate_states(st)[source]¶
For specified structure, generates phosphate states, and returns list of output structures. Ev:78688
NOTE: Output structure has no hydrogens.
- schrodinger.application.prepwizard.extend_sulfate_states(st)[source]¶
For specified structure, generates sulfate states, and returns list of output structures. Ev:82634
- schrodinger.application.prepwizard.get_chain_sequences(st, remove_tails=True)[source]¶
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.
- schrodinger.application.prepwizard.write_sequences_to_fasta(pdbid, sequences_dict, fastafile)[source]¶
- schrodinger.application.prepwizard.does_res_have_missing_side_chains(residue)[source]¶
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.
- schrodinger.application.prepwizard.do_any_residues_have_missing_side_chains(st)[source]¶
Returns True if at least one of the residue in the given structure has missing side-chain atoms (backbone atoms are ignored).
- schrodinger.application.prepwizard.fix_sulfur_charges(st)[source]¶
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)
- schrodinger.application.prepwizard.prepare_for_epik(st, het_asls, app=None)[source]¶
Extract the structures to run Epik on from the input complex CT. Atoms in the original structure will be marked with i_ppw_anum property, to make it possible to match Epik output with the input structure.
- schrodinger.application.prepwizard.filter_undesired_states(orig_st, state_sts)[source]¶
Returns a subset of state structures, which excludes metal-binding states for hets that are not within 5A of a metal.
- Parameters
orig_st (
structure.Structure
) – Original complex structure (receptor, ligands, metals)state_st (Iterable of
structure.Structure
) – Epik output states to filter.
- Returns
List of filtered structures.
- Return type
List of
structure.Structure
- schrodinger.application.prepwizard.find_ppw_atom(st, anum)[source]¶
Find the atom in the given structure whose i_ppw_anum property is set to the given value. ValueError exception is raised if such atom is not found.
- schrodinger.application.prepwizard.apply_state(complex_st, state_st)[source]¶
Modify the het in complex_st complex (protein/ligand) structure such that its ionization state matches the output that we got from Epik (state_st).
- Parameters
complex_st (
structure.Structure
) – Original complex structure (receptor + het)state_st (
structure.Structure
) – Epik output for the het group. May include some atoms from the receptor if the ligand is covalently-bound.
- Returns
List of atom indices in complex_st that are part of the het.
- Return type
(dict, list)
- schrodinger.application.prepwizard.apply_state_and_calc_score(complex_st, state_st)[source]¶
Apply the state <state_st> to <complex_st>, and return the score for the state in the context of the protein complex.
- Parameters
complex_st (
structure.Structure
) – Original complex structure (receptor + het)state_st (
structure.Structure
) – Epik output for the het group. May include some atoms from the receptor if the ligand is covalently-bound.
- Returns
Tuple of state score, Epik penalty, and information string. Epik penalty will be None for metal states.
- Return type
(float, float/None, str)
- schrodinger.application.prepwizard.get_state_penalties(state_st)[source]¶
Return the Epik state penalty for this Epik output structure, as well as metal penalties for each atom that has the r_epik_Metal_State_Penalty property set.
- schrodinger.application.prepwizard.get_smallest_metal_penalty(complex_st, metal_penalties)[source]¶
Return the lowest metal penalty of all het atoms, considering only atoms that are within 3A of a receptor metal.
- schrodinger.application.prepwizard.get_bridging_waters(st, min_hbonds=3)[source]¶
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).
- schrodinger.application.prepwizard.hydrogen_neighbors(st, atoms)[source]¶
Returns the list of neighbor (bonded) atoms that are hydrogens.
- Parameters
st (
structure.Structure
) – Structure where atoms are from.atoms (list of ints) – List of atom indices for the heavy atoms.
- Returns
List of hydrogen atom indices
- Return type
list of ints.
- schrodinger.application.prepwizard.get_pdb_id(st)[source]¶
Returns the PDB ID of the given structure. If the property does not exist or contains just white spaces, returns the string “unknown”.
- schrodinger.application.prepwizard.get_het_name(st, het_atoms)[source]¶
Return the het “name” to display for the user for the given het. Example outputs:
A:HEM (123a) A:GLY-VAL-PRO
- Parameters
st (
schrodinger.structure.Structure
) – Structure containing the hethet_atoms (list of ints) – Atoms from this het.
- schrodinger.application.prepwizard.add_prepared_props(st)[source]¶
Adds “prepared” and “prepared with version” properties to the given structure.
- schrodinger.application.prepwizard.generate_bio_units(st)[source]¶
If the given structure has Biounit data, generate conformations for each biounit. If multiple bio units are defined, multiple structures are returned - oner per bio unit. If no biounit data is present, original structure is returned (in list).