Rosetta
|
Represent and solve a kinematic closure problem. More...
#include <ClosureProblem.hh>
Classes | |
class | Memento |
Save the current state of the closure problem. This is meant to facilitate undoing rejected perturbations when necessary. More... | |
Public Member Functions | |
ClosureProblem () | |
Default constructor. More... | |
~ClosureProblem () override | |
Default destructor. More... | |
void | frame (Pose const &pose, Loop const &loop, pivot_pickers::PivotPickerOP pivot_picker) |
Choose pivots and copy coordinate information into the problem. More... | |
SolutionList | solve () const |
Return every possible solution to this problem. More... | |
void | restore (Pose &pose) const |
Undo any changes made to the pose during the last move. More... | |
void | perturb_phi (core::Size residue, Real value, AngleUnit unit) |
Perturb the given phi angle. More... | |
void | perturb_psi (core::Size residue, Real value, AngleUnit unit) |
Perturb the given psi angle. More... | |
void | perturb_omega (core::Size residue, Real value, AngleUnit unit) |
Perturb the given omega angle. More... | |
void | perturb_n_ca_c (core::Size residue, Real value, AngleUnit unit) |
Perturb the N-CA-C bond angle in the given residue. More... | |
void | perturb_ca_c_n (core::Size residue, Real value, AngleUnit unit) |
Perturb the CA-C-N bond angle in the given residue. More... | |
void | perturb_c_n_ca (core::Size residue, Real value, AngleUnit unit) |
Perturb the C-N-CA bond angle in the given residue. More... | |
void | perturb_n_ca (core::Size residue, Real value) |
Perturb the N-CA bond length in the given residue. More... | |
void | perturb_ca_c (core::Size residue, Real value) |
Perturb the CA-C bond length in the given residue. More... | |
void | perturb_c_n (core::Size residue, Real value) |
Perturb the C-N bond length in the given residue. More... | |
ParameterList & | perturb_torsions () |
Provide non-const access to the raw torsion angle list. More... | |
ParameterList & | perturb_angles () |
Provide non-const access to the raw bond angle list. More... | |
ParameterList & | perturb_lengths () |
Provide non-const access to the raw bond length list. More... | |
core::Size | first_residue () const |
Return the index of the first pivot residue. More... | |
core::Size | cut_residue () const |
Return the index of the second pivot residue. More... | |
core::Size | last_residue () const |
Return the index of the third pivot residue. More... | |
core::Size | num_residues () const |
Return the number of residues in the loop. More... | |
core::Size | num_atoms () const |
Return the number of atoms in the loop. More... | |
Real | phi (core::Size residue, AngleUnit unit) const |
Return the current value of the given phi angle. More... | |
Real | psi (core::Size residue, AngleUnit unit) const |
Return the current value of the given psi angle. More... | |
Real | omega (core::Size residue, AngleUnit unit) const |
Return the current value of the given omega angle. More... | |
Real | n_ca_c (core::Size residue, AngleUnit unit) const |
Return the current value of the given N-CA-C bond angle. More... | |
Real | ca_c_n (core::Size residue, AngleUnit unit) const |
Return the current value of the given CA-C-N bond angle. More... | |
Real | c_n_ca (core::Size residue, AngleUnit unit) const |
Return the current value of the given C-N-CA bond angle. More... | |
Real | n_ca (core::Size residue) const |
Return the current value of the given N-CA bond length. More... | |
Real | ca_c (core::Size residue) const |
Return the current value of the given CA-C bond length. More... | |
Real | c_n (core::Size residue) const |
Return the current value of the given C-N bond length. More... | |
bool | is_pivot_residue (core::Size residue) const |
Return true if the given residue is a pivot. More... | |
bool | is_nonpivot_residue (core::Size residue) const |
Return true if the given residue is not a pivot. More... | |
Loop | pivot_loop () const |
Return a loop specifying the three pivot residues. More... | |
IndexList | residues () const |
Return the indices of every residue in the loop. More... | |
IndexList | pivot_residues () const |
Return the indices of all three pivot residues. More... | |
IndexList | nonpivot_residues () const |
Return the indices of every nonpivot residue in the loop. More... | |
IndexList | pivot_atoms () const |
Return the indices of all three pivot atoms. More... | |
void | perturbed_sequence (utility::vector1< std::string > const &values) |
Set AA sequence from left pivot to the right pivot (including the pivots) More... | |
utility::vector1< std::string > | perturbed_sequence () const |
Get perturbed AA sequence from left pivot to the right pivot (including the pivots) More... | |
utility::vector1< std::string > | unperturbed_sequence () const |
Get unperturbed AA sequence from left pivot to the right pivot (including the pivots) More... | |
bool | sequence_mutated () const |
Return if mutations have been made to the sequence. More... | |
Private Member Functions | |
void | extract_cartesian_coordinates (Pose const &pose, CoordinateList &atom_xyzs) const |
Extract cartesian coordinates for those backbone atoms which are relevant to the closure algorithm. This includes all atoms from within the loop and from the two residues on either side of the loop. More... | |
void | extract_internal_coordinates (CoordinateList const &atom_xyzs, ParameterList &bond_lengths, ParameterList &bond_angles, ParameterList &torsion_angles) const |
Extract torsion angles, bond angles, and bond lengths for those backbone atoms which are relevant to the closure algorithm. More... | |
void | extract_internal_coordinates (Pose const &pose, ParameterList &bond_lengths, ParameterList &bond_angles, ParameterList &torsion_angles) const |
void | apply_internal_coordinates (ParameterList const &bond_lengths, ParameterList const &bond_angles, ParameterList const &torsion_angles, Pose &pose) const |
Apply the given internal coordinates to the given pose. More... | |
void | frame_lower_pivot (Pose const &pose, CoordinateList &atom_xyzs) const |
Extract coordinates for the residue just beyond the N-terminal pivot. These coordinates help anchor the closure problem. More... | |
void | frame_upper_pivot (Pose const &pose, CoordinateList &atom_xyzs) const |
Extract coordinates for the residue just beyond the C-terminal pivot. These coordinates help anchor the closure problem. More... | |
bool | ids_span_cut (core::id::AtomID left, core::id::AtomID right) const |
Return true if the two given atoms are on opposite sides of the cutpoint specified by the loop that was used to create this problem. More... | |
core::id::AtomID | id_from_index (core::Size index) const |
Return an AtomID referring to the atom at the given index relative to the start of the loop. More... | |
void | mutate_residues (core::pose::Pose &pose, utility::vector1< std::string > sequence) const |
Mutate the residues between pivots to the sequence_ (including pivots) More... | |
Private Attributes | |
Loop | pivots_ |
bool | frame_called_ |
ParameterList | perturbed_lengths_ |
ParameterList | perturbed_angles_ |
ParameterList | perturbed_torsions_ |
ParameterList | unperturbed_lengths_ |
ParameterList | unperturbed_angles_ |
ParameterList | unperturbed_torsions_ |
CoordinateList | unperturbed_xyzs_ |
utility::vector1< std::string > | unperturbed_sequence_ |
utility::vector1< std::string > | perturbed_sequence_ |
Friends | |
class | ClosureSolution |
class | Memento |
Represent and solve a kinematic closure problem.
A number of parameters are needed to define a kinematic closure problem. These parameters include a region of the protein backbone, a set of pivot residues, and a new set of torsion angles for the nonpivot residues. All of this can be specified using the frame() and perturb_* methods. Once that has been done, the solve() method can be called to return the complete set of backbone conformations consistent with the given parameters. These conformations are represented by the ClosureSolution class. The restore() method can be used to undo a solution once it has been applied, which is useful in some Monte Carlo schemes.
protocols::kinematic_closure::ClosureProblem::ClosureProblem | ( | ) |
Default constructor.
|
overridedefault |
Default destructor.
|
private |
Apply the given internal coordinates to the given pose.
References protocols::environment::bond_angles(), protocols::environment::bond_lengths(), core::pose::Pose::conformation(), first_residue(), id_from_index(), last_residue(), num_atoms(), core::conformation::Conformation::set_bond_angle(), core::conformation::Conformation::set_bond_length(), core::pose::Pose::set_omega(), core::pose::Pose::set_phi(), core::pose::Pose::set_psi(), and core::pose::Pose::update_residue_neighbors().
Referenced by protocols::kinematic_closure::ClosureSolution::apply().
Real protocols::kinematic_closure::ClosureProblem::c_n | ( | core::Size | residue | ) | const |
Return the current value of the given C-N bond length.
References first_residue(), and perturbed_lengths_.
Real protocols::kinematic_closure::ClosureProblem::c_n_ca | ( | core::Size | residue, |
AngleUnit | unit | ||
) | const |
Return the current value of the given C-N-CA bond angle.
References first_residue(), and perturbed_angles_.
Real protocols::kinematic_closure::ClosureProblem::ca_c | ( | core::Size | residue | ) | const |
Return the current value of the given CA-C bond length.
References first_residue(), and perturbed_lengths_.
Real protocols::kinematic_closure::ClosureProblem::ca_c_n | ( | core::Size | residue, |
AngleUnit | unit | ||
) | const |
Return the current value of the given CA-C-N bond angle.
References first_residue(), and perturbed_angles_.
Size protocols::kinematic_closure::ClosureProblem::cut_residue | ( | ) | const |
Return the index of the second pivot residue.
References protocols::loops::Loop::cut(), frame_called_, and pivots_.
Referenced by ids_span_cut(), is_pivot_residue(), nonpivot_residues(), pivot_atoms(), and pivot_residues().
|
private |
Extract cartesian coordinates for those backbone atoms which are relevant to the closure algorithm. This includes all atoms from within the loop and from the two residues on either side of the loop.
This method does not change anything about the problem object itself. All changes are made to the given atom_xyzs
pseudo-matrix.
References first_residue(), frame_lower_pivot(), frame_upper_pivot(), last_residue(), num_atoms(), core::pose::Pose::residue(), and core::conformation::Residue::xyz().
|
private |
Extract torsion angles, bond angles, and bond lengths for those backbone atoms which are relevant to the closure algorithm.
References protocols::environment::bond_angles(), protocols::environment::bond_lengths(), and num_atoms().
|
private |
Size protocols::kinematic_closure::ClosureProblem::first_residue | ( | ) | const |
Return the index of the first pivot residue.
References frame_called_, pivots_, and protocols::loops::Loop::start().
Referenced by apply_internal_coordinates(), c_n(), c_n_ca(), ca_c(), ca_c_n(), protocols::kinematic_closure::ClosureSolution::check_overlap(), extract_cartesian_coordinates(), frame_lower_pivot(), id_from_index(), is_pivot_residue(), n_ca(), n_ca_c(), nonpivot_residues(), omega(), phi(), pivot_atoms(), pivot_residues(), psi(), and residues().
void protocols::kinematic_closure::ClosureProblem::frame | ( | Pose const & | pose, |
Loop const & | loop, | ||
pivot_pickers::PivotPickerOP | pivot_picker | ||
) |
Choose pivots and copy coordinate information into the problem.
References core::conformation::Residue::name3(), and core::pose::Pose::residue().
|
private |
Extract coordinates for the residue just beyond the N-terminal pivot. These coordinates help anchor the closure problem.
References core::id::BB, core::conformation::Residue::clone(), core::pose::Pose::conformation(), first_residue(), core::conformation::Residue::is_lower_terminus(), core::id::omega_dihedral, core::pose::Pose::residue(), and core::conformation::Residue::type().
Referenced by extract_cartesian_coordinates().
|
private |
Extract coordinates for the residue just beyond the C-terminal pivot. These coordinates help anchor the closure problem.
References core::id::BB, core::conformation::Residue::clone(), core::pose::Pose::conformation(), core::conformation::Residue::is_upper_terminus(), last_residue(), core::id::omega_dihedral, core::pose::Pose::residue(), and core::conformation::Residue::type().
Referenced by extract_cartesian_coordinates().
|
private |
Return an AtomID referring to the atom at the given index relative to the start of the loop.
More specifically, the first atom in the loop is taken to be the backbone nitrogen of the residue preceding the first pivot. Thus the index of the first pivot is 5 (pivots must be alpha carbons).
References first_residue().
Referenced by apply_internal_coordinates().
|
private |
Return true if the two given atoms are on opposite sides of the cutpoint specified by the loop that was used to create this problem.
References cut_residue(), core::sequence::left, and core::id::AtomID::rsd().
bool protocols::kinematic_closure::ClosureProblem::is_nonpivot_residue | ( | core::Size | residue | ) | const |
Return true if the given residue is not a pivot.
References is_pivot_residue().
bool protocols::kinematic_closure::ClosureProblem::is_pivot_residue | ( | core::Size | residue | ) | const |
Return true if the given residue is a pivot.
References cut_residue(), first_residue(), and last_residue().
Referenced by is_nonpivot_residue().
Size protocols::kinematic_closure::ClosureProblem::last_residue | ( | ) | const |
Return the index of the third pivot residue.
References frame_called_, pivots_, and protocols::loops::Loop::stop().
Referenced by apply_internal_coordinates(), protocols::kinematic_closure::ClosureSolution::check_overlap(), extract_cartesian_coordinates(), frame_upper_pivot(), is_pivot_residue(), nonpivot_residues(), pivot_atoms(), pivot_residues(), and residues().
|
private |
Mutate the residues between pivots to the sequence_ (including pivots)
References protocols::loops::add_cutpoint_variants(), protocols::simple_moves::MutateResidue::apply(), core::pose::Pose::fold_tree(), frame_called_, core::conformation::Residue::name3(), pivots_, core::util::remove_cutpoint_variants(), core::pose::Pose::residue(), protocols::simple_moves::MutateResidue::set_res_name(), protocols::simple_moves::MutateResidue::set_target(), core::pose::Pose::size(), protocols::loops::Loop::start(), and protocols::loops::Loop::stop().
Referenced by protocols::kinematic_closure::ClosureSolution::apply_if_reasonable().
Real protocols::kinematic_closure::ClosureProblem::n_ca | ( | core::Size | residue | ) | const |
Return the current value of the given N-CA bond length.
References first_residue(), and perturbed_lengths_.
Real protocols::kinematic_closure::ClosureProblem::n_ca_c | ( | core::Size | residue, |
AngleUnit | unit | ||
) | const |
Return the current value of the given N-CA-C bond angle.
References first_residue(), and perturbed_angles_.
IndexList protocols::kinematic_closure::ClosureProblem::nonpivot_residues | ( | ) | const |
Return the indices of every nonpivot residue in the loop.
References cut_residue(), first_residue(), and last_residue().
Size protocols::kinematic_closure::ClosureProblem::num_atoms | ( | ) | const |
Return the number of atoms in the loop.
References num_residues().
Referenced by apply_internal_coordinates(), extract_cartesian_coordinates(), extract_internal_coordinates(), protocols::kinematic_closure::ClosureSolution::get_distance(), and protocols::kinematic_closure::ClosureSolution::get_jacobian().
Size protocols::kinematic_closure::ClosureProblem::num_residues | ( | ) | const |
Return the number of residues in the loop.
References frame_called_, protocols::loops::Loop::length(), and pivots_.
Referenced by num_atoms().
Real protocols::kinematic_closure::ClosureProblem::omega | ( | core::Size | residue, |
AngleUnit | unit | ||
) | const |
Return the current value of the given omega angle.
References first_residue(), and perturbed_torsions_.
ParameterList & protocols::kinematic_closure::ClosureProblem::perturb_angles | ( | ) |
Provide non-const access to the raw bond angle list.
void protocols::kinematic_closure::ClosureProblem::perturb_c_n | ( | core::Size | residue, |
Real | value | ||
) |
Perturb the C-N bond length in the given residue.
void protocols::kinematic_closure::ClosureProblem::perturb_c_n_ca | ( | core::Size | residue, |
Real | value, | ||
AngleUnit | unit | ||
) |
Perturb the C-N-CA bond angle in the given residue.
void protocols::kinematic_closure::ClosureProblem::perturb_ca_c | ( | core::Size | residue, |
Real | value | ||
) |
Perturb the CA-C bond length in the given residue.
void protocols::kinematic_closure::ClosureProblem::perturb_ca_c_n | ( | core::Size | residue, |
Real | value, | ||
AngleUnit | unit | ||
) |
Perturb the CA-C-N bond angle in the given residue.
ParameterList & protocols::kinematic_closure::ClosureProblem::perturb_lengths | ( | ) |
Provide non-const access to the raw bond length list.
void protocols::kinematic_closure::ClosureProblem::perturb_n_ca | ( | core::Size | residue, |
Real | value | ||
) |
Perturb the N-CA bond length in the given residue.
void protocols::kinematic_closure::ClosureProblem::perturb_n_ca_c | ( | core::Size | residue, |
Real | value, | ||
AngleUnit | unit | ||
) |
Perturb the N-CA-C bond angle in the given residue.
void protocols::kinematic_closure::ClosureProblem::perturb_omega | ( | core::Size | residue, |
Real | value, | ||
AngleUnit | unit | ||
) |
Perturb the given omega angle.
void protocols::kinematic_closure::ClosureProblem::perturb_phi | ( | core::Size | residue, |
Real | value, | ||
AngleUnit | unit | ||
) |
Perturb the given phi angle.
void protocols::kinematic_closure::ClosureProblem::perturb_psi | ( | core::Size | residue, |
Real | value, | ||
AngleUnit | unit | ||
) |
Perturb the given psi angle.
ParameterList & protocols::kinematic_closure::ClosureProblem::perturb_torsions | ( | ) |
Provide non-const access to the raw torsion angle list.
utility::vector1< std::string > protocols::kinematic_closure::ClosureProblem::perturbed_sequence | ( | ) | const |
Get perturbed AA sequence from left pivot to the right pivot (including the pivots)
References perturbed_sequence_.
void protocols::kinematic_closure::ClosureProblem::perturbed_sequence | ( | utility::vector1< std::string > const & | values | ) |
Set AA sequence from left pivot to the right pivot (including the pivots)
References perturbed_sequence_.
Referenced by protocols::kinematic_closure::ClosureSolution::apply_if_reasonable().
Real protocols::kinematic_closure::ClosureProblem::phi | ( | core::Size | residue, |
AngleUnit | unit | ||
) | const |
Return the current value of the given phi angle.
References first_residue(), and perturbed_torsions_.
IndexList protocols::kinematic_closure::ClosureProblem::pivot_atoms | ( | ) | const |
Return the indices of all three pivot atoms.
References cut_residue(), first_residue(), and last_residue().
Referenced by protocols::kinematic_closure::ClosureSolution::check_rama(), and protocols::kinematic_closure::ClosureSolution::get_jacobian().
Loop protocols::kinematic_closure::ClosureProblem::pivot_loop | ( | ) | const |
Return a loop specifying the three pivot residues.
References pivots_.
IndexList protocols::kinematic_closure::ClosureProblem::pivot_residues | ( | ) | const |
Return the indices of all three pivot residues.
References cut_residue(), first_residue(), and last_residue().
Referenced by protocols::kinematic_closure::ClosureSolution::check_rama().
Real protocols::kinematic_closure::ClosureProblem::psi | ( | core::Size | residue, |
AngleUnit | unit | ||
) | const |
Return the current value of the given psi angle.
References first_residue(), and perturbed_torsions_.
IndexList protocols::kinematic_closure::ClosureProblem::residues | ( | ) | const |
Return the indices of every residue in the loop.
References first_residue(), and last_residue().
void protocols::kinematic_closure::ClosureProblem::restore | ( | Pose & | pose | ) | const |
Undo any changes made to the pose during the last move.
This method is typically used to restore the pose if no solutions to the closure problem could be found. It should only be called after frame() and solve().
Referenced by protocols::kinematic_closure::ClosureSolution::apply_if_reasonable().
bool protocols::kinematic_closure::ClosureProblem::sequence_mutated | ( | ) | const |
Return if mutations have been made to the sequence.
References perturbed_sequence_, and unperturbed_sequence_.
Referenced by protocols::kinematic_closure::ClosureSolution::apply_if_reasonable().
SolutionList protocols::kinematic_closure::ClosureProblem::solve | ( | ) | const |
Return every possible solution to this problem.
References protocols::forge::methods::order().
utility::vector1< std::string > protocols::kinematic_closure::ClosureProblem::unperturbed_sequence | ( | ) | const |
Get unperturbed AA sequence from left pivot to the right pivot (including the pivots)
References unperturbed_sequence_.
|
friend |
|
friend |
|
private |
Referenced by cut_residue(), first_residue(), last_residue(), mutate_residues(), and num_residues().
|
private |
Referenced by c_n_ca(), ca_c_n(), n_ca_c(), and protocols::kinematic_closure::ClosureProblem::Memento::restore().
|
private |
Referenced by c_n(), ca_c(), n_ca(), and protocols::kinematic_closure::ClosureProblem::Memento::restore().
|
private |
Referenced by perturbed_sequence(), and sequence_mutated().
|
private |
Referenced by omega(), phi(), psi(), and protocols::kinematic_closure::ClosureProblem::Memento::restore().
|
private |
Referenced by cut_residue(), first_residue(), last_residue(), mutate_residues(), num_residues(), and pivot_loop().
|
private |
|
private |
|
private |
Referenced by sequence_mutated(), and unperturbed_sequence().
|
private |
|
private |