33 #include <ObjexxFCL/string.functions.hh>
36 #include <utility/pointer/ReferenceCount.hh>
37 #include <utility/vector1.hh>
38 #include <utility/string_util.hh>
39 #include <utility/file/FileName.hh>
41 #include <basic/options/option.hh>
42 #include <basic/Tracer.hh>
49 #include <basic/options/option_macros.hh>
50 #include <basic/options/keys/evaluation.OptionKeys.gen.hh>
51 #include <basic/options/keys/in.OptionKeys.gen.hh>
53 #include <utility/vector0.hh>
61 static basic::Tracer
tr(
"protocols.evaluation.ChiWellRmsdEvaluatorCreator");
64 namespace simple_filters {
70 using namespace basic::options;
71 using namespace basic::options::OptionKeys;
72 tr.Info <<
"Evaluation Creator active ... " << std::endl;
73 if ( option[ OptionKeys::evaluation::chirmsd ].user() ) {
76 if ( option[ in::file::native ].user() ) {
82 RmsdVector
const& rmsd( option[ OptionKeys::evaluation::chirmsd ]() );
92 for ( RmsdVector::const_iterator it=rmsd.begin(); it!=rmsd.end(); ++it ) {
101 while ( it != rmsd.end() && (*it).find(
'=')!=std::string::npos ) {
102 Size pos( it->find(
'=') );
106 nchi_max=utility::string2int( value );
107 }
else if ( key ==
"sasa" ) {
108 sasa_max=utility::string2float( value );
110 utility_exit_with_message(
"key not recognized: "+key+
" possible keys: { heavy, sasa }" );
112 tr.Info <<
"detected option: " << key <<
" : " << value << std::endl;
116 if ( it != rmsd.end() ) {
119 utility_exit_with_message(
120 "need to specify tripletts <target> [key/value pairs] <column> <selection/FULL> with option -evaluation:rmsd last read: "+fname );
123 if ( it != rmsd.end() ) {
124 selection_file = *it;
126 utility_exit_with_message(
127 "need to specify tripletts <target> <column> <selection/FULL> with option -evaluation:rmsd last read: "+column );
129 if ( fname ==
"NATIVE" ) target_pose = native_pose;
130 else if ( fname !=
"IRMS" ) {
135 if ( selection_file ==
"EXCLUDE" ) {
138 if ( it != rmsd.end() ) {
139 selection_file = *it;
141 utility_exit_with_message(
142 "need to specify a <selection/FULL> after 'EXCLUDE' with option -evaluation:rmsd last read: "+column );
147 if ( selection_file ==
"INLINE" ) {
150 if ( it != rmsd.end() ) {
153 utility_exit_with_message(
154 "need to find END_INLINE after INLINE in option -evaluation:rmsd last read: "+column );
156 while( next_tag !=
"END_INLINE" ) {
157 selection.push_back( utility::string2int( next_tag ) );
159 if ( it != rmsd.end() ) {
162 utility_exit_with_message(
163 "need to find END_INLINE after INLINE in option -evaluation:rmsd last read: "+column );
166 }
else if ( selection_file !=
"FULL" ) {
167 std::ifstream is( selection_file.c_str() );
170 utility_exit_with_message(
"[ERROR] Error opening RBSeg file '" + selection_file +
"'" );
181 for (
Size i = 1; i<=target_pose->total_residue(); ++i) {
183 for (
Size j = 1; j<=selection.size() && !found; ++j ) {
184 if ( selection[ j ]==i ) {
188 if ( !found) inverted_selection.push_back( i );
190 selection = inverted_selection;
192 if ( selection_file !=
"FULL" ) {
202 return "ChiWellRmsdEvaluatorCreator";