Rosetta
|
Performs the work done by the energy_based_clustering app. Uses an energy-biased cookie-cutter approach to cluster a large number of structures without generating an all-by-all RMSD matrix. More...
#include <EnergyBasedClusteringProtocol.hh>
Public Member Functions | |
EnergyBasedClusteringProtocol () | |
Default constructor – initializes from global options system. More... | |
EnergyBasedClusteringProtocol (EnergyBasedClusteringOptions const &options) | |
Options constructor – avoids access to global options system. More... | |
~EnergyBasedClusteringProtocol () override | |
EnergyBasedClusteringProtocolOP | clone () const |
void | go () |
Perform the clustering, based on options set in the options object. More... | |
core::Size | n_clusters_from_last_run () const |
Get the number of clusters returned from the last call to go(). More... | |
Static Public Member Functions | |
static void | register_options () |
Indicate which options-system options are relvant. More... | |
Private Member Functions | |
bool | is_in_list (core::Size const val, utility::vector1< core::Size > const &vallist) const |
Function to determine whether a value is in a list. More... | |
std::string | do_ABOXYZ_bin_analysis (core::pose::Pose const &pose) const |
Given a pose, generate a string for its ABOXYZ bins. More... | |
bool | is_all_alpha_aa_or_peptoid (core::pose::Pose const &pose) const |
Is a pose composed only of alpha amino acids and peptoid residues (returns true), or does it have other residues (returns false)? More... | |
void | align_with_offset (core::pose::Pose &pose1, core::pose::Pose const &pose2, core::Size const offset, utility::vector1< core::id::NamedAtomID > const &extra_atom_list) const |
Align one pose to another with an offset in the residue count. More... | |
void | pose_from_posedata (core::pose::Pose const &inputpose, core::pose::Pose &outputpose, EBC_ClusterType const clustermode, std::string const &pose_descriptor, utility::vector1< core::Real > const &posedata, utility::vector1< core::Real > const &reconstruction_data, bool const rebuild_all_in_dihedral_mode=false) const |
Reconstruct a pose from posedata. More... | |
void | sort_cluster_list (utility::vector1< core::Size > &statelist, utility::vector1< core::Real > &poseenergies) const |
Sort the list of states in a cluster by energies. More... | |
core::Real | calc_dist (utility::vector1< core::Real > const &vect1, utility::vector1< core::Real > const &vect2, EBC_ClusterType const clustmode, utility::vector1< numeric::xyzVector< core::Real > > const &alignmentvect1, utility::vector1< numeric::xyzVector< core::Real > > const &alignmentvect2, core::Size const nresidues, core::pose::Pose const &firstpose) const |
Function to calculate the RMSD between two poses, based on whatever is in "posedata" for the second only. This assumes that a pose already exists for the first, and that this is provided in refpose. More... | |
core::Real | calc_dist (utility::vector1< core::Real > const &vect1, utility::vector1< core::Real > const &vect2, EBC_ClusterType const clustmode, utility::vector1< numeric::xyzVector< core::Real > > const &alignmentvect1, utility::vector1< numeric::xyzVector< core::Real > > const &alignmentvect2, core::Size const nresidues, core::pose::Pose const &firstpose, core::Size &offset, core::Size &permutation) const |
Overloaded form of calc_dist for cyclic permutations and for homooligomer swapping. More... | |
void | swap_alignment_vector (utility::vector1< numeric::xyzVector< core::Real > > const &parentvect, utility::vector1< numeric::xyzVector< core::Real > > &swappedvect, core::pose::Pose const &refpose, core::Size const permutation_number) const |
Swap chains in an alignment vector (vector of x,y,z atom coordinates). More... | |
core::Size | alignment_atoms_in_res (core::pose::Pose const &pose, core::Size const position) const |
Returns the number of alignment atoms in a given residue. More... | |
core::Size | alignment_torsions_in_res (core::pose::Pose const &pose, core::Size const position) const |
Returns the number of alignment torsion angles stored for a given residue. More... | |
bool | use_this_atom (core::conformation::Residue const &res1, core::conformation::Residue const &res2, core::Size const atomno, std::string const &atname1, std::string const &atname2="") const |
Function containing the special-case logic for alpha, beta, and gamma-amino acids. More... | |
bool | use_in_rmsd (core::pose::Pose const &pose1, core::pose::Pose const &pose2, core::Size resno, core::Size atomno, utility::vector1< core::id::NamedAtomID > const &extra_atom_list) const |
Given a residue number, and atom number, and a pose, determine whether that atom gets used in the RMSD calculation. More... | |
bool | use_in_rmsd_offset (core::pose::Pose const &pose1, core::pose::Pose const &pose2, core::Size resno2, core::Size atomno, core::Size const pose1_offset, utility::vector1< core::id::NamedAtomID > const &extra_atom_list) const |
Given two poses, a residue number in the second pose, and atom number, and and offset for circular permutation, determine whether the atom is to be used in RMSD calculation. More... | |
void | do_option_checks () const |
Check that options have been set sensibly. More... | |
core::scoring::ScoreFunctionOP | set_up_scorefunction () const |
Get the global scorefunction, and set up constraints energies appropriately. More... | |
void | parse_extra_atom_list (utility::vector1< core::id::NamedAtomID > &extra_atom_list) const |
Given a vector of strings of format resnum:atomname, parse this out into a vector of NamedAtomIDs. More... | |
void | add_user_constraints (core::pose::Pose &mypose) const |
Function to add user-specified constraints (specified with a CST file) to a pose. More... | |
void | swap_chains (core::pose::Pose ¤tpose, core::Size const permutation_number) const |
Swap chains around in a pose (circular permutation of chain indices). More... | |
void | get_start_and_end_aa (core::Size const chain_index, core::pose::Pose const &pose, core::Size &startaa, core::Size &endaa) const |
Get the start and end indices of chain chain_index, and store these in startaa and endaa. More... | |
void | get_start_and_end_indices (core::Size const chain_index, core::pose::Pose const &pose, core::Size &startindex, core::Size &endindex) const |
Get the start and end indices of chain chain_index, and store these in startaa and endaa. More... | |
void | make_disulfides (core::pose::Pose &mypose) const |
Function to form the disulfides based on user-specified disulfide positions (if provided), or based on automatic detection (if not). More... | |
void | mutate_to_alanine (core::pose::Pose &mypose) const |
Function to mutate a pose to a chain of alanines. More... | |
void | check_backbones_match (core::pose::Pose const &pose1, core::pose::Pose const &pose2) const |
Function to check whether two poses have matching classes of residues at matching positions: More... | |
void | storeposedata (core::pose::Pose const &pose, utility::vector1< core::Real > &posedata, utility::vector1< numeric::xyzVector< core::Real > > &alignmentdata, utility::vector1< core::Real > &dihedral_mode_reconstruction_data, EBC_ClusterType const clustermode, utility::vector1< core::id::NamedAtomID > const &extra_atom_list) const |
Given an input pose, store only the relevant data needed for clustering. More... | |
void | do_initial_import_and_scoring (core::Size &count, core::Real &lowestE, core::Size &lowestE_index, core::pose::Pose &firstpose, protocols::cyclic_peptide::CycpepSymmetryFilter const &symmfilter, utility::vector1< core::Real > &poseenergies, utility::vector1< std::string > &pose_descriptors, utility::vector1< utility::vector1< core::Real > > &posedata, utility::vector1< utility::vector1< numeric::xyzVector< core::Real > > > &alignmentdata, utility::vector1< utility::vector1< core::Real > > &dihedral_reconstruction_data, utility::vector1< std::string > &pose_binstrings, utility::vector1< core::Size > &cluster_assignments, utility::vector1< core::Size > &cluster_offsets, utility::vector1< core::Size > &cluster_oligomer_permutations, core::scoring::ScoreFunctionOP sfxn, std::map< std::string, core::Real > const &loaded_scores, utility::vector1< core::id::NamedAtomID > const &extra_atom_list) const |
Import all structures and score them, setting up derived data. More... | |
void | remove_extraneous_virtuals (core::pose::Pose &pose) const |
Remove cutpoint variants that add extraneous virtual atoms that mess up atom indexing. More... | |
void | add_cyclic_constraints (core::pose::Pose &mypose) const |
Function to add cyclic constraints to a pose. More... | |
void | parse_alternative_score_file (std::map< std::string, core::Real > &scores) const |
Loads alternative scores from file and writes them into scores. More... | |
Static Private Member Functions | |
static core::Size | num_asymmetric_binstrings (std::set< std::string > const &binstrings, bool const circularly_permute) |
Count the number of binstrings which are not the same as their mirror image. More... | |
static core::Size | num_asymmetric_binstrings_with_mirror_counterpart_represented (std::set< std::string > const &binstrings, bool const circularly_permute) |
Count the number of asymmetric binstrings (binstrings which are not the same as their mirror image) for which the mirror image is also in the set. More... | |
static std::string | permute_string (std::string const &string_in) |
Given a string of the form "ABCDEFG", return "BCDEFGA". More... | |
static char | get_mirror_bin (char const bin_in) |
Given a bin, get its mirror. (A–X, B–Y, O–Z). More... | |
static std::string | get_mirror_bin_sequence (std::string const &binstring_in, bool const circularly_permuted_for_alphabetization) |
Given a bin string, get its mirror. More... | |
static char | determine_ABOXYZ_bin (core::Real const &phi, core::Real const &psi, core::Real const &omega) |
Given phi, psi, and omega, determine the ABOXYZ bin. More... | |
static std::string | get_circular_permutation_first_in_alphabetical_order (std::string const &string_in) |
Given an alpha-amino acid bin string, figure out all circular permutations and return the one that's first in alphabetical order. More... | |
Private Attributes | |
EnergyBasedClusteringOptions | options_ |
Clustering options, either read from global options system or passed directly to the protocol. More... | |
std::string | constraints_file_contents_ |
The contents of an optional constraints file. More... | |
core::Size | n_clusters_from_last_run_ |
The number of clusters produced by the last run. More... | |
Friends | |
class | ::EnergyBasedClusteringTests |
Performs the work done by the energy_based_clustering app. Uses an energy-biased cookie-cutter approach to cluster a large number of structures without generating an all-by-all RMSD matrix.
protocols::energy_based_clustering::EnergyBasedClusteringProtocol::EnergyBasedClusteringProtocol | ( | ) |
Default constructor – initializes from global options system.
protocols::energy_based_clustering::EnergyBasedClusteringProtocol::EnergyBasedClusteringProtocol | ( | EnergyBasedClusteringOptions const & | options | ) |
Options constructor – avoids access to global options system.
|
overridedefault |
|
private |
Function to add cyclic constraints to a pose.
References core::pose::Pose::add_constraint(), protocols::simple_moves::DeclareBond::apply(), core::conformation::Residue::atom_index(), CaCN_ANGLE, CNCa_ANGLE, core::conformation::Residue::has(), core::chemical::ResidueType::is_beta_aa(), core::chemical::ResidueType::is_lower_terminus(), core::chemical::ResidueType::is_upper_terminus(), core::pose::remove_lower_terminus_type_from_pose_residue(), core::pose::remove_upper_terminus_type_from_pose_residue(), core::pose::Pose::residue(), core::pose::Pose::residue_type(), protocols::simple_moves::DeclareBond::set(), core::pose::Pose::size(), and core::pose::Pose::total_residue().
Referenced by do_initial_import_and_scoring().
|
private |
Function to add user-specified constraints (specified with a CST file) to a pose.
References protocols::energy_based_clustering::EnergyBasedClusteringOptions::cst_files_, and options_.
Referenced by do_initial_import_and_scoring().
|
private |
Align one pose to another with an offset in the residue count.
References core::id::AtomID::BOGUS_ATOM_ID(), core::pose::initialize_atomid_map(), core::chemical::ResidueType::nheavyatoms(), core::pose::Pose::residue_type(), core::scoring::superimpose_pose(), core::pose::Pose::total_residue(), and use_in_rmsd_offset().
Referenced by go().
|
private |
Returns the number of alignment atoms in a given residue.
Some special-case logic here, since oxygens are counted in peptide-like building-blocks.
References core::pose::Pose::chain(), protocols::energy_based_clustering::EnergyBasedClusteringOptions::chains_to_ignore_, core::conformation::Residue::connected_residue_at_upper(), core::conformation::Residue::has(), core::chemical::ResidueType::is_alpha_aa(), core::chemical::ResidueType::is_beta_aa(), core::chemical::ResidueType::is_gamma_aa(), is_in_list(), core::chemical::ResidueType::is_ligand(), core::chemical::ResidueType::is_metal(), core::chemical::ResidueType::is_n_methylated(), core::chemical::ResidueType::is_oligourea(), core::chemical::ResidueTypeBase::is_peptoid(), core::conformation::Residue::is_peptoid(), core::chemical::ResidueType::is_upper_terminus(), core::chemical::ResidueType::mainchain_atoms(), options_, core::pose::Pose::residue(), core::pose::Pose::residue_type(), protocols::energy_based_clustering::EnergyBasedClusteringOptions::residues_to_ignore_, and protocols::energy_based_clustering::EnergyBasedClusteringOptions::use_CB_.
Referenced by calc_dist(), get_start_and_end_indices(), and swap_alignment_vector().
|
private |
Returns the number of alignment torsion angles stored for a given residue.
References core::pose::Pose::chain(), protocols::energy_based_clustering::EnergyBasedClusteringOptions::chains_to_ignore_, core::conformation::Residue::connected_residue_at_lower(), core::conformation::Residue::connected_residue_at_upper(), is_in_list(), core::chemical::ResidueType::is_ligand(), core::chemical::ResidueType::is_lower_terminus(), core::chemical::ResidueType::is_metal(), core::chemical::ResidueType::is_upper_terminus(), core::conformation::Residue::mainchain_torsions(), options_, core::pose::Pose::residue(), core::pose::Pose::residue_type(), and protocols::energy_based_clustering::EnergyBasedClusteringOptions::residues_to_ignore_.
Referenced by calc_dist().
|
private |
Function to calculate the RMSD between two poses, based on whatever is in "posedata" for the second only. This assumes that a pose already exists for the first, and that this is provided in refpose.
References core::conformation::Residue::chain(), protocols::energy_based_clustering::EnergyBasedClusteringOptions::chains_to_ignore_, core::conformation::Residue::connected_residue_at_lower(), core::conformation::Residue::connected_residue_at_upper(), protocols::energy_based_clustering::EBC_bb_cartesian, protocols::energy_based_clustering::EBC_bb_dihedral, core::chemical::ResidueType::is_ligand(), core::conformation::Residue::is_lower_terminus(), core::chemical::ResidueType::is_metal(), core::conformation::Residue::is_upper_terminus(), core::conformation::Residue::mainchain_torsions(), options_, core::pose::Pose::residue(), core::pose::Pose::residue_type(), and protocols::energy_based_clustering::EnergyBasedClusteringOptions::residues_to_ignore_.
Referenced by calc_dist(), and go().
|
private |
Overloaded form of calc_dist for cyclic permutations and for homooligomer swapping.
References alignment_atoms_in_res(), alignment_torsions_in_res(), calc_dist(), protocols::energy_based_clustering::EnergyBasedClusteringOptions::cluster_cyclic_permutations_, protocols::energy_based_clustering::EnergyBasedClusteringOptions::cyclic_permutation_offset_, protocols::energy_based_clustering::EBC_bb_cartesian, protocols::energy_based_clustering::EBC_bb_dihedral, protocols::energy_based_clustering::EnergyBasedClusteringOptions::homooligomer_swap_, core::pose::Pose::num_chains(), options_, and swap_alignment_vector().
|
private |
Function to check whether two poses have matching classes of residues at matching positions:
References core::pose::Pose::chain(), protocols::energy_based_clustering::EnergyBasedClusteringOptions::chains_to_ignore_, core::chemical::ResidueType::is_alpha_aa(), core::chemical::ResidueType::is_beta_aa(), core::chemical::ResidueType::is_gamma_aa(), is_in_list(), core::chemical::ResidueType::is_ligand(), core::chemical::ResidueType::is_metal(), core::chemical::ResidueType::is_NA(), core::chemical::ResidueTypeBase::is_peptoid(), options_, core::pose::Pose::residue_type(), protocols::energy_based_clustering::EnergyBasedClusteringOptions::residues_to_ignore_, core::id::to_string(), and core::pose::Pose::total_residue().
Referenced by do_initial_import_and_scoring().
EnergyBasedClusteringProtocolOP protocols::energy_based_clustering::EnergyBasedClusteringProtocol::clone | ( | ) | const |
|
staticprivate |
Given phi, psi, and omega, determine the ABOXYZ bin.
Based on the definition in David Baker's cyclic_utilities.py Python script from 2016, with slight modification for symmetry
If psi is in the range (-80, 50], it's B.
In the positive phi case {
If psi is in the range [-50, 80), it's Y.
References core::scoring::omega.
Referenced by do_ABOXYZ_bin_analysis().
|
private |
Given a pose, generate a string for its ABOXYZ bins.
If the -cluster_cyclic_permutations flag is used, all cyclic permutations of the string are considered, and the first in alphabetical order is returned.
References protocols::energy_based_clustering::EnergyBasedClusteringOptions::cluster_cyclic_permutations_, determine_ABOXYZ_bin(), core::pose::Pose::empty(), get_circular_permutation_first_in_alphabetical_order(), core::chemical::ResidueType::is_alpha_aa(), core::chemical::ResidueType::is_ligand(), core::chemical::ResidueTypeBase::is_peptoid(), core::chemical::ResidueType::is_virtual_residue(), core::pose::Pose::omega(), options_, core::pose::Pose::phi(), core::pose::Pose::psi(), core::pose::Pose::residue_type(), and core::pose::Pose::total_residue().
Referenced by do_initial_import_and_scoring().
|
private |
Import all structures and score them, setting up derived data.
Performs disk access.
References add_cyclic_constraints(), add_user_constraints(), protocols::relax::FastRelax::apply(), protocols::cyclic_peptide::CycpepSymmetryFilter::apply(), core::pose::Pose::chain_sequence(), check_backbones_match(), protocols::energy_based_clustering::EnergyBasedClusteringOptions::cluster_by_, protocols::energy_based_clustering::EnergyBasedClusteringOptions::cluster_cyclic_permutations_, protocols::energy_based_clustering::EnergyBasedClusteringOptions::cyclic_, protocols::energy_based_clustering::EnergyBasedClusteringOptions::cyclic_symmetry_, protocols::energy_based_clustering::EnergyBasedClusteringOptions::cyclic_symmetry_mirroring_, do_ABOXYZ_bin_analysis(), protocols::energy_based_clustering::EBC_bb_cartesian, protocols::energy_based_clustering::EBC_bb_dihedral, core::pose::Pose::energies(), core::import_pose::pose_stream::MetaPoseInputStream::fill_pose(), core::import_pose::pose_stream::MetaPoseInputStream::get_last_pose_descriptor_string(), core::conformation::Residue::has(), core::import_pose::pose_stream::MetaPoseInputStream::has_another_pose(), protocols::energy_based_clustering::EnergyBasedClusteringOptions::homooligomer_swap_, is_all_alpha_aa_or_peptoid(), make_disulfides(), protocols::energy_based_clustering::EnergyBasedClusteringOptions::mutate_to_ala_, mutate_to_alanine(), core::pose::Pose::num_jump(), options_, protocols::energy_based_clustering::EnergyBasedClusteringOptions::perform_ABOXYZ_bin_analysis_, protocols::energy_based_clustering::EnergyBasedClusteringOptions::prerelax_, protocols::energy_based_clustering::EnergyBasedClusteringOptions::rebuild_all_in_dihedral_mode_, protocols::energy_based_clustering::EnergyBasedClusteringOptions::relax_rounds_, remove_extraneous_virtuals(), core::pose::Pose::residue(), storeposedata(), core::import_pose::pose_stream::streams_from_cmd_line(), core::scoring::Energies::total_energy(), core::pose::Pose::total_residue(), protocols::TR(), and protocols::energy_based_clustering::EnergyBasedClusteringOptions::use_CB_.
Referenced by go().
|
private |
Check that options have been set sensibly.
Check that symmetry options have been set sensibly.
References protocols::energy_based_clustering::EnergyBasedClusteringOptions::chains_to_ignore_, protocols::energy_based_clustering::EnergyBasedClusteringOptions::cluster_by_, protocols::energy_based_clustering::EnergyBasedClusteringOptions::cluster_cyclic_permutations_, protocols::energy_based_clustering::EnergyBasedClusteringOptions::cluster_radius_, protocols::energy_based_clustering::EnergyBasedClusteringOptions::cyclic_, protocols::energy_based_clustering::EnergyBasedClusteringOptions::cyclic_symmetry_, protocols::energy_based_clustering::EnergyBasedClusteringOptions::cyclic_symmetry_mirroring_, protocols::energy_based_clustering::EnergyBasedClusteringOptions::cyclic_symmetry_threshold_, protocols::energy_based_clustering::EnergyBasedClusteringOptions::cyclic_symmetry_threshold_specified_, protocols::energy_based_clustering::EBC_bb_cartesian, protocols::energy_based_clustering::EBC_bb_dihedral, protocols::energy_based_clustering::EnergyBasedClusteringOptions::homooligomer_swap_, protocols::energy_based_clustering::EnergyBasedClusteringOptions::mutate_to_ala_, options_, protocols::energy_based_clustering::EnergyBasedClusteringOptions::residues_to_ignore_, and protocols::TR().
Referenced by go().
|
staticprivate |
Given an alpha-amino acid bin string, figure out all circular permutations and return the one that's first in alphabetical order.
Strings must be provided in uppercase only.
References permute_string().
Referenced by do_ABOXYZ_bin_analysis(), get_mirror_bin_sequence(), num_asymmetric_binstrings(), and num_asymmetric_binstrings_with_mirror_counterpart_represented().
|
staticprivate |
Given a bin, get its mirror. (A–X, B–Y, O–Z).
Referenced by get_mirror_bin_sequence().
|
staticprivate |
Given a bin string, get its mirror.
If the boolean is true, the sequence put through every circular permutation, and the one that's first alphabetically is selected and returned.
References get_circular_permutation_first_in_alphabetical_order(), and get_mirror_bin().
Referenced by go(), num_asymmetric_binstrings(), and num_asymmetric_binstrings_with_mirror_counterpart_represented().
|
private |
Get the start and end indices of chain chain_index, and store these in startaa and endaa.
References core::pose::Pose::chain(), and core::pose::Pose::total_residue().
Referenced by swap_alignment_vector(), and swap_chains().
|
private |
Get the start and end indices of chain chain_index, and store these in startaa and endaa.
References alignment_atoms_in_res(), core::pose::Pose::chain(), and core::pose::Pose::total_residue().
Referenced by swap_alignment_vector().
void protocols::energy_based_clustering::EnergyBasedClusteringProtocol::go | ( | ) |
Perform the clustering, based on options set in the options object.
References align_with_offset(), calc_dist(), protocols::energy_based_clustering::EnergyBasedClusteringOptions::cluster_by_, protocols::energy_based_clustering::EnergyBasedClusteringOptions::cluster_cyclic_permutations_, protocols::energy_based_clustering::EnergyBasedClusteringOptions::cluster_radius_, protocols::energy_based_clustering::EnergyBasedClusteringOptions::cyclic_symmetry_, protocols::energy_based_clustering::EnergyBasedClusteringOptions::cyclic_symmetry_mirroring_, protocols::energy_based_clustering::EnergyBasedClusteringOptions::cyclic_symmetry_threshold_, do_initial_import_and_scoring(), do_option_checks(), core::pose::Pose::dump_pdb(), get_mirror_bin_sequence(), protocols::energy_based_clustering::EnergyBasedClusteringOptions::homooligomer_swap_, protocols::energy_based_clustering::EnergyBasedClusteringOptions::limit_clusters_, protocols::energy_based_clustering::EnergyBasedClusteringOptions::limit_structures_per_cluster_, n_clusters_from_last_run_, num_asymmetric_binstrings(), num_asymmetric_binstrings_with_mirror_counterpart_represented(), options_, protocols::energy_based_clustering::EnergyBasedClusteringOptions::output_prefix_, parse_alternative_score_file(), parse_extra_atom_list(), protocols::energy_based_clustering::EnergyBasedClusteringOptions::path_to_scores_file_, protocols::energy_based_clustering::EnergyBasedClusteringOptions::perform_ABOXYZ_bin_analysis_, pose_from_posedata(), core::io::silent::SilentFileOptions::read_from_global_options(), protocols::energy_based_clustering::EnergyBasedClusteringOptions::rebuild_all_in_dihedral_mode_, protocols::cyclic_peptide::CycpepSymmetryFilter::set_angle_threshold(), protocols::cyclic_peptide::CycpepSymmetryFilter::set_mirror_symm(), protocols::cyclic_peptide::CycpepSymmetryFilter::set_symm_repeats(), set_up_scorefunction(), protocols::energy_based_clustering::EnergyBasedClusteringOptions::silent_output_, core::pose::Pose::size(), sort_cluster_list(), swap_chains(), protocols::TR(), and core::io::silent::SilentFileData::write_silent_struct().
|
private |
Is a pose composed only of alpha amino acids and peptoid residues (returns true), or does it have other residues (returns false)?
Ignores virtual residues and ligands.
References core::pose::Pose::empty(), core::chemical::ResidueType::is_alpha_aa(), core::chemical::ResidueType::is_ligand(), core::chemical::ResidueTypeBase::is_peptoid(), core::chemical::ResidueType::is_virtual_residue(), core::pose::Pose::residue_type(), and core::pose::Pose::total_residue().
Referenced by do_initial_import_and_scoring().
|
inlineprivate |
Function to determine whether a value is in a list.
References protocols::hybridization::val.
Referenced by alignment_atoms_in_res(), alignment_torsions_in_res(), check_backbones_match(), pose_from_posedata(), storeposedata(), and use_this_atom().
|
private |
Function to form the disulfides based on user-specified disulfide positions (if provided), or based on automatic detection (if not).
References core::pose::Pose::conformation(), core::conformation::Conformation::detect_disulfides(), protocols::energy_based_clustering::EnergyBasedClusteringOptions::disulfide_positions_, core::conformation::Conformation::fix_disulfides(), and options_.
Referenced by do_initial_import_and_scoring(), and pose_from_posedata().
|
private |
Function to mutate a pose to a chain of alanines.
This does not mutate cysteine residues involved in disulfide bonds. Note that this assumes that disulfide bonds have already been built in the pose.
References protocols::simple_moves::MutateResidue::apply(), core::chemical::ResidueType::is_alpha_aa(), core::chemical::ResidueType::is_beta_aa(), core::chemical::ResidueTypeBase::is_d_aa(), core::chemical::ResidueType::is_disulfide_bonded(), core::chemical::ResidueType::is_oligourea(), core::chemical::ResidueTypeBase::is_peptoid(), core::pose::Pose::residue_type(), core::pose::Pose::total_residue(), and core::pose::Pose::update_residue_neighbors().
Referenced by do_initial_import_and_scoring().
|
inline |
Get the number of clusters returned from the last call to go().
Will be zero if go() has not been called.
References n_clusters_from_last_run_.
|
staticprivate |
Count the number of binstrings which are not the same as their mirror image.
References get_circular_permutation_first_in_alphabetical_order(), and get_mirror_bin_sequence().
Referenced by go().
|
staticprivate |
Count the number of asymmetric binstrings (binstrings which are not the same as their mirror image) for which the mirror image is also in the set.
This should always be an even number.
References get_circular_permutation_first_in_alphabetical_order(), and get_mirror_bin_sequence().
Referenced by go().
|
private |
Loads alternative scores from file and writes them into scores.
References options_, protocols::energy_based_clustering::EnergyBasedClusteringOptions::path_to_scores_file_, protocols::hybridization::score, and protocols::TR().
Referenced by go().
|
private |
Given a vector of strings of format resnum:atomname, parse this out into a vector of NamedAtomIDs.
References protocols::energy_based_clustering::EnergyBasedClusteringOptions::extra_rms_atoms_, options_, and protocols::TR().
Referenced by go().
|
staticprivate |
Given a string of the form "ABCDEFG", return "BCDEFGA".
Referenced by get_circular_permutation_first_in_alphabetical_order().
|
private |
Reconstruct a pose from posedata.
The reconstruction_data vector is unused for anything except dihedral-based building whe rebuild_all_in_dihedral_mode is true. In that case, this must be a full vector of coordinates of atoms. Otherwise, it can be empty.
References protocols::analysis::simple_metrics::RunSimpleMetricsMover::apply(), core::id::BB, core::pose::Pose::chain(), protocols::energy_based_clustering::EnergyBasedClusteringOptions::chains_to_ignore_, core::conformation::Residue::connected_residue_at_lower(), core::conformation::Residue::connected_residue_at_upper(), protocols::energy_based_clustering::EBC_bb_cartesian, protocols::energy_based_clustering::EBC_bb_dihedral, is_in_list(), core::chemical::ResidueType::is_ligand(), core::chemical::ResidueType::is_lower_terminus(), core::chemical::ResidueType::is_metal(), core::chemical::ResidueType::is_upper_terminus(), core::conformation::Residue::mainchain_torsions(), make_disulfides(), core::conformation::Residue::natoms(), options_, core::pose::Pose::residue(), core::pose::Pose::residue_type(), protocols::energy_based_clustering::EnergyBasedClusteringOptions::residues_to_ignore_, core::pose::Pose::set_torsion(), core::pose::Pose::set_xyz(), core::pose::Pose::size(), core::pose::Pose::total_residue(), and core::pose::Pose::update_residue_neighbors().
Referenced by go().
|
static |
Indicate which options-system options are relvant.
|
private |
Remove cutpoint variants that add extraneous virtual atoms that mess up atom indexing.
References core::chemical::CUTPOINT_LOWER, core::chemical::CUTPOINT_UPPER, core::chemical::ResidueTypeBase::has_variant_type(), core::pose::remove_variant_type_from_pose_residue(), core::pose::Pose::residue_type(), core::pose::Pose::total_residue(), and core::pose::Pose::update_residue_neighbors().
Referenced by do_initial_import_and_scoring().
|
private |
Get the global scorefunction, and set up constraints energies appropriately.
References core::scoring::angle_constraint, core::scoring::atom_pair_constraint, constraints_file_contents_, protocols::energy_based_clustering::EnergyBasedClusteringOptions::cst_files_, protocols::energy_based_clustering::EnergyBasedClusteringOptions::cyclic_, core::scoring::dihedral_constraint, core::scoring::get_score_function(), options_, and protocols::TR().
Referenced by go().
|
private |
Sort the list of states in a cluster by energies.
Inefficient selection sort used. That's okay – this sorts small lists.
Referenced by go().
|
private |
Given an input pose, store only the relevant data needed for clustering.
The "alignmentdata" array is only used for Cartesian clustering.
References core::conformation::Residue::atom(), core::pose::Pose::chain(), protocols::energy_based_clustering::EnergyBasedClusteringOptions::chains_to_ignore_, core::conformation::Residue::connected_residue_at_lower(), core::conformation::Residue::connected_residue_at_upper(), protocols::energy_based_clustering::EBC_bb_cartesian, protocols::energy_based_clustering::EBC_bb_dihedral, core::conformation::Residue::has_lower_connect(), core::conformation::Residue::has_upper_connect(), is_in_list(), core::chemical::ResidueType::is_ligand(), core::chemical::ResidueType::is_metal(), core::chemical::ResidueTypeBase::is_polymer(), core::conformation::Residue::mainchain_torsion(), core::conformation::Residue::mainchain_torsions(), core::conformation::Residue::natoms(), options_, protocols::energy_based_clustering::EnergyBasedClusteringOptions::rebuild_all_in_dihedral_mode_, core::pose::Pose::residue(), core::pose::Pose::residue_type(), protocols::energy_based_clustering::EnergyBasedClusteringOptions::residues_to_ignore_, core::pose::Pose::size(), core::pose::Pose::total_atoms(), core::pose::Pose::total_residue(), use_in_rmsd(), and core::conformation::Atom::xyz().
Referenced by do_initial_import_and_scoring().
|
private |
Swap chains in an alignment vector (vector of x,y,z atom coordinates).
Can only be called if options_.cluster_by_ == EBC_bb_cartesian.
References alignment_atoms_in_res(), protocols::energy_based_clustering::EnergyBasedClusteringOptions::cluster_by_, protocols::energy_based_clustering::EBC_bb_cartesian, get_start_and_end_aa(), get_start_and_end_indices(), core::pose::Pose::num_chains(), and options_.
Referenced by calc_dist().
|
private |
Swap chains around in a pose (circular permutation of chain indices).
References core::pose::append_subpose_to_pose(), get_start_and_end_aa(), core::pose::Pose::num_chains(), and core::pose::Pose::update_residue_neighbors().
Referenced by go().
|
private |
Given a residue number, and atom number, and a pose, determine whether that atom gets used in the RMSD calculation.
References core::conformation::Residue::atom_index(), core::conformation::Residue::atom_name(), core::pose::Pose::chain(), protocols::energy_based_clustering::EnergyBasedClusteringOptions::chains_to_ignore_, core::conformation::Residue::has(), core::chemical::ResidueType::has(), core::chemical::ResidueType::is_alpha_aa(), core::chemical::ResidueType::is_n_methylated(), options_, core::pose::Pose::residue(), core::pose::Pose::residue_type(), protocols::energy_based_clustering::EnergyBasedClusteringOptions::residues_to_ignore_, protocols::energy_based_clustering::EnergyBasedClusteringOptions::use_CB_, and use_this_atom().
Referenced by storeposedata().
|
private |
Given two poses, a residue number in the second pose, and atom number, and and offset for circular permutation, determine whether the atom is to be used in RMSD calculation.
References core::conformation::Residue::atom_name(), core::pose::Pose::chain(), protocols::energy_based_clustering::EnergyBasedClusteringOptions::chains_to_ignore_, core::conformation::Residue::has(), options_, core::pose::Pose::residue(), protocols::energy_based_clustering::EnergyBasedClusteringOptions::residues_to_ignore_, core::pose::Pose::total_residue(), and use_this_atom().
Referenced by align_with_offset().
|
private |
Function containing the special-case logic for alpha, beta, and gamma-amino acids.
References core::conformation::Residue::connected_residue_at_upper(), core::chemical::ResidueType::has(), core::conformation::Residue::has_upper_connect(), core::chemical::ResidueType::is_alpha_aa(), core::chemical::ResidueType::is_beta_aa(), core::chemical::ResidueType::is_gamma_aa(), is_in_list(), core::chemical::ResidueType::is_oligourea(), core::chemical::ResidueTypeBase::is_peptoid(), core::chemical::ResidueType::mainchain_atoms(), options_, core::conformation::Residue::type(), and protocols::energy_based_clustering::EnergyBasedClusteringOptions::use_CB_.
Referenced by use_in_rmsd(), and use_in_rmsd_offset().
|
friend |
|
private |
The contents of an optional constraints file.
Referenced by set_up_scorefunction().
|
private |
The number of clusters produced by the last run.
Referenced by go(), and n_clusters_from_last_run().
|
private |
Clustering options, either read from global options system or passed directly to the protocol.
Referenced by add_user_constraints(), alignment_atoms_in_res(), alignment_torsions_in_res(), calc_dist(), check_backbones_match(), do_ABOXYZ_bin_analysis(), do_initial_import_and_scoring(), do_option_checks(), go(), make_disulfides(), parse_alternative_score_file(), parse_extra_atom_list(), pose_from_posedata(), set_up_scorefunction(), storeposedata(), swap_alignment_vector(), use_in_rmsd(), use_in_rmsd_offset(), and use_this_atom().