schrodinger.application.prepwizard module

Shared functionality between PrepWizard GUI and command-line PrepWizard.

Copyright Schrodinger, LLC. All rights reserved.

schrodinger.application.prepwizard.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.

schrodinger.application.prepwizard.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.

schrodinger.application.prepwizard.atomsasl(atoms)

Generates an ASL expression for the specified atoms.

schrodinger.application.prepwizard.create_glycosylation_bonds(st, dist=1.8, verbose=True)

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 gylcosilation
  • 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)

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)

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

schrodinger.application.prepwizard.count_phosphates_and_sulfurs(st)
schrodinger.application.prepwizard.extend_phosphate_states(st)

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)

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

schrodinger.application.prepwizard.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.

schrodinger.application.prepwizard.write_sequences_to_fasta(pdbid, sequences_dict, fastafile)
schrodinger.application.prepwizard.fill_missing_loops(st, fasta_file=None, prime_jobname=None, 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.

schrodinger.application.prepwizard.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.

schrodinger.application.prepwizard.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).

schrodinger.application.prepwizard.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. Note that app will be ignored if running with python sidechain adding

schrodinger.application.prepwizard.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)

schrodinger.application.prepwizard.prepare_for_epik(st, het_asls, app=None)

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)

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)

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)

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:

Dict mapping state_st heavy atoms to complex_st, and 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)

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.generate_special_states(sts, app=None)
schrodinger.application.prepwizard.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).

schrodinger.application.prepwizard.hydrogen_neighbors(st, atoms)

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)

Returns the PDB ID of the given structure. If the property does not exist, returns the string “unknown”.

schrodinger.application.prepwizard.get_het_name(st, het_atoms)

Return the het “name” to display for the user for the given het. Example outputs:

A:HEM (123a) A:GLY-VAL-PRO
Parameters:
  • st (structure.Structure) – Structure containing the het
  • het_atoms (list of ints) – Atoms from this het.
schrodinger.application.prepwizard.add_prepared_props(st)

Adds “prepared” and “prepared with version” properties to the given structure.