18 #include <basic/options/option.hh>
19 #include <basic/options/keys/out.OptionKeys.gen.hh>
20 #include <basic/options/keys/in.OptionKeys.gen.hh>
29 #include <basic/Tracer.hh>
31 #include <utility/vector1.hh>
38 static basic::Tracer
tr(
"core.io.silent");
57 ss_types_[ creator->keyname() ] = creator;
64 out <<
"Available silent struct types:" << std::endl;
66 std::map< std::string, io::silent::SilentStructCreatorCOP >::const_iterator
69 out <<
"\t" << it->first << std::endl;
84 tr.Trace <<
"generate silent struct of type " << type_name << std::endl;
85 SilentStructCreatorMap::const_iterator iter =
ss_types_.find( type_name );
87 return iter->second->create_silent_struct();
92 string msg(
"SilentStructFactory::get_instance()->get_silent_struct: ");
93 msg += type_name +
" does not name a known SilentStructType --> " +
94 "check spelling or register new SilentStruct type in SilentStructFactory!";
96 msg +=
"known types are:\n";
102 utility_exit_with_message( msg );
113 for ( SilentStructCreatorMap::const_iterator
115 ss_names.push_back( it->first );
123 ss_types_[ creator->keyname() ] = creator;
129 SilentStructCreatorMap::const_iterator iter =
ss_types_.find( type_name );
136 string msg(
"SilentStructFactory::get_creator: ");
137 msg += type_name +
" does not name a known SilentStructType --> " +
138 "check spelling or register new SilentStruct type in SilentStructFactory!";
140 msg +=
"known types are:\n";
146 utility_exit_with_message( msg );
152 using namespace basic::options;
153 using namespace basic::options::OptionKeys;
159 using namespace basic::options;
160 using namespace basic::options::OptionKeys;
164 using namespace basic::options;
165 using namespace basic::options::OptionKeys;
167 bool already_binary( option[ out::file::silent_struct_type ]().find(
"binary" ) != std::string::npos );
168 bool const score_only( option[ out::file::silent_struct_type ]() ==
"score" );
171 if ( option[ out::file::silent_struct_type ].user() ){
178 if ( option[ out::file::silent_struct_type ]() ==
"rna" ) {
179 binary_string =
"binary_rna";
181 tr.Info <<
"detected attempt to write non-ideal pose to silent-file..."
182 <<
"Automatically switching to " << binary_string <<
" silent-struct type" << std::endl;