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
protocols
qsar
scoring_grid
ScoringGridLoader.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 protocols/qsar/scoring_grid/DataLoader.cc
11
/// @brief Implementation of the XML parser's DataLoader base class (ctor & dstor)
12
/// @author Andrew Leaver-Fay (aleaverfay@gmail.com)
13
14
// Unit Headers
15
#include <
protocols/qsar/scoring_grid/ScoringGridLoader.hh
>
16
#include <
protocols/qsar/scoring_grid/ScoringGridLoaderCreator.hh
>
17
18
// Project Headers
19
#include <
protocols/qsar/scoring_grid/GridManager.hh
>
20
//#include <protocols/qsar/qsarTypeManager.hh>
21
22
#include <basic/Tracer.hh>
23
24
// Utility headers
25
#include <utility/tag/Tag.hh>
26
27
// Boost Headers
28
#include <boost/foreach.hpp>
29
30
#include <utility/vector0.hh>
31
#include <utility/vector1.hh>
32
33
#define foreach BOOST_FOREACH
34
35
namespace
protocols {
36
namespace
qsar {
37
namespace
scoring_grid {
38
39
static
basic::Tracer
TR
(
"protocols.qsar.scoring_grid.ScoringGridLoader"
);
40
41
ScoringGridLoader::ScoringGridLoader
() {}
42
ScoringGridLoader::~ScoringGridLoader
() {}
43
44
void
ScoringGridLoader::load_data
(
45
core::pose::Pose
const
&,
46
utility::tag::TagPtr
const
tag,
47
moves::DataMap
&
48
)
const
49
{
50
using namespace
utility::tag;
51
typedef
utility::vector0< TagPtr >
TagPtrs
;
52
53
/// Setup the scoring grid_manager
54
55
//core::Real width = 40.0;
56
//core::Real resolution = 0.25;
57
58
qsar::scoring_grid::GridManager
* grid_manager(
qsar::scoring_grid::GridManager::get_instance
());
59
60
if
( tag->hasOption(
"width"
) ) {
61
grid_manager->
set_width
(tag->getOption<
core::Real
>(
"width"
));
62
63
}
64
if
( tag->hasOption(
"resolution"
) ){
65
grid_manager->
set_resolution
(tag->getOption<
core::Real
>(
"resolution"
));
66
}
67
68
if
(tag->hasOption(
"ligand_chain"
) ) {
69
grid_manager->
set_chain
(tag->getOption<
char
>(
"ligand_chain"
));
70
}
71
72
if
(tag->hasOption(
"normalized"
))
73
{
74
grid_manager->
set_normalized
(tag->getOption<
bool
>(
"normalized"
));
75
}
76
77
/// Add grids to the scoring grid manager
78
79
TagPtrs
const
grid_tags( tag->getTags() );
80
if
(grid_tags.size()==0){
81
TR <<
"WARNING WARNING grid manager will be empty"
<<std::endl;
82
}
83
84
foreach
(
TagPtr
tag, grid_tags){
85
grid_manager->
make_new_grid
(tag);
86
}
87
88
TR.flush();
89
}
90
91
protocols::jd2::parser::DataLoaderOP
92
ScoringGridLoaderCreator::create_loader
()
const
{
return
new
ScoringGridLoader
; }
93
94
std::string
95
ScoringGridLoaderCreator::keyname
()
const
{
return
"SCORINGGRIDS"
; }
96
97
98
}
//namespace scoring_grid
99
}
//namespace qsar
100
}
//namespace protocols
Generated on Sat Jun 1 2013 12:08:22 for Rosetta 3.5 by
1.8.4