Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PeptideBondEnergy.cc
Go to the documentation of this file.
1 // -*- mode:c++;tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;rm-trailing-spaces:t -*-
2 // vi: set ts=2 noet:
3 //
4 // (c) Copyright Rosetta Commons Member Institutions.
5 // (c) This file is part of the Rosetta software suite and is made available under license.
6 // (c) The Rosetta software is developed by the contributing members of the Rosetta Commons.
7 // (c) For more information, see http://www.rosettacommons.org. Questions about this can be
8 // (c) addressed to University of Washington UW TechTransfer, email: license@u.washington.edu.
9 
10 /// @file core/scoring/methods/PeptideBondEnergy.cc
11 /// @author James Thompson <tex@u.washington.edu>
12 
13 // Unit headers
16 
17 // Package headers
18 //#include <core/scoring/ScoringManager.hh>
19 
20 // Project headers
21 // AUTO-REMOVED #include <core/pose/Pose.hh>
23 // AUTO-REMOVED #include <core/chemical/VariantType.hh>
25 
27 
28 #include <utility/vector1.hh>
29 
30 
31 // Numeric headers
32 
33 
34 namespace core {
35 namespace scoring {
36 namespace methods {
37 
38 
39 /// @details This must return a fresh instance of the PeptideBondEnergy class,
40 /// never an instance already in use
44 ) const {
45  return new PeptideBondEnergy;
46 }
47 
50  ScoreTypes sts;
51  sts.push_back( peptide_bond );
52  return sts;
53 }
54 
55 
57 
58 /// called at the end of energy evaluation
59 /// In this case (PeptideBondEnergy), all the calculation is done here
60 
61 //void
62 //PeptideBondEnergy::finalize_total_energy(
63 // pose::Pose & pose,
64 // ScoreFunction const &,
65 // EnergyMap & totals
66 //) const
67 //{
68 // using conformation::Residue;
69 //
70 // Real const mean( 1.325883 );
71 // Real const sdev( 0.012547 );
72 // Real total_dev(0.0);
73 // core::scoring::constraints::GaussianFunc gfunc( mean, sdev );
74 //
75 // std::string const bbN_( "N" );
76 // std::string const bbC_( "C" );
77 //
78 // typedef core::conformation::ResidueOPs ResidueOPs;
79 // for ( ResidueOPs::iterator this_res = pose.res_begin(),
80 // next_res = this_res + 1,
81 // end = pose.res_end();
82 // next_res != end; ++this_res, ++next_res
83 // ) {
84 // total_dev += gfunc.func(
85 // (*this_res)->xyz( bbC_ ).distance( (*next_res)->xyz( bbN_ ) )
86 // );
87 // }
88 // totals[ peptide_bond ] = total_dev;
89 //}
90 
91 void
93  conformation::Residue const & rsd1,
94  conformation::Residue const & rsd2,
95  pose::Pose const & /* pose */,
96  ScoreFunction const &,
97  EnergyMap & emap
98 ) const {
100 
101  Real const mean( 1.325883 );
102  Real const sdev( 0.012547 );
103  Real total_dev(0.0);
104  core::scoring::constraints::GaussianFunc gfunc( mean, sdev );
105 
106  std::string const bbN_( "N" );
107  std::string const bbC_( "C" );
108 
109  // make certain that both require atoms are present.
110  if ( !rsd1.type().has_atom_name(bbN_) || !rsd2.type().has_atom_name(bbC_) )
111  return;
112  // make sure we're bonded and in relatively the right sequence orientation
113  if ( !rsd1.is_bonded(rsd2) || ( rsd1.seqpos() > rsd2.seqpos() ) )
114  return;
115 
117  total_dev += gfunc.func(
118  rsd1.xyz( bbC_ ).distance( rsd2.xyz( bbN_ ) )
119  );
120  emap[ peptide_bond ] += total_dev;
121 } // residue_pair_energy
122 
123  /// called during gradient-based minimization inside dfunc
124  /**
125  F1 and F2 are not zeroed -- contributions from this atom are
126  just summed in
127  **/
128 
129 void
131  id::AtomID const & /* id */,
132  pose::Pose const & /* pose */,
133  kinematics::DomainMap const &, // domain_map,
134  ScoreFunction const &, // sfxn,
135  EnergyMap const & /* weights */,
136  Vector & /* F1 */,
137  Vector & /* F2 */
138 ) const
139 {} // need to fill this in if we ever want to minimize with it!
140 
141 /// @brief Chainbreak Energy is context independent and thus indicates that no context graphs need to
142 /// be maintained by class Energies
143 void
145  utility::vector1< bool > & /*context_graphs_required*/
146 ) const
147 {}
148 
149 Distance
151  return 3.0;
152 }
155 {
156  return 1; // Initial versioning
157 }
158 
159 
160 } // namespace methods
161 } // namespace scoring
162 } // namespace core