Rosetta  2020.37
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
protocols::kinematic_closure::ClosureProblem Class Reference

Represent and solve a kinematic closure problem. More...

#include <ClosureProblem.hh>

Inheritance diagram for protocols::kinematic_closure::ClosureProblem:
Inheritance graph
[legend]

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
 

Detailed Description

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.

Constructor & Destructor Documentation

protocols::kinematic_closure::ClosureProblem::ClosureProblem ( )

Default constructor.

protocols::kinematic_closure::ClosureProblem::~ClosureProblem ( )
overridedefault

Default destructor.

Member Function Documentation

void protocols::kinematic_closure::ClosureProblem::apply_internal_coordinates ( ParameterList const &  bond_lengths,
ParameterList const &  bond_angles,
ParameterList const &  torsion_angles,
Pose pose 
) const
private
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().

void protocols::kinematic_closure::ClosureProblem::extract_cartesian_coordinates ( Pose const &  pose,
CoordinateList &  atom_xyzs 
) const
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().

void protocols::kinematic_closure::ClosureProblem::extract_internal_coordinates ( CoordinateList const &  atom_xyzs,
ParameterList &  bond_lengths,
ParameterList &  bond_angles,
ParameterList &  torsion_angles 
) const
private

Extract torsion angles, bond angles, and bond lengths for those backbone atoms which are relevant to the closure algorithm.

References num_atoms().

void protocols::kinematic_closure::ClosureProblem::extract_internal_coordinates ( Pose const &  pose,
ParameterList &  bond_lengths,
ParameterList &  bond_angles,
ParameterList &  torsion_angles 
) const
private
Size protocols::kinematic_closure::ClosureProblem::first_residue ( ) const
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().

void protocols::kinematic_closure::ClosureProblem::frame_lower_pivot ( Pose const &  pose,
CoordinateList &  atom_xyzs 
) const
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::id::omega_dihedral, and core::pose::Pose::residue().

Referenced by extract_cartesian_coordinates().

void protocols::kinematic_closure::ClosureProblem::frame_upper_pivot ( Pose const &  pose,
CoordinateList &  atom_xyzs 
) const
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(), last_residue(), core::id::omega_dihedral, and core::pose::Pose::residue().

Referenced by extract_cartesian_coordinates().

AtomID protocols::kinematic_closure::ClosureProblem::id_from_index ( core::Size  index) const
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().

bool protocols::kinematic_closure::ClosureProblem::ids_span_cut ( core::id::AtomID  left,
core::id::AtomID  right 
) const
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(), 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
void protocols::kinematic_closure::ClosureProblem::mutate_residues ( core::pose::Pose pose,
utility::vector1< std::string >  sequence 
) const
private
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
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.

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().

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_.

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
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_.

Friends And Related Function Documentation

friend class ClosureSolution
friend
friend class Memento
friend

Member Data Documentation

bool protocols::kinematic_closure::ClosureProblem::frame_called_
private
ParameterList protocols::kinematic_closure::ClosureProblem::perturbed_angles_
private
ParameterList protocols::kinematic_closure::ClosureProblem::perturbed_lengths_
private
utility::vector1<std::string> protocols::kinematic_closure::ClosureProblem::perturbed_sequence_
private
ParameterList protocols::kinematic_closure::ClosureProblem::perturbed_torsions_
private
Loop protocols::kinematic_closure::ClosureProblem::pivots_
private
ParameterList protocols::kinematic_closure::ClosureProblem::unperturbed_angles_
private
ParameterList protocols::kinematic_closure::ClosureProblem::unperturbed_lengths_
private
utility::vector1<std::string> protocols::kinematic_closure::ClosureProblem::unperturbed_sequence_
private
ParameterList protocols::kinematic_closure::ClosureProblem::unperturbed_torsions_
private
CoordinateList protocols::kinematic_closure::ClosureProblem::unperturbed_xyzs_
private

The documentation for this class was generated from the following files: