Rosetta
|
#include <PointMutScanDriver.hh>
Public Member Functions | |
PointMutScanDriver (utility::vector1< std::string > &pdb_file_names, bool double_mutant_scan, std::string const &list_file, bool output_mutant_structures) | |
Main constructor for the class. What all does it do? More... | |
virtual | ~PointMutScanDriver () |
Destructor. What all needs to be done here? More... | |
void | go () |
Entry point for the pmut_scan protocol. This is function the app calls to do the scan. More... | |
void | read_in_structures () |
Reads in the structure (or list of structures) specified on the command line to a class member variable. Create Pose objects for all of the structures because we'll pass these out to the slave nodes later. More... | |
void | fill_mutations_list () |
Determines whether the user specified a list of mutants or just wants to do a scan over all possible combinations. More... | |
void | calculate_neighbor_table (core::pose::Pose &pose, utility::vector1< utility::vector1< bool > > &neighbors) |
Calculates the 10A neighbor graph using the given pose object and then sets values in a 2D array to indicate which resids are neighbors. More... | |
void | make_specific_mutant (utility::vector1< core::pose::Pose > &mutant_poses, utility::vector1< core::pose::Pose > &native_poses, protocols::pmut_scan::Mutant &m, std::string mutation_string="", std::string mutation_string_PDB_numbering="") |
Function which takes in a mutation to make (either single, double or more) and calls itself recursively until the desired structure is created. Useful for testing certain combinations of mutations (like putting two double mutants together) without having to run an entire scan protocol that would cover those mutations. More... | |
virtual core::Energy | score (core::pose::Pose &pose) |
score the pose for the purposes of determining if a mutation is "good" or not. In the base implementation, it's just a scorefunction call, but in child implementations it may be fancier (for example, calculating a binding energy instead) More... | |
core::scoring::ScoreFunctionCOP | get_scorefxn () const |
accessor for scorefxn_ now that it is private member data More... | |
virtual bool | reject_mutant (Mutant const &, core::pose::Pose const &) |
offers a chance for child classes to inject mutant selection logic More... | |
void | set_ddG_cutoff (core::Real threshold) |
utility::vector1< Mutant >::const_iterator | mutants_begin () const |
returns a const iterator to the beginning of the Mutant data member variable vector More... | |
utility::vector1< Mutant >::const_iterator | mutants_end () const |
returns a const iterator to the end of the Mutant data member variable vector More... | |
core::Size | n_mutants () const |
returns the size of the Mutant data member variable vector More... | |
Private Member Functions | |
void | make_mutants () |
Calls make_specific_mutant on all mutants assigned to this node. Also responsible for creating the score function that's used for all mutants. More... | |
void | make_mutant_structure (core::pose::Pose &mutant_pose, core::pose::Pose &native_pose, protocols::pmut_scan::MutationData const &md) |
Given mutant and native pose references and the mutation to make, this function constructs all the necessary PackerTask Operations and Movers to apply the mutation and repacking steps to both the mutant and native poses. More... | |
void | barrier () |
std::string | node_name (core::Size rank) |
void | read_mutants_list_file (std::string &list_file) |
If the user specified mutants, it reads the lines in the mutant list file and parses those lines to get mutation data and then saves them all to the class member variable. Needs access to a pose to translate the lines in the mutations_list file to pose numbering. More... | |
void | divide_up_mutations () |
This function takes the vector of all possible mutants and splits them up as evenly as possible among all the CPUs. More... | |
Private Attributes | |
bool | double_mutant_scan_ |
std::string | mutants_list_file_ |
bool | output_mutant_structures_ |
utility::vector1< core::pose::Pose > | input_poses_ |
utility::vector1< Mutant > | all_mutants_ |
utility::vector1< Mutant > | mutants_list_ |
utility::vector1< std::string > | pdb_file_names_ |
core::Real | DDG_cutoff_ |
core::scoring::ScoreFunctionOP | scorefxn_ |
core::Size | MPI_rank_ |
core::Size | MPI_nprocs_ |
protocols::pmut_scan::PointMutScanDriver::PointMutScanDriver | ( | utility::vector1< std::string > & | pdb_file_names, |
bool | double_mutant_scan, | ||
std::string const & | list_file, | ||
bool | output_mutant_structures | ||
) |
Main constructor for the class. What all does it do?
References core::scoring::hbonds::HBondOptions::decompose_bb_hb_into_pair_energies(), core::scoring::methods::EnergyMethodOptions::hbond_options(), MPI_nprocs_, protocols::wum::mpi_rank(), MPI_rank_, read_in_structures(), and scorefxn_.
|
virtual |
Destructor. What all needs to be done here?
|
private |
Make all processes stop and wait here.
Referenced by go().
void protocols::pmut_scan::PointMutScanDriver::calculate_neighbor_table | ( | core::pose::Pose & | pose, |
utility::vector1< utility::vector1< bool > > & | neighbors | ||
) |
Calculates the 10A neighbor graph using the given pose object and then sets values in a 2D array to indicate which resids are neighbors.
References core::conformation::Residue::atom(), core::pose::Pose::conformation(), core::conformation::find_neighbors(), core::conformation::Residue::first_sidechain_atom(), core::conformation::Residue::nheavyatoms(), core::pose::Pose::residue(), core::conformation::residue_point_graph_from_conformation(), core::pose::Pose::size(), and core::conformation::Atom::xyz().
Referenced by fill_mutations_list().
|
private |
This function takes the vector of all possible mutants and splits them up as evenly as possible among all the CPUs.
References all_mutants_, MPI_nprocs_, MPI_rank_, mutants_list_, protocols::stepwise::modeler::rna::sleep(), and protocols::pmut_scan::TR().
Referenced by go().
void protocols::pmut_scan::PointMutScanDriver::fill_mutations_list | ( | ) |
Determines whether the user specified a list of mutants or just wants to do a scan over all possible combinations.
If we're doing a scan over all possible mutations:
If we have a two residue protein, 1 and 2, there are 19 possible aa's we can mutate each residue to. Since 1 and 2 are independent, the number of possible double mutants is 19*19 = 361. It's easy to enumerate all of the possible double mutants, but we want to come up with an efficient way of making those mutants and calculating the ddGs. The easiest solution is to enumerate all of the possible double mutants, make that a work unit, and then distribute all of the work units out to a large cluster. The downside to this approach is that several processors will end up making the same mutation, at least in part. For example, the double mutant A1C A2C is similar to the mutant A1C A2D. In fact, A1C will have to be paired not only with A2C and A2D, but also A2E, A2F and so on. It would be more efficient to make a pose for A1C, and then go into a second for loop that tries A2C-A2W on that already mutated pose.
What's the outermost thing this protocol has to do. For the single mutant scan, you have to try all 19 non-wt aas at every position. That lends itself to parallelization rather easily. Each protein position is independent of the others so you can have nres processes each testing the mutations at that position. At most, each processor will test 19 mutations. With double_mutants, you have to fix one mutation (eg. A1C) and then try all possible other mutations at all other positions. So, if you have nres processors, each processor will fix some position to 1 of 19 aas and then scan through a mutant at all other positions. Let's assume we have a 10 residue protein. Position 1 will mutate to 1 of 19 aas. For each of 1 of those 19, we have to test 19 * 9 = 171 other mutations (at the other positions). That results in a grand total of 3249 possibilites. And that's only residue 1's mutants! We also have to try to fix the 19 non-wt aas for position 2 and try 19 * 8 = 152 mutations at the other locations for a total of 2888 mutations for just position
Testing ~10 million mutants even on 512 cpus could take quite a bit of time. We really need to find a way to prune down the number of possible mutants to just the ones that will be most interesting. I definitely could change it so that if the two mutations are more than some number of Angstroms apart, then don't bother making that mutant and scoring. The question then becomes how often you have a stabilizing first mutant, and then find a stabilizing (better than -0.1) second mutant on the first structure that is more than xAng away. Probably happens often.
Another problem is that the parallelization is not balanced. Because we have directionality in the approach for testing double mutants - for example, if we've already done 1AC 2AC we don't have to do 2AC 1AC - processor 1 which handles all of the possible mutants at 1 and every other residue has to do way way less
For triple mutants, assuming a 10 residue protein there would be 19 * 19 * 19 * nres(nres+1)/2, or ~377,000, possible mutants. The 233 residue antibody: 186,983,199 possible combinations.
References core::conformation::Residue::aa(), protocols::pmut_scan::Mutant::add_mutation(), all_mutants_, calculate_neighbor_table(), double_mutant_scan_, input_poses_, core::chemical::ResidueTypeBase::is_protein(), MPI_rank_, mutants_list_file_, core::conformation::Residue::name1(), core::chemical::num_canonical_aas, core::chemical::oneletter_code_from_aa(), core::pose::Pose::pdb_info(), read_mutants_list_file(), reject_mutant(), core::pose::Pose::residue(), core::pose::Pose::residue_type(), core::pose::Pose::size(), and protocols::pmut_scan::TR().
Referenced by go().
core::scoring::ScoreFunctionCOP protocols::pmut_scan::PointMutScanDriver::get_scorefxn | ( | ) | const |
accessor for scorefxn_ now that it is private member data
References scorefxn_.
Referenced by protocols::pmut_scan::AlterSpecDisruptionDriver::AlterSpecDisruptionDriver().
void protocols::pmut_scan::PointMutScanDriver::go | ( | ) |
Entry point for the pmut_scan protocol. This is function the app calls to do the scan.
References barrier(), divide_up_mutations(), fill_mutations_list(), make_mutants(), MPI_rank_, node_name(), and protocols::pmut_scan::TR().
|
private |
Given mutant and native pose references and the mutation to make, this function constructs all the necessary PackerTask Operations and Movers to apply the mutation and repacking steps to both the mutant and native poses.
References core::chemical::aa_from_oneletter_code(), core::sequence::end, core::pose::Pose::metric(), protocols::pmut_scan::MutationData::mut_residue(), protocols::pmut_scan::MutationData::mutation_string(), core::chemical::num_canonical_aas, core::conformation::membrane::out, protocols::pmut_scan::MutationData::pose_resnum(), scorefxn_, and core::pose::Pose::size().
Referenced by make_specific_mutant().
|
private |
Calls make_specific_mutant on all mutants assigned to this node. Also responsible for creating the score function that's used for all mutants.
References protocols::comparative_modeling::features::A, input_poses_, make_specific_mutant(), MPI_rank_, mutants_list_, protocols::pmut_scan::TR(), and protocols::comparative_modeling::features::X.
Referenced by go().
void protocols::pmut_scan::PointMutScanDriver::make_specific_mutant | ( | utility::vector1< core::pose::Pose > & | mutant_poses, |
utility::vector1< core::pose::Pose > & | native_poses, | ||
protocols::pmut_scan::Mutant & | m, | ||
std::string | mutation_string = "" , |
||
std::string | mutation_string_PDB_numbering = "" |
||
) |
Function which takes in a mutation to make (either single, double or more) and calls itself recursively until the desired structure is created. Useful for testing certain combinations of mutations (like putting two double mutants together) without having to run an entire scan protocol that would cover those mutations.
References DDG_cutoff_, core::pose::Pose::dump_scored_pdb(), core::chemical::element::F, make_mutant_structure(), protocols::pmut_scan::MutationData::mutation_string(), protocols::pmut_scan::MutationData::mutation_string_PDB_numbering(), protocols::pmut_scan::Mutant::n_mutations(), core::conformation::membrane::out, output_mutant_structures_, pdb_file_names_, protocols::pmut_scan::Mutant::pop_mutation(), score(), scorefxn_, protocols::pmut_scan::TR(), and protocols::comparative_modeling::features::X.
Referenced by make_mutants().
utility::vector1< Mutant >::const_iterator protocols::pmut_scan::PointMutScanDriver::mutants_begin | ( | ) | const |
returns a const iterator to the beginning of the Mutant data member variable vector
References all_mutants_.
utility::vector1< Mutant >::const_iterator protocols::pmut_scan::PointMutScanDriver::mutants_end | ( | ) | const |
returns a const iterator to the end of the Mutant data member variable vector
References all_mutants_.
Size protocols::pmut_scan::PointMutScanDriver::n_mutants | ( | ) | const |
returns the size of the Mutant data member variable vector
References all_mutants_.
|
private |
Referenced by go().
void protocols::pmut_scan::PointMutScanDriver::read_in_structures | ( | ) |
Reads in the structure (or list of structures) specified on the command line to a class member variable. Create Pose objects for all of the structures because we'll pass these out to the slave nodes later.
NOTE: This protocol assumes that if you pass multiple structures, they are all variants of the same structure and you want to use all of them for the ddG calculation.
References input_poses_, core::import_pose::PDB_file, pdb_file_names_, and core::import_pose::pose_from_file().
Referenced by PointMutScanDriver().
|
private |
If the user specified mutants, it reads the lines in the mutant list file and parses those lines to get mutation data and then saves them all to the class member variable. Needs access to a pose to translate the lines in the mutations_list file to pose numbering.
References protocols::pmut_scan::Mutant::add_mutation(), all_mutants_, input_poses_, core::conformation::Residue::name1(), core::pose::Pose::pdb_info(), core::pose::Pose::residue(), and protocols::pmut_scan::TR().
Referenced by fill_mutations_list().
|
inlinevirtual |
offers a chance for child classes to inject mutant selection logic
Reimplemented in protocols::pmut_scan::AlterSpecDisruptionDriver.
Referenced by fill_mutations_list().
|
virtual |
score the pose for the purposes of determining if a mutation is "good" or not. In the base implementation, it's just a scorefunction call, but in child implementations it may be fancier (for example, calculating a binding energy instead)
Reimplemented in protocols::pmut_scan::AlterSpecDisruptionDriver.
References scorefxn_.
Referenced by make_specific_mutant().
void protocols::pmut_scan::PointMutScanDriver::set_ddG_cutoff | ( | core::Real | threshold | ) |
References DDG_cutoff_.
|
private |
Referenced by divide_up_mutations(), fill_mutations_list(), mutants_begin(), mutants_end(), n_mutants(), and read_mutants_list_file().
|
private |
Referenced by make_specific_mutant(), and set_ddG_cutoff().
|
private |
Referenced by fill_mutations_list().
|
private |
Referenced by fill_mutations_list(), make_mutants(), read_in_structures(), and read_mutants_list_file().
|
private |
Referenced by divide_up_mutations(), and PointMutScanDriver().
|
private |
Referenced by divide_up_mutations(), fill_mutations_list(), go(), make_mutants(), and PointMutScanDriver().
|
private |
Referenced by divide_up_mutations(), and make_mutants().
|
private |
Referenced by fill_mutations_list().
|
private |
Referenced by make_specific_mutant().
|
private |
Referenced by make_specific_mutant(), and read_in_structures().
|
private |
Referenced by get_scorefxn(), make_mutant_structure(), make_specific_mutant(), PointMutScanDriver(), and score().