schrodinger.protein.protassign.network_solver module¶
This module contains NetworkSolver, a ProtAssign wrapper around toulbar2 module.
Copyright Schrodinger, LLC. All rights reserved.
- class schrodinger.protein.protassign.network_solver.NetworkSolver(cluster, interact, upper_bound)¶
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)¶
- 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()¶
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)¶
Parse and then delete toulbar2 output file that contains the chosen state for each changeable
- optimal_solution()¶
Run toulbar2 to get the optimal solution
- Returns
Optimal state combination. If toulbar2 fails returns None
- Return type
List[int] or None
- explore_solutions(upper_bound=None, number=1000)¶
Run toulbar2 to greedily obtain a number of solutions with an energy below a certain upper bound. Note that there are no guarantees here about diversity, though each solution will be unique.