16 #include <protocols/jd2/JobDistributor.hh>
17 #include <protocols/rotamer_recovery/RotamerRecoveryMover.hh>
18 #include <protocols/rotamer_recovery/RotamerRecovery.hh>
19 #include <protocols/rotamer_recovery/RotamerRecoveryFactory.hh>
24 #include <basic/options/keys/in.OptionKeys.gen.hh>
25 #include <basic/options/keys/packing.OptionKeys.gen.hh>
28 #include <core/import_pose/import_pose.hh>
29 #include <core/pack/task/TaskFactory.hh>
30 #include <core/pack/task/operation/TaskOperations.hh>
31 #include <core/scoring/ScoreFunction.hh>
32 #include <core/scoring/ScoreFunctionFactory.hh>
48 using core::pose::PoseOP;
49 using core::import_pose::pose_from_pdb;
50 using core::pack::task::TaskFactory;
51 using core::pack::task::TaskFactoryOP;
52 using core::pack::task::operation::InitializeFromCommandline;
53 using core::pack::task::operation::ReadResfile;
54 using core::pack::task::operation::RestrictToRepacking;
55 using core::scoring::get_score_function;
56 using core::scoring::ScoreFunctionOP;
57 using protocols::rotamer_recovery::RotamerRecoveryOP;
58 using protocols::rotamer_recovery::RotamerRecoveryFactory;
59 using protocols::rotamer_recovery::RotamerRecoveryMover;
60 using protocols::rotamer_recovery::RotamerRecoveryMoverOP;
61 using protocols::jd2::JobDistributor;
64 static Tracer TR(
"apps.benchmark.scientific.rotamer_recovery");
76 using namespace basic::options::OptionKeys;
81 OPT( packing::use_input_sc );
82 OPT( packing::resfile );
83 NEW_OPT( rotamer_recovery::protocol,
"Rotamer Recovery Protocol component.",
"RRProtocolMinPack");
84 NEW_OPT( rotamer_recovery::comparer,
"Rotamer Recovery Comparer component.",
"RRComparerAutomorphicRMSD");
85 NEW_OPT( rotamer_recovery::reporter,
"Rotamer Recovery Reporter component.",
"RRReporterHuman");
92 main(
int argc,
char * argv [] )
100 using namespace basic::options::OptionKeys;
101 using namespace basic::options::OptionKeys::out::file;
102 using namespace core::pack::task::operation;
104 string const & protocol(
option[ rotamer_recovery::protocol ].
value() );
105 string const & reporter(
option[ rotamer_recovery::reporter ].
value() );
107 string const & comparer(
option[ rotamer_recovery::comparer ].
value() );
108 ScoreFunctionOP scfxn( get_score_function() );
109 TaskFactoryOP task_factory(
new TaskFactory );
110 task_factory->push_back( TaskOperationCOP(
new InitializeFromCommandline ) );
111 if (
option.
has(OptionKeys::packing::resfile) &&
option[OptionKeys::packing::resfile].user() ) {
112 task_factory->push_back( TaskOperationCOP(
new ReadResfile ) );
114 task_factory->push_back( TaskOperationCOP(
new RestrictToRepacking ) );
117 RotamerRecoveryFactory::get_instance()->get_rotamer_recovery(
118 protocol, comparer, reporter));
120 RotamerRecoveryMoverOP rotamer_recovery_mover(
new RotamerRecoveryMover(rotamer_recovery, scfxn, task_factory) );
124 JobDistributor::get_instance()->go( rotamer_recovery_mover );
126 rotamer_recovery_mover->show();
131 fout.open( output_fname.c_str(), std::ios::out );
132 if ( !fout.is_open() ) {
133 TR <<
"Unable to open output file '" << output_fname <<
"'." << endl;
136 rotamer_recovery_mover->show( fout );
140 TR.
Error <<
"Exception: " << endl;
143 TR <<
"Exception: " << endl;
148 std::cout <<
"caught exception " << e.
msg() << std::endl;
virtual std::string const msg() const
vector0: std::vector with assert-checked bounds
void init(int argc, char *argv[])
Command line init() version.
BooleanOptionKey const user("options:user")
BooleanOptionKey const rotamer_recovery("sequence_recovery::rotamer_recovery")
common derived classes for thrown exceptions
#define OPT_2GRP_KEY(type, grp1, grp2, key)
virtual void show(std::ostream &) const =0
static THREAD_LOCAL basic::Tracer TR("basic.options")
Program exit functions and macros.
#define utility_exit()
Macro function wrappers for utility::exit.
rule< Scanner, options_closure::context_t > options
utility::options::OptionCollection option
OptionCollection global.
#define NEW_OPT(akey, help, adef)
ocstream cout(std::cout)
Wrapper around std::cout.
vector1: std::vector with 1-based indexing
base class for Exception system
Class for handling user debug/warnings/errors. Use instance of this class instead of 'std::cout' for ...
#define OPT_1GRP_KEY(type, grp, key)
static Tracer TR("apps.benchmark.scientific.rotamer_recovery")
int const silent
Named verbosity levels.
bool has(BooleanOptionKey const &key) const
Is there an option with a BooleanOptionKey?
int main(int argc, char *argv[])