15 #include <core/types.hh>
20 #include <core/chemical/util.hh>
22 #include <core/id/SequenceMapping.hh>
23 #include <core/io/pdb/pdb_writer.hh>
29 #include <core/sequence/util.hh>
30 #include <core/sequence/Sequence.hh>
31 #include <core/sequence/SequenceAlignment.hh>
35 #include <core/pose/Pose.hh>
36 #include <core/pose/Pose.fwd.hh>
37 #include <core/pose/annotated_sequence.hh>
39 #include <protocols/comparative_modeling/PartialThreadingMover.hh>
58 #include <core/import_pose/import_pose.hh>
61 #include <core/conformation/Residue.hh>
62 #include <core/kinematics/Jump.hh>
65 std::map< std::string, core::pose::Pose >
74 using core::import_pose::pose_from_file;
77 ResidueTypeSetCOP rsd_set( rsd_set_from_cmd_line() );
78 map< string, Pose > poses;
81 for (
iter it = fn_list.begin(),
end = fn_list.end(); it !=
end; ++it ) {
84 core::import_pose::pose_from_file( pose, *rsd_set, *it , core::import_pose::PDB_file);
86 name = name.substr( 0, 5 );
95 main(
int argc,
char* argv [] ) {
105 using core::pose::PoseOP;
107 using core::import_pose::pose_from_file;
108 using core::pose::make_pose_from_sequence;
109 using protocols::comparative_modeling::PartialThreadingMover;
112 using namespace basic::options::OptionKeys;
118 SequenceOP fasta_seq = core::sequence::read_fasta_file(
140 for ( aln_iter aln_fn = align_fns.begin(), aln_end = align_fns.end();
141 aln_fn != aln_end; ++aln_fn
143 vector1< SequenceAlignment > alns = core::sequence::read_aln(
147 for ( vector1< SequenceAlignment >::iterator it = alns.begin(),
151 string const template_id( it->sequence(2)->id().substr(0,5) );
154 tr << *it << std::endl;
155 tr <<
"id " << it->sequence(2)->id() <<
" => " << template_id
157 string const ungapped_query( it->sequence(1)->ungapped_sequence() );
160 map< string, Pose >::iterator pose_it = poses.find( template_id );
161 if ( pose_it == poses.end() ) {
162 string msg(
"Error: can't find pose (id = "
166 tr.
Error << msg << std::endl;
168 Pose query_pose, template_pose;
169 make_pose_from_sequence(
172 fasta_seq->sequence(),
173 *(rsd_set_from_cmd_line().lock())
175 template_pose = pose_it->second;
176 PartialThreadingMover mover(*it,template_pose);
177 mover.apply(query_pose);
181 string const id_out( it->sequence(2)->id() );
187 core::id::SequenceMapping map( it->sequence_mapping(1,2) );
188 output <<
"REMARK query_anchored_aln ";
190 if ( map[
ii] ) output << fasta_seq->at(ii);
201 tr.
Debug <<
"finished building partial models." << std::endl;
204 std::cout <<
"caught exception " << e.
msg() << std::endl;
StringOptionKey const aln_format
virtual std::string const msg() const
utility::keys::KeyLookup< KeyType >::const_iterator const_iterator
Key collection iterators.
void init(int argc, char *argv[])
Command line init() version.
FileVectorOptionKey const template_pdb
BooleanOptionKey const dump_pdb
Platform independent operations on files (except I/O)
FileVectorOptionKey const fasta
int main(int argc, char *argv[])
basic::options::OptionKeys collection
common derived classes for thrown exceptions
void flush_all_channels()
flush tracer buffer and flush buffers of all sub-channels ie: Fatal, Error, Warning, Info, Debug, Trace
std::string file_basename(const std::string &full_path)
std::map< std::string, core::pose::Pose > poses_from_cmd_line(utility::vector1< std::string > const &fn_list)
FileVectorOptionKey const alignment
IntegerOptionKey const end
Program exit functions and macros.
IntegerOptionKey const iter
BooleanOptionKey const sequence
File name class supporting Windows and UN*X/Linux format names.
basic::options::OptionKeys collection
rule< Scanner, options_closure::context_t > options
utility::options::OptionCollection option
OptionCollection global.
Output file stream wrapper for uncompressed and compressed files.
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 ...
bool file_exists(std::string const &path)
Does File Exist?
rule< Scanner, string_closure::context_t > name
ozstream: Output file stream wrapper for uncompressed and compressed files
Some std::string helper functions.
Program options global and initialization function.
THREAD_LOCAL basic::Tracer tr("struc_set_fragment_picker")
BooleanOptionKey const chemical
StringOptionKey const output