15 #include <core/types.hh>
20 #include <core/chemical/util.hh>
22 #include <core/id/SequenceMapping.hh>
24 #include <core/io/pdb/pose_io.hh>
27 #include <core/sequence/util.hh>
28 #include <core/sequence/Sequence.hh>
29 #include <core/sequence/SequenceAlignment.hh>
33 #include <core/pose/Pose.hh>
34 #include <core/pose/Pose.fwd.hh>
35 #include <core/pose/annotated_sequence.hh>
37 #include <protocols/comparative_modeling/PartialThreadingMover.hh>
53 #include <basic/options/keys/in.OptionKeys.gen.hh>
54 #include <basic/options/keys/cm.OptionKeys.gen.hh>
56 #include <core/import_pose/import_pose.hh>
59 #include <core/conformation/Residue.hh>
60 #include <core/kinematics/Jump.hh>
63 std::map< std::string, core::pose::Pose >
72 using core::import_pose::pose_from_pdb;
73 using namespace core::chemical;
75 ResidueTypeSetCOP rsd_set( rsd_set_from_cmd_line() );
76 map< string, Pose > poses;
79 for ( iter it = fn_list.begin(),
end = fn_list.end(); it !=
end; ++it ) {
82 core::import_pose::pose_from_pdb( pose, *rsd_set, *it );
84 name = name.substr( 0, 5 );
93 main(
int argc,
char* argv [] ) {
103 using core::pose::PoseOP;
105 using core::import_pose::pose_from_pdb;
106 using core::pose::make_pose_from_sequence;
107 using protocols::comparative_modeling::PartialThreadingMover;
110 using namespace basic::options::OptionKeys;
111 using namespace core::chemical;
116 SequenceOP fasta_seq = core::sequence::read_fasta_file(
117 option[ in::file::fasta ]()[1]
121 vector1< string > align_fns =
option[ in::file::alignment ]();
124 option[ in::file::template_pdb ]()
138 for ( aln_iter aln_fn = align_fns.begin(), aln_end = align_fns.end();
139 aln_fn != aln_end; ++aln_fn
141 vector1< SequenceAlignment > alns = core::sequence::read_aln(
142 option[ cm::aln_format ](), *aln_fn
145 for ( vector1< SequenceAlignment >::iterator it = alns.begin(),
149 string const template_id( it->sequence(2)->id().substr(0,5) );
150 tr << *it << std::endl;
151 tr <<
"id " << it->sequence(2)->id() <<
" => " << template_id
153 string const ungapped_query( it->sequence(1)->ungapped_sequence() );
156 map< string, Pose >::iterator pose_it = poses.find( template_id );
157 if ( pose_it == poses.end() ) {
158 string msg(
"Error: can't find pose (id = "
162 tr.
Error << msg << std::endl;
164 Pose query_pose, template_pose;
165 make_pose_from_sequence(
168 fasta_seq->sequence(),
169 *(rsd_set_from_cmd_line().lock())
171 template_pose = pose_it->second;
172 PartialThreadingMover mover(*it,template_pose);
173 mover.apply(query_pose);
177 string const id_out( it->sequence(2)->id() );
182 core::id::SequenceMapping map( it->sequence_mapping(1,2) );
183 output <<
"REMARK query_anchored_aln ";
185 if ( map[
ii] ) output << fasta_seq->at(ii);
189 core::io::pdb::dump_pdb( query_pose, output );
196 tr.
Debug <<
"finished building partial models." << std::endl;
199 std::cout <<
"caught exception " << e.
msg() << std::endl;
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.
utility::keys::lookup::end< KeyType > const end
Platform independent operations on files (except I/O)
int main(int argc, char *argv[])
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)
Program exit functions and macros.
File name class supporting Windows and UN*X/Linux format names.
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")