15 #include <core/types.hh>
16 #include <core/sequence/util.hh>
19 #include <protocols/viewer/viewers.hh>
20 #include <core/init/init.hh>
23 #include <core/chemical/ChemicalManager.fwd.hh>
26 #include <protocols/stepwise/modeler/align/StepWiseLegacyClustererSilentBased.hh>
35 #include <basic/options/keys/out.OptionKeys.gen.hh>
36 #include <basic/options/keys/in.OptionKeys.gen.hh>
37 #include <basic/options/keys/cluster.OptionKeys.gen.hh>
40 #include <core/chemical/ResidueType.hh>
43 using namespace protocols;
59 using namespace basic::options::OptionKeys;
60 using namespace basic::options::OptionKeys::cluster;
63 if ( !
option[
in::file::silent ].
user() )
utility_exit_with_message(
"The rna_cluster executable requires silent input [with -in:file:silent], and models need to be scored. The clustering algorithm starts with the lowest scoring models and works its way up." );
66 protocols::stepwise::modeler::align::StepWiseLegacyClustererSilentBased stepwise_clusterer( silent_files_in );
68 Size max_decoys( 400 );
70 stepwise_clusterer.set_max_decoys( max_decoys );
73 Real cluster_radius ( 2.0 );
74 if (
option[ OptionKeys::cluster::radius ].
user() ) cluster_radius =
option[ OptionKeys::cluster::radius ]();
75 stepwise_clusterer.set_cluster_radius( cluster_radius );
77 stepwise_clusterer.set_cluster_by_all_atom_rmsd(
true );
78 stepwise_clusterer.set_score_diff_cut(
option[ score_diff_cut ] );
79 stepwise_clusterer.set_rename_tags(
true );
80 stepwise_clusterer.set_rsd_type_set( core::chemical::FA_STANDARD );
81 stepwise_clusterer.set_auto_tune(
option[ auto_tune ] );
83 stepwise_clusterer.cluster();
86 stepwise_clusterer.output_silent_file( silent_file_out );
88 std::cout <<
"Maximum number of models: " << max_decoys <<
". [use -nstruct to set higher]" << std::endl;
89 std::cout <<
"Used all-heavy-atom clustering radius of " << cluster_radius <<
" Angstroms. [use -cluster:radius to change.]" << std::endl;
105 main(
int argc,
char * argv [] )
109 using namespace basic::options::OptionKeys;
111 std::cout << std::endl <<
"Basic usage: " << argv[0] <<
" -in:file:silent <input silent file> -out:file:silent <output silent file> -cluster:radius <RMSD threshold in Angstroms>" << std::endl;
112 std::cout << std::endl <<
" Type -help for full slate of options." << std::endl << std::endl;
117 option.add_relevant( cluster::radius );
118 option.add_relevant( cluster::score_diff_cut );
119 option.add_relevant( cluster::auto_tune );
132 protocols::viewer::viewer_main(
my_main );
134 std::cout <<
"caught exception " << e.
msg() << std::endl;
#define utility_exit_with_message(m)
Exit with file + line + message.
virtual std::string const msg() const
BooleanOptionKey const user("options:user")
common derived classes for thrown exceptions
int main(int argc, char *argv[])
std::vector with 1-based indexing
basic::options::IntegerOptionKey const nstruct("nstruct")
rule< Scanner, options_closure::context_t > options
ocstream cout(std::cout)
Wrapper around std::cout.
BooleanOptionKey const exit("options:exit")
vector1: std::vector with 1-based indexing
void init()
set global 'init_was_called' to true
Program options global and initialization function.
int const silent
Named verbosity levels.
rule< Scanner, option_closure::context_t > option