390 likes | 404 Views
Andrew Leaver-Fay, PhD Baker Lab University of Washington. mini. Speed. Flexibility. Usability. O(N 2 ). Past. O(N) & O(N lg N). Present. O(k). Future. Speed. Flexibility. Usability. Speed. Flexibility. Usability. Speed. Flexibility. Usability. Speed. Flexibility. Usability.
E N D
Andrew Leaver-Fay, PhD Baker Lab University of Washington
Speed. Flexibility. Usability. O(N2) Past O(N) & O(Nlg N) Present O(k) Future
Speed. Flexibility. Usability. O(N2) Past O(N) & O(Nlg N) Present O(k) Future
Model Protocol Pose pose; ScoreFunction * sfxn; Mover * mover; … MonteCarlo MC( sfxn ); … for i = 1 to X mover->apply( pose ); MC.boltzman( pose ); // 1 sfxn call, 1 pose copy
Model Protocol Pose pose; ScoreFunctionOP sfxn; MoverOP mover; … MonteCarlo MC( sfxn ); … for i = 1 to X mover->apply( pose ); MC.boltzman( pose ); // 1 sfxn call, 1 pose copy
a b a b O(N2) O(NlgN) Scoring • Neighbor detection: O(N2) O(N lg N) • NxN tables sparse graph • Score terms left to themselves ScoreFunction evaluates terms for neighboring residue pairs* • O(N2) terms replaced with O(N) equivalents O(NlgN) O(N) O(N + k) O(N)
EnergyMethod Hierarchy Count Range Context Dependcy
Scoring Real ScoreFunction::operator()( Pose & pose ) const pose.update_residue_neighbors( info_ ); setup_for_scoring( pose ); for e = {u,v } pose.energy_graph() eval_cd_2b( pose.res(u), pose.res(v) ); if ( pose.moved_relative( u, v ) ) total += eval_ci_2b( pose.res(u), pose.res(v), e); else total += e; total += eval_cd_1b( pose ); total += eval_ci_1b( pose ); finalize( total ); return total;
ScoreFunction as a Container • Holds EnergyMethods that the user wants evaluated • Input to • minimizer • pack_rotamers • rotamer_trials
ScoreFunction as a Container • Holds EnergyMethods that the user wants evaluated • Input to • minimizer • pack_rotamers • rotamer_trials
ScoreFunction as a Container • Holds EnergyMethods that the user wants evaluated • Input to • minimizer • pack_rotamers • rotamer_trials • OnTheFlyInteractionGraph • GreenPacker
GreenPacker Reuses RPEs for groups of residues that aren’t moving wrt each other. For Example: Fixed-backbone ligand docking Fixed backbone protein docking
GreenPacker Reuses RPEs for groups of residues that aren’t moving wrt each other. Prot/Prot CI 2B energies reused Prot/Prot CI 2B energies reused Prot/Prot CD 2B energies freshlycalculated Prot/Prot CD 2B energies freshlycalculated All Prot/Prot 2B energies freshly calculated
GreenPacker Reuses RPEs for groups of residues that aren’t moving wrt each other. Prot/Prot CI 2B energies reused Prot/Prot CI 2B energies reused Prot/Prot CD 2B energies freshlycalculated Prot/Prot CD 2B energies freshlycalculated All Prot/Prot 2B energies freshly calculated
GreenPacker Reuses RPEs for groups of residues that aren’t moving wrt each other.
GreenPacker Reuses RPEs for groups of residues that aren’t moving wrt each other.
GreenPacker Reuses RPEs for groups of residues that aren’t moving wrt each other.
GreenPacker • User identifies residue groups that remain fixed wrt each other • 1st packing: • save rotamer internal geometry • save CI 2B energies • Subsequent packings: • Find correspondence between original rotamers and new rotamers based on internal geometry • Intra-group: • Reuse saved CI 2B energies for rotamers that have a correspondence • Compute fresh CI 2B energies for those that don’t • Compute CD 2B energies • Inter-group: • Compute all 2B energies
ScoreFunction as a Container • Holds EnergyMethods that the user wants evaluated • Input to • minimizer • pack_rotamers • rotamer_trials • OnTheFlyInteractionGraph • GreenPacker
ScoreFunction as a Container • Holds EnergyMethods that the user wants evaluated • Input to • minimizer • pack_rotamers • rotamer_trials • OnTheFlyInteractionGraph • GreenPacker • Enzyme Multi State Interaction Graph* • LoopScoreFunction* • LoopPacker* • Sidechain Minimizer*
Minimization • update_domain_map: O(N) • setup_for_derivatives: O(N) • set_DOF + refold: O(N) • eval_atom_derivative: O(k) -- (Phil?) • score: O(N + k) Efficient to minimize all residues, inefficient to minimize one residue
Output Sensitive Refold Problem: after m updates to the DOFs of an atom tree, refold. k = # atoms that move O(N+m): refold from root O(m2+k) (complicated) O(k+m): DFS -- Snoeyink set_chi
Output Sensitive Refold DFS: Record each atom with a DOF change -- O(m) Mark each atom with a DOF change as “unreached” Start a DFS from each unvisited atom, stopping at atoms that have already been visited in the DFS. Mark reached atoms -- O(k) Refold from unreached atoms with DOF changes
Output Sensitive Refold DFS: Record each atom with a DOF change -- O(m) Mark each atom with a DOF change as “unreached” Start a DFS from each unvisited atom, stopping at atoms that have already been visited in the DFS. Mark reached atoms -- O(k) Refold from unreached atoms with DOF changes
Output Sensitive Refold DFS: Record each atom with a DOF change -- O(m) Mark each atom with a DOF change as “unreached” Start a DFS from each unvisited atom, stopping at atoms that have already been visited in the DFS. Mark reached atoms -- O(k) Refold from unreached atoms with DOF changes
Output Sensitive Refold DFS: Record each atom with a DOF change -- O(m) Mark each atom with a DOF change as “unreached” Start a DFS from each unvisited atom, stopping at atoms that have already been visited in the DFS. Mark reached atoms -- O(k) Refold from unreached atoms with DOF changes
Loop Modeling Example Step 33 Step 34
O(k) minimization • “Sidechain minimizer” • Rotamer trials w/ minimization • Pre-minimize rotamers • Pre-minimize rotamer pairs* • Without modifying core::pack! • class RotamerOperation • class RotamerSetOperation
When is mini done? • R++ functionality mini functionality • Release?
Plug for Roland Dunbrack’s Talk Tomorrow -0.2 0 0.4
Acknowledgements Mini Community David Baker Brian Kuhlman Jeff Gray