util

Bindings for core::util namespace

class pyrosetta.rosetta.core.util.ChainbreakUtil

Bases: pybind11_object

assign(self: pyrosetta.rosetta.core.util.ChainbreakUtil, : pyrosetta.rosetta.core.util.ChainbreakUtil) pyrosetta.rosetta.core.util.ChainbreakUtil

C++: core::util::ChainbreakUtil::operator=(const class core::util::ChainbreakUtil &) –> class core::util::ChainbreakUtil &

has_chainbreak(self: pyrosetta.rosetta.core.util.ChainbreakUtil, pose: pyrosetta.rosetta.core.pose.Pose) bool

Returns true if pose has a chainbreak, false otherwise

C++: core::util::ChainbreakUtil::has_chainbreak(const class core::pose::Pose &) const –> bool

pyrosetta.rosetta.core.util.add_constraints_to_metal(pose: pyrosetta.rosetta.core.pose.Pose, metal_position: int, distance_constraint_multiplier: float, angle_constraint_multiplier: float, binders: pyrosetta.rosetta.utility.vector1_core_id_AtomID) None

Function to set up distance and angle constraints for a specified metal ion.

Modified/taken from auto_setup_all_metal_constraints to allow constraint setup for only specified metal residues. Does not modify score function weights. Inputs:

pose (The pose that we’ll operate on, changed by operation) metal_position (The residue number of the metal to be constrained) distance_constraint_multiplier (A float for the strength of the metal - binding atom distance constraint. A value of 2.0 doubles

it, for example.)

angle_constraint_multiplier (A float for the strength of the metal - binding atom - binding atom parent angle constraint.)

Sharon Guffy (guffy.unc.edu); originally written by Vikram K. Mulligan (vmulligan.edu) as part of auto_setup_all_metal_constraints

C++: core::util::add_constraints_to_metal(class core::pose::Pose &, const unsigned long, const double, const double, const class utility::vector1<class core::id::AtomID, class std::allocator<class core::id::AtomID> > &) –> void

pyrosetta.rosetta.core.util.add_covalent_linkage(pose: pyrosetta.rosetta.core.pose.Pose, resA_pos: int, resB_pos: int, resA_At: int, resB_At: int, remove_hydrogens: bool) None

: Adds an arbitrary covalent linkage between two atoms (resA_At and resB_At) in two residues (at positions resA_pos and resB_pos).

: This is useful for adding covalent linkages between metal-binding side-chains and metal atoms. This code was shamelessly

stolen from Florian’s EnzConstraintParameters.cc in protocols/toolbox/match_enzdes_utils, and was modified to permit deletion of unnecessary protons. NOTE: THIS CODE MODIFIES THE RESIDUE TYPE LIST, AND IS CURRENTLY NOT THREADSAFE.

C++: core::util::add_covalent_linkage(class core::pose::Pose &, const unsigned long, const unsigned long, const unsigned long, const unsigned long, const bool) –> void

pyrosetta.rosetta.core.util.add_covalent_linkages_to_metal(*args, **kwargs)

Overloaded function.

  1. add_covalent_linkages_to_metal(pose: pyrosetta.rosetta.core.pose.Pose, metal_position: int, liganding_atomids: pyrosetta.rosetta.utility.vector1_core_id_AtomID) -> None

  2. add_covalent_linkages_to_metal(pose: pyrosetta.rosetta.core.pose.Pose, metal_position: int, liganding_atomids: pyrosetta.rosetta.utility.vector1_core_id_AtomID, remove_hydrogens: bool) -> None

Function to add covalent linkages between a metal atom and all the liganding atoms provided in a vector of AtomIDs.

The inputs are:

pose (The pose to be modified) metal_position (The residue number of the metal in the pose) liganding_atomids (A list of AtomIDs on other residues that will be covalently linked to the metal) remove_hydrogens (Should hydrogens on the liganding atoms be removed automatically? Default true.)

This function uses core::pose::add_covalent_linkage, which can strip off extraneous hydrogens.

C++: core::util::add_covalent_linkages_to_metal(class core::pose::Pose &, const unsigned long, class utility::vector1<class core::id::AtomID, class std::allocator<class core::id::AtomID> > &, const bool) –> void

pyrosetta.rosetta.core.util.auto_setup_all_metal_bonds(*args, **kwargs)

Overloaded function.

  1. auto_setup_all_metal_bonds(pose: pyrosetta.rosetta.core.pose.Pose) -> None

  2. auto_setup_all_metal_bonds(pose: pyrosetta.rosetta.core.pose.Pose, dist_cutoff_multiplier: float) -> None

  3. auto_setup_all_metal_bonds(pose: pyrosetta.rosetta.core.pose.Pose, dist_cutoff_multiplier: float, remove_hydrogens: bool) -> None

Function to auto-detect and add covalent connections to all metal ions in a pose.

This function iteratively calls auto_setup_metal_bonds. Inputs:

pose (The pose that we’ll operate on, changed by operation) dist_cutoff_multiplier (A float for the distance cutoff multiplier; the cutoff is the sum of the Lennard-Jones radii times the multiplier)

remove_hydrogesn (Should hydrogens on the liganding atoms be auto-removed? Default true.)

Vikram K. Mulligan (vmulligan.edu)

C++: core::util::auto_setup_all_metal_bonds(class core::pose::Pose &, const double, const bool) –> void

pyrosetta.rosetta.core.util.auto_setup_all_metal_constraints(*args, **kwargs)

Overloaded function.

  1. auto_setup_all_metal_constraints(pose: pyrosetta.rosetta.core.pose.Pose, distance_constraint_multiplier: float, angle_constraint_multiplier: float) -> None

Function to set up distance and angle constraints between metals and the residues that bind them.

This function constrains the distances to be whatever they are in the input pose. This version does not set the weights for the constraints terms in the scorefunction. Inputs:

pose (The pose that we’ll operate on, changed by operation)

distance_constraint_multiplier (A float for the strength of the metal - binding atom distance constraint. A value of 2.0 doubles it, for example.) angle_constraint_multiplier (A float for the strength of the metal - binding atom - binding atom parent angle constraint.)

Vikram K. Mulligan (vmulligan.edu)

C++: core::util::auto_setup_all_metal_constraints(class core::pose::Pose &, const double, const double) –> void

  1. auto_setup_all_metal_constraints(pose: pyrosetta.rosetta.core.pose.Pose, sfxn: pyrosetta.rosetta.core.scoring.ScoreFunction, distance_constraint_multiplier: float, angle_constraint_multiplie: float) -> None

Function to set up distance and angle constraints between metals and the residues that bind them.

This function constrains the distances to be whatever they are in the input pose. This version sets the weights for the constraints terms in the scorefunction to 1.0 if they’re off, or scales the constraints themselves appropriately if they’re already on. Inputs:

pose (The pose that we’ll operate on, changed by operation)

sfxn (An owning pointer to the scorefunction, changed by operation) distance_constraint_multiplier (A float for the strength of the metal - binding atom distance constraint. A value of 2.0 doubles it, for example.) angle_constraint_multiplier (A float for the strength of the metal - binding atom - binding atom parent angle constraint.)

Vikram K. Mulligan (vmulligan.edu)

C++: core::util::auto_setup_all_metal_constraints(class core::pose::Pose &, class std::shared_ptr<class core::scoring::ScoreFunction>, const double, const double) –> void

pyrosetta.rosetta.core.util.find_metalbinding_atoms(*args, **kwargs)

Overloaded function.

  1. find_metalbinding_atoms(pose: pyrosetta.rosetta.core.pose.Pose, metal_position: int) -> pyrosetta.rosetta.utility.vector1_core_id_AtomID

  2. find_metalbinding_atoms(pose: pyrosetta.rosetta.core.pose.Pose, metal_position: int, dist_cutoff_multiplier: float) -> pyrosetta.rosetta.utility.vector1_core_id_AtomID

Function that generates a list of metal-binding atoms that coordinate a metal in a protein.

This function generates the list by looping through all residues and checking all metal-binding atoms of all metal-binding residues, so it’s not super speedy. Inputs:

pose (The pose that we’ll operate on, unchanged by operation) metal_postion (The residue number of the metal) dist_cutoff_multiplier (A float for the distance cutoff multiplier; the cutoff is the sum of the Lennard-Jones radii times the multiplier)

Vikram K. Mulligan (vmulligan.edu)

C++: core::util::find_metalbinding_atoms(const class core::pose::Pose &, const unsigned long, const double) –> class utility::vector1<class core::id::AtomID, class std::allocator<class core::id::AtomID> >

pyrosetta.rosetta.core.util.find_metalbinding_atoms_for_complex(pose: pyrosetta.rosetta.core.pose.Pose, metal_position: int, dist_cutoff_multiplier: float) pyrosetta.rosetta.std.map_unsigned_long_utility_vector1_core_id_AtomID_std_allocator_core_id_AtomID_t_std_allocator_std_pair_const_unsigned_long_utility_vector1_core_id_AtomID_std_allocator_core_id_AtomID_t

Function that can find contacts to metal ions that are part of a larger complex.

Identifies metal ions based on the METALS set defined in this file and passes

those atoms to find_metalbinding_atoms_helper.

Sharon Guffy (guffy.unc.edu )

C++: core::util::find_metalbinding_atoms_for_complex(const class core::pose::Pose &, const unsigned long, const double) –> class std::map<unsigned long, class utility::vector1<class core::id::AtomID, class std::allocator<class core::id::AtomID> >, struct std::less<unsigned long>, class std::allocator<struct std::pair<const unsigned long, class utility::vector1<class core::id::AtomID, class std::allocator<class core::id::AtomID> > > > >

pyrosetta.rosetta.core.util.find_metalbinding_atoms_helper(pose: pyrosetta.rosetta.core.pose.Pose, metal_atom: pyrosetta.rosetta.core.id.AtomID, dist_cutoff_multiplier: float) pyrosetta.rosetta.utility.vector1_core_id_AtomID

Helper function that finds contacts for metal atoms specified by AtomID

Code modified from Vikram’s code originally in find_metalbinding_atoms

Sharon Guffy (guffy.unc.edu )

C++: core::util::find_metalbinding_atoms_helper(const class core::pose::Pose &, const class core::id::AtomID &, const double) –> class utility::vector1<class core::id::AtomID, class std::allocator<class core::id::AtomID> >

pyrosetta.rosetta.core.util.generate_replacement_restype(restype: pyrosetta.rosetta.core.chemical.ResidueType, mode: pyrosetta.rosetta.core.chemical.TypeSetMode) pyrosetta.rosetta.core.chemical.MutableResidueType
Attempt to generate a new residue type of the appropriate mode.

If not possible, return a nullptr.

C++: core::util::generate_replacement_restype(const class core::chemical::ResidueType &, enum core::chemical::TypeSetMode) –> class std::shared_ptr<class core::chemical::MutableResidueType>

pyrosetta.rosetta.core.util.getMLweight(*args, **kwargs)

Overloaded function.

  1. getMLweight(scorefxn: pyrosetta.rosetta.core.scoring.ScoreFunction, : pyrosetta.rosetta.core.pose.Pose) -> float

get the optimal weight on the xtal ML energy

C++: core::util::getMLweight(class core::scoring::ScoreFunction &, class core::pose::Pose &) –> double

  1. getMLweight(scorefxn: pyrosetta.rosetta.core.scoring.ScoreFunction, : pyrosetta.rosetta.core.pose.Pose, : pyrosetta.rosetta.core.kinematics.MoveMap) -> float

get the optimal weight on the xtal ML energy considering only movable DOFs

C++: core::util::getMLweight(class core::scoring::ScoreFunction &, class core::pose::Pose &, class core::kinematics::MoveMap &) –> double

pyrosetta.rosetta.core.util.getMLweight_cart(*args, **kwargs)

Overloaded function.

  1. getMLweight_cart(scorefxn: pyrosetta.rosetta.core.scoring.ScoreFunction, : pyrosetta.rosetta.core.pose.Pose) -> float

get the optimal weight on the xtal ML energy

C++: core::util::getMLweight_cart(class core::scoring::ScoreFunction &, class core::pose::Pose &) –> double

  1. getMLweight_cart(scorefxn: pyrosetta.rosetta.core.scoring.ScoreFunction, : pyrosetta.rosetta.core.pose.Pose, : pyrosetta.rosetta.core.kinematics.MoveMap) -> float

get the optimal weight on the xtal ML energy considering only movable DOFs

C++: core::util::getMLweight_cart(class core::scoring::ScoreFunction &, class core::pose::Pose &, class core::kinematics::MoveMap &) –> double

pyrosetta.rosetta.core.util.rebuild_disulfide(*args, **kwargs)

Overloaded function.

  1. rebuild_disulfide(pose: pyrosetta.rosetta.core.pose.Pose, lower_res: int, upper_res: int, threads_to_request: int) -> None

  2. rebuild_disulfide(pose: pyrosetta.rosetta.core.pose.Pose, lower_res: int, upper_res: int, threads_to_request: int, packer_task: pyrosetta.rosetta.core.pack.task.PackerTask) -> None

  3. rebuild_disulfide(pose: pyrosetta.rosetta.core.pose.Pose, lower_res: int, upper_res: int, threads_to_request: int, packer_task: pyrosetta.rosetta.core.pack.task.PackerTask, packer_score: pyrosetta.rosetta.core.scoring.ScoreFunction) -> None

  4. rebuild_disulfide(pose: pyrosetta.rosetta.core.pose.Pose, lower_res: int, upper_res: int, threads_to_request: int, packer_task: pyrosetta.rosetta.core.pack.task.PackerTask, packer_score: pyrosetta.rosetta.core.scoring.ScoreFunction, mm: pyrosetta.rosetta.core.kinematics.MoveMap) -> None

  5. rebuild_disulfide(pose: pyrosetta.rosetta.core.pose.Pose, lower_res: int, upper_res: int, threads_to_request: int, packer_task: pyrosetta.rosetta.core.pack.task.PackerTask, packer_score: pyrosetta.rosetta.core.scoring.ScoreFunction, mm: pyrosetta.rosetta.core.kinematics.MoveMap, minimizer_score: pyrosetta.rosetta.core.scoring.ScoreFunction) -> None

Rebuild a pair of cysteines (and possibly surrounding residues) so

that they form a near-ideal disulfide bond. Supports symmetric poses.

C++: core::util::rebuild_disulfide(class core::pose::Pose &, unsigned long, unsigned long, const unsigned long, class std::shared_ptr<class core::pack::task::PackerTask>, class std::shared_ptr<class core::scoring::ScoreFunction>, class std::shared_ptr<class core::kinematics::MoveMap>, class std::shared_ptr<class core::scoring::ScoreFunction>) –> void

  1. rebuild_disulfide(pose: pyrosetta.rosetta.core.pose.Pose, disulfides: pyrosetta.rosetta.utility.vector1_std_pair_unsigned_long_unsigned_long_t, threads_to_request: int) -> None

  2. rebuild_disulfide(pose: pyrosetta.rosetta.core.pose.Pose, disulfides: pyrosetta.rosetta.utility.vector1_std_pair_unsigned_long_unsigned_long_t, threads_to_request: int, packer_task: pyrosetta.rosetta.core.pack.task.PackerTask) -> None

  3. rebuild_disulfide(pose: pyrosetta.rosetta.core.pose.Pose, disulfides: pyrosetta.rosetta.utility.vector1_std_pair_unsigned_long_unsigned_long_t, threads_to_request: int, packer_task: pyrosetta.rosetta.core.pack.task.PackerTask, packer_score: pyrosetta.rosetta.core.scoring.ScoreFunction) -> None

  4. rebuild_disulfide(pose: pyrosetta.rosetta.core.pose.Pose, disulfides: pyrosetta.rosetta.utility.vector1_std_pair_unsigned_long_unsigned_long_t, threads_to_request: int, packer_task: pyrosetta.rosetta.core.pack.task.PackerTask, packer_score: pyrosetta.rosetta.core.scoring.ScoreFunction, mm: pyrosetta.rosetta.core.kinematics.MoveMap) -> None

  5. rebuild_disulfide(pose: pyrosetta.rosetta.core.pose.Pose, disulfides: pyrosetta.rosetta.utility.vector1_std_pair_unsigned_long_unsigned_long_t, threads_to_request: int, packer_task: pyrosetta.rosetta.core.pack.task.PackerTask, packer_score: pyrosetta.rosetta.core.scoring.ScoreFunction, mm: pyrosetta.rosetta.core.kinematics.MoveMap, minimizer_score: pyrosetta.rosetta.core.scoring.ScoreFunction) -> None

Rebuild a number of pairs of cysteines (and possibly surrounding

residues) so that they form near-ideal disulfide bonds

C++: core::util::rebuild_disulfide(class core::pose::Pose &, class utility::vector1<struct std::pair<unsigned long, unsigned long>, class std::allocator<struct std::pair<unsigned long, unsigned long> > >, const unsigned long, class std::shared_ptr<class core::pack::task::PackerTask>, class std::shared_ptr<class core::scoring::ScoreFunction>, class std::shared_ptr<class core::kinematics::MoveMap>, class std::shared_ptr<class core::scoring::ScoreFunction>) –> void

pyrosetta.rosetta.core.util.rebuild_fa_disulfides(*args, **kwargs)

Overloaded function.

  1. rebuild_fa_disulfides(pose: pyrosetta.rosetta.core.pose.Pose) -> None

  2. rebuild_fa_disulfides(pose: pyrosetta.rosetta.core.pose.Pose, threads_to_request: int) -> None

Rebuild disulfides after a transition to a full atom ResidueTypeSet

In multi-threaded builds, this function takes an extra parameter for the number of threads to request, for parallel interaction graph precomputation.

C++: core::util::rebuild_fa_disulfides(class core::pose::Pose &, const unsigned long) –> void

pyrosetta.rosetta.core.util.remove_cutpoint_variants(pose: pyrosetta.rosetta.core.pose.Pose) None

Removes cutpoint variants from pose by scanning the fold tree

C++: core::util::remove_cutpoint_variants(class core::pose::Pose &) –> void

pyrosetta.rosetta.core.util.switch_to_centroid_rot_set(*args, **kwargs)

Overloaded function.

  1. switch_to_centroid_rot_set(pose: pyrosetta.rosetta.core.pose.Pose, symm_info: pyrosetta.rosetta.core.conformation.symmetry.SymmetryInfo, rsd_set: pyrosetta.rosetta.core.chemical.ResidueTypeSet) -> None

  2. switch_to_centroid_rot_set(pose: pyrosetta.rosetta.core.pose.Pose, symm_info: pyrosetta.rosetta.core.conformation.symmetry.SymmetryInfo, rsd_set: pyrosetta.rosetta.core.chemical.ResidueTypeSet, allow_sloppy_match: bool) -> None

C++: core::util::switch_to_centroid_rot_set(class core::pose::Pose &, class std::shared_ptr<const class core::conformation::symmetry::SymmetryInfo>, const class core::chemical::ResidueTypeSet &, bool) –> void

pyrosetta.rosetta.core.util.switch_to_residue_type_set(*args, **kwargs)

Overloaded function.

  1. switch_to_residue_type_set(pose: pyrosetta.rosetta.core.pose.Pose, type_set: pyrosetta.rosetta.core.chemical.ResidueTypeSet) -> None

  2. switch_to_residue_type_set(pose: pyrosetta.rosetta.core.pose.Pose, type_set: pyrosetta.rosetta.core.chemical.ResidueTypeSet, threads_to_request: int) -> None

  3. switch_to_residue_type_set(pose: pyrosetta.rosetta.core.pose.Pose, type_set: pyrosetta.rosetta.core.chemical.ResidueTypeSet, threads_to_request: int, allow_sloppy_match: bool) -> None

  4. switch_to_residue_type_set(pose: pyrosetta.rosetta.core.pose.Pose, type_set: pyrosetta.rosetta.core.chemical.ResidueTypeSet, threads_to_request: int, allow_sloppy_match: bool, switch_protein_res_only: bool) -> None

  5. switch_to_residue_type_set(pose: pyrosetta.rosetta.core.pose.Pose, type_set: pyrosetta.rosetta.core.chemical.ResidueTypeSet, threads_to_request: int, allow_sloppy_match: bool, switch_protein_res_only: bool, keep_energies: bool) -> None

the function allows a pose to use a different residue_type_set to

represent all its residues, such as from fullatom residues to centroid residues, or vice versa. During the switch, corresponding atoms will be copied. Redundant atoms will be removed (in case from fullatom to centroid) and missing atoms will be built by ideal geometry (in the case from centroid to fullatom).

C++: core::util::switch_to_residue_type_set(class core::pose::Pose &, const class core::chemical::ResidueTypeSet &, const unsigned long, bool, bool, bool) –> void

  1. switch_to_residue_type_set(pose: pyrosetta.rosetta.core.pose.Pose, type_set_mode: pyrosetta.rosetta.core.chemical.TypeSetMode) -> None

  2. switch_to_residue_type_set(pose: pyrosetta.rosetta.core.pose.Pose, type_set_mode: pyrosetta.rosetta.core.chemical.TypeSetMode, threads_to_request: int) -> None

  3. switch_to_residue_type_set(pose: pyrosetta.rosetta.core.pose.Pose, type_set_mode: pyrosetta.rosetta.core.chemical.TypeSetMode, threads_to_request: int, allow_sloppy_match: bool) -> None

  4. switch_to_residue_type_set(pose: pyrosetta.rosetta.core.pose.Pose, type_set_mode: pyrosetta.rosetta.core.chemical.TypeSetMode, threads_to_request: int, allow_sloppy_match: bool, switch_protein_res_only: bool) -> None

  5. switch_to_residue_type_set(pose: pyrosetta.rosetta.core.pose.Pose, type_set_mode: pyrosetta.rosetta.core.chemical.TypeSetMode, threads_to_request: int, allow_sloppy_match: bool, switch_protein_res_only: bool, keep_energies: bool) -> None

the function allows a pose to use a different residue_type_set to

represent all its residues, such as from fullatom residues to centroid residues, or vice versa. During the switch, corresponding atoms will be copied. Redundant atoms will be removed (in case from fullatom to centroid) and missing atoms will be built by ideal geometry (in the case from centroid to fullatom).

C++: core::util::switch_to_residue_type_set(class core::pose::Pose &, enum core::chemical::TypeSetMode, const unsigned long, bool, bool, bool) –> void

  1. switch_to_residue_type_set(pose: pyrosetta.rosetta.core.pose.Pose, type_set_name: str) -> None

  2. switch_to_residue_type_set(pose: pyrosetta.rosetta.core.pose.Pose, type_set_name: str, threads_to_request: int) -> None

  3. switch_to_residue_type_set(pose: pyrosetta.rosetta.core.pose.Pose, type_set_name: str, threads_to_request: int, allow_sloppy_match: bool) -> None

  4. switch_to_residue_type_set(pose: pyrosetta.rosetta.core.pose.Pose, type_set_name: str, threads_to_request: int, allow_sloppy_match: bool, switch_protein_res_only: bool) -> None

  5. switch_to_residue_type_set(pose: pyrosetta.rosetta.core.pose.Pose, type_set_name: str, threads_to_request: int, allow_sloppy_match: bool, switch_protein_res_only: bool, keep_energies: bool) -> None

the function allows a pose to use a different residue_type_set to

represent all its residues, such as from fullatom residues to centroid residues, or vice versa. During the switch, corresponding atoms will be copied. Redundant atoms will be removed (in case from fullatom to centroid) and missing atoms will be built by ideal geometry (in the case from centroid to fullatom).

C++: core::util::switch_to_residue_type_set(class core::pose::Pose &, const std::string &, const unsigned long, bool, bool, bool) –> void