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
forge
constraints
ConstraintFileRCG.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/forge/constraints/ConstraintFileRCG.cc
11
///
12
/// @brief
13
/// @author Nobuyasu Koga( nobuyasu@uw.edu ) , October 2009
14
15
// Unit header
16
#include <
protocols/forge/constraints/ConstraintFileRCG.hh
>
17
#include <
protocols/forge/constraints/ConstraintFileCstGeneratorCreator.hh
>
18
19
// Package headers
20
#include <
core/scoring/constraints/ConstraintIO.hh
>
21
#include <
core/scoring/constraints/ConstraintSet.hh
>
22
#include <
core/id/SequenceMapping.hh
>
23
24
// Project headers
25
#include <basic/options/option.hh>
26
#include <basic/Tracer.hh>
27
#include <utility/tag/Tag.hh>
28
#include <utility/vector1.hh>
29
30
31
static
basic::Tracer
tr
(
"protocols.forge.constraints.ConstraintFileRCG"
);
32
33
namespace
protocols{
34
namespace
forge{
35
namespace
constraints{
36
37
std::string
38
ConstraintFileCstGeneratorCreator::keyname
()
const
39
{
40
return
ConstraintFileCstGeneratorCreator::mover_name
();
41
}
42
43
protocols::moves::MoverOP
44
ConstraintFileCstGeneratorCreator::create_mover
()
const
45
{
46
return
new
ConstraintFileRCG
();
47
}
48
49
std::string
50
ConstraintFileCstGeneratorCreator::mover_name
()
51
{
52
return
"ConstraintFileCstGenerator"
;
53
}
54
55
/// @brief
56
ConstraintFileRCG::ConstraintFileRCG
():
57
RemodelConstraintGenerator(),
58
filename_(
""
)
59
{
60
/*using namespace basic::options;
61
using namespace basic::options::OptionKeys;
62
if( option[ constraints::cst_file ].user() ){
63
filename_ = option[ constraints::cst_file ].value().at( 1 );
64
}*/
65
}
66
67
/// @brief
68
ConstraintFileRCG::ConstraintFileRCG
(
String
const
&
filename
):
69
RemodelConstraintGenerator(),
70
filename_( filename )
71
{}
72
73
/// @brief
74
ConstraintFileRCG::~ConstraintFileRCG
() {}
75
76
void
77
ConstraintFileRCG::parse_my_tag
(
TagPtr
const
tag,
78
protocols::moves::DataMap
& data,
79
protocols::filters::Filters_map
const
& filters,
80
protocols::moves::Movers_map
const
& movers,
81
core::pose::Pose
const
& pose )
82
{
83
RemodelConstraintGenerator::parse_my_tag( tag, data, filters, movers, pose );
84
set_cstfile
( tag->getOption<
std::string
>(
"filename"
,
filename_
) );
85
}
86
87
std::string
88
ConstraintFileRCG::get_name
()
const
89
{
90
return
ConstraintFileCstGeneratorCreator::mover_name
();
91
}
92
93
protocols::moves::MoverOP
94
ConstraintFileRCG::fresh_instance
()
const
95
{
96
return
new
ConstraintFileRCG
();
97
}
98
99
/// @brief
100
void
101
ConstraintFileRCG::set_cstfile
(
String
const
&
filename
)
102
{
103
filename_
=
filename
;
104
}
105
106
/// @brief
107
void
108
ConstraintFileRCG::generate_remodel_constraints
(
Pose
const
& pose )
109
{
110
using namespace
core::scoring::constraints;
111
if
(
filename_
==
""
) {
112
utility_exit_with_message(
"ConstraintFileCstGenerator requires that a constraint filename be specified."
);
113
}
114
ConstraintSetOP
constraints =
ConstraintIO::get_instance
()->
read_constraints
(
filename_
,
new
ConstraintSet
, pose );
115
this->
add_constraints
( constraints->get_all_constraints() );
116
}
//generate constraints
117
118
119
}
//namespace constraints
120
}
//namespace forge
121
}
//namespace protocols
Generated on Sat Jun 1 2013 11:51:55 for Rosetta 3.5 by
1.8.4