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

#include <BranchAngleOptimizer.hh>

Public Member Functions

 BranchAngleOptimizer (core::scoring::mm::MMBondAngleLibrary const &mm_bondangle_library)
 
 BranchAngleOptimizer ()
 
 BranchAngleOptimizer (BranchAngleOptimizer const &src)
 
core::Real tolerance () const
 
void tolerance (core::Real tolerance)
 
virtual ~BranchAngleOptimizer ()
 
core::scoring::mm::MMBondAngleResidueTypeParamSetOP bond_angle_residue_type_param_set ()
 
core::scoring::mm::MMBondAngleResidueTypeParamSetCOP bond_angle_residue_type_param_set () const
 
void bond_angle_residue_type_param_set (core::scoring::mm::MMBondAngleResidueTypeParamSetOP param_set)
 set input MMBondAngleResidueTypeParamSet, sharing with the input More...
 
void bond_angle_residue_type_param_set (core::scoring::mm::MMBondAngleResidueTypeParamSetCOP param_set)
 set input MMBondAngleResidueTypeParamSet, making a copy More...
 
bool initialized () const
 
core::Size optimize_angles (core::pose::Pose &pose, core::id::AtomID main_atomid1, core::id::AtomID center_atomid, core::id::AtomID main_atomid2, bool optimize_for_minimum=false)
 optimize angles branching off the defined mainchain More...
 
core::Size overall_params (core::pose::Pose const &pose, core::id::AtomID main_atomid1, core::id::AtomID center_atomid, core::id::AtomID main_atomid2, core::Real &Ktheta, core::Real &theta0, core::Real &energy0)
 get overall bond angle parameters for the defined mainchian More...
 
BranchParam1 param1 (core::pose::Pose const &pose, core::id::AtomID const &main_atomid1, core::id::AtomID const &center_atomid, core::id::AtomID const &main_atomid2, core::id::AtomID const &branch_atomid1) const
 get single branching atom bond angle parameters More...
 
BranchParam2 param2 (core::pose::Pose const &pose, core::id::AtomID const &main_atomid1, core::id::AtomID const &center_atomid, core::id::AtomID const &main_atomid2, core::id::AtomID const &branch_atomid1, core::id::AtomID const &branch_atomid2) const
 get double branching atom bond angle parameters More...
 
core::Size num_coef1 () const
 get number of single branching atom coefficients More...
 
core::Size num_coef2 () const
 get number of double branching atom coefficients More...
 
core::Size num_undefined_coef1 () const
 get number of undefined single branching atom coefficients More...
 
core::Size num_undefined_coef2 () const
 get number of undefined double branching atom coefficients More...
 
void read_database ()
 read known parameters from the database More...
 
void write_database () const
 write undefined parameters to the database More...
 
void read_coef1 (std::istream &in)
 read single branching atom coefficients from an input stream More...
 
bool read_coef1 (std::string const &filename)
 read single branching atom coefficients from a file More...
 
void read_coef1_default ()
 read single branching atom coefficients from default database file More...
 
bool read_coef1_user ()
 read single branching atom coefficients from user database file More...
 
void read_coef2 (std::istream &in)
 read single branching atom coefficients More...
 
bool read_coef2 (std::string const &filename)
 read double branching atom coefficients from a file More...
 
void read_coef2_default ()
 read double branching atom coefficients from default database file More...
 
bool read_coef2_user ()
 read double branching atom coefficients from user database file More...
 
void read_undefined_coef1 (std::istream &in)
 read parameters for undefined single branching atom coefficients More...
 
bool read_undefined_coef1 (std::string const &filename)
 read parameters for undefined single branching atom coefficients from a file More...
 
bool read_undefined_coef1 ()
 read single branching atom undefined coefficients from the database file More...
 
void write_undefined_coef1 (std::ostream &out) const
 write out parameters for undefined single branching atom coefficients More...
 
bool write_undefined_coef1 (std::string const &filename) const
 write parameters for undefined single branching atom coefficients to a file More...
 
bool write_undefined_coef1 () const
 write single branching atom undefined coefficients to the database file More...
 
void read_undefined_coef2 (std::istream &in)
 read parameters for undefined double branching atom coefficients More...
 
bool read_undefined_coef2 (std::string const &filename)
 read parameters for undefined double branching atom coefficients from a file More...
 
bool read_undefined_coef2 ()
 read double branching atom undefined coefficients from the database file More...
 
void write_undefined_coef2 (std::ostream &out) const
 write out parameters for undefined double branching atom coefficients More...
 
bool write_undefined_coef2 (std::string const &filename) const
 write parameters for undefined double branching atom coefficients to a file More...
 
bool write_undefined_coef2 () const
 write double branching atom undefined coefficients to the database file More...
 

Private Member Functions

BranchAngleOptimizer const & operator= (BranchAngleOptimizer const &src)=delete
 

Private Attributes

core::scoring::mm::MMBondAngleLibrary
const & 
mm_bondangle_library_
 
core::scoring::mm::MMBondAngleResidueTypeParamSetOP bond_angle_residue_type_param_set_
 
utility::vector1< BranchCoef1coef1_
 
utility::vector1< BranchCoef2coef2_
 
std::map< BranchParam1,
core::Size
coef_map1_
 
std::map< BranchParam2,
core::Size
coef_map2_
 
std::set< BranchParam1undefined_coef1_
 
std::set< BranchParam2undefined_coef2_
 
core::Real tolerance_
 
bool initialized_
 

Constructor & Destructor Documentation

protocols::branch_angle::BranchAngleOptimizer::BranchAngleOptimizer ( core::scoring::mm::MMBondAngleLibrary const &  mm_bondangle_library)
protocols::branch_angle::BranchAngleOptimizer::BranchAngleOptimizer ( )
protocols::branch_angle::BranchAngleOptimizer::BranchAngleOptimizer ( BranchAngleOptimizer const &  src)
default
protocols::branch_angle::BranchAngleOptimizer::~BranchAngleOptimizer ( )
virtualdefault

Member Function Documentation

core::scoring::mm::MMBondAngleResidueTypeParamSetOP protocols::branch_angle::BranchAngleOptimizer::bond_angle_residue_type_param_set ( )
core::scoring::mm::MMBondAngleResidueTypeParamSetCOP protocols::branch_angle::BranchAngleOptimizer::bond_angle_residue_type_param_set ( ) const
void protocols::branch_angle::BranchAngleOptimizer::bond_angle_residue_type_param_set ( core::scoring::mm::MMBondAngleResidueTypeParamSetOP  param_set)

set input MMBondAngleResidueTypeParamSet, sharing with the input

References bond_angle_residue_type_param_set_.

void protocols::branch_angle::BranchAngleOptimizer::bond_angle_residue_type_param_set ( core::scoring::mm::MMBondAngleResidueTypeParamSetCOP  param_set)

set input MMBondAngleResidueTypeParamSet, making a copy

References bond_angle_residue_type_param_set_.

bool protocols::branch_angle::BranchAngleOptimizer::initialized ( ) const
inline

References initialized_.

core::Size protocols::branch_angle::BranchAngleOptimizer::num_coef1 ( ) const

get number of single branching atom coefficients

get number of single branching atom coefficients

References coef1_.

core::Size protocols::branch_angle::BranchAngleOptimizer::num_coef2 ( ) const

get number of double branching atom coefficients

get number of double branching atom coefficients

References coef2_.

core::Size protocols::branch_angle::BranchAngleOptimizer::num_undefined_coef1 ( ) const

get number of undefined single branching atom coefficients

get number of undefined single branching atom coefficients

References undefined_coef1_.

core::Size protocols::branch_angle::BranchAngleOptimizer::num_undefined_coef2 ( ) const

get number of undefined double branching atom coefficients

get number of undefined double branching atom coefficients

References undefined_coef2_.

BranchAngleOptimizer const& protocols::branch_angle::BranchAngleOptimizer::operator= ( BranchAngleOptimizer const &  src)
privatedelete
Size protocols::branch_angle::BranchAngleOptimizer::optimize_angles ( core::pose::Pose pose,
core::id::AtomID  main_atomid1,
core::id::AtomID  center_atomid,
core::id::AtomID  main_atomid2,
bool  optimize_for_minimum = false 
)

optimize angles branching off the defined mainchain

Add a branch point to the object, if optimization parameters were found, returns an index to them, otherwise returns 0. If other failure conditions are met, a warning is output and the function returns 0.

References core::kinematics::AtomTree::atom(), core::pose::Pose::atom_tree(), core::id::AtomID::atomno(), protocols::branch_angle::branching_atomid1(), protocols::branch_angle::branching_atomids2(), coef1_, coef2_, coef_map1_, coef_map2_, core::kinematics::tree::Atom::get_self_ptr(), param1(), param2(), core::chemical::rings::PHI, core::pose::Pose::residue(), core::id::AtomID::rsd(), core::pose::Pose::set_dof(), core::chemical::rings::THETA, protocols::TR(), undefined_coef1_, undefined_coef2_, and core::pose::Pose::xyz().

core::Size protocols::branch_angle::BranchAngleOptimizer::overall_params ( core::pose::Pose const &  pose,
core::id::AtomID  main_atomid1,
core::id::AtomID  center_atomid,
core::id::AtomID  main_atomid2,
core::Real Ktheta,
core::Real theta0,
core::Real energy0 
)
BranchParam1 protocols::branch_angle::BranchAngleOptimizer::param1 ( core::pose::Pose const &  pose,
core::id::AtomID const &  main_atomid1,
core::id::AtomID const &  center_atomid,
core::id::AtomID const &  main_atomid2,
core::id::AtomID const &  branch_atomid1 
) const
BranchParam2 protocols::branch_angle::BranchAngleOptimizer::param2 ( core::pose::Pose const &  pose,
core::id::AtomID const &  main_atomid1,
core::id::AtomID const &  center_atomid,
core::id::AtomID const &  main_atomid2,
core::id::AtomID const &  branch_atomid1,
core::id::AtomID const &  branch_atomid2 
) const
void protocols::branch_angle::BranchAngleOptimizer::read_coef1 ( std::istream &  in)

read single branching atom coefficients from an input stream

reads records of the format:

m1_m2_Ktheta(kcal/radians^2) m1_m2_theta0(degrees) m1_b1_Ktheta(kcal/radians^2) m1_b1_theta0(degrees) m2_b1_Ktheta(kcal/radians^2) m2_b1_theta0(degrees)

overall_Ktheta(kcal/radians^2) overall_theta0(degrees) overall_energy0(kcal/mol)

b1_torsion_offset_A(radians) b1_torsion_offset_B(unitless) b1_torsion_offset_C(radians^-1) b1_bond_angle_A(radians) b1_bond_angle_B(unitless) b1_bond_angle_C(radians^-1)

References coef1_, coef_map1_, and tolerance_.

Referenced by read_coef1(), read_coef1_default(), and read_coef1_user().

bool protocols::branch_angle::BranchAngleOptimizer::read_coef1 ( std::string const &  filename)

read single branching atom coefficients from a file

read from an uncompressed or gzip-compressed file, returns false on failure

References read_coef1().

void protocols::branch_angle::BranchAngleOptimizer::read_coef1_default ( )

read single branching atom coefficients from default database file

read from sampling/branch_angle/branch_angle_1.txt

References read_coef1().

Referenced by read_database().

bool protocols::branch_angle::BranchAngleOptimizer::read_coef1_user ( )

read single branching atom coefficients from user database file

read from branch_angle/branch_angle_1_user.txt

References read_coef1().

Referenced by read_database().

void protocols::branch_angle::BranchAngleOptimizer::read_coef2 ( std::istream &  in)

read single branching atom coefficients

reads records of the format:

m1_m2_Ktheta(kcal/radians^2) m1_m2_theta0(degrees) m1_b1_Ktheta(kcal/radians^2) m1_b1_theta0(degrees) m2_b1_Ktheta(kcal/radians^2) m2_b1_theta0(degrees) m1_b2_Ktheta(kcal/radians^2) m1_b2_theta0(degrees) m2_b2_Ktheta(kcal/radians^2) m2_b2_theta0(degrees) b1_b2_Ktheta(kcal/radians^2) b1_b2_theta0(degrees)

overall_Ktheta(kcal/radians^2) overall_theta0(degrees) overall_energy0(kcal/mol)

b1_torsion_offset_A(radians) b1_torsion_offset_B(unitless) b1_torsion_offset_C(radians^-1) b1_bond_angle_A(radians) b1_bond_angle_B(unitless) b1_bond_angle_C(radians^-1) b2_torsion_offset_A(radians) b2_torsion_offset_B(unitless) b2_torsion_offset_C(radians^-1) b2_bond_angle_A(radians) b2_bond_angle_B(unitless) b2_bond_angle_C(radians^-1)

References coef2_, coef_map2_, and tolerance_.

Referenced by read_coef2(), read_coef2_default(), and read_coef2_user().

bool protocols::branch_angle::BranchAngleOptimizer::read_coef2 ( std::string const &  filename)

read double branching atom coefficients from a file

read from an uncompressed or gzip-compressed file, returns false on failure

References read_coef2().

void protocols::branch_angle::BranchAngleOptimizer::read_coef2_default ( )

read double branching atom coefficients from default database file

read from sampling/branch_angle/branch_angle_2.txt, fails hard

References read_coef2().

Referenced by read_database().

bool protocols::branch_angle::BranchAngleOptimizer::read_coef2_user ( )

read double branching atom coefficients from user database file

read from branch_angle/branch_angle_2_user.txt

References read_coef2().

Referenced by read_database().

void protocols::branch_angle::BranchAngleOptimizer::read_database ( )
void protocols::branch_angle::BranchAngleOptimizer::read_undefined_coef1 ( std::istream &  in)

read parameters for undefined single branching atom coefficients

reads records of the format:

m1_m2_Ktheta(kcal/radians^2) m1_m2_theta0(degrees) m1_b1_Ktheta(kcal/radians^2) m1_b1_theta0(degrees) m2_b1_Ktheta(kcal/radians^2) m2_b1_theta0(degrees)

References tolerance_, and undefined_coef1_.

bool protocols::branch_angle::BranchAngleOptimizer::read_undefined_coef1 ( std::string const &  filename)

read parameters for undefined single branching atom coefficients from a file

read from an uncompressed or gzip-compressed file, returns false on failure

References read_undefined_coef1().

bool protocols::branch_angle::BranchAngleOptimizer::read_undefined_coef1 ( )

read single branching atom undefined coefficients from the database file

read from branch_angle/branch_angle_1_undefined.txt

Referenced by read_undefined_coef1().

void protocols::branch_angle::BranchAngleOptimizer::read_undefined_coef2 ( std::istream &  in)

read parameters for undefined double branching atom coefficients

reads records of the format:

m1_m2_Ktheta(kcal/radians^2) m1_m2_theta0(degrees) m1_b1_Ktheta(kcal/radians^2) m1_b1_theta0(degrees) m2_b1_Ktheta(kcal/radians^2) m2_b1_theta0(degrees) m1_b2_Ktheta(kcal/radians^2) m1_b2_theta0(degrees) m2_b2_Ktheta(kcal/radians^2) m2_b2_theta0(degrees) b1_b2_Ktheta(kcal/radians^2) b1_b2_theta0(degrees)

References tolerance_, and undefined_coef2_.

bool protocols::branch_angle::BranchAngleOptimizer::read_undefined_coef2 ( std::string const &  filename)

read parameters for undefined double branching atom coefficients from a file

read from an uncompressed or gzip-compressed file, returns false on failure

References read_undefined_coef2().

bool protocols::branch_angle::BranchAngleOptimizer::read_undefined_coef2 ( )

read double branching atom undefined coefficients from the database file

read from branch_angle/branch_angle_2_undefined.txt

Referenced by read_undefined_coef2().

core::Real protocols::branch_angle::BranchAngleOptimizer::tolerance ( ) const
inline

References tolerance_.

Referenced by tolerance().

void protocols::branch_angle::BranchAngleOptimizer::tolerance ( core::Real  tolerance)
inline

References tolerance(), and tolerance_.

void protocols::branch_angle::BranchAngleOptimizer::write_database ( ) const

write undefined parameters to the database

write undefined parameters to the database

References protocols::TR(), undefined_coef1_, undefined_coef2_, write_undefined_coef1(), and write_undefined_coef2().

Referenced by protocols::protein_interface_design::movers::BackrubDDMover::apply().

void protocols::branch_angle::BranchAngleOptimizer::write_undefined_coef1 ( std::ostream &  out) const

write out parameters for undefined single branching atom coefficients

for every set of parameters, dump out three lines in the format:

m1_m2_Ktheta(kcal/radians^2) m1_m2_theta0(degrees) m1_b1_Ktheta(kcal/radians^2) m1_b1_theta0(degrees) m2_b1_Ktheta(kcal/radians^2) m2_b1_theta0(degrees)

each set of parameters will be followed by a blank line

References undefined_coef1_.

bool protocols::branch_angle::BranchAngleOptimizer::write_undefined_coef1 ( std::string const &  filename) const

write parameters for undefined single branching atom coefficients to a file

write to an uncompressed or gzip-compressed file, returns false on failure

References write_undefined_coef1().

bool protocols::branch_angle::BranchAngleOptimizer::write_undefined_coef1 ( ) const

write single branching atom undefined coefficients to the database file

overwrite branch_angle/branch_angle_1_undefined.txt if undefined parameters exist

References undefined_coef1_.

Referenced by write_database(), and write_undefined_coef1().

void protocols::branch_angle::BranchAngleOptimizer::write_undefined_coef2 ( std::ostream &  out) const

write out parameters for undefined double branching atom coefficients

for every set of parameters, dump out three lines in the format:

m1_m2_Ktheta(kcal/radians^2) m1_m2_theta0(degrees) m1_b1_Ktheta(kcal/radians^2) m1_b1_theta0(degrees) m2_b1_Ktheta(kcal/radians^2) m2_b1_theta0(degrees) m1_b2_Ktheta(kcal/radians^2) m1_b2_theta0(degrees) m2_b2_Ktheta(kcal/radians^2) m2_b2_theta0(degrees) b1_b2_Ktheta(kcal/radians^2) b1_b2_theta0(degrees)

each set of parameters will be followed by a blank line

References undefined_coef2_.

bool protocols::branch_angle::BranchAngleOptimizer::write_undefined_coef2 ( std::string const &  filename) const

write parameters for undefined double branching atom coefficients to a file

write to an uncompressed or gzip-compressed file, returns false on failure

References write_undefined_coef2().

bool protocols::branch_angle::BranchAngleOptimizer::write_undefined_coef2 ( ) const

write double branching atom undefined coefficients to the database file

overwrite branch_angle/branch_angle_2_undefined.txt if undefined parameters exist

References undefined_coef2_.

Referenced by write_database(), and write_undefined_coef2().

Member Data Documentation

core::scoring::mm::MMBondAngleResidueTypeParamSetOP protocols::branch_angle::BranchAngleOptimizer::bond_angle_residue_type_param_set_
private
utility::vector1<BranchCoef1> protocols::branch_angle::BranchAngleOptimizer::coef1_
private
utility::vector1<BranchCoef2> protocols::branch_angle::BranchAngleOptimizer::coef2_
private
std::map<BranchParam1, core::Size> protocols::branch_angle::BranchAngleOptimizer::coef_map1_
private
std::map<BranchParam2, core::Size> protocols::branch_angle::BranchAngleOptimizer::coef_map2_
private
bool protocols::branch_angle::BranchAngleOptimizer::initialized_
private

Referenced by initialized(), and read_database().

core::scoring::mm::MMBondAngleLibrary const& protocols::branch_angle::BranchAngleOptimizer::mm_bondangle_library_
private

Referenced by param1(), and param2().

core::Real protocols::branch_angle::BranchAngleOptimizer::tolerance_
private
std::set<BranchParam1> protocols::branch_angle::BranchAngleOptimizer::undefined_coef1_
private
std::set<BranchParam2> protocols::branch_angle::BranchAngleOptimizer::undefined_coef2_
private

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