14 #include <core/types.hh>
15 #include <core/init/init.hh>
17 #include <core/chemical/util.hh>
21 #include <core/sequence/util.hh>
22 #include <core/sequence/Sequence.hh>
23 #include <core/sequence/SequenceAlignment.hh>
24 #include <core/sequence/NWAligner.hh>
25 #include <core/sequence/ScoringScheme.fwd.hh>
26 #include <core/sequence/SimpleScoringScheme.hh>
28 #include <core/kinematics/MoveMap.hh>
29 #include <core/kinematics/MoveMap.fwd.hh>
31 #include <core/import_pose/pose_stream/util.hh>
32 #include <core/import_pose/pose_stream/MetaPoseInputStream.hh>
33 #include <core/import_pose/PDBSilentStruct.hh>
35 #include <core/io/pdb/pose_io.hh>
36 #include <core/conformation/Conformation.hh>
37 #include <core/scoring/ScoreFunction.hh>
39 #include <core/pose/Pose.hh>
40 #include <core/pose/util.hh>
41 #include <core/pack/task/TaskFactory.hh>
43 #include <core/fragment/FragSet.hh>
44 #include <core/fragment/FragSet.fwd.hh>
46 #include <protocols/relax/MiniRelax.cc>
48 #include <protocols/loophash/FastGapMover.hh>
49 #include <protocols/comparative_modeling/ThreadingMover.hh>
59 #include <basic/options/keys/in.OptionKeys.gen.hh>
60 #include <basic/options/keys/relax.OptionKeys.gen.hh>
62 #include <core/pose/annotated_sequence.hh>
67 core::import_pose::PDBSilentStruct ss;
69 ss.fill_struct( pose );
70 ss.fill_pose( pose, *(core::chemical::rsd_set_from_cmd_line()) );
74 main(
int argc,
char* argv [] ) {
78 using namespace basic::options::OptionKeys;
79 using namespace core::chemical;
81 using namespace core::fragment;
82 using namespace core::import_pose::pose_stream;
83 using namespace protocols::comparative_modeling;
84 using namespace core::scoring;
86 using namespace core::kinematics;
95 protocols::loophash::FastGapMover fast_gap;
96 ResidueTypeSetCAP rsd_set = rsd_set_from_cmd_line();
97 MetaPoseInputStream
input = streams_from_cmd_line();
98 std::string
sequence = core::sequence::read_fasta_file(
99 option[ in::file::fasta ]()[1]
103 while (
input.has_another_pose() ) {
105 input.fill_pose( start_pose, *rsd_set );
108 ScoringSchemeOP ss(
new SimpleScoringScheme( 6, 1, -4, -1 ) );
109 SequenceOP full_length(
new Sequence(
112 SequenceOP pdb_seq(
new Sequence(
113 start_pose.sequence(),
"pdb", 1
115 SequenceAlignment aln = nw_align.align( full_length, pdb_seq, ss );
116 tr.
Debug <<
"rebuilding pose with alignment: " << std::endl;
117 tr.
Debug << aln << std::endl;
121 ThreadingMover threader(aln,start_pose);
122 threader.build_loops(
false);
124 core::pose::make_pose_from_sequence( full_length_pose,
sequence, *rsd_set );
125 threader.apply(full_length_pose);
127 full_length_pose.dump_pdb(
"here.pdb");
129 fast_gap.apply(full_length_pose);
131 std::string output_prefix( core::pose::tag_from_pose(start_pose) );
133 alignment_into_pose( aln, full_length_pose );
135 output <<
"REMARK REBUILT_RESIDUES";
137 output <<
"REMARK query_aln " << aln.sequence(1)->to_string() << std::endl;
138 output <<
"REMARK template_aln " << aln.sequence(2)->to_string()<< std::endl;
140 core::io::pdb::dump_pdb( full_length_pose, output );
145 std::cout <<
"caught exception " << e.
msg() << std::endl;
void restore_hack(core::pose::Pose &pose)
virtual std::string const msg() const
vector0: std::vector with assert-checked bounds
common derived classes for thrown exceptions
int main(int argc, char *argv[])
std::vector with 1-based indexing
rule< Scanner, options_closure::context_t > options
utility::options::OptionCollection option
OptionCollection global.
Output file stream wrapper for uncompressed and compressed files.
void close()
Close the ofstream and reset the state.
ocstream cout(std::cout)
Wrapper around std::cout.
vector1: std::vector with 1-based indexing
Class for handling user debug/warnings/errors. Use instance of this class instead of 'std::cout' for ...
ozstream: Output file stream wrapper for uncompressed and compressed files
void init()
set global 'init_was_called' to true
Program options global and initialization function.
THREAD_LOCAL basic::Tracer tr("struc_set_fragment_picker")