26 #include <basic/Tracer.hh>
28 #include <basic/options/option.hh>
29 #include <utility/io/izstream.hh>
30 #include <utility/exit.hh>
38 #include <basic/options/keys/AnchoredDesign.OptionKeys.gen.hh>
40 #include <utility/vector1.hh>
47 static basic::Tracer
TR(
"protocols.AnchoredDesign.Anchor" );
50 namespace anchored_design{
58 anchorfile_(bad_anchorfile)
65 anchorfile_(
"NO_ANCHORFILE_NEEDED")
81 anchorfile_(bad_anchorfile)
92 utility::pointer::ReferenceCount(rhs)
101 if (
this == &rhs)
return *
this;
113 read_anchorfile(pose, anchorfile_);
123 utility::io::izstream anchorfile( filename );
125 Error() <<
"Can't open anchorfile file: " << filename << std::endl;
126 Error() <<
"Use -AnchoredDesign::anchor to specify" << std::endl;
134 anchorfile >> chain >> PDBstart >> PDBend;
137 if( anchorfile.fail() ){
138 Error() <<
"Can't parse anchor file. Using the PDB numbering, format is:\n chain start end \n "
139 <<
"Only the first line is read." << std::endl;
146 utility_exit_with_message(
"Cannot read anchor file because pose has no PDBInfo");
150 start_ = pose_map.
find(chain, PDBstart);
151 end_ = pose_map.
find(chain, PDBend);
164 anchorfile_ = basic::options::option[ basic::options::OptionKeys::AnchoredDesign::anchor ].value();