schrodinger.protein.assignment module

Module for optimizing hydroxyl, thiol and water orientiations, Chi-flips of asparagine, glutamine and histidine, and protonation states of aspartic acid, glutamic acid, and histidine.

Usage: ProtAssign(st)

Copyright Schrodinger, LLC. All rights reserved.

exception schrodinger.protein.assignment.PropKaException(value)

Bases: exceptions.Exception

class schrodinger.protein.assignment.ProtAssign(ct, interactive=False, do_flips=True, asl='', noprot_asl='', atoms=[], use_xtal=False, torsion_penalty=False, sample_waters=True, sample_acids=True, freeze_existing=False, include_initial=False, max_comb=10000, logging_level=1, quiet_flag=False, debug_flag=False, add_labels=True, label_pkas=False, pH='neutral', use_propka=True, propka_pH=7.0, user_states=[], minimize=False)
class amide_changeable(ct, iatom)

Bases: schrodinger.protein.assignment.changeable

asl = '((res.ptype "ASN " AND atom.ptype " CG ") OR (res.ptype "GLN " AND atom.ptype " CD "))'
assign_state(ct, istate, add_labels=True, label_pkas=False)
enumerate_states(ct, acceptors, donors, pH, do_flips=True, include_initial=False)
get_adjustable_atoms()
get_heavies()
get_penalty(istate)
get_state_sites(ct, istate)
get_view_atoms()
pre_treat_1(ct)
pre_treat_2(ct)
update_atom_indices(ct, new_indices)
class amine_changeable(ct, iatom)

Bases: schrodinger.protein.assignment.changeable

asl = '((res.ptype "LYS ","LYN ") AND (atom.ptype " NZ "))'
assign_state(ct, istate, add_labels=True, label_pkas=False)
change_pka(pka, propka_pH)
enumerate_states(ct, acceptors, donors, pH, do_flips=True, include_initial=False)
get_heavies()
get_penalty(istate)
get_state_sites(ct, istate)
get_view_atoms()
lock_protonation()
pre_treat_1(ct)
pre_treat_2(ct)
update_atom_indices(ct, new_indices)
apply_pkas(changeables, changes, propka_pH)
assign_best_combinations(ct)
assign_cluster_combination(ct, icluster, icombination)
assign_state_of_changeable(ct, ichangeable, istate)
class carboxyl_changeable(ct, iatom)

Bases: schrodinger.protein.assignment.changeable

asl = '(res.ptype "ASP ","ASH " AND atom.ptype " CG ") OR (res.ptype "GLU ","GLH " AND atom.ptype " CD ")'
assign_state(ct, istate, add_labels=True, label_pkas=False)
change_pka(pka, propka_pH)
enumerate_states(ct, acceptors, donors, pH, do_flips=True, include_initial=False)
get_adjustable_atoms()
get_heavies()
get_penalty(istate)
get_state_sites(ct, istate)
get_view_atoms()
lock_protonation()
pre_treat_1(ct)
pre_treat_2(ct)
update_atom_indices(ct, new_indices)
class changeable(ct, iatom)
HOH_angle = 109.5
OH_length = 1.0
add_current_to_states(ct)
asl = 'none'
assign_state(ct, istate, add_labels=True, label_pkas=False)
change_pka(pka, propka_pH)
enumerate_states(ct, acceptors, donors, pH, do_flips=True, include_initial=False)
get_adjustable_atoms()
get_atom_name(ct, iatom)
get_dihedral_atoms(ct, h)
get_new_index(ct, atom_index, new_indices)
get_penalty(istate)
get_residue_name(ct, iatom)
get_view_atoms()
hbond_heavy_max_angle = 140.0
hbond_heavy_min_angle = 80.0
hbond_min_angle = 150.0
lock_protonation()
max_hbond_distance = 3.5
pre_treat(ct)
pre_treat_1(ct)
pre_treat_2(ct)
swap_atoms(ct, atom1, atom2)
update_atom_indices(ct, new_indices)
cleanup(ct)
cluster(ct)
clustering_distance = 4.0
decrement_state_of_changeable(ct, ichangeable)
delete_atoms(ct, atoms)
enumerate_changeable_states(ct)
extend_targeted_to_hyds(ct)
find_protonation_state_changes(ct, clusters='all')
fix_elements(ct)
freeze_existing_hydrogens(ct)
generate_mates(ct)
class hbond_cluster
assign_combination(ct, icombination, add_labels, label_pkas)
create_hybrid(local_combinations, interact, random_scaffold=False)

This takes the lowest energy solution, and for each problematic region it searches other solutions (in random order) for any which may have had better luck for just that part of the overall cluster. It then splices those solutions into the lowest energy one. If random_scaffold, then it selects a random solution as the basis in stead of the lowest energy one.

deconverge(ct, interact, comb, problem_cutoff=50.0)

This starts with what is assumed to be a good solution, and then randomizes the states, but not to anything that produces a problem.

expand_solutions(ct, interact)

This takes an existing set of good solutions and generates more by deconverging them and then iterating them back to convergence. Generates at least 10 new solutions.

get_atom_name(ct, iatom)
get_residue_name(ct, iatom)
initialize_score_storage()
iterate_to_convergence(ct, interact, comb, problem_cutoff=50.0)

This iterates the combination ‘comb’ to convergence. Maximum of 10 cycles.

optimize(ct, interact, static_donors, static_acceptors, static_clashers, max_comb, use_propka, propka_pH=7.0, xtal_ct=None)
pre_score_pairs(ct, interact)
pre_score_self(ct)
recombine_solutions(ct, interact)

This is similar to score_sequentially, but begins with some pre-existing good solutions in self.combinations, and then creates hybrids to try to improve on them.

score_combination(ct, interact, states)
score_donor_acceptor(ct, donor_heavy, donor_hydrogen, acceptor_heavy, use_xtal=False)
score_donor_donor(ct, donor1_heavy, donor1_hydrogen, donor2_heavy, donor2_hydrogen, use_xtal=False)
score_exhaustively(ct, interact, find_all_solutions=True, tolerate_clashes=False)
score_pair(ct, iacceptors, idonors, iclashers, icharge, jacceptors, jdonors, jclashers, jcharge, use_xtal=False)
score_sequentially(ct, interact)

This routine uses an algorithm similar to Prime’s iteration to convergence. Starting from a random configuration, each species is optimized in turn, keeping the others fixed in their current state. This continues until the system reaches convergence (no more changes in the most optimal state for all residues).

setup_local_static(ct, static_acceptors, static_donors, static_clashers)
setup_local_static_alt(ct, static_acceptors, static_donors, static_clashers)
setup_xtal(ct, interact, clustering_distance)
single_point(ct, interact, static_donors, static_acceptors, static_clashers, xtal_ct=None)
trim_redundant_combinations()
class histidine_changeable(ct, iatom)

Bases: schrodinger.protein.assignment.changeable

asl = '((res.ptype "HIS ","HID ","HIE ","HIP ")) AND ((atom.ptype " CG "))'
assign_state(ct, istate, add_labels=True, label_pkas=False)
change_pka(pka, propka_pH)
enumerate_states(ct, acceptors, donors, pH, do_flips=True, include_initial=False)
get_adjustable_atoms()
get_heavies()
get_penalty(istate)
get_state_sites(ct, istate)
get_view_atoms()
lock_protonation()
pre_treat_1(ct)
pre_treat_2(ct)
update_atom_indices(ct, new_indices)
identify_all_hbonders(ct)
identify_species(ct)
increment_state_of_changeable(ct, ichangeable)
lock_protonation_states(ct)
minimize_hydrogens(ct)
optimize(ct)
optimize_cluster(ct, icluster, assign=True)
record_current_indices(ct)
remove_changeables_from_hbonders()
remove_zero_order_bonds(ct)
restore_zobs(ct)
class rotatable_changeable(ct, iatom)

Bases: schrodinger.protein.assignment.changeable

add_current_to_states(ct)
asl = '((res.ptype "CYS ","CYT ") AND (atom.ptype " SG ") AND (atom.formal -1)) OR ((res.ptype "TYR ") AND (atom.ptype " OH ") AND (atom.formal -1)) OR (( atom.ele H AND not /C0-H0/ AND not /N0-H0/ ) AND NOT (res.ptype "HOH","DOD","SPC","ASH","GLH","ASP","GLU" ))'
assign_state(ct, istate, add_labels=True, label_pkas=False)
change_pka(pka, propka_pH)
enumerate_states(ct, acceptors, donors, pH, do_flips=True, include_initial=False)
get_adjustable_atoms()
get_heavies()
get_penalty(istate)
get_state_sites(ct, istate)
get_view_atoms()
lock_protonation()
pre_treat_1(ct)
pre_treat_2(ct)
update_atom_indices(ct, new_indices)
run_propka(changeables, ct, use_xtal=False)
set_user_states(ct)
setup(ct)
single_point_cluster(ct, icluster)
summarize_pkas()
class water_changeable(ct, iatom)

Bases: schrodinger.protein.assignment.changeable

add_current_to_states(ct)
asl = '(water) AND (atom.ele O)'
assign_state(ct, istate, add_labels=True, label_pkas=False)
enumerate_states(ct, acceptors, donors, pH, do_flips=True, include_initial=False)
find_dihedrals(ct, atom1, atom2, atom3, acceptors, donors)
get_adjustable_atoms()
get_heavies()
get_penalty(istate)
get_state_sites(ct, istate)
get_view_atoms()
redundancy_tolerance = 0.5
update_atom_indices(ct, new_indices)
schrodinger.protein.assignment.measure(ct, atom1=None, atom2=None, atom3=None, atom4=None, use_xtal=False, max_dist=10.0)
schrodinger.protein.assignment.rand(d0, d1, ..., dn)

Random values in a given shape.

Create an array of the given shape and populate it with random samples from a uniform distribution over [0, 1).

d0, d1, …, dn : int, optional
The dimensions of the returned array, should all be positive. If no argument is given a single Python float is returned.
out : ndarray, shape (d0, d1, ..., dn)
Random values.

random

This is a convenience function. If you want an interface that takes a shape-tuple as the first argument, refer to np.random.random_sample .

>>> np.random.rand(3,2)
array([[ 0.14022471,  0.96360618],  #random
       [ 0.37601032,  0.25528411],  #random
       [ 0.49313049,  0.94909878]]) #random
schrodinger.protein.assignment.randn(d0, d1, ..., dn)

Return a sample (or samples) from the “standard normal” distribution.

If positive, int_like or int-convertible arguments are provided, randn generates an array of shape (d0, d1, ..., dn), filled with random floats sampled from a univariate “normal” (Gaussian) distribution of mean 0 and variance 1 (if any of the d_i are floats, they are first converted to integers by truncation). A single float randomly sampled from the distribution is returned if no argument is provided.

This is a convenience function. If you want an interface that takes a tuple as the first argument, use numpy.random.standard_normal instead.

d0, d1, …, dn : int, optional
The dimensions of the returned array, should be all positive. If no argument is given a single Python float is returned.
Z : ndarray or float
A (d0, d1, ..., dn)-shaped array of floating-point samples from the standard normal distribution, or a single such float if no parameters were supplied.

random.standard_normal : Similar, but takes a tuple as its argument.

For random samples from N(\mu, \sigma^2), use:

sigma * np.random.randn(...) + mu

>>> np.random.randn()
2.1923875335537315 #random

Two-by-four array of samples from N(3, 6.25):

>>> 2.5 * np.random.randn(2, 4) + 3
array([[-4.49401501,  4.00950034, -1.81814867,  7.29718677],  #random
       [ 0.39924804,  4.68456316,  4.99394529,  4.84057254]]) #random
schrodinger.protein.assignment.report(message_level=1, message='')