22 #include <core/types.hh>
27 #include <core/chemical/ResidueTypeSet.fwd.hh>
28 #include <core/chemical/ChemicalManager.hh>
30 #include <protocols/filters/Filter.fwd.hh>
33 #include <protocols/contact_map/ContactMap.hh>
35 #include <core/pose/Pose.hh>
37 #include <core/import_pose/pose_stream/util.hh>
38 #include <core/import_pose/pose_stream/MetaPoseInputStream.hh>
56 std::string current_region =
"";
59 protocols::moves::Movers_map movers;
60 protocols::filters::Filters_map
filters;
63 if ( region_def ==
"" ) {
64 std::ostringstream oss;
65 oss <<
"1-" << pose.n_residue();
66 region_def = oss.str();
69 while ( region_def !=
"" ) {
71 using namespace basic::options::OptionKeys;
75 if (
pos == std::string::npos ) {
79 current_region = region_def.substr(0,
pos);
80 region_def = region_def.substr(
pos+1);
82 pos=current_region.find(
':');
84 if (
pos == std::string::npos ) {
85 tag->setOption(
"region1", current_region);
86 }
else if ( current_region.find(
"ligand=")==std::string::npos ) {
87 tag->setOption(
"region1", current_region.substr(0,
pos));
88 tag->setOption(
"region2", current_region.substr(
pos+1));
90 if ( current_region.find(
"ligand=")>
pos ) {
91 tag->setOption(
"region1", current_region.substr(0,
pos));
92 tag->setOption(
"ligand", current_region.substr(
pos+8));
94 tag->setOption(
"region1", current_region.substr(
pos+1));
95 tag->setOption(
"ligand", current_region.substr(7,
pos-7));
101 tag->setOption(
"models_per_file", 0);
104 cm.parse_my_tag( tag, data, filters , movers, pose);
107 output_prefix +=current_region;
108 cm.set_output_prefix(output_prefix);
116 int main(
int argc,
char* argv[]) {
121 using namespace core::import_pose::pose_stream;
123 using namespace basic::options::OptionKeys;
124 using namespace core;
149 core::chemical::ResidueTypeSetCOP rsd_set =
150 ChemicalManager::get_instance()->residue_type_set(
156 MetaPoseInputStream
input( streams_from_cmd_line() );
159 if ( ! input.has_another_pose() ) {
160 tr.
Info <<
"No pose supplied - exiting without further action! "<< std::endl;
165 input.fill_pose(
pose, *rsd_set);
175 while ( input.has_another_pose() ) {
176 input.fill_pose(
pose, *rsd_set);
178 for (
core::Size i=1 ; i <= maps.size(); i++ ) {
183 for (
core::Size i=1 ; i <= maps.size(); i++ ) {
184 maps[i].write_to_file();
190 std::cout <<
"caught exception " << e.
msg() << std::endl;
StringVectorOptionKey const tags("in:file:tags")
virtual std::string const msg() const
FileVectorOptionKey const extra_res("in:file:extra_res")
StringOptionKey const residue_type_set("in:file:residue_type_set")
void init(int argc, char *argv[])
Command line init() version.
FileVectorOptionKey const l("in:file:l")
StringOptionKey const silent_struct_type("in:file:silent_struct_type")
FileVectorOptionKey const extra_res_cen("in:file:extra_res_cen")
macros to define options on a per-application basis at the top of app files (those with main) ...
std::vector with 1-based indexing
FileVectorOptionKey const extra_res_fa("in:file:extra_res_fa")
utility::pointer::shared_ptr< Tag > TagOP
basic::options::OptionKeys collection
rule< Scanner, options_closure::context_t > options
utility::options::OptionCollection option
OptionCollection global.
BooleanOptionKey const filters
general-purpose store for any reference-count derived object
BooleanOptionKey const cm
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 ...
FileVectorOptionKey const silent("in:file:silent")
An object for reading/writing a simple xml-like language.
PathVectorOptionKey const database("in:path:database")
Program options global and initialization function.
rule< Scanner, tag_closure::context_t > tag
BooleanOptionKey const chemical
FileVectorOptionKey const s("in:file:s")