schrodinger.protein.protassign.hbond_cluster module¶
Module containing the hbond_cluster class; used by ProtAssign.
Copyright Schrodinger, LLC. All rights reserved.
- schrodinger.protein.protassign.hbond_cluster.calculate_clash_term(distance, cutoff, base=50)¶
Return clash term
- schrodinger.protein.protassign.hbond_cluster.calculate_distance_term(distance)¶
Return distance dependent part of the hydrogen-bond potential functions.
- schrodinger.protein.protassign.hbond_cluster.calculate_angle_term(angle)¶
Return angle dependent part of the hydrogen bond potential.
- Parameters
angle – Angle in degrees formed by H-D-A, with Hydrogen, Donor and Acceptor
angle – float
- Returns
Score
- Return type
float
- schrodinger.protein.protassign.hbond_cluster.score_metal_donor(ct: schrodinger.structure._structure.Structure, metal: Tuple[int, int], donor: Tuple[int, int], use_xtal=False) float ¶
Score a metal-donor interaction. Donors should not be pointing towards metals. If so, this will result in a penalty
- schrodinger.protein.protassign.hbond_cluster.score_acceptor_acceptor(ct: schrodinger.structure._structure.Structure, iacceptor: int, jacceptor: int, use_xtal: bool = False, acceptor_acceptor_clash_cutoff: float = 2.7) float ¶
Scoring function for acceptor-acceptor interactions.
These interactions are considered worse than clasher-donor hydrogen clashes, and its base penalty is thus higher. It is set so the scoring function is more robust and provides the correct flip for the Gln-541 state of 2X9E that interact with the ligand.
- Returns
Score
- schrodinger.protein.protassign.hbond_cluster.score_donor_acceptor(ct, donor_heavy, donor_hydrogen, acceptor_heavy, use_xtal=False)¶
- class schrodinger.protein.protassign.hbond_cluster.hbond_cluster¶
Bases:
object
- __init__()¶
- setup_xtal(ct, interaction_matrix, clustering_distance)¶
- optimize(ct: schrodinger.structure._structure.Structure, interaction_matrix: Dict[int, Set[int]], static_donors: List[Tuple[int, int]], static_acceptors: List[int], static_clashers: List[int], max_comb: int, num_sequential_cycles: int, use_propka: bool, pH: float = 7.0, annotated_ct: Optional[schrodinger.structure._structure.Structure] = None, dcell=None)¶
Optimize hydrogen bond network and protonation states of changeables in this cluster
- Parameters
ct – Structure containing changeables to optimize
interaction_matrix – Interaction lookup dict for changeable-changeable interactions
static_donors – List of static donor atom indices
static_acceptors – List of static acceptor atom indices
static_clashers – List of static clasher atom indices
max_comb – Maximum number of combinations at which an exhaustive search is performed.
num_sequential_cycles – Number of optimization cycles when using heuristic search.
use_propka – Use PROPKA to determine pKa values of changeables
pH – pH of system when using PROPKA for pKa determination
annotated_ct – Annotated structure that may contain xtal mates for faster optimization. Passing this, skips the creation of crystal mates and structure annotation during the self-scoring phase.
dcell – Pre-calculated distance cell to improve performance
- solve_network_exact_and_diversify(ct, interaction_matrix, ncombinations, delta_energy=2.0)¶
Solve the network exact
- Parameters
ct (Structure) – Structure
interaction_matrix (Dict[int, Set[int]]) – Changeable interaction lookup table
ncombinations (int) – Number of maximum combinations to return
delta_energy (float) – Maximum energy difference of combinations generated compared to the global minimum
- Returns
List of combinations with first element being the global optimum combination or empty list if no optimum found
- Return type
- score_combination(ct, interaction_matrix, states)¶
- single_point(ct, interaction_matrix, static_donors, static_acceptors, static_clashers, xtal_ct=None)¶
- setup_local_static_alt(ct, static_acceptors, static_donors, static_clashers)¶
- setup_local_static(ct, static_acceptors, static_donors, static_clashers)¶
- pre_score_self(ct, dcell=None)¶
Calculate the self score for each state. Interactions are calculated between the changeable and its static environment.
- Parameters
ct – Structure to calculate self-scores of
dcell – Pre-calculated distance cell to improve performance
- pre_score_pairs(ct, interaction_matrix: Dict[int, Set[int]])¶
- score_pair(ct, iacceptors, idonors, iclashers, icharge, jacceptors, jdonors, jclashers, jcharge, use_xtal=False)¶
- score_exhaustively(ct, interaction_matrix, find_all_solutions=True, tolerate_clashes=False)¶
- score_sequentially(ct: schrodinger.structure._structure.Structure, interaction_matrix: Dict[int, Set[int]], num_sequential_cycles: int)¶
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).
- Parameters
ct – input/output structure, will be modified
interaction_matrix – Interaction lookup table
num_sequential_cycles – Number of cycles of randomization and optimization to conduct
- expand_solutions(ct, interaction_matrix)¶
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.
- recombine_solutions(ct, interaction_matrix)¶
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.
- deconverge(ct, interaction_matrix, 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.
- iterate_to_convergence(ct, interaction_matrix, comb, problem_cutoff=50.0)¶
This iterates the combination ‘comb’ to convergence. Maximum of 10 cycles.
- create_hybrid(local_combinations: List[Tuple[Tuple[List[int], float, float], List[int]]], interaction_matrix: Dict[int, Set[int]], random_scaffold: bool = False) Optional[List[int]] ¶
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.
- Parameters
local_combinations – List of combinations, where a combination is specified as a tuple holding the combination, total charge, and total energy, and another list of problem children.
interaction_matrix – Interaction lookup table for changeables
random_scaffold – Choose a random starting combination, otherwise start with the first combiation
- trim_redundant_combinations()¶
- assign_combination(ct, icombination, add_labels, label_pkas, verbose=False)¶
Assign a given combination to this cluster
- Parameters
ct (schrodinger.Structure) – The structure to operate on
icombination – The index of the combination to assign or if this number is larger then the stored combinations, just keep the current state
add_labels (bool) – Whether to add labels to atoms to be seen in maestro with the current protonation state
label_pka (bool) – Whether to add labels for the pKa of each residue
verbose (bool) – Whether to report additional information to the log file about the combination chosen
- determine_gap(icombination, ichangeable)¶
Create a dictionary with the energy gaps to each of the various states. States that differ by only a hydrogen rotation are not considered unique
- Parameters
icombination (integer) – the combination to use as the zero point. In most situations this will be the lowest energy combination ( 0 when sorted)
ichangeable (integer) – The residue number ( or position number) within the cluster which will be analyzed
- Rparam
dictionary where the key is the name of the state or “Default” when the state is one of the staggers
- Return type
dictionary with a key of string and value of a float
- schrodinger.protein.protassign.hbond_cluster.create_hbond_clusters_from_changeables(ct, changeables, interaction_matrix, use_xtal, max_cluster_size)¶