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/pdb_writer.hh>
24 #include <core/pose/Pose.hh>
28 #include <protocols/viewer/viewers.hh>
30 #include <core/init/init.hh>
52 using namespace protocols;
56 OPT_KEY( Boolean, remove_variant_cutpoint_atoms )
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;
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;
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;
StringVectorOptionKey const tags("in:file:tags")
#define utility_exit_with_message(m)
Exit with file + line + message.
virtual std::string const msg() const
BooleanOptionKey const scoring
common derived classes for thrown exceptions
IntegerOptionKey const end
macros to define options on a per-application basis at the top of app files (those with main) ...
IntegerOptionKey const iter
basic::options::OptionKeys collection
std::vector with 1-based indexing
basic::options::OptionKeys collection
rule< Scanner, options_closure::context_t > options
#define OPT_KEY(type, key)
#define NEW_OPT(akey, help, adef)
FileVectorOptionKey const silent
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
basic::options::OptionKeys collection
FileVectorOptionKey const silent("in:file:silent")
void init()
set global 'init_was_called' to true
Program options global and initialization function.
rule< Scanner, tag_closure::context_t > tag
StringOptionKey const prefix("out:prefix")
StringOptionKey const user
rule< Scanner, option_closure::context_t > option