17 #include <protocols/rigid/RigidBodyMover.hh>
18 #include <protocols/backrub/BackrubMover.hh>
19 #include <protocols/moves/MonteCarlo.hh>
22 #include <core/conformation/Residue.hh>
23 #include <core/conformation/Conformation.hh>
25 #include <core/io/pdb/pose_io.hh>
26 #include <core/pack/task/TaskFactory.hh>
27 #include <core/pack/task/PackerTask.hh>
28 #include <core/pack/pack_rotamers.hh>
29 #include <core/pose/Pose.hh>
30 #include <core/scoring/ScoreFunction.hh>
31 #include <core/scoring/ScoreFunctionFactory.hh>
32 #include <core/scoring/TenANeighborGraph.hh>
33 #include <core/pose/PDBInfo.hh>
34 #include <core/kinematics/MoveMap.hh>
35 #include <core/optimization/MinimizerOptions.hh>
36 #include <core/optimization/AtomTreeMinimizer.hh>
39 #include <core/id/AtomID_Map.hh>
40 #include <protocols/pockets/PocketConstraint.hh>
41 #include <protocols/pockets/PocketGrid.hh>
42 #include <core/scoring/func/ScalarWeightedFunc.hh>
43 #include <core/scoring/Energies.hh>
45 #include <basic/options/keys/out.OptionKeys.gen.hh>
46 #include <basic/options/keys/pocket_grid.OptionKeys.gen.hh>
60 #include <core/import_pose/import_pose.hh>
66 using namespace core::scoring;
67 using namespace core::optimization;
68 using namespace basic::options::OptionKeys;
74 main(
int argc,
char * argv [] )
77 NEW_OPT ( num_angles,
"Number of different pose angles to measure score at", 1);
80 int angles =
option[ num_angles ];
82 fprintf (stderr,
"Error: invalid number of angles. Must be greather than 0\n");
91 core::import_pose::pose_from_pdb( input_pose, input_pdb_name );
94 scoring::ScoreFunctionOP
scorefxn( get_score_function() );
96 (*scorefxn)(input_pose);
97 core::Real const starting_total_score = input_pose.energies().total_energies()[ total_score ];
98 std::cout <<
"Total score at start without constraint is: " << starting_total_score << std::endl;
101 std::string resid(
option[ OptionKeys::pocket_grid::central_relax_pdb_num ]);
104 std::vector< conformation::ResidueCOP >
residues = protocols::pockets::PocketGrid::getRelaxResidues(input_pose, resid);
135 if ( residues.size() == 0 ) {
136 std::cout <<
"ERROR!! Invalid residue to backrub around" << std::endl;
143 protocols::pockets::PocketGrid pg( residues );
144 for (
int i=0; i<angles; ++i ) {
164 if ( pg.autoexpanding_pocket_eval( residues, input_pose ) ) {
165 constraint_pocket_score += pg.netTargetPocketVolume();
166 largest_pocket_score += pg.netTargetPocketVolume();
171 if (
option[ OptionKeys::pocket_grid::pocket_dump_pdbs ]() ) {
174 if (
option[ OptionKeys::pocket_grid::pocket_dump_exemplars ]() ) {
175 pg.dumpExemplarToFile();
179 constraint_pocket_score /= angles;
180 largest_pocket_score /= angles;
181 std::cout <<
"Pocket score (unweighted) is: " << constraint_pocket_score << std::endl;
182 std::cout <<
"Largest pocket score (unweighted) is: " << largest_pocket_score << std::endl;
184 std::cout <<
"caught exception " << e.
msg() << std::endl;
int main(int argc, char *argv[])
General testing code.
virtual std::string const msg() const
void init(int argc, char *argv[])
Command line init() version.
Conversions between degrees and radians.
common derived classes for thrown exceptions
std::string start_file()
kind of like the old -s – just one file
rule< Scanner, options_closure::context_t > options
#define OPT_KEY(type, key)
Output file stream wrapper for uncompressed and compressed files.
Option lookup functions emulating Rosetta++ equivalents for transitional use.
#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
xyzVector and xyzMatrix functions
rule< Scanner, option_closure::context_t > option