Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FormFactor.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/FormFactor.hh
11 /// @brief Represents an atomic scattering form factor
12 /// @author Dominik Gront (dgront@chem.uw.edu.pl)
13 
14 #ifndef INCLUDED_core_scoring_saxs_FormFactor_hh
15 #define INCLUDED_core_scoring_saxs_FormFactor_hh
16 
18 
19 // utility headers
20 #include <core/types.hh>
21 #include <utility/pointer/owning_ptr.hh>
22 #include <utility/pointer/ReferenceCount.hh>
23 
24 #include <numeric/interpolation/spline/Interpolator.hh>
25 
26 #include <string>
27 
28 #include <utility/vector1.hh>
29 
30 
31 namespace core {
32 namespace scoring {
33 namespace saxs {
34 
35 /// @brief
37 public:
38  ///@brief Automatically generated virtual destructor for class deriving directly from ReferenceCount
39  virtual ~FormFactor();
40 
41  /// @ A unique identifier of a form factor object, set by the manager
43 
44  /// @brief Constructor reads a file with a spline function
46 
47  /// @brief evaluates an atomic form factor for a given scattering angle (defined in 1/A)
48  Real ff(Real q) const {
49 
50  Real y = 0.0;
51  Real dy = 0.0;
52  spline_interpolator_->interpolate(q, y, dy);
53 
54  return y;
55  }
56 
57  /// @brief Returns tabulated ff-value (computed for i-th value of q-argument)
58  Real get(Size q_index) { return ff_values_[q_index]; }
59 
60  std::string & name() { return name_; }
61 
62  void is_glob(bool flag) { glob_flag_ = flag; }
63 
64  bool is_glob() const { return glob_flag_; }
65 
66  void tabulate(const utility::vector1<Real> & q);
67 private:
68  bool glob_flag_;
72 };
73 
74 } // core
75 } // scoring
76 } // saxs
77 
78 #endif /* INCLUDED_core_scoring_saxs_FormFactor_HH */