Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SurfacePotential.hh
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/SurfacePotential.hh
11 /// @brief Class which keeps reads the residue hydrophobic ASA database file and calculates surface residue energies.
12 /// @author Ron Jacak
13 
14 #ifndef INCLUDED_core_pack_interaction_graph_SurfacePotential_hh
15 #define INCLUDED_core_pack_interaction_graph_SurfacePotential_hh
16 
17 #include <core/chemical/AA.hh>
19 // AUTO-REMOVED #include <core/id/AtomID_Map.hh>
20 #include <core/pose/Pose.fwd.hh>
22 #include <core/types.hh>
23 
24 // Utility headers
25 
26 #include <core/id/AtomID.fwd.hh>
27 #include <utility/vector1.hh>
28 #include <map>
29 
30 
31 namespace core {
32 namespace pack {
33 namespace interaction_graph {
34 
35 /// With the traditional scoring hierarchy, classes like this one are created and accessed via the ScoringManager, which
36 /// is itself a Singleton class. These "potential" classes are only created and initialized when the use of the EnergyMethod
37 /// these classes correspond is encountered. No point in reading database files for a term if that term is not being used
38 /// in some score function. However, the surface energy is used when users specify they want to use it on the command
39 /// line - NOT via a score function. The score/energy is done within an interaction graph. One might ask why I just don't
40 /// put the logic for reading in the database file to the interaction graph init methods. However, there will be cases
41 /// where I will want to just score a protein (and not do any design) where I will want the database file to be read in.
42 /// Scoring doesn't use interaction graphs, so if the code for that was located there, these values would not be read in.
43 /// Instead, I've decided to implement this as its own separate class. It uses the Singleton design pattern so the database
44 /// will only get read in once during a run.
45 
47 
48 public:
50  Real average_residue_hASA( chemical::AA aa_type, Size num_nbs );
51  Real hASA_patch_energy( Real patch_area, Size num_nbs );
52 
54  Size resid, utility::vector1< Size > num_neighbors_ );
55 
56  void compute_pose_surface_energy( pose::Pose const & pose, Real & surface_energy_ );
57  void compute_pose_surface_energy( pose::Pose const & pose, Real & total_surface_energy_, utility::vector1< Real > & residue_surface_energy_ );
58 
59  core::Real hpatch_score( core::Real patch_area );
60 
61  /// @brief return the hpatch score for an entire pose
63  pose::Pose const & pose
64  );
65 
67  pose::Pose const & pose,
68  Real & total_hpatch_energy_,
69  std::map< core::Size, std::pair< core::Real, core::Real > > & patch_scores_,
70  std::map< core::Size, utility::vector1< id::AtomID > > & atoms_in_patches_
71  );
72 
76 
77 private:
78  /// @brief private constructor
80  /// @brief static data member holding pointer to the singleton class itself
81 
85 
86  // outer vector holds AA's; inner vector holds neighbor counts. Residues always have at least 1 neighbor because
87  // num_neighbors_counting_self() is always used to determine number of neighbors
89  std::vector< utility::vector1 < Real > > hASA_to_score_;
90 
91  // vector which holds the values read from scoring/score_functions/SurfacePotential/hpatch_score.txt
92  std::vector< core::Real > patcharea_to_score_;
93 
95 
102 
103 };
104 
105 } // namespace interaction_graph
106 } // namespace pack
107 } // namespace core
108 
109 
110 #endif