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.
- schrodinger.protein.assignment.get_annotated_atom(residue)[source]¶
- Returns annotated atom of residue _StructureAtom or None 
- schrodinger.protein.assignment.get_annotated_atom_property(residue)[source]¶
- Returns property dict of annotated atom or an empty dict if atom is not present 
- schrodinger.protein.assignment.shift_pka(residue, amount)[source]¶
- Shift the predicted pKa of residue 
- schrodinger.protein.assignment.get_interaction_label(label, suffix)[source]¶
- Create property label for a given interaction. 
- schrodinger.protein.assignment.set_interaction_label(residue, label, suffix=None)[source]¶
- Set a label of the annoted atom of residue to True 
- schrodinger.protein.assignment.has_interaction_label(residue, label, suffix=None)[source]¶
- Check if the annotated atom of the residue has a label 
- schrodinger.protein.assignment.residue_to_label(residue_or_atom)[source]¶
- Create string from residue or atom. 
- schrodinger.protein.assignment.log_interaction(residue1, residue2, name, distance=None, angle=None)[source]¶
- Log the interaction between two residues and its distance and angle optionally 
- schrodinger.protein.assignment.get_bulk_solvent_accessible_atoms(st, radius=2.5, radius2=3.0, spacing=0.5, include_water=False)[source]¶
- Return bulk solvent accessible atoms. - Bulk solvent accessible atoms are determined by creating a grid and setting occupied voxels to 1 using a fixed radius for each atom and then checking if any non-occupied voxels are present within a slightly larger radius. - Parameters
- st (Structure) – Structure to determine bulk solvent accessible atoms. The atom property BULK_SOLVENT_ACCESSIBLE_PROPERTY will be set for each atom. 
- radius (float) – Initial radius 
- radius2 (float) – 
- spacing (float) – Spacing of grid. Lower spacing makes the calculation more accurate but requires more compute time and memory. 
- include_water (bool) – Whether to keep waters or not when calculating bulk solvent accessible atoms. 
 
- Returns
- List of atom indices that are bulk solvent accessible 
- Return type
- List[int] 
 
- schrodinger.protein.assignment.get_unsatisfied_donors(st, include_bsa=True)[source]¶
- Return unsatisfied buried donors - Parameters
- st (Structure) – Structure to analyze 
- include_bsa (bool) – Include bulk solvent accessible atoms 
 
- Returns
- List of unsatisfied donor atoms 
- Return type
 
- schrodinger.protein.assignment.get_carboxyl_atoms(residue)[source]¶
- Get carboxyl atom groups from residue. Returns multiple groups if multiple are present. The first atom will be the carbon. It specifically adds Glu and Asp even if they are protonated and uses a SMARTS pattern otherwise to extract the carboxyl group. - Parameters
- residue (_Residue) – Residue to check 
- Returns
- List of carboxyl atoms 
- Return type
 
- schrodinger.protein.assignment.charge_arginine_sidechains(st)[source]¶
- Make arginine sidechains charged. Assumes bond orders have been assigned correctly. - Looks for the nitrogen that has a double bond to the CZ atom, and changes the formal charge to 1 and retypes atom. 
- class schrodinger.protein.assignment.HistidinepKaPredictor[source]¶
- Bases: - object- Empirical histidine pKa predictor - INTERNAL_PKA = 6.5¶
 - METAL_PKA_SHIFT = -4.0¶
 - STATIC_DONOR_PKA_SHIFT = -3.0¶
 - FORCED_ACCEPTOR_PKA_SHIFT = -3.0¶
 - PI_CATION_PKA_SHIFT = -1.0¶
 - PI_PI_PKA_SHIFT = 1.0¶
 - CARBOXYLIC_ACID_PKA_SHIFT = 1.0¶
 - DOUBLE_SIDED_HBOND_PKA_SHIFT = 1.0¶
 - MAX_STATIC_DONOR_INTERACTION_DISTANCE = 3.0¶
 - MIN_STATIC_DONOR_INTERACTION_ANGLE = 120¶
 - MAX_STATIC_ACCEPTOR_INTERACTION_DISTANCE = 2.5¶
 - MIN_STATIC_ACCEPTOR_INTERACTION_ANGLE = 120¶
 - MAX_METAL_INTERACTION_DISTANCE = 3.5¶
 - MAX_PI_PI_INTERACTION_DISTANCE = 4.5¶
 - MAX_PI_PI_INTERACTION_ANGLE = 30¶
 - MAX_PI_CATION_INTERACTION_DISTANCE = 4.5¶
 - MAX_PI_CATION_INTERACTION_ANGLE = 30¶
 - MAX_PI_ARG_INTERACTION_DISTANCE = 5.5¶
 - MAX_CARBOXYLIC_ACID_INTERACTION_DISTANCE = 3.8¶
 - MIN_CARBOXYLIC_ACID_INTERACTION_ANGLE = 140¶
 - NITROGEN_PDBNAMES = {' ND1', ' NE2'}¶
 - CARBON_PDBNAMES = {' CD2', ' CE1'}¶
 - SIDECHAINS_PDBNAMES = {' CD2', ' CE1', ' CG ', ' ND1', ' NE2'}¶
 - predict(st, protassign=None, flip=False)[source]¶
- Predict histidine pKa with empirical rules. Currently this requires the structure being annotated by ProtAssign. - Parameters
- st (Structure) – ProtAssign annotated structure 
- protassign (schrodinger.protein.assignment.ProtAssign) – ProtAssign instance to calculate forced acceptor interactions 
- flip (bool) – Calculate pKa of flipped version of histidne 
 
 - Returns None but annotates ANNOTATED_ATOM of each histidine with found interactions and predicted pKa 
 
- class schrodinger.protein.assignment.AsparticAcidpKaPredictor[source]¶
- Bases: - schrodinger.protein.assignment._CarboxylicAcidpKaPredictor- Aspartic acid emperical pKa predictor - INTERNAL_PKA = 3.4¶
 - PDBRES_NAMES = {'ASH ', 'ASP '}¶
 - CARBON_PDBNAME = ' CG '¶
 - OXYGEN_PDBNAMES = [' OD1', ' OD2']¶
 - SIDECHAIN_PDBNAMES = [' OD1', ' OD2', ' CG ']¶
 - CARBOXYLIC_ACID_PKA_SHIFT = 4.0¶
 - MAX_CARBOXYLIC_ACID_INTERACTION_DISTANCE = 3.8¶
 - MAX_METAL_INTERACTION_DISTANCE = 3.5¶
 - MAX_STATIC_ACCEPTOR_INTERACTION_DISTANCE = 3.5¶
 - METAL_PKA_SHIFT = -3.0¶
 - MIN_CARBOXYLIC_ACID_INTERACTION_ANGLE = 140¶
 - MIN_STATIC_ACCEPTOR_INTERACTION_ANGLE = 150¶
 - STATIC_ACCEPTOR_PKA_SHIFT = 4.0¶
 - carboxyl_interactions()¶
- Check if histidine is interacting with a carboxyl group. 
 - metal_interactions()¶
 - predict(st)¶
 - static_acceptor_interactions()¶
- Check if histidine is interacting with a static acceptor 
 
- class schrodinger.protein.assignment.GlutamicAcidpKaPredictor[source]¶
- Bases: - schrodinger.protein.assignment._CarboxylicAcidpKaPredictor- Glutamic acid emperical pKa predictor - INTERNAL_PKA = 4.2¶
 - PDBRES_NAMES = {'GLH ', 'GLU '}¶
 - CARBON_PDBNAME = ' CD '¶
 - OXYGEN_PDBNAMES = [' OE1', ' OE2']¶
 - SIDECHAIN_PDBNAMES = [' OE1', ' OE2', ' CD ']¶
 - CARBOXYLIC_ACID_PKA_SHIFT = 4.0¶
 - MAX_CARBOXYLIC_ACID_INTERACTION_DISTANCE = 3.8¶
 - MAX_METAL_INTERACTION_DISTANCE = 3.5¶
 - MAX_STATIC_ACCEPTOR_INTERACTION_DISTANCE = 3.5¶
 - METAL_PKA_SHIFT = -3.0¶
 - MIN_CARBOXYLIC_ACID_INTERACTION_ANGLE = 140¶
 - MIN_STATIC_ACCEPTOR_INTERACTION_ANGLE = 150¶
 - STATIC_ACCEPTOR_PKA_SHIFT = 4.0¶
 - carboxyl_interactions()¶
- Check if histidine is interacting with a carboxyl group. 
 - metal_interactions()¶
 - predict(st)¶
 - static_acceptor_interactions()¶
- Check if histidine is interacting with a static acceptor 
 
- exception schrodinger.protein.assignment.PropKaException(value)[source]¶
- Bases: - Exception- args¶
 - with_traceback()¶
- Exception.with_traceback(tb) – set self.__traceback__ to tb and return self. 
 
- schrodinger.protein.assignment.measure(ct, atom1=None, atom2=None, atom3=None, atom4=None, use_xtal=False, max_dist=10.0)[source]¶
- schrodinger.protein.assignment.calculate_interaction_matrix(ct: schrodinger.structure._structure.Structure, iatoms: List[int], distance: float, use_xtal: bool = False) Dict[int, set][source]¶
- Create an interaction matrix based on the changeable_index atom property - Parameters
- ct – Structure with annotated atoms having set the i_pa_changeable_index corresponding the the index of the changeable 
- iatoms – List of atom indices which take part in interaction 
- distance – Max distance between interacting atoms 
- use_xtal – Take into account crystal symmetry mates 
- use_xtal – bool 
 
- Returns
- interaction matrix allowing double indexing: interact[i, j] 
 
- schrodinger.protein.assignment.annotate_structure_interactors(ct, acceptors, donors, clashers)[source]¶
- Set atom property for each interactor class 
- schrodinger.protein.assignment.generate_annotated_ct(ct, donors, acceptors, clashers, use_xtal=False)[source]¶
- Generate an annotated Structure that contains crystal mates. The annotated heavily speeds up the self scoring step for large and xtal structures - Parameters
- Returns
- New annotated structure with property ANNOTATED_PROPERTY set to True 
- Return type
 
- schrodinger.protein.assignment.check_residue_flip_state(res: schrodinger.structure._structure._Residue) tuple[source]¶
- Determine whether a residue cannot be flipped, is, or is not flipped. - Parameters
- res – a protein residue 
- Returns
- a tuple of - (state, msg), where- statedescribes whether the residue is flipped (- True), is not flipped (- False), or cannot be flipped (- None); if- None,- msgwill contain an explanation
- Return type
- tuple[bool or NoneType, str] 
 
- schrodinger.protein.assignment.get_residue_flip_state(res: schrodinger.structure._structure._Residue) Optional[bool][source]¶
- Return the flip state of a protein residue. - A truncated version of - check_residue_flip_state().- Parameters
- res – a protein residue 
- Returns
- the flip state of a residue 
 
- schrodinger.protein.assignment.get_residue_string(residue_or_atom) str[source]¶
- Return a string describing a residue from a residue or atom. - The string will match the format
- <chain>:<residue PDB code> <residue number>[<insertion code>] 
 - Parameters
- residue_or_atom (_Residue or _StructureAtom) – a residue or atom 
- Returns
- a string describing the residue 
 
- schrodinger.protein.assignment.get_heavy_neighbors(atom: schrodinger.structure._structure._StructureAtom) list[source]¶
- Parameters
- atom – an atom 
- Returns
- a list of heavy (non-H) atoms covalently bound to - atom
- Return type
- list[structure._StructureAtom] 
 
- class schrodinger.protein.assignment.WaterStateEnumerator(ct, oxygen, acceptors, donors)[source]¶
- Bases: - object- Enumerate discrete water states that are hydrogen bonding with nearby acceptors and donors - The goal is to sample likely states while also limiting the number of states as solving the combinatorial problem gets harder with more and more states. - OH_LENGTH = 1.0¶
 - HOH_ANGLE = 109.5¶
 - MIN_HYDROGEN_NONSTATIC_DONOR_DISTANCE = 2.5¶
 - __init__(ct, oxygen, acceptors, donors)[source]¶
- Parameters
- ct (Structure) – Annotated structure with donor/acceptor and static flags. 
- oxygen (_StructureAtom) – Oxygen atom of water 
- acceptors (List[int]) – List of acceptor atom indices 
- donors (List[Tuple[int, int]]) – List of donor atom indices 
 
 
 - enumerate_acceptor_acceptor_states()[source]¶
- Enumerate states where water is donating to two acceptors at the same time - Returns
- List of water states 
- Return type
- List[_WaterState] 
 
 - enumerate_donor_donor_states()[source]¶
- Enumerate states where water is accepting from two donors at the same time - Returns
- List of water states 
- Return type
- List[_WaterState] 
 
 - enumerate_acceptor_states()[source]¶
- Enumerate states where water is donating to a single acceptor - Returns
- List of water states 
- Return type
- List[_WaterState] 
 
 
- class schrodinger.protein.assignment.NetworkSolver(cluster, interact, upper_bound)[source]¶
- Bases: - object- Wrapper around toulbar2 that exactly solves the hydrogen bond network problem - PRECISION = 5¶
 - MAX_TIME = 30¶
 - TOULBAR2 = 'toulbar2'¶
 - __init__(cluster, interact, upper_bound)[source]¶
- Parameters
- cluster (ProtAssign.hbond_cluster) – Hydrogen bond network cluster that will be optimized 
- interact (Dict[int, Dict[int, bool]]) – Changeable interaction lookup table. 
- upper_bound (float) – Upper energy bound for the network energy. Required for toulbar2 
 
 
 - setup_toulbar2_inputs()[source]¶
- Setup the input file for toulbar2. Essentially the file contains data on the variables involved, and the self and pair scores, all in a json file. 
 - parse_and_delete_output_file(out)[source]¶
- Parse and then delete toulbar2 output file that contains the chosen state for each changeable 
 - optimal_solution()[source]¶
- Run toulbar2 to get the optimal solution - Returns
- Optimal state combination. If toulbar2 fails returns None 
- Return type
- List[int] or None 
 
 
- class schrodinger.protein.assignment.ProtAssign(ct, interactive=False, do_flips=True, asl='', noprot_asl='', atoms=[], use_xtal=False, sample_waters=True, sample_acids=True, freeze_existing=False, include_initial=False, max_comb=10000, num_sequential_cycles=30, max_cluster_size=None, seed: Optional[int] = None, 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, ligand_sts=None, include_epik_states=False)[source]¶
- Bases: - object- class changeable(ct, iatom)[source]¶
- Bases: - object- asl = 'none'¶
 - max_hbond_distance = 3.5¶
 - hbond_min_angle = 150.0¶
 - hbond_heavy_min_angle = 80.0¶
 - hbond_heavy_max_angle = 140.0¶
 - assign_state_gap(atom, state_gaps, report_gaps=True)[source]¶
- Write the Gap in energy between the lowest energy state and the state with different protonation states or heavy atom positions to the output ct - Parameters
- atom (structure.StructureAtom) – The atom that should have properties written to it 
- state_gaps (A dictionary where the keys are strings (state names) and the values are floats (energy in kcals of the lowest energy combination that has that state)) – The energy gaps between states for a given changeable position. 
- report_gaps (bool) – Whether to report the gaps to the log file as well 
 
 
 - update_atom_indices(ct: schrodinger.structure._structure.Structure, new_indices: Dict[int, int])[source]¶
 - get_new_index(ct: schrodinger.structure._structure.Structure, atom_index: int, new_indices: Dict[int, int])[source]¶
 - get_close_interactors(ct, dcell)[source]¶
- Return acceptors, donors and clashers that are close to this changeable heavy atoms. - Parameters
- ct (Structure) – Structure with annotated atoms signfying interaction class 
- dcell (DistanceCell) – Distance cell to query for neighboring atoms 
 
- Returns
- List of acceptors, donor heavy-hydrogen pairs, and clashers atom indices 
- Return type
- tuple[list[int], list[tuple[int, int]], list[int]] 
 
 
 - class ligand_changeable(ct, iatom)[source]¶
- Bases: - schrodinger.protein.assignment.ProtAssign.changeable- type = 'LIGAND'¶
 - property nstates¶
 - pre_treat_1(ct)[source]¶
- Add all the protonation states to the ct. After this method the ct is a superposition of ligand states. 
 - pre_treat_2(ct)[source]¶
- Further annotates structure and stores data for bookkeeping and improved computational performance. Assumes pre_treat_1 has been called before. 
 - enumerate_states(ct, acceptors, donors, pH, do_flips=True, include_initial=False)[source]¶
- Enumerate ligand states - The input structure is supposed to have its different protonation states available as a superposition, i.e. all protonation states of the ligand are fully integrated into the structure. - A ligand state is a protonation state of the ligand and a combination of non-shared hydrogen coordinates. A non-shared hydrogen is a rotatable hydrogen that is only present in a subset of ligand protonation states. 
 - get_rotatable_id_to_atom(ct, hetid: int) Dict[int, int][source]¶
- Return a dictionary that maps a rotatable index to its atom index 
 - update_hydrogen_xyz_from_state(ct, istate: int)[source]¶
- Update the non-shared rotatable hydrogen coordinates for a specific state. - Returns None but updates xyz coordinates of non-shared rotatable hydrogens. 
 - get_state_sites(ct, istate: int) Tuple[List[int], List[Tuple[int, int]], List[int], int][source]¶
- Updates non-shared rotatable hydrogen positions and returns atom indices for acceptors, donors, clashers and (unused) charge 
 - assign_state(ct, istate, add_labels=True, label_pkas=False, state_gaps=None, verbose=False) List[int][source]¶
- Sets the ligand to a certain state and internally updates atom indices. Returns list of atom indices that need to be deleted to obtain the right state. 
 - update_atom_indices(ct, new_indices: Dict[int, int])[source]¶
- Update stored atom indices for bookkeeping. 
 - get_penalty(istate: int) float[source]¶
- Get penalty for ligand state, which is currently fully defined by the ligand protonation state. Return 0 if no penalty. 
 - add_current_to_states(ct)¶
 - asl = 'none'¶
 - assign_state_gap(atom, state_gaps, report_gaps=True)¶
- Write the Gap in energy between the lowest energy state and the state with different protonation states or heavy atom positions to the output ct - Parameters
- atom (structure.StructureAtom) – The atom that should have properties written to it 
- state_gaps (A dictionary where the keys are strings (state names) and the values are floats (energy in kcals of the lowest energy combination that has that state)) – The energy gaps between states for a given changeable position. 
- report_gaps (bool) – Whether to report the gaps to the log file as well 
 
 
 - change_empirical_pka(pH)¶
 - change_pka(pka, pH)¶
 - get_close_interactors(ct, dcell)¶
- Return acceptors, donors and clashers that are close to this changeable heavy atoms. - Parameters
- ct (Structure) – Structure with annotated atoms signfying interaction class 
- dcell (DistanceCell) – Distance cell to query for neighboring atoms 
 
- Returns
- List of acceptors, donor heavy-hydrogen pairs, and clashers atom indices 
- Return type
- tuple[list[int], list[tuple[int, int]], list[int]] 
 
 - get_new_index(ct: schrodinger.structure._structure.Structure, atom_index: int, new_indices: Dict[int, int])¶
 - 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)¶
 - swap_atoms(ct, atom1, atom2)¶
 
 - class amide_changeable(ct, iatom)[source]¶
- Bases: - schrodinger.protein.assignment.ProtAssign.changeable- This is the primary amide -NH2 group of ASN and GLN residues. - asl = '((res.ptype "ASN " AND atom.ptype " CG ") OR (res.ptype "GLN " AND atom.ptype " CD "))'¶
 - OXYGEN_PDBNAMES = [' OD1', ' OE1']¶
 - NITROGEN_PDBNAMES = [' ND2', ' NE2']¶
 - CARBON_PDBNAMES = [' CG ', ' CD ']¶
 - enumerate_states(ct, acceptors, donors, pH, do_flips=True, include_initial=False)[source]¶
- Generate states for amides - Max 2 states are generated by swapping the oxygen and nitrogen and readjusting the hydrogens to the nitrogen. - Parameters
- ct (Structure) – Structure to generate states for 
- do_flips (bool) – Include the flipped state of the amide 
 
 - Other parameters are not used 
 - set_state_coordinates(ct, istate)[source]¶
- Set coordinates of nitrogen, oxygen, and hydrogens to pre-calculated state coordinates. 
 - assign_state(ct, istate, add_labels=True, label_pkas=False, state_gaps=None, verbose=False)[source]¶
- Assign state to amide residue. - The state is changed by setting the coordinates of the nitrogen, oxygen and 2 hydrogens to pre-calculated positions. 
 - get_state_sites(ct, istate)[source]¶
- Return state sites consisting of acceptors, donors, clashers and charge. 
 - add_current_to_states(ct)¶
 - assign_state_gap(atom, state_gaps, report_gaps=True)¶
- Write the Gap in energy between the lowest energy state and the state with different protonation states or heavy atom positions to the output ct - Parameters
- atom (structure.StructureAtom) – The atom that should have properties written to it 
- state_gaps (A dictionary where the keys are strings (state names) and the values are floats (energy in kcals of the lowest energy combination that has that state)) – The energy gaps between states for a given changeable position. 
- report_gaps (bool) – Whether to report the gaps to the log file as well 
 
 
 - change_empirical_pka(pH)¶
 - change_pka(pka, pH)¶
 - get_close_interactors(ct, dcell)¶
- Return acceptors, donors and clashers that are close to this changeable heavy atoms. - Parameters
- ct (Structure) – Structure with annotated atoms signfying interaction class 
- dcell (DistanceCell) – Distance cell to query for neighboring atoms 
 
- Returns
- List of acceptors, donor heavy-hydrogen pairs, and clashers atom indices 
- Return type
- tuple[list[int], list[tuple[int, int]], list[int]] 
 
 - get_new_index(ct: schrodinger.structure._structure.Structure, atom_index: int, new_indices: Dict[int, int])¶
 - 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)¶
 - swap_atoms(ct, atom1, atom2)¶
 
 - class histidine_changeable(ct, iatom)[source]¶
- Bases: - schrodinger.protein.assignment.ProtAssign.changeable- Imidazole group of Histidine residues. - asl = '((res.ptype "HIS ","HID ","HIE ","HIP ")) AND ((atom.ptype " CG "))'¶
 - enumerate_states(ct, acceptors, donors, pH, do_flips=True, include_initial=False)[source]¶
- Enumerate histidine states and create penalties for certain states. - Parameters
- ct (Structure) – Structure to generate states for 
- acceptors (List[int]) – List of acceptor atom indices 
- donors (List[Tuple[int, int]]) – List of donor pair atom indices 
- pH (float) – pH of system to determine pH-related penalties 
- do_flips (bool) – Include flipped histidine states in pool 
- include_initial – Does nothing here 
 
 
 - assign_state(ct, istate, add_labels=True, label_pkas=False, state_gaps=None, verbose=False)[source]¶
 - add_current_to_states(ct)¶
 - assign_state_gap(atom, state_gaps, report_gaps=True)¶
- Write the Gap in energy between the lowest energy state and the state with different protonation states or heavy atom positions to the output ct - Parameters
- atom (structure.StructureAtom) – The atom that should have properties written to it 
- state_gaps (A dictionary where the keys are strings (state names) and the values are floats (energy in kcals of the lowest energy combination that has that state)) – The energy gaps between states for a given changeable position. 
- report_gaps (bool) – Whether to report the gaps to the log file as well 
 
 
 - get_close_interactors(ct, dcell)¶
- Return acceptors, donors and clashers that are close to this changeable heavy atoms. - Parameters
- ct (Structure) – Structure with annotated atoms signfying interaction class 
- dcell (DistanceCell) – Distance cell to query for neighboring atoms 
 
- Returns
- List of acceptors, donor heavy-hydrogen pairs, and clashers atom indices 
- Return type
- tuple[list[int], list[tuple[int, int]], list[int]] 
 
 - get_new_index(ct: schrodinger.structure._structure.Structure, atom_index: int, new_indices: Dict[int, int])¶
 - hbond_heavy_max_angle = 140.0¶
 - hbond_heavy_min_angle = 80.0¶
 - hbond_min_angle = 150.0¶
 - max_hbond_distance = 3.5¶
 - pre_treat(ct)¶
 - swap_atoms(ct, atom1, atom2)¶
 
 - class carboxyl_changeable(ct, iatom)[source]¶
- Bases: - schrodinger.protein.assignment.ProtAssign.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, state_gaps=None, verbose=False)[source]¶
 - add_current_to_states(ct)¶
 - assign_state_gap(atom, state_gaps, report_gaps=True)¶
- Write the Gap in energy between the lowest energy state and the state with different protonation states or heavy atom positions to the output ct - Parameters
- atom (structure.StructureAtom) – The atom that should have properties written to it 
- state_gaps (A dictionary where the keys are strings (state names) and the values are floats (energy in kcals of the lowest energy combination that has that state)) – The energy gaps between states for a given changeable position. 
- report_gaps (bool) – Whether to report the gaps to the log file as well 
 
 
 - get_close_interactors(ct, dcell)¶
- Return acceptors, donors and clashers that are close to this changeable heavy atoms. - Parameters
- ct (Structure) – Structure with annotated atoms signfying interaction class 
- dcell (DistanceCell) – Distance cell to query for neighboring atoms 
 
- Returns
- List of acceptors, donor heavy-hydrogen pairs, and clashers atom indices 
- Return type
- tuple[list[int], list[tuple[int, int]], list[int]] 
 
 - get_new_index(ct: schrodinger.structure._structure.Structure, atom_index: int, new_indices: Dict[int, int])¶
 - hbond_heavy_max_angle = 140.0¶
 - hbond_heavy_min_angle = 80.0¶
 - hbond_min_angle = 150.0¶
 - max_hbond_distance = 3.5¶
 - pre_treat(ct)¶
 - swap_atoms(ct, atom1, atom2)¶
 
 - class rotatable_changeable(ct, iatom)[source]¶
- Bases: - schrodinger.protein.assignment.ProtAssign.changeable- 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" ))'¶
 - type = 'ROTATABLE'¶
 - assign_state(ct, istate, add_labels=True, label_pkas=False, state_gaps=None, verbose=False)[source]¶
 - assign_state_gap(atom, state_gaps, report_gaps=True)¶
- Write the Gap in energy between the lowest energy state and the state with different protonation states or heavy atom positions to the output ct - Parameters
- atom (structure.StructureAtom) – The atom that should have properties written to it 
- state_gaps (A dictionary where the keys are strings (state names) and the values are floats (energy in kcals of the lowest energy combination that has that state)) – The energy gaps between states for a given changeable position. 
- report_gaps (bool) – Whether to report the gaps to the log file as well 
 
 
 - get_close_interactors(ct, dcell)¶
- Return acceptors, donors and clashers that are close to this changeable heavy atoms. - Parameters
- ct (Structure) – Structure with annotated atoms signfying interaction class 
- dcell (DistanceCell) – Distance cell to query for neighboring atoms 
 
- Returns
- List of acceptors, donor heavy-hydrogen pairs, and clashers atom indices 
- Return type
- tuple[list[int], list[tuple[int, int]], list[int]] 
 
 - get_new_index(ct: schrodinger.structure._structure.Structure, atom_index: int, new_indices: Dict[int, int])¶
 - hbond_heavy_max_angle = 140.0¶
 - hbond_heavy_min_angle = 80.0¶
 - hbond_min_angle = 150.0¶
 - max_hbond_distance = 3.5¶
 - pre_treat(ct)¶
 - swap_atoms(ct, atom1, atom2)¶
 
 - class amine_changeable(ct, iatom)[source]¶
- Bases: - schrodinger.protein.assignment.ProtAssign.changeable- asl = '((res.ptype "LYS ","LYN ") AND (atom.ptype " NZ "))'¶
 - enumerate_states(ct, acceptors, donors, pH, do_flips=True, sample_neutral_states=False, include_initial=False)[source]¶
- Generate states for lysines. - States are generated by rotating hydrogens for acceptor/donor interactions and by optionally including the neutral state. - Parameters
- ct (Structure) – Structure to generate states for 
- acceptors (List[int]) – List of acceptor atom indices 
- donors (List[(int, int)]) – List of donor atom indices 
- pH (float) – pH of system 
- do_flips (bool) – Does nothing 
- sample_neutral_states (bool) – Include neutral states. Since PROPKA’s pKa prediction is unreliable for Lys, currently we have no method of confidently assess whether it is neutral. So it’s turned off by default. 
- include_initial (bool) – Include the initial state of the Lys 
 
 
 - assign_state(ct, istate, add_labels=True, label_pkas=False, state_gaps=None, verbose=False)[source]¶
 - add_current_to_states(ct)¶
 - assign_state_gap(atom, state_gaps, report_gaps=True)¶
- Write the Gap in energy between the lowest energy state and the state with different protonation states or heavy atom positions to the output ct - Parameters
- atom (structure.StructureAtom) – The atom that should have properties written to it 
- state_gaps (A dictionary where the keys are strings (state names) and the values are floats (energy in kcals of the lowest energy combination that has that state)) – The energy gaps between states for a given changeable position. 
- report_gaps (bool) – Whether to report the gaps to the log file as well 
 
 
 - get_adjustable_atoms()¶
 - get_close_interactors(ct, dcell)¶
- Return acceptors, donors and clashers that are close to this changeable heavy atoms. - Parameters
- ct (Structure) – Structure with annotated atoms signfying interaction class 
- dcell (DistanceCell) – Distance cell to query for neighboring atoms 
 
- Returns
- List of acceptors, donor heavy-hydrogen pairs, and clashers atom indices 
- Return type
- tuple[list[int], list[tuple[int, int]], list[int]] 
 
 - get_new_index(ct: schrodinger.structure._structure.Structure, atom_index: int, new_indices: Dict[int, int])¶
 - hbond_heavy_max_angle = 140.0¶
 - hbond_heavy_min_angle = 80.0¶
 - hbond_min_angle = 150.0¶
 - max_hbond_distance = 3.5¶
 - pre_treat(ct)¶
 - swap_atoms(ct, atom1, atom2)¶
 
 - class water_changeable(ct, iatom)[source]¶
- Bases: - schrodinger.protein.assignment.ProtAssign.changeable- asl = '(water) AND (atom.ele O)'¶
 - redundancy_tolerance = 0.5¶
 - property nstates¶
- Return number of enumerated states 
 - enumerate_states(ct, acceptors, donors, pH, do_flips=True, include_initial=False)[source]¶
- Generate discrete states for water, where a state is defined by the coordinates of its two hydrogens. 
 - assign_state(ct, istate, add_labels=True, label_pkas=False, state_gaps=None, verbose=False)[source]¶
 - assign_state_gap(atom, state_gaps, report_gaps=True)¶
- Write the Gap in energy between the lowest energy state and the state with different protonation states or heavy atom positions to the output ct - Parameters
- atom (structure.StructureAtom) – The atom that should have properties written to it 
- state_gaps (A dictionary where the keys are strings (state names) and the values are floats (energy in kcals of the lowest energy combination that has that state)) – The energy gaps between states for a given changeable position. 
- report_gaps (bool) – Whether to report the gaps to the log file as well 
 
 
 - change_empirical_pka(pH)¶
 - change_pka(pka, pH)¶
 - get_close_interactors(ct, dcell)¶
- Return acceptors, donors and clashers that are close to this changeable heavy atoms. - Parameters
- ct (Structure) – Structure with annotated atoms signfying interaction class 
- dcell (DistanceCell) – Distance cell to query for neighboring atoms 
 
- Returns
- List of acceptors, donor heavy-hydrogen pairs, and clashers atom indices 
- Return type
- tuple[list[int], list[tuple[int, int]], list[int]] 
 
 - get_new_index(ct: schrodinger.structure._structure.Structure, atom_index: int, new_indices: Dict[int, int])¶
 - 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)¶
 
 - class hbond_cluster[source]¶
- Bases: - object- optimize(ct: schrodinger.structure._structure.Structure, interact: 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, propka_pH: float = 7.0, annotated_ct: Optional[schrodinger.structure._structure.Structure] = None)[source]¶
- Optimize hydrogen bond network and protonation states of changeables in this cluster - Parameters
- ct – Structure containing changeables to optimize 
- interact – 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 
- propka_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. 
 
 
 - solve_network_exact_and_diversify(ct, interact, ncombinations, delta_energy=2.0)[source]¶
- Solve the network exact - Parameters
- ct (Structure) – Structure 
- interact (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
 
 - pre_score_self(ct)[source]¶
- Calculate the self score for each state. Interactions are calculated between the changeable and its static environment. 
 - score_pair(ct, iacceptors, idonors, iclashers, icharge, jacceptors, jdonors, jclashers, jcharge, use_xtal=False)[source]¶
 - score_acceptor_acceptor(ct: schrodinger.structure._structure.Structure, iacceptor: int, jacceptor: int, use_xtal=False) float[source]¶
- Scoring function for acceptor-acceptor interactions. - These interactions are considered worse than hydrogen clashes, and its base penalty is thus higher. It is set to 70 as it makes the scoring function more robust for the Asn and Gln state of 2X9E and 3UZA that interact with the ligand. No other optimization has been performed. - Returns
- Score 
 
 - static score_metal_donor(ct: schrodinger.structure._structure.Structure, metal: Tuple[int, int], donor: Tuple[int, int], use_xtal=False) float[source]¶
- Score a metal-donor interaction. Donors should not be pointing towards metals. If so, this will result in a penalty 
 - static calculate_distance_term(distance)[source]¶
- Return distance dependent part of the hydrogen-bond potential functions. 
 - static calculate_angle_term(angle)[source]¶
- 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 
 
 - score_sequentially(ct: schrodinger.structure._structure.Structure, interact: Dict[int, Set[int]], num_sequential_cycles: int)[source]¶
- 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 
- interact – Interaction lookup table 
- num_sequential_cycles – Number of cycles of randomization and optimization to conduct 
 
 
 - expand_solutions(ct, interact)[source]¶
- 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, interact)[source]¶
- 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, interact, comb, problem_cutoff=50.0)[source]¶
- 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, interact, comb, problem_cutoff=50.0)[source]¶
- This iterates the combination ‘comb’ to convergence. Maximum of 10 cycles. 
 - create_hybrid(local_combinations: List[Tuple[Tuple[List[int], float, float], List[int]]], interact: Dict[int, Set[int]], random_scaffold: bool = False) Optional[List[int]][source]¶
- 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. 
- interact – Interaction lookup table for changeables 
- random_scaffold – Choose a random starting combination, otherwise start with the first combiation 
 
 
 - assign_combination(ct, icombination, add_labels, label_pkas, verbose=False)[source]¶
- 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)[source]¶
- 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 
 
 
 - __init__(ct, interactive=False, do_flips=True, asl='', noprot_asl='', atoms=[], use_xtal=False, sample_waters=True, sample_acids=True, freeze_existing=False, include_initial=False, max_comb=10000, num_sequential_cycles=30, max_cluster_size=None, seed: Optional[int] = None, 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, ligand_sts=None, include_epik_states=False)[source]¶
 - annotate_structure(ct)[source]¶
- Annotate atoms in structure by their interaction class and whether or not they are static - Internally updates the acceptors, donors and clashers attributes 
 - enumerate_changeable_states(ct)[source]¶
- Enumerate all states for each changeable. Crystal symmetry mates are taken into account if requested. 
 - assign_best_combinations(ct, last_time=False)[source]¶
- Assign the best combinations to the ct and report output - Parameters
- ct (schrodinger.Structure) – The structure to operate on 
- last_time (bool) – Whether or not this is the last time through when we should be extra verbose 
 
 
 
- schrodinger.protein.assignment.annotate_atom_indices(ct)[source]¶
- Add atom index as an atom property to each atom 
- schrodinger.protein.assignment.identify_species(ct, species: List[Type], target_atoms) List[schrodinger.protein.assignment.ProtAssign.changeable][source]¶
- Identify all changeables, i.e. elements in the network that can be changed apart from ligand changeables. 
- schrodinger.protein.assignment.identify_ligand_changeables(ct, ligand_sts: List[schrodinger.structure._structure.Structure]) List[schrodinger.protein.assignment.ProtAssign.ligand_changeable][source]¶
- Identify ligand changeables given a list of structures. - Ligand changeables are identified by comparing the residue ID of given ligand structures with residues that are present in the Structure. 
- Check if changeable is part of ligand and whether it can be its own changeable or needs to be sampled within the ligand states. - Returns
- True if changeable is a non-shared rotatable across ligand states, False otherwise 
 
- schrodinger.protein.assignment.update_rotatable_changeable_indices(ct, iatoms: List[int], changeables: List[schrodinger.protein.assignment.ProtAssign.rotatable_changeable])[source]¶
- Update the atom indices of the shared changeables, in this case specifically for rotatables. - Parameters
- ct – Structure 
- Current_state_indices
- Ligand atom indices of current state 
 
- Given a list of changeables, filter rotatable_changeable instances if they are not shared across all ligand states, as these nonshared rotatables will be dealed with by the ligand_changeable itself. 
- schrodinger.protein.assignment.annotate_ligand_atoms(ligand_sts: List[schrodinger.structure._structure.Structure], ligand_id: str)[source]¶
- Annotate atoms of ligand structures with an ID and state ID 
- schrodinger.protein.assignment.update_ligand_rotatables_annotation(ct, iatoms: List[int])[source]¶
- Update atom properties of rotatable hydrogens in the ligand reindexing them 
- schrodinger.protein.assignment.add_ligand_sts(ct, ligand_sts: List[schrodinger.structure._structure.Structure])[source]¶
- Extend structure with ligand states - Checks if a ligand state is already part of the structure to determine whether to add based on specific atom properties. 
- schrodinger.protein.assignment.get_ligand_atom_indices(ct, ligand_id: str) List[int][source]¶
- Return atom indices annotated by ligand_id 
- schrodinger.protein.assignment.further_annotate_ligand_atoms(ct, iatoms: List[int])[source]¶
- Further annotate ligand atoms notably hydrogen Assumes ligand atoms are annotated already with s_pa_ligand_id and i_pa_ligand_het 
- schrodinger.protein.assignment.group_ligand_het_states(ct, iatoms: List[int]) Dict[int, List[int]][source]¶
- Return ligand atom indices grouped by het 
- schrodinger.protein.assignment.get_ligand_interactors(ct, iatoms: List[int])[source]¶
- Get ligand interactors while excluding shared acceptors/donors 
- schrodinger.protein.assignment.annotate_ligand_rotatable_hydrogens(ct, ligand_iatoms: List[int])[source]¶
- Annotate rotatable hydrogens of the ligand. - These are either hydrogens that are shared with a rotatable_changeable or rotatable in a subset of ligand states 
- schrodinger.protein.assignment.extract_epik_states(ct, include_initial=False) List[schrodinger.structure._structure.Structure][source]¶
- Extract Epik embedded states - Epik states are embedded into a structure property during the PPW pipeline. States are extracted and returned. 
- schrodinger.protein.assignment.identify_all_hbonders(ct)[source]¶
- Identify all acceptor, donors and clashers in a structure 
- schrodinger.protein.assignment.get_dihedral_atoms(ct: schrodinger.structure._structure.Structure, h: int) List[int][source]¶
- Get atoms to define a dihedral angle given a hydrogen atom index Return list is smaller than 4 elements if dihedral cannot be determined.