Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
MembraneEnvPenalties.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/RMS_Energy.cc
11 /// @brief RMS Energy function. Used to optimize the RMSD between two structures.
12 /// @author James Thompson
13 
14 
15 // Unit headers
18 
19 // Package headers
20 // AUTO-REMOVED #include <core/conformation/Residue.hh>
21 // AUTO-REMOVED #include <core/conformation/Atom.hh>
22 
25 // AUTO-REMOVED #include <core/scoring/EnergyGraph.hh>
26 //#include <core/scoring/rms_util.hh>
27 
28 //#include <core/io/pdb/pose_io.hh>
29 
30 //#include <basic/options/option.hh>
31 //#include <basic/options/keys/OptionKeys.hh>
32 
33 // AUTO-REMOVED #include <core/pose/Pose.hh>
34 
36 #include <utility/vector1.hh>
37 
38 
39 //#include <basic/prof.hh>
40 //#include <utility/exit.hh>
41 
42 namespace core {
43 namespace scoring {
44 namespace methods {
45 
46 
47 /// @details This must return a fresh instance of the MembraneEnvPenalties class,
48 /// never an instance already in use
52 ) const {
53  return new MembraneEnvPenalties;
54 }
55 
58  ScoreTypes sts;
59  sts.push_back( Menv_non_helix );
60  sts.push_back( Menv_termini );
61  sts.push_back( Menv_tm_proj );
62  return sts;
63 }
64 
65 
66 /// c-tor
69  potential_( ScoringManager::get_instance()->get_MembranePotential() )
70 {}
71 
72 
73 /// clone
76 {
77  return new MembraneEnvPenalties();
78 }
79 
80 
81 /////////////////////////////////////////////////////////////////////////////
82 // scoring
83 /////////////////////////////////////////////////////////////////////////////
84 
85 /// @brief Calculate the RMS difference between native_pose_ (provided by
86 /// the option -in::file::native and the given Pose. The actual energy calculation
87 /// is the difference between the RMSD and the target RMSD. Target RMSD is specified
88 /// the option -score::rms_target.
89 
90 ///
91  /*
92 void
93 MembraneEnvPenalties::setup_for_scoring( pose::Pose & pose, ScoreFunction const & ) const
94 {
95  // compute interpolated number of neighbors at various distance cutoffs
96  pose.update_residue_neighbors();
97  potential_.compute_centroid_environment( pose );
98  potential_.compute_membrane_embedding( pose );
99 
100 }
101 */
102 void
104  pose::Pose & pose,
105  ScoreFunction const &,
106  EnergyMap & emap
107 ) const {
108 
109  if(potential_.Menv_penalties()) //bw quick hack before putting them as individual scoring terms....
110  {
111  Real tm_projection(0);
112  Real non_helix_pen(0);
113  Real termini_pen(0);
114  potential_.tm_projection_penalty(pose,tm_projection);
115  potential_.non_helix_in_membrane_penalty(pose, non_helix_pen);
116  potential_.termini_penalty(pose,termini_pen);
117  emap[ Menv_non_helix ]=non_helix_pen;
118  emap[ Menv_termini ]=termini_pen;
119  emap[ Menv_tm_proj ]=tm_projection;
120 
121 
122 // std::cout << "Menv_penalties (tm_projection+hbond_pen+termini_pen+10) " << tm_projection << " " << hbond_pen << " " << termini_pen << std::endl;
123  }
124  potential_.finalize( pose );
125 // totals[ rms ] = std::abs( rms_target_ - rmsd );
126 
127  // PROF_STOP( basic::RMS );
128 }
131 {
132  return 1; // Initial versioning
133 }
134 
135 } // namespace methods
136 } // namespace scoring
137 } // namespace core