15 #include <core/types.hh>
16 #include <core/chemical/AA.hh>
17 #include <core/chemical/ChemicalManager.hh>
18 #include <core/pose/util.hh>
20 #include <core/io/silent/SilentStruct.hh>
21 #include <core/io/silent/SilentFileData.hh>
22 #include <core/io/pdb/pose_io.hh>
24 #include <core/pose/Pose.hh>
28 #include <protocols/viewer/viewers.hh>
30 #include <core/init/init.hh>
43 #include <basic/options/keys/in.OptionKeys.gen.hh>
44 #include <basic/options/keys/out.OptionKeys.gen.hh>
52 using namespace protocols;
54 using io::pdb::dump_pdb;
56 OPT_KEY( Boolean, remove_variant_cutpoint_atoms )
63 using namespace core::scoring;
65 using namespace basic::options::OptionKeys;
69 core::chemical::ResidueTypeSetCOP rsd_set;
70 rsd_set = core::chemical::ChemicalManager::get_instance()->residue_type_set( core::chemical::FA_STANDARD );
73 core::io::silent::SilentFileData silent_file_data;
77 silent_file_data.read_file( infile );
85 bool use_tags =
false;
86 std::set< std::string > desired_tags;
87 if (
option[ in::file::tags ].active() ) {
92 for ( core::io::silent::SilentFileData::iterator iter = silent_file_data.begin(),
end = silent_file_data.end(); iter !=
end; ++iter ) {
94 std::string
const tag = iter->decoy_tag();
96 if ( use_tags && ( !desired_tags.count( tag ) ) )
continue;
98 std::cout <<
"Extracting: " << tag << std::endl;
100 iter->fill_pose(
pose, *rsd_set );
106 if (
option[ remove_variant_cutpoint_atoms ]()==
true ) {
107 for (
Size n = 1; n <=
pose.total_residue(); n++ ) {
108 pose::remove_variant_type_from_pose_residue(
pose, core::chemical::CUTPOINT_LOWER, n );
109 pose::remove_variant_type_from_pose_residue(
pose, core::chemical::CUTPOINT_UPPER, n );
113 std::string out_prefix =
"";
117 pose.dump_pdb( out_prefix + tag +
".pdb" );
133 main(
int argc,
char * argv [] )
138 std::cout << std::endl <<
"Basic usage: " << argv[0] <<
" -in::file::silent <silent file> -tags <model tag like S_00001> " << std::endl;
139 std::cout << std::endl <<
" Type -help for full slate of options." << std::endl << std::endl;
141 NEW_OPT( remove_variant_cutpoint_atoms ,
"remove_variant_cutpoint_atoms",
false );
151 protocols::viewer::viewer_main(
my_main );
153 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
BooleanOptionKey const user("options:user")
utility::keys::lookup::end< KeyType > const end
common derived classes for thrown exceptions
basic::options::OptionKeys collection
std::vector with 1-based indexing
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
utility::keys::lookup::begin< KeyType > const begin
void init()
set global 'init_was_called' to true
Program options global and initialization function.
rule< Scanner, tag_closure::context_t > tag
int const silent
Named verbosity levels.
rule< Scanner, option_closure::context_t > option