15 #include <core/scoring/rms_util.hh>
16 #include <core/sequence/Sequence.hh>
17 #include <core/sequence/util.hh>
18 #include <core/types.hh>
19 #include <core/chemical/AA.hh>
20 #include <core/conformation/Residue.hh>
21 #include <core/chemical/ResidueTypeSet.hh>
22 #include <core/chemical/ChemicalManager.hh>
24 #include <core/scoring/ScoreFunction.hh>
25 #include <core/scoring/ScoreFunctionFactory.hh>
27 #include <core/kinematics/FoldTree.hh>
28 #include <core/kinematics/Jump.hh>
30 #include <core/io/silent/SilentFileData.hh>
31 #include <core/io/silent/BinarySilentStruct.hh>
32 #include <core/pose/annotated_sequence.hh>
35 #include <protocols/viewer/viewers.hh>
36 #include <protocols/stepwise/modeler/rna/helix/RNA_HelixAssembler.hh>
38 #include <core/pose/Pose.hh>
39 #include <core/pose/PDBInfo.hh>
40 #include <core/init/init.hh>
41 #include <core/io/pdb/pose_io.hh>
57 #include <basic/options/keys/out.OptionKeys.gen.hh>
58 #include <basic/options/keys/in.OptionKeys.gen.hh>
59 #include <basic/options/keys/score.OptionKeys.gen.hh>
60 #include <basic/options/keys/rna.OptionKeys.gen.hh>
66 using namespace protocols;
67 using namespace basic::options::OptionKeys;
71 using io::pdb::dump_pdb;
78 OPT_KEY( Boolean, minimize_all )
86 using namespace core::scoring;
87 using namespace core::chemical;
90 using namespace basic::options::OptionKeys;
92 using namespace core::kinematics;
94 using namespace protocols::stepwise::modeler::rna::helix;
96 std::string full_sequence;
98 std::string
const fasta_file =
option[ in::file::fasta ]()[1];
99 SequenceOP fasta_sequence = read_fasta_file( fasta_file )[1];
100 full_sequence = fasta_sequence->sequence();
104 for (
Size n = 1; n <= full_sequence_segments.size(); n++ ) full_sequence += full_sequence_segments[ n ];
109 std::string silent_file =
"";
110 bool output_silent(
false );
113 output_silent =
true;
115 SilentFileData silent_file_data;
117 bool const is_use_phenix_geo =
option[ basic::options::OptionKeys::rna::corrected_geo] ();
118 ResidueTypeSetCOP rsd_set;
119 rsd_set = ChemicalManager::get_instance()->residue_type_set( FA_STANDARD );
122 std::string sequence_to_build;
123 for (
Size n = 1; n <= full_sequence.size(); n++ )
if ( !is_blank_seq( full_sequence[n-1]) ) sequence_to_build.push_back( full_sequence[ n-1 ] );
124 pose::make_pose_from_sequence(
pose, sequence_to_build, *rsd_set );
126 RNA_HelixAssembler rna_helix_assembler;
128 rna_helix_assembler.set_minimize_all(
option[ minimize_all ]() );
129 rna_helix_assembler.set_dump(
option[
dump ]() );
130 rna_helix_assembler.use_phenix_geo( is_use_phenix_geo );
132 ScoreFunctionOP
scorefxn = get_score_function();
133 rna_helix_assembler.set_scorefxn ( scorefxn );
137 ScoreFunctionOP finish_scorefxn = ScoreFunctionFactory::create_score_function(
option[ finish_weights ]() );
138 rna_helix_assembler.set_finish_scorefxn( finish_scorefxn );
140 rna_helix_assembler.set_model_and_remove_capping_residues(
true );
142 protocols::viewer::add_conformation_viewer(
pose.conformation(),
"current", 400, 400 );
146 std::string
outfile = full_sequence+
".pdb";
150 rna_helix_assembler.apply(
pose, full_sequence );
152 if ( output_silent ) {
154 BinarySilentStruct
s(
pose, tag );
155 silent_file_data.write_silent_struct( s, silent_file,
false );
172 protocols::viewer::clear_conformation_viewers();
180 main(
int argc,
char * argv [] )
185 std::cout << std::endl <<
"Basic usage: " << argv[0] <<
" -seq <sequence of first strand> <sequence of second strand> -o <name of output pdb file> " << std::endl;
186 std::cout << std::endl <<
" Type -help for full slate of options." << std::endl << std::endl;
189 NEW_OPT(
seq,
"Input sequence", blank_string_vector );
190 NEW_OPT( minimize_all,
"minimize all torsions in response to each base pair addition",
false );
192 NEW_OPT( finish_weights,
"[ optional ] score function to do a second minimize with after each base pair addition",
"" );
203 protocols::viewer::viewer_main(
my_main );
205 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
std::string lead_zero_string_of(T const &t, int const w)
Leading-Zero Right-Justified string of a Template Argument Type Supporting Stream Output...
BooleanOptionKey const user("options:user")
int main(int argc, char *argv[])
common derived classes for thrown exceptions
Program exit functions and macros.
void rna_build_helix_test()
std::vector with 1-based indexing
basic::options::IntegerOptionKey const nstruct("nstruct")
rule< Scanner, options_closure::context_t > options
#define OPT_KEY(type, key)
#define NEW_OPT(akey, help, adef)
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.
rule< Scanner, tag_closure::context_t > tag
Fast (x,y,z)-coordinate numeric vector.
int const silent
Named verbosity levels.
rule< Scanner, option_closure::context_t > option