Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Namespaces | Constant Groups | Macros | Functions
util.cc File Reference

Pose class utilities. More...

#include <core/pose/util.hh>
#include <cmath>
#include <iostream>
#include <basic/Tracer.hh>
#include <basic/datacache/BasicDataCache.hh>
#include <basic/datacache/CacheableString.hh>
#include <basic/datacache/CacheableStringFloatMap.hh>
#include <basic/datacache/CacheableStringMap.hh>
#include <basic/options/option.hh>
#include <basic/options/keys/in.OptionKeys.gen.hh>
#include <numeric/constants.hh>
#include <numeric/xyz.functions.hh>
#include <numeric/xyzVector.string.hh>
#include <ObjexxFCL/string.functions.hh>
#include <utility/io/izstream.hh>
#include <utility/exit.hh>
#include <utility/string_util.hh>
#include <utility/excn/Exceptions.hh>
#include <core/chemical/ChemicalManager.hh>
#include <core/chemical/ResidueType.hh>
#include <core/chemical/ResidueTypeSet.hh>
#include <core/chemical/VariantType.hh>
#include <core/conformation/Conformation.hh>
#include <core/conformation/ResidueFactory.hh>
#include <core/conformation/util.hh>
#include <core/id/DOF_ID_Map.hh>
#include <core/id/Exceptions.hh>
#include <core/id/NamedStubID.hh>
#include <core/id/NamedAtomID.hh>
#include <core/id/TorsionID.hh>
#include <core/kinematics/MoveMap.hh>
#include <core/kinematics/FoldTree.hh>
#include <core/io/raw_data/DisulfideFile.hh>
#include <core/io/silent/BinaryProteinSilentStruct.hh>
#include <core/pose/PDBInfo.hh>
#include <core/pose/Pose.hh>
#include <core/pose/MiniPose.hh>
#include <core/pose/datacache/CacheableDataType.hh>
#include <core/pose/datacache/PositionConservedResiduesStore.hh>
#include <core/scoring/ScoreType.hh>
#include <core/scoring/Energies.hh>
#include <core/conformation/Residue.hh>
#include <core/id/SequenceMapping.hh>
#include <core/sequence/Sequence.hh>
#include <core/sequence/util.hh>
#include <utility/vector1.hh>
#include <boost/foreach.hpp>
#include <core/pose/util.tmpl.hh>
#include <boost/functional/hash.hpp>

Namespaces

 core
 A class for defining atom parameters, known as atom_types.
 
 core::pose
 

Constant Groups

 core
 A class for defining atom parameters, known as atom_types.
 
 core::pose
 

Macros

#define foreach   BOOST_FOREACH
 

Functions

static basic::Tracer core::pose::TR ("core.pose.util")
 
void core::pose::jumps_from_pose (const core::pose::Pose &pose, Jumps *jumps)
 Retrieves jump information from <pose>, storing the result in <jumps>. Jumps are keyed by their jump id. More...
 
void core::pose::remove_virtual_residues (core::pose::Pose *pose)
 Removes all virtual residues from <pose> More...
 
void core::pose::swap_transform (Size jump_num, const kinematics::RT &xform, Pose *pose)
 Updates the rigid-body transform of the specified jump in <pose> More...
 
bool core::pose::is_position_conserved_residue (const Pose &pose, core::Size residue)
 Returns true if <residue> is positionally conserved, false otherwise. More...
 
void core::pose::create_subpose (Pose const &src, utility::vector1< Size > const &positions, kinematics::FoldTree const &f, Pose &pose)
 
void core::pose::partition_pose_by_jump (pose::Pose const &src, int const jump_number, pose::Pose &partner1, pose::Pose &partner2)
 
void core::pose::set_ss_from_phipsi (pose::Pose &pose)
 Analyzes <pose> residue phi/psi sets and guesses the secondary structure, ideally dssp should be used for that. More...
 
void core::pose::addVirtualResAsRoot (const numeric::xyzVector< core::Real > &xyz, core::pose::Pose &pose)
 Adds a virtual residue to the end of the pose at the specified location. Roots the structure on this residue. More...
 
void core::pose::addVirtualResAsRoot (core::pose::Pose &pose)
 Find residue closest to center-of-mass More...
 
bool core::pose::getPoseExtraScores (core::pose::Pose const &pose, std::string const name, core::Real &value)
 getters/setters for things in the Pose DataCache More...
 
void core::pose::setPoseExtraScores (core::pose::Pose &pose, std::string name, core::Real value)
 
void core::pose::add_comment (core::pose::Pose &pose, std::string const &key, std::string const &val)
 Adds a key-value pair to the STRING_MAP in the Pose DataCache. If there is no STRING_MAP in the DataCache, one is created. More...
 
void core::pose::add_score_line_string (core::pose::Pose &pose, std::string const &key, std::string const &val)
 Sets a PDB-style REMARK entry in the Pose. More...
 
void core::pose::clearPoseExtraScores (core::pose::Pose &pose)
 
void core::pose::clearPoseExtraScore (core::pose::Pose &pose, std::string const &name)
 
bool core::pose::get_comment (core::pose::Pose const &pose, std::string const &key, std::string &val)
 Attempts to access the entry in the STRING_MAP associated with the given key. If an entry for the key exists, the value associated with the key is put into val, and this function returns true. Otherwise, this function returns false and val left unmodified. More...
 
bool core::pose::get_score_line_string (core::pose::Pose const &pose, std::string const &key, std::string &val)
 
void core::pose::delete_comment (core::pose::Pose &pose, std::string const &key)
 Deletes the entry in the STRING_MAP associated with the given key. More...
 
std::map< std::string,
std::string > 
core::pose::get_all_score_line_strings (core::pose::Pose const &pose)
 Gets a map< string, string > representing score_line_strings about the Pose in the form of key-value pairs. More...
 
std::map< std::string,
std::string > 
core::pose::get_all_comments (core::pose::Pose const &pose)
 Gets a map< string, string > representing comments about the Pose in the form of key-value pairs. More...
 
utility::vector1< char > core::pose::read_psipred_ss2_file (pose::Pose const &pose)
 
std::map< int, char > core::pose::conf2pdb_chain (core::pose::Pose const &pose)
 get Conformation chain -> PDBInfo chain mapping More...
 
bool core::pose::renumber_pdbinfo_based_on_conf_chains (core::pose::Pose &pose, bool fix_chains, bool const start_from_existing_numbering, bool const keep_insertion_codes, bool const rotate_chain_ids)
 renumber PDBInfo based on Conformation chains; each chain starts from 1 More...
 
bool core::pose::is_ideal_pose (core::pose::Pose const &pose)
 checks if the pose geometry is ideal More...
 
bool core::pose::is_ideal_position (core::Size seqpos, core::pose::Pose const &pose)
 checks if the pose geometry is ideal in position seqpos More...
 
void core::pose::remove_nonprotein_residues (core::pose::Pose &pose)
 this function removes all residues from the pose which are not protein residues. This removal includes, but is not limited to, metals, DNA, RNA, and ligands. It will NOT remove ligands which are canonical residues (for example, if a protein binds an alanine monomer, the monomer will be untouched). More...
 
void core::pose::remove_ligand_canonical_residues (core::pose::Pose &pose)
 this function removes all residues with both UPPER and LOWER terminus types. This is intended for removing ligands that are canonical residues. More...
 
bool core::pose::compare_atom_coordinates (Pose const &lhs, Pose const &rhs, Size const n_dec_places=3)
 this function compares pose atom coordinates for equality; it is not the == operator because it does not compare all pose data. More...
 
bool core::pose::compare_binary_protein_silent_struct (Pose const &lhs, Pose const &rhs)
 
void core::pose::copy_dofs (pose::Pose &pose, MiniPose const &scratch_pose, core::pose::ResMap const &res_map)
 A very useful function that copies degrees of freedom from one pose to another. res_map defines how to map residue numbers from the large pose to the smaller "scratch" pose. – rhiju, 2009. More...
 
void core::pose::copy_dofs_match_atom_names (pose::Pose &pose, MiniPose const &chunk_pose, core::pose::ResMap const &res_map)
 
void core::pose::copy_dofs (pose::Pose &pose, Pose const &scratch_pose, core::pose::ResMap const &res_map)
 
void core::pose::copy_dofs_match_atom_names (pose::Pose &pose, Pose const &scratch_pose, core::pose::ResMap const &res_map, bool const backbone_only, bool const ignore_virtual)
 
void core::pose::copy_dofs (pose::Pose &pose, Pose const &scratch_pose, std::map< id::AtomID, id::AtomID > const &atom_id_map)
 
void core::pose::copy_dofs (pose::Pose &pose, MiniPose const &scratch_pose, std::map< id::AtomID, id::AtomID > const &atom_id_map)
 
bool core::pose::check_domain_map (std::map< id::AtomID, Size > const &atom_id_domain_map, id::AtomID const &atom_id1, id::AtomID const &atom_id2)
 
bool core::pose::check_domain_map (std::map< id::AtomID, Size > const &atom_id_domain_map, utility::vector1< id::AtomID > const &atom_ids1, utility::vector1< id::AtomID > const &atom_ids2)
 
void core::pose::copy_dofs (pose::Pose &pose, MiniPose const &scratch_pose, std::map< id::AtomID, id::AtomID > const &atom_id_map, std::map< id::AtomID, Size > const &atom_id_domain_map)
 
bool core::pose::get_scratch_atom_id (id::AtomID &other_scratch_atom_id, std::map< core::id::AtomID, core::id::AtomID > const &atom_id_map, core::kinematics::tree::AtomCOP other_atom)
 
void core::pose::setup_atom_id_map (std::map< core::id::AtomID, core::id::AtomID > &atom_id_map, ResMap const &res_map, core::pose::Pose const &pose)
 
void core::pose::setup_atom_id_map_match_atom_names (std::map< core::id::AtomID, core::id::AtomID > &atom_id_map, ResMap const &res_map, core::pose::Pose const &pose, core::pose::Pose const &reference_pose, bool const backbone_only, bool const ignore_virtual)
 
void core::pose::setup_atom_id_map_match_atom_names (std::map< core::id::AtomID, core::id::AtomID > &atom_id_map, ResMap const &res_map, core::pose::Pose const &pose, MiniPose const &chunk_pose)
 
id::NamedAtomID core::pose::atom_id_to_named_atom_id (core::id::AtomID const &atom_id, Pose const &pose)
 
id::AtomID core::pose::named_atom_id_to_atom_id (core::id::NamedAtomID const &named_atom_id, Pose const &pose, bool raise_exception)
 
id::NamedStubID core::pose::stub_id_to_named_stub_id (id::StubID const &stub_id, core::pose::Pose const &pose)
 
id::StubID core::pose::named_stub_id_to_stub_id (id::NamedStubID const &named_stub_id, core::pose::Pose const &pose)
 
std::string core::pose::tag_from_pose (core::pose::Pose const &pose)
 
void core::pose::tag_into_pose (core::pose::Pose &pose, std::string const &tag)
 
core::Real core::pose::energy_from_pose (core::pose::Pose &pose, core::scoring::ScoreType const &sc_type)
 
core::Real core::pose::energy_from_pose (core::pose::Pose &pose, std::string const &sc_type)
 
core::Real core::pose::total_energy_from_pose (core::pose::Pose &pose)
 
void core::pose::transfer_phi_psi (const core::pose::Pose &srcpose, core::pose::Pose &tgtpose, core::Size ir, core::Size jr)
 
void core::pose::transfer_phi_psi (const core::pose::Pose &srcpose, core::pose::Pose &tgtpose)
 
void core::pose::transfer_jumps (const core::pose::Pose &srcpose, core::pose::Pose &tgtpose)
 
void core::pose::replace_pose_residue_copying_existing_coordinates (pose::Pose &pose, Size const seqpos, core::chemical::ResidueType const &new_rsd_type)
 
core::conformation::ResidueOP core::pose::remove_variant_type_from_residue (core::conformation::Residue const &old_rsd, core::chemical::VariantType const &variant_type, pose::Pose const &pose)
 removes variant from an existing residue More...
 
conformation::ResidueOP core::pose::add_variant_type_to_residue (conformation::Residue const &old_rsd, chemical::VariantType const &variant_type, pose::Pose const &pose)
 construct a variant of an existing residue More...
 
void core::pose::add_variant_type_to_pose_residue (pose::Pose &pose, chemical::VariantType const &variant_type, Size const seqpos)
 construct a variant of an existing pose residue More...
 
void core::pose::remove_variant_type_from_pose_residue (pose::Pose &pose, chemical::VariantType const &variant_type, Size const seqpos)
 construct a non-variant of an existing pose residue More...
 
void core::pose::add_lower_terminus_type_to_pose_residue (pose::Pose &pose, Size const seqpos)
 
void core::pose::add_upper_terminus_type_to_pose_residue (pose::Pose &pose, Size const seqpos)
 
void core::pose::remove_lower_terminus_type_from_pose_residue (pose::Pose &pose, Size const seqpos)
 
void core::pose::remove_upper_terminus_type_from_pose_residue (pose::Pose &pose, Size const seqpos)
 
core::Real core::pose::pose_max_nbr_radius (Pose const &pose)
 returns a Distance More...
 
void core::pose::setup_dof_to_torsion_map (pose::Pose const &pose, id::DOF_ID_Map< id::TorsionID > &dof_map)
 set up a map to look up TORSION_ID by DOF_ID (Map[DOF_ID] = TORISION_ID) More...
 
void core::pose::setup_dof_mask_from_move_map (core::kinematics::MoveMap const &mm, pose::Pose const &pose, id::DOF_ID_Mask &dof_mask)
 convert from allow-bb,allow-chi MoveMap to simple DOF_ID boolean mask needed by the minimizer More...
 
bool core::pose::has_chain (std::string const &chain, core::pose::Pose const &pose)
 
bool core::pose::has_chain (char const &chain, core::pose::Pose const &pose)
 
std::set< core::Sizecore::pose::get_jump_ids_from_chain_ids (std::set< core::Size > const chain_ids, core::pose::Pose const &pose)
 
core::Size core::pose::get_jump_id_from_chain_id (core::Size const &chain_id, const core::pose::Pose &pose)
 
core::Size core::pose::get_chain_id_from_chain (std::string const &chain, core::pose::Pose const &pose)
 
core::Size core::pose::get_chain_id_from_chain (char const &chain, core::pose::Pose const &pose)
 
utility::vector1< core::Sizecore::pose::get_chain_ids_from_chain (std::string const &chain, core::pose::Pose const &pose)
 
utility::vector1< core::Sizecore::pose::get_chain_ids_from_chain (char const &chain, core::pose::Pose const &pose)
 
core::Size core::pose::get_jump_id_from_chain (std::string const &chain, core::pose::Pose const &pose)
 
core::Size core::pose::get_jump_id_from_chain (char const &chain, core::pose::Pose const &pose)
 
utility::vector1< core::Sizecore::pose::get_jump_ids_from_chain (char const &chain, core::pose::Pose const &pose)
 
utility::vector1< core::Sizecore::pose::get_jump_ids_from_chain (std::string const &chain, core::pose::Pose const &pose)
 
core::Size core::pose::get_chain_id_from_jump_id (core::Size const &jump_id, core::pose::Pose const &pose)
 
char core::pose::get_chain_from_jump_id (core::Size const &jump_id, core::pose::Pose const &pose)
 
core::conformation::ResidueCOPs core::pose::get_chain_residues (core::pose::Pose const &pose, core::Size const chain_id)
 
char core::pose::get_chain_from_chain_id (core::Size const &chain_id, core::pose::Pose const &pose)
 
core::Size core::pose::num_heavy_atoms (core::Size begin, core::Size const end, core::pose::Pose const &pose)
 
core::Size core::pose::num_atoms (core::Size begin, core::Size const end, core::pose::Pose const &pose)
 
core::Size core::pose::num_hbond_acceptors (core::Size begin, core::Size const end, core::pose::Pose const &pose)
 
core::Size core::pose::num_hbond_donors (core::Size begin, core::Size const end, core::pose::Pose const &pose)
 
core::Size core::pose::num_chi_angles (core::Size begin, core::Size const end, core::pose::Pose const &pose)
 
core::Real core::pose::molecular_mass (core::Size begin, core::Size const end, core::pose::Pose const &pose)
 
core::Real core::pose::molar_mass (core::Size begin, core::Size const end, core::pose::Pose const &pose)
 
core::Size core::pose::get_hash_from_chain (char const &chain, core::pose::Pose const &pose)
 
core::Size core::pose::get_hash_excluding_chain (char const &chain, core::pose::Pose const &pose)
 
std::string core::pose::get_sha1_hash_excluding_chain (char const &chain, core::pose::Pose const &pose)
 
void core::pose::initialize_disulfide_bonds (Pose &pose)
 detect and fix disulfide bonds More...
 
std::string core::pose::extract_tag_from_pose (core::pose::Pose &pose)
 Returns a string giving the pose's tag if there is such a thing or "UnknownTag" otherwise. More...
 
core::id::SequenceMapping core::pose::sequence_map_from_pdbinfo (Pose const &first, Pose const &second)
 Create a sequence map of first pose onto the second, matching the PDBInfo If the PDBInfo of either Pose is missing or invalid, do a simple sequence alignment matching. More...
 
core::Size core::pose::canonical_residue_count (core::pose::Pose const &pose)
 count the number of canonical residues in the pose More...
 
core::Size core::pose::noncanonical_residue_count (core::pose::Pose const &pose)
 count the number of non-canonical residues in the pose More...
 
core::Size core::pose::canonical_atom_count (core::pose::Pose const &pose)
 count the number of canonical amino acid atoms in the pose More...
 
core::Size core::pose::noncanonical_atom_count (core::pose::Pose const &pose)
 count the number of non-canonical amino acids in thepose More...
 
core::Size core::pose::noncanonical_chi_count (core::pose::Pose const &pose)
 count the number of non-canonical chi angles in the pose More...
 

Detailed Description

Pose class utilities.

Author
Phil Bradley
Modified by Sergey Lyskov, Rhiju Das, Steven Lewis

Macro Definition Documentation

#define foreach   BOOST_FOREACH