19 #include <basic/Tracer.hh>
25 #include <utility/tag/Tag.hh>
26 #include <utility/vector0.hh>
29 #include <boost/foreach.hpp>
33 #include <utility/excn/Exceptions.hh>
38 #define foreach BOOST_FOREACH
44 using std::stringstream;
54 namespace loops_definers {
57 static Tracer
TR(
"protocols.loops.loops_definers.LoopsExplicitDefiner");
69 loop_list_(src.loop_list_)
83 string const & loops_name
88 if(tag->hasOption(
"start")){
89 loop.
start = tag->getOption<
Size>(
"start");
93 <<
"Tag " << tag->getName() <<
" with name "
94 <<
"'" << loops_name <<
"' does not have the expected 'start' field." << endl;
95 utility_exit_with_message(err_msg.str());
98 if(tag->hasOption(
"stop")){
99 loop.
stop = tag->getOption<
Size>(
"stop");
101 stringstream err_msg;
103 <<
"Tag " << tag->getName() <<
" with name "
104 <<
"'" << loops_name <<
"' does not have the expected 'stop' field." << endl;
105 utility_exit_with_message(err_msg.str());
108 loop.
cut = tag->getOption<
Size>(
"cut", 0);
110 loop.
extended = tag->getOption<
bool>(
"extended",
false);
124 if(!tag->hasOption(
"name")){
125 throw utility::excn::EXCN_RosettaScriptsOption(
126 "Unable to create unnamed LoopsDefiner (type: Loops)" );
128 string const loops_name(tag->getOption<
string>(
"name"));
134 for(; begin !=
end; ++begin){
137 if(loop_tag->getName() !=
"loop"){
139 <<
"Please include only tags with name 'loop' "
140 <<
"as subtags of a 'Loops' tag" << endl
141 <<
"Tag with name '" << loop_tag->getName() <<
"' is invalid" << endl;
142 throw utility::excn::EXCN_RosettaScriptsOption(
"");