Rosetta 3.5
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
src
core
scoring
saxs
FormFactorManager.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/FormFactorManager.hh
11
/// @brief Loads and manages atomic form factors
12
/// @author Dominik Gront (dgront@chem.uw.edu.pl)
13
14
#ifndef INCLUDED_core_scoring_saxs_FormFactorManager_hh
15
#define INCLUDED_core_scoring_saxs_FormFactorManager_hh
16
17
#include <
core/scoring/saxs/FormFactorManager.fwd.hh
>
18
19
#include <
core/scoring/saxs/FormFactor.hh
>
20
21
// utility headers
22
#include <
core/types.hh
>
23
#include <utility/pointer/owning_ptr.hh>
24
#include <utility/pointer/ReferenceCount.hh>
25
#include <utility/vector1.hh>
26
27
#include <map>
28
// AUTO-REMOVED #include <set>
29
#include <string>
30
31
namespace
core {
32
namespace
scoring {
33
namespace
saxs {
34
35
/// @brief selects a given number of fragments using a quota scheme
36
class
FormFactorManager
{
37
public
:
38
39
/// @brief return singleton of the manager
40
static
FormFactorManager
*
get_manager
();
41
42
void
register_ff
(
std::string
atom_name,
FormFactorOP
new_ff);
43
44
void
load_ff
(
std::string
config_file);
45
46
void
load_ff_from_db
(
std::string
file_name);
47
48
/// @brief returns true if the manager has form factor function for a given atom
49
bool
is_known_atom
(
std::string
atom_name);
50
51
/// @brief returns form factor function for a given atom index
52
FormFactorOP
get_ff
(
Size
atom_id) {
return
ff_vector_
[atom_id]; }
53
54
/// @brief returns the number of form factors registered in this manager
55
Size
count_ff
() {
return
ff_vector_
.size(); }
56
57
/// @brief returns form factor function for a given atom
58
FormFactorOP
get_ff
(
std::string
atom_name);
59
60
/// @brief returns a vector of know atom names
61
utility::vector1<std::string>
get_known_atoms
() {
62
63
return
known_atoms_
;
64
}
65
66
/// @brief returns an index of an atom type or 0 if teh atom is not registered
67
Size
get_atom_index
(
std::string
atom_name) {
68
69
if
(
names_to_indexes_
.find(atom_name) !=
names_to_indexes_
.end()) {
70
return
names_to_indexes_
.find(atom_name)->second;
71
}
else
72
return
0;
73
}
74
75
/// @brief asks all the registered form factors to tabulate their values for the new vector of q-arguments
76
void
tabulate
(
const
utility::vector1<Real>
& q) {
77
78
for
(
Size
i=1;i<=
ff_vector_
.size();++i)
ff_vector_
[i]->
tabulate
(q);
79
}
80
81
private
:
82
/// @brief all known FF are stored here
83
std::map<std::string,FormFactorOP>
ff_map_
;
84
/// @brief vector of all known form factor, stored as OPs
85
utility::vector1<FormFactorOP>
ff_vector_
;
86
/// @brief all known atom names
87
utility::vector1<std::string>
known_atoms_
;
88
/// @brief maps all known atom names to integer indexes in ff_vector
89
std::map<std::string,Size>
names_to_indexes_
;
90
91
static
FormFactorManager
*
singleton_
;
92
93
/// @brief Constructor reads basic form factors from library
94
FormFactorManager
() {}
95
};
96
97
98
}
// core
99
}
// scoring
100
}
// saxs
101
102
#endif
/* INCLUDED_core_scoring_saxs_FormFactorManager_HH */
Generated on Sat Jun 1 2013 11:40:06 for Rosetta 3.5 by
1.8.4