18 #include <basic/resource_manager/ResourceOptions.hh>
28 #include <utility/excn/Exceptions.hh>
29 #include <basic/Tracer.hh>
34 static basic::Tracer
TR(
"core.io.silent.SilentFileLoader");
42 using basic::resource_manager::ResourceOP;
43 using basic::resource_manager::ResourceLoaderOP;
44 using basic::resource_manager::ResourceOptions;
45 using basic::resource_manager::ResourceOptionsOP;
46 using basic::resource_manager::LocatorID;
75 ResourceOptions
const & options,
76 LocatorID
const & locator_id,
80 if ( ! dynamic_cast< SilentFileOptions const * >( &options ) ) {
81 throw utility::excn::EXCN_Msg_Exception(
82 "SilentFileLoader expected to get a SilentFileOptions object, "
83 "but was given a ResourceOptions of type '" + options.type() +
"', "
84 "which has the name '" + options.name() +
"'." );
87 static_cast< SilentFileOptions const & >( options ));
91 while(getline(istream, line)) {
92 lines.push_back(line);
101 if(!(ss->init_from_lines(lines, container))) {
102 throw utility::excn::EXCN_BadInput(
"SilentFileLoader failed to load silent file with locator_id '" + locator_id +
"'." );
106 ss->fill_pose(*pose);
108 if(pose->total_residue() == 0){
110 <<
"Loading Pose with SilentFileLoader for the "
111 <<
"locator_id '" << locator_id <<
"', "
112 <<
"but the resulting pose does not have any residues." << std::endl;
114 <<
"Also note that the input stream has '" << lines.size() <<
"'" << std::endl;