Rosetta Protocols  2014.35
Public Member Functions | Private Member Functions | Private Attributes | List of all members
protocols::generalized_kinematic_closure::perturber::GeneralizedKICperturber Class Reference

#include <GeneralizedKICperturber.hh>

Public Member Functions

 GeneralizedKICperturber ()
 Creator for GeneralizedKICperturber. More...
 
 ~GeneralizedKICperturber ()
 Destructor for GeneralizedKICperturber mover. More...
 
std::string get_name () const
 Returns the name of this class ("GeneralizedKICperturber"). More...
 
perturber_effect get_perturber_effect () const
 Returns the enum type for the effect of this perturber. More...
 
perturber_effect get_perturber_effect_from_name (std::string const &name) const
 Returns the enum type for the effect of a pertuber based on a perturber name. Returns unknown_effect if can't find a match for the name. More...
 
std::string get_perturber_effect_name (core::Size &effect) const
 Returns the name of a perturber given the enum type. Returns "unknown_effect" if no such effect exists. More...
 
void set_perturber_effect (perturber_effect const &effect)
 Sets the effect of this perturber. More...
 
void set_perturber_effect (std::string const &effectname)
 Sets the effect of this perturber using the perturber effect name. Exits with an error message if the name is unknown. More...
 
void add_inputvalue (core::Real const &inputvalue)
 Adds a real value to the list of real input values. More...
 
void add_residue (core::Size const residue_index)
 Adds a residue to the list of residues on which this perturber should act. More...
 
void add_atom_set (utility::vector1< core::id::NamedAtomID > const &atomset)
 Adds a set of atoms defining a bond length, bond angle, or dihedral angle to the list of sets of atoms on which this perturber should act. More...
 
void apply (core::pose::Pose const &original_pose, core::pose::Pose const &loop_pose, utility::vector1< std::pair< core::Size, core::Size > > const &residue_map, utility::vector1< std::pair< core::id::AtomID, numeric::xyzVector< core::Real > > > const &atomlist, utility::vector1< core::Real > &torsions, utility::vector1< core::Real > &bondangles, utility::vector1< core::Real > &bondlengths) const
 Applies the perturbation to the vectors of desired torsions, desired angles, and desired bond lengths. More...
 

Private Member Functions

core::Size get_loop_index (core::Size const original_pose_index, utility::vector1< std::pair< core::Size, core::Size > > const &residue_map) const
 Given an index in the original pose and a mapping from loop to pose, return the index in the loop. More...
 
void reindex_AtomIDs (utility::vector1< std::pair< core::Size, core::Size > > const &residue_map, utility::vector1< utility::vector1< core::id::AtomID > > &AtomIDs_reindexed, core::pose::Pose const &original_pose) const
 Given a list of lists of AtomIDs, where residue indices are based on the original pose, and a mapping of original pose residue ID values to loop residue ID values, generate a new list of lists of AtomIDs, where the residue indices are based on the loop pose. More...
 
void apply_set_dihedral (utility::vector1< utility::vector1< core::id::AtomID > > const &dihedrallist, utility::vector1< std::pair< core::id::AtomID, numeric::xyzVector< core::Real > > > const &atomlist, utility::vector1< core::Real > &torsions, core::Size const effect) const
 Applies a set_dihedral perturbation to a list of torsions. More...
 
void apply_set_bondangle (utility::vector1< utility::vector1< core::id::AtomID > > const &bondanglelist, utility::vector1< std::pair< core::id::AtomID, numeric::xyzVector< core::Real > > > const &atomlist, utility::vector1< core::Real > &bondangles) const
 Applies a set_bondangle perturbation to a list of bond angles. More...
 
void apply_set_bondlength (utility::vector1< utility::vector1< core::id::AtomID > > const &bondlengthlist, utility::vector1< std::pair< core::id::AtomID, numeric::xyzVector< core::Real > > > const &atomlist, utility::vector1< core::Real > &bondlengths) const
 Applies a set_bondlength perturbation to a list of bond lengths. More...
 
void apply_randomize_alpha_backbone_by_rama (core::pose::Pose const &original_pose, core::pose::Pose const &loop_pose, utility::vector1< core::Size > const &residues, utility::vector1< std::pair< core::id::AtomID, numeric::xyzVector< core::Real > > > const &atomlist, utility::vector1< std::pair< core::Size, core::Size > > const &residue_map, utility::vector1< core::Real > &torsions) const
 Applies a randomize_alpha_backbone_by_rama perturbation to the list of torsions. More...
 
void apply_sample_cis_peptide_bond (core::pose::Pose const &loop_pose, utility::vector1< std::pair< core::id::AtomID, numeric::xyzVector< core::Real > > > const &atomlist, utility::vector1< core::Size > const &residues, utility::vector1< std::pair< core::Size, core::Size > > const &residue_map, utility::vector1< core::Real > &torsions) const
 Applies a sample_cis_peptide_bond perturbation to the list of torsions. More...
 

Private Attributes

perturber_effect effect_
 The effect of this perturber. See the perturber_effect enum type for more information. More...
 
utility::vector1< core::Realinputvalues_real_
 Real input values for the operation. For example, a set_dihedral operation would take a single real value (the value that the dihedral will be set to). More...
 
utility::vector1< core::Sizeresidues_
 The list of residues on which this operation should be carried out. More...
 
utility::vector1
< utility::vector1
< core::id::NamedAtomID > > 
atoms_
 A list of sets of atoms defining bond lenghts, bond angles, or dihedral angles on which this perturber will work. More...
 

Constructor & Destructor Documentation

protocols::generalized_kinematic_closure::perturber::GeneralizedKICperturber::GeneralizedKICperturber ( )
protocols::generalized_kinematic_closure::perturber::GeneralizedKICperturber::~GeneralizedKICperturber ( )

Destructor for GeneralizedKICperturber mover.

Member Function Documentation

void protocols::generalized_kinematic_closure::perturber::GeneralizedKICperturber::add_atom_set ( utility::vector1< core::id::NamedAtomID > const &  atomset)
inline

Adds a set of atoms defining a bond length, bond angle, or dihedral angle to the list of sets of atoms on which this perturber should act.

These are indices based on the original structure, NOT based on the loop to be closed. Some effects act on a list of residues, while others act on a list of atoms.

References atoms_.

void protocols::generalized_kinematic_closure::perturber::GeneralizedKICperturber::add_inputvalue ( core::Real const &  inputvalue)
inline

Adds a real value to the list of real input values.

References inputvalues_real_.

void protocols::generalized_kinematic_closure::perturber::GeneralizedKICperturber::add_residue ( core::Size const  residue_index)
inline

Adds a residue to the list of residues on which this perturber should act.

These are indices based on the original structure, NOT based on the loop to be closed. Some effects act on a list of residues, while others act on a list of AtomIDs.

References residues_.

void protocols::generalized_kinematic_closure::perturber::GeneralizedKICperturber::apply ( core::pose::Pose const &  original_pose,
core::pose::Pose const &  loop_pose,
utility::vector1< std::pair< core::Size, core::Size > > const &  residue_map,
utility::vector1< std::pair< core::id::AtomID, numeric::xyzVector< core::Real > > > const &  atomlist,
utility::vector1< core::Real > &  torsions,
utility::vector1< core::Real > &  bondangles,
utility::vector1< core::Real > &  bondlengths 
) const

Applies the perturbation to the vectors of desired torsions, desired angles, and desired bond lengths.

Detailed:
Parameters
[in]original_pose- The original pose.
[in]loop_pose- A pose consisting of just the loop to be perturbed, plus one residue on each side establishing the frame.
[in]residue_map- Mapping of (loop residue, original pose residue).
[in]atomlist- List of atoms (residue indices are based on the loop_pose).
[in,out]torsions- Desired torsions for each atom; can be set or altered by the apply() function.
[in,out]bondangles- Desired bond angles for each atom; can be set or altered by the apply() function.
[in,out]bondlengths- Desired bond lengths for each atom; can be set or altered by the apply() function.

References apply_randomize_alpha_backbone_by_rama(), apply_sample_cis_peptide_bond(), apply_set_bondangle(), apply_set_bondlength(), apply_set_dihedral(), effect_, protocols::generalized_kinematic_closure::perturber::perturb_dihedral, protocols::generalized_kinematic_closure::perturber::randomize_alpha_backbone_by_rama, protocols::generalized_kinematic_closure::perturber::randomize_dihedral, reindex_AtomIDs(), residues_, protocols::generalized_kinematic_closure::perturber::sample_cis_peptide_bond, protocols::generalized_kinematic_closure::perturber::set_bondangle, protocols::generalized_kinematic_closure::perturber::set_bondlength, and protocols::generalized_kinematic_closure::perturber::set_dihedral.

void protocols::generalized_kinematic_closure::perturber::GeneralizedKICperturber::apply_randomize_alpha_backbone_by_rama ( core::pose::Pose const &  original_pose,
core::pose::Pose const &  loop_pose,
utility::vector1< core::Size > const &  residues,
utility::vector1< std::pair< core::id::AtomID, numeric::xyzVector< core::Real > > > const &  atomlist,
utility::vector1< std::pair< core::Size, core::Size > > const &  residue_map,
utility::vector1< core::Real > &  torsions 
) const
private

Applies a randomize_alpha_backbone_by_rama perturbation to the list of torsions.

This checks whether each residue is an alpha-amino acid.

Parameters
[in]original_pose- The input pose.
[in]loop_pose- A pose that is just the loop to be closed (possibly with other things hanging off of it).
[in]residues- A vector of the indices of residues affected by this perturber. Note that
[in]atomlist- A vector of pairs of AtomID, xyz coordinate. Residue indices are based on the loop pose, NOT the original pose.
[in]residue_map- A vector of pairs of (loop pose index, original pose index).
[in,out]torsions- A vector of desired torsions, some of which are randomized by this function.

References numeric::dihedral_degrees(), protocols::generalized_kinematic_closure::general_set_phi(), protocols::generalized_kinematic_closure::general_set_psi(), core::scoring::ScoringManager::get_instance(), get_loop_index(), core::scoring::ScoringManager::get_Ramachandran(), core::chemical::ResidueType::is_alpha_aa(), core::pose::Pose::n_residue(), nres, rama, core::pose::Pose::residue(), runtime_assert_string_msg, and core::conformation::Residue::type().

Referenced by apply().

void protocols::generalized_kinematic_closure::perturber::GeneralizedKICperturber::apply_sample_cis_peptide_bond ( core::pose::Pose const &  loop_pose,
utility::vector1< std::pair< core::id::AtomID, numeric::xyzVector< core::Real > > > const &  atomlist,
utility::vector1< core::Size > const &  residues,
utility::vector1< std::pair< core::Size, core::Size > > const &  residue_map,
utility::vector1< core::Real > &  torsions 
) const
private

Applies a sample_cis_peptide_bond perturbation to the list of torsions.

This checks whether each residue specified is an alpha- or beta-amino acid. If it is, it samples the cis version of the omega angle (if omega is in the chain of atoms).

Parameters
[in]loop_pose- A pose that is just the loop to be closed (possibly with other things hanging off of it).
[in]atomlist- A vector of pairs of AtomID, xyz coordinate. Residue indices are based on the loop pose, NOT the original pose.
[in]residues- A vector of the indices of residues affected by this perturber. Note that
[in]residue_map- A vector of pairs of (loop pose index, original pose index).
[in,out]torsions- A vector of desired torsions, some of which are randomized by this function.

This checks whether each residue specified is an alpha- or beta-amino acid. If it is, it samples the cis version of the omega angle (if omega is in the chain of atoms). Note that this sets the omega value to 0 with some probability specified in the value passed to this perturber. It assumes that the omega values have all been initialized to 180.

Parameters
[in]loop_pose- A pose that is just the loop to be closed (possibly with other things hanging off of it).
[in]atomlist- A vector of pairs of AtomID, xyz coordinate. Residue indices are based on the loop pose, NOT the original pose.
[in]residues- A vector of the indices of residues affected by this perturber. Note that
[in]residue_map- A vector of pairs of (loop pose index, original pose index).
[in,out]torsions- A vector of desired torsions, some of which are randomized by this function.

References get_loop_index(), inputvalues_real_, core::chemical::ResidueType::is_alpha_aa(), core::chemical::ResidueType::is_beta_aa(), nres, core::pose::Pose::residue(), runtime_assert_string_msg, core::conformation::Residue::type(), and numeric::random::RandomGenerator::uniform().

Referenced by apply().

void protocols::generalized_kinematic_closure::perturber::GeneralizedKICperturber::apply_set_bondangle ( utility::vector1< utility::vector1< core::id::AtomID > > const &  bondanglelist,
utility::vector1< std::pair< core::id::AtomID, numeric::xyzVector< core::Real > > > const &  atomlist,
utility::vector1< core::Real > &  bondangles 
) const
private

Applies a set_bondangle perturbation to a list of bond angles.

Detailed:
Parameters
[in]bondanglelist- List of sets of atoms defining bond angles, indexed based on the loop_pose.
[in]atomlist- List of atoms (residue indices are based on the loop_pose).
[in,out]bondangles- Desired bond angles for each atom; set by this function.

References inputvalues_real_, runtime_assert_string_msg, and size().

Referenced by apply().

void protocols::generalized_kinematic_closure::perturber::GeneralizedKICperturber::apply_set_bondlength ( utility::vector1< utility::vector1< core::id::AtomID > > const &  bondlengthlist,
utility::vector1< std::pair< core::id::AtomID, numeric::xyzVector< core::Real > > > const &  atomlist,
utility::vector1< core::Real > &  bondlengths 
) const
private

Applies a set_bondlength perturbation to a list of bond lengths.

Detailed:
Parameters
[in]bondlengthlist- List of sets of atoms defining bond lengths, indexed based on the loop_pose.
[in]atomlist- List of atoms (residue indices are based on the loop_pose).
[in,out]bondlengths- Desired bond lengths for each atom; set by this function.

References inputvalues_real_, runtime_assert_string_msg, and size().

Referenced by apply().

void protocols::generalized_kinematic_closure::perturber::GeneralizedKICperturber::apply_set_dihedral ( utility::vector1< utility::vector1< core::id::AtomID > > const &  dihedrallist,
utility::vector1< std::pair< core::id::AtomID, numeric::xyzVector< core::Real > > > const &  atomlist,
utility::vector1< core::Real > &  torsions,
core::Size const  effect 
) const
private

Applies a set_dihedral perturbation to a list of torsions.

Can also be used to randomize dihedral values.

Parameters
[in]dihedrallist- List of sets of atoms defining dihedrals, indexed based on the loop_pose.
[in]atomlist- List of atoms (residue indices are based on the loop_pose).
[in,out]torsions- Desired torsions for each atom; set by this function.
[in]effect- Should the specified torsions be set (0), randomized (1), or perturbed (2)?

References numeric::random::RandomGenerator::gaussian(), inputvalues_real_, runtime_assert_string_msg, size(), and numeric::random::RandomGenerator::uniform().

Referenced by apply().

core::Size protocols::generalized_kinematic_closure::perturber::GeneralizedKICperturber::get_loop_index ( core::Size const  original_pose_index,
utility::vector1< std::pair< core::Size, core::Size > > const &  residue_map 
) const
private

Given an index in the original pose and a mapping from loop to pose, return the index in the loop.

References utility_exit_with_message.

Referenced by apply_randomize_alpha_backbone_by_rama(), apply_sample_cis_peptide_bond(), and reindex_AtomIDs().

std::string protocols::generalized_kinematic_closure::perturber::GeneralizedKICperturber::get_name ( ) const

Returns the name of this class ("GeneralizedKICperturber").

perturber_effect protocols::generalized_kinematic_closure::perturber::GeneralizedKICperturber::get_perturber_effect ( ) const
inline

Returns the enum type for the effect of this perturber.

References effect_.

perturber_effect protocols::generalized_kinematic_closure::perturber::GeneralizedKICperturber::get_perturber_effect_from_name ( std::string const &  name) const

Returns the enum type for the effect of a pertuber based on a perturber name. Returns unknown_effect if can't find a match for the name.

References protocols::generalized_kinematic_closure::perturber::end_of_effect_list, get_perturber_effect_name(), and protocols::generalized_kinematic_closure::perturber::unknown_effect.

Referenced by set_perturber_effect().

std::string protocols::generalized_kinematic_closure::perturber::GeneralizedKICperturber::get_perturber_effect_name ( core::Size effect) const
void protocols::generalized_kinematic_closure::perturber::GeneralizedKICperturber::reindex_AtomIDs ( utility::vector1< std::pair< core::Size, core::Size > > const &  residue_map,
utility::vector1< utility::vector1< core::id::AtomID > > &  AtomIDs_reindexed,
core::pose::Pose const &  original_pose 
) const
private

Given a list of lists of AtomIDs, where residue indices are based on the original pose, and a mapping of original pose residue ID values to loop residue ID values, generate a new list of lists of AtomIDs, where the residue indices are based on the loop pose.

Given a list of lists of atoms (as std::pair <residue_index, atom_name>) where residue indices are based on the original pose, and a mapping of original pose residue ID values to loop residue ID values, generate a new list of lists of AtomIDs, where the residue indices are based on the loop pose.

References atoms_, get_loop_index(), has, core::pose::Pose::n_residue(), core::pose::Pose::residue(), runtime_assert_string_msg, and size().

Referenced by apply().

void protocols::generalized_kinematic_closure::perturber::GeneralizedKICperturber::set_perturber_effect ( perturber_effect const &  effect)
void protocols::generalized_kinematic_closure::perturber::GeneralizedKICperturber::set_perturber_effect ( std::string const &  effectname)

Sets the effect of this perturber using the perturber effect name. Exits with an error message if the name is unknown.

References protocols::generalized_kinematic_closure::perturber::end_of_effect_list, get_perturber_effect_from_name(), runtime_assert_string_msg, and set_perturber_effect().

Member Data Documentation

utility::vector1< utility::vector1 < core::id::NamedAtomID > > protocols::generalized_kinematic_closure::perturber::GeneralizedKICperturber::atoms_
private

A list of sets of atoms defining bond lenghts, bond angles, or dihedral angles on which this perturber will work.

These are NamedAtomIDs (residue_index, atom_name). The residue indices are based on the original structure, NOT on the loop to be closed. Some effects act on a list of residues, while others act on a list of atoms.

Referenced by add_atom_set(), and reindex_AtomIDs().

perturber_effect protocols::generalized_kinematic_closure::perturber::GeneralizedKICperturber::effect_
private

The effect of this perturber. See the perturber_effect enum type for more information.

Referenced by apply(), get_perturber_effect(), and set_perturber_effect().

utility::vector1<core::Real> protocols::generalized_kinematic_closure::perturber::GeneralizedKICperturber::inputvalues_real_
private

Real input values for the operation. For example, a set_dihedral operation would take a single real value (the value that the dihedral will be set to).

Referenced by add_inputvalue(), apply_sample_cis_peptide_bond(), apply_set_bondangle(), apply_set_bondlength(), and apply_set_dihedral().

utility::vector1<core::Size> protocols::generalized_kinematic_closure::perturber::GeneralizedKICperturber::residues_
private

The list of residues on which this operation should be carried out.

These are indices based on the original structure, NOT based on the loop to be closed. Some effects act on a list of residues, while others act on a list of AtomIDs.

Referenced by add_residue(), and apply().


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