Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FastSAXSEnergy.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/saxs/SAXSEnergy.hh
11 /// @brief FastSAX scoring of Stovgaard et al (BMC Bioinf. 2010)
12 /// @author Frank DiMaio
13 
14 
15 #ifndef INCLUDED_core_scoring_saxs_FastSAXSEnergy_hh
16 #define INCLUDED_core_scoring_saxs_FastSAXSEnergy_hh
17 
18 // Package headers
19 // AUTO-REMOVED #include <core/scoring/saxs/FastSAXSEnergyCreator.hh>
20 // AUTO-REMOVED #include <core/chemical/ChemicalManager.hh>
21 #include <core/chemical/AA.hh>
22 
23 // AUTO-REMOVED #include <core/scoring/EnergyMap.hh>
25 // AUTO-REMOVED #include <core/scoring/methods/EnergyMethodOptions.hh>
26 
29 
30 // Project headers
31 #include <core/pose/Pose.fwd.hh>
32 
33 #include <string>
34 
35 #include <utility/vector1.hh>
36 #include <numeric/xyzVector.hh>
37 
38 
39 namespace core {
40 namespace scoring {
41 namespace saxs {
42 
44 public:
46 
47 public:
48 
49  ///
51 
52  ///
53  FastSAXSEnergy( FastSAXSEnergy const & src ) :
54  parent(src) {
55  chi2 = src.chi2;
56  dchi2_dca = src.dchi2_dca;
57  dchi2_dsc = src.dchi2_dsc;
58  }
59 
60  virtual methods::EnergyMethodOP clone() const;
61 
62  virtual void finalize_total_energy(pose::Pose & pose,ScoreFunction const &,EnergyMap & totals) const;
63 
64  virtual void setup_for_scoring( pose::Pose & pose, ScoreFunction const & scorefxn ) const;
65 
66  virtual void setup_for_derivatives( pose::Pose & pose, ScoreFunction const & sf) const;
67 
68  virtual void
70  id::AtomID const & id,
71  pose::Pose const & pose,
72  kinematics::DomainMap const &, // domain_map,
73  ScoreFunction const & sfxn,
74  EnergyMap const & weights,
75  Vector & F1,
76  Vector & F2
77  ) const;
78 
79  virtual void indicate_required_context_graphs(utility::vector1< bool > & /*context_graphs_required*/
80  ) const {}
81 
82 private:
83  //////
84  // PRIVATE DATA
85  //////
86  // precomputed bb/sc derivatives
89 
90  // saved chi2, c scaling factor
91  mutable core::Real chi2, c;
92 
93  // saved chi2 residuals
95 
96  virtual
97  core::Size version() const;
98 };
99 
100 
101 // a couple utility functions
102 // (0) remap core:chemical::AA enum to indices in formfactor table
104 
105 // (1) load saxs spectrum from file (only do this once)
107  core::Size &nq,
111 
112 // (2) load per-resiude form factors (resampled onto the same grid as the input spectrum)
113 void load_form_factors(
114  core::Size nq,
116  utility::vector1< utility::vector1< core::Real > >::iterator &spectra);
117 
118 }
119 }
120 }
121 
122 #endif