![]() |
Rosetta Core
2014.35
|
FileData class. Hold data created from PDB file. More...
#include <file_data.hh>
Public Types | |
typedef std::map< std::string, double > | ResidueTemps |
typedef std::map< std::string, ResidueTemps > | Temps |
typedef std::map< std::string, Vector > | ResidueCoords |
typedef std::map< std::string, ResidueCoords > | Coords |
typedef utility::vector1 < std::string > | Strings |
Public Member Functions | |
FileData () | |
~FileData () | |
empty destructor in C++ file to reduce number of necessary includes. More... | |
void | initialize_header_information () |
HeaderInformationOP | header_information () const |
void | store_header_record (Record &R) |
void | finalize_header_information () |
The header records can span multiple lines while the pdb_dynamic_parser is done line-wise. Finalizing the header information ensures that all the information is fully processed. More... | |
void | fill_header_records (std::vector< Record > &VR) const |
Make sure to call finalize_header_information before calling this. More... | |
void | store_link_record (Record &record) |
Store (non-standard) polymer linkages in a map. More... | |
void | store_heterogen_names (std::string const &hetID, std::string &text) |
Store heterogen name information in a map. More... | |
void | parse_heterogen_name_for_carbohydrate_residues (std::string const &text) |
Parse heterogen name data for a given carbohydrate and save the particular base (non-variant) ResidueType needed in a map. More... | |
ResidueInformation | get_residue_information (core::pose::Pose const &pose, core::uint const seqpos, bool use_PDB=true, bool renumber_chains=false) const |
Return the PDB resName, chainID, resSeq, and iCode for the given Rosetta sequence position. More... | |
void | append_residue (core::conformation::Residue const &rsd, core::Size &atom_index, core::pose::Pose const &pose, bool preserve_crystinfo=false) |
Append pdb information to FileData for a single residue. More... | |
void | init_from_pose (core::pose::Pose const &pose) |
Fill FileData object using information from given Pose object. More... | |
void | init_from_pose (core::pose::Pose const &pose, FileDataOptions const &options) |
Fill FileData object using information from given Pose object and a set of options. More... | |
void | init_from_pose (core::pose::Pose const &pose, utility::vector1< core::Size > const &residue_indices) |
Fill FileData object using information from given Pose object, for a specified subset of residues. More... | |
bool | update_atom_information_based_on_occupancy (AtomInformation &ai, FileDataOptions const &options) const |
void | randomize_missing_coords (AtomInformation &ai) const |
randomize missing density More... | |
void | create_working_data (utility::vector1< ResidueInformation > &rinfo) |
Convert FileData into set of residues, sequences, coordinates etc. More... | |
void | create_working_data (utility::vector1< ResidueInformation > &rinfo, FileDataOptions const &options) |
Convert FileData into set of residues, sequences, coordinates etc. using a set of options. More... | |
Static Public Member Functions | |
static void | dump_pdb (core::pose::Pose const &pose, std::ostream &out, std::string const &tag="", bool write_fold_tree=false) |
Writes <pose> to a given stream in PDB file format. More... | |
static bool | dump_pdb (core::pose::Pose const &pose, std::string const &file_name, std::string const &tag="", bool write_fold_tree=false) |
Writes <pose> to a PDB file, returns false if an error occurs. More... | |
static void | dump_pdb (core::pose::Pose const &pose, std::ostream &out, utility::vector1< core::Size > const &residue_indices, std::string const &tag="") |
Public Attributes | |
std::string | filename |
std::string | modeltag |
HeaderInformationOP | header |
pose::RemarksOP | remarks |
utility::vector1< std::pair < std::string, std::string > > | heterogen_names |
std::map< std::string, std::string > | carbohydrate_residue_type_base_names |
std::map< std::string, utility::vector1 < LinkInformation > > | link_map |
pose::CrystInfo | crystinfo |
std::vector< AtomChain > | chains |
Friends | |
std::ostream & | operator<< (std::ostream &os, FileData const &) |
Debug printing. More... | |
FileData class. Hold data created from PDB file.
typedef std::map< std::string, ResidueCoords > core::io::pdb::FileData::Coords |
typedef std::map< std::string, Vector > core::io::pdb::FileData::ResidueCoords |
typedef std::map< std::string, double > core::io::pdb::FileData::ResidueTemps |
typedef utility::vector1< std::string > core::io::pdb::FileData::Strings |
typedef std::map< std::string, ResidueTemps > core::io::pdb::FileData::Temps |
core::io::pdb::FileData::FileData | ( | ) |
core::io::pdb::FileData::~FileData | ( | ) |
empty destructor in C++ file to reduce number of necessary includes.
void core::io::pdb::FileData::append_residue | ( | core::conformation::Residue const & | rsd, |
core::Size & | atom_index, | ||
core::pose::Pose const & | pose, | ||
bool | preserve_crystinfo = false |
||
) |
Append pdb information to FileData for a single residue.
References core::io::pdb::AtomInformation::altLoc, core::conformation::Residue::atom(), core::conformation::Residue::atom_name(), core::conformation::Residue::atom_type(), core::chemical::ResidueType::atom_type_set(), core::conformation::Residue::chain(), core::io::pdb::AtomInformation::chainID, chains, core::io::pdb::AtomInformation::element, get_residue_information(), heterogen_names, core::io::pdb::AtomInformation::iCode, core::conformation::Residue::is_carbohydrate(), core::conformation::Residue::is_ligand(), core::conformation::Residue::is_polymer(), core::chemical::AtomType::is_virtual(), core::io::pdb::AtomInformation::isHet, core::io::pdb::AtomInformation::name, core::conformation::Residue::name3(), core::conformation::Residue::natoms(), core::io::pdb::AtomInformation::occupancy, option, core::pose::Pose::pdb_info(), core::io::pdb::print_i(), core::chemical::residue_type_base_name(), core::io::pdb::AtomInformation::resName, core::io::pdb::AtomInformation::resSeq, core::conformation::Residue::seqpos(), core::io::pdb::AtomInformation::serial, core::io::pdb::AtomInformation::temperature, text, core::conformation::Residue::type(), core::io::pdb::AtomInformation::x, core::io::pdb::AtomInformation::y, and core::io::pdb::AtomInformation::z.
Referenced by init_from_pose().
void core::io::pdb::FileData::create_working_data | ( | utility::vector1< ResidueInformation > & | rinfo | ) |
Convert FileData into set of residues, sequences, coordinates etc.
Convert FileData in to set of residues, sequences, coordinates. this is a convenience function, no magic done here. Well, maybe a little.
References options.
Referenced by core::io::pdb::build_pose_as_is1().
void core::io::pdb::FileData::create_working_data | ( | utility::vector1< ResidueInformation > & | rinfo, |
FileDataOptions const & | options | ||
) |
Convert FileData into set of residues, sequences, coordinates etc. using a set of options.
Convert FileData in to set of residues, sequences, coordinates. this is a convenience function, no magic done here. Well, maybe a little.
References core::io::pdb::ResidueInformation::atoms, chains, core::io::pdb::convert_atom_name(), core::io::pdb::convert_res_name(), core::io::pdb::AtomInformation::name, core::io::pdb::AtomInformation::resName, core::io::pdb::AtomInformation::temperature, core::io::pdb::ResidueInformation::temps, update_atom_information_based_on_occupancy(), core::io::pdb::AtomInformation::x, core::io::pdb::ResidueInformation::xyz, core::io::pdb::AtomInformation::y, and core::io::pdb::AtomInformation::z.
|
static |
Writes <pose> to a given stream in PDB file format.
Convert given Pose object in to PDB format and send it to the given stream.
References core::io::pdb::PDB_DReader::createPDBData(), init_from_pose(), and core::io::pdb::write_additional_pdb_data().
Referenced by dump_pdb(), core::pose::Pose::dump_pdb(), core::import_pose::atom_tree_diffs::dump_reference_pose(), and core::pose::Pose::dump_scored_pdb().
|
static |
Writes <pose> to a PDB file, returns false if an error occurs.
Convert given Pose object into PDB format and save it to 'file_name' file.
References dump_pdb(), Error(), and file.
|
static |
Convert given Pose object into PDB format and send it to the given stream. only the residues corresponding to indices in 'residue_indices' will be output
References core::io::pdb::PDB_DReader::createPDBData(), init_from_pose(), and core::io::pdb::write_additional_pdb_data().
void core::io::pdb::FileData::fill_header_records | ( | std::vector< Record > & | VR | ) | const |
Make sure to call finalize_header_information before calling this.
Populate the header records from the data in the HeaderInformation
References header.
Referenced by core::io::pdb::PDB_DReader::createRecords().
void core::io::pdb::FileData::finalize_header_information | ( | ) |
The header records can span multiple lines while the pdb_dynamic_parser is done line-wise. Finalizing the header information ensures that all the information is fully processed.
finalize storing records from the data in the HeaderInformation
References header.
Referenced by core::io::pdb::PDB_DReader::createFileData().
ResidueInformation core::io::pdb::FileData::get_residue_information | ( | core::pose::Pose const & | pose, |
core::uint const | seqpos, | ||
bool | use_PDB = true , |
||
bool | renumber_chains = false |
||
) | const |
Return the PDB resName, chainID, resSeq, and iCode for the given Rosetta sequence position.
References core::pose::Pose::chain(), core::conformation::Conformation::chain_endings(), chr_chains(), core::pose::Pose::conformation(), core::conformation::Residue::name3(), core::pose::Pose::pdb_info(), core::pose::Pose::residue(), core::io::pdb::ResidueInformation::resName, runtime_assert, and core::io::pdb::TR.
Referenced by append_residue(), and init_from_pose().
HeaderInformationOP core::io::pdb::FileData::header_information | ( | ) | const |
References header.
Referenced by core::io::pdb::build_pose_as_is1(), and core::io::pdb::PDB_DReader::createRecords().
void core::io::pdb::FileData::init_from_pose | ( | core::pose::Pose const & | pose | ) |
Fill FileData object using information from given Pose object.
Read atoms/residue information from Pose object and put it in FileData object.
References options.
Referenced by dump_pdb(), and core::io::pdb::pose_from_pose().
void core::io::pdb::FileData::init_from_pose | ( | core::pose::Pose const & | pose, |
FileDataOptions const & | options | ||
) |
Fill FileData object using information from given Pose object and a set of options.
Read atoms/residue information from Pose object and put it in FileData object using options defined in FileDataOptions.
References append_residue(), core::conformation::Residue::atom_index(), core::conformation::Conformation::bond_length(), core::io::pdb::ResidueInformation::chainID, core::io::pdb::LinkInformation::chainID1, core::io::pdb::LinkInformation::chainID2, chains, core::pose::Pose::conformation(), crystinfo, core::kinematics::FoldTree::end(), core::pose::Pose::fold_tree(), get_residue_information(), header, core::io::pdb::ResidueInformation::iCode, core::io::pdb::LinkInformation::iCode1, core::io::pdb::LinkInformation::iCode2, core::io::pdb::LinkInformation::length, link_map, core::io::pdb::LinkInformation::name1, core::io::pdb::LinkInformation::name2, nres, core::pose::Pose::pdb_info(), core::io::pdb::FileDataOptions::preserve_crystinfo(), core::io::pdb::FileDataOptions::preserve_header(), remarks, core::io::pdb::ResidueInformation::resid(), core::io::pdb::LinkInformation::resID1, core::io::pdb::LinkInformation::resID2, core::pose::Pose::residue(), core::io::pdb::ResidueInformation::resName, core::io::pdb::LinkInformation::resName1, core::io::pdb::LinkInformation::resName2, core::io::pdb::ResidueInformation::resSeq, core::io::pdb::LinkInformation::resSeq1, core::io::pdb::LinkInformation::resSeq2, core::pose::Pose::total_residue(), and core::io::pdb::FileDataOptions::write_pdb_link_records().
void core::io::pdb::FileData::init_from_pose | ( | core::pose::Pose const & | pose, |
utility::vector1< core::Size > const & | residue_indices | ||
) |
Fill FileData object using information from given Pose object, for a specified subset of residues.
A lightweight, direct way of limiting pose pdb output to a subset of residues.
References append_residue(), chains, core::sequence::end, nres, core::pose::Pose::residue(), runtime_assert, and core::pose::Pose::total_residue().
void core::io::pdb::FileData::initialize_header_information | ( | ) |
prepare the HeaderInformation data structure;
References header.
Referenced by core::io::pdb::PDB_DReader::createFileData().
void core::io::pdb::FileData::parse_heterogen_name_for_carbohydrate_residues | ( | std::string const & | text | ) |
Parse heterogen name data for a given carbohydrate and save the particular base (non-variant) ResidueType needed in a map.
The standard PDB HETNAM record is insufficient for indicating the type of carbohydrate residue found at each position of the sequence. The PDB format only allows one heterogen name per 3-letter code. To work around this, a PDB file containing carbohydrates will need to be made "Rosetta-ready". 3-letter codes will need to be converted from, e.g., GLC, which implies the vague "ALPHA-D-GLUCOSE", to Glc. When Rosetta reads in a "sentence case" code such as this, it will check a resID-to-ResidueType map to determine which type of alpha-D-glucose to use, e.g., ->4)-alpha-D-glucopyranosyl or ->6)-alpha-D-glucopyranosyl or ->4)-alpha-D-glucofuranosyl, etc. This function fills that map from a "Rosetta-ready" HETNAM text field, which includes the resID information (in the same order as in an ATOM or HETATOM record) followed by a space and the base (non-variant) ResidueType.
References carbohydrate_residue_type_base_names, and key.
Referenced by store_heterogen_names().
void core::io::pdb::FileData::randomize_missing_coords | ( | AtomInformation & | ai | ) | const |
randomize missing density
The missing density regions in the input pdb should have 0.000 in the placeholders this routine puts random coordinates wherever there is 0.000 for mainchain atoms. tex - that's a stupid way of defining missing density, as atoms can be at the origin for other reasons. This has been updated to check for occupancy to define missing density rather than atoms located at the origin.
References core::io::pdb::AtomInformation::name, core::io::pdb::AtomInformation::occupancy, core::io::pdb::AtomInformation::resName, core::io::pdb::AtomInformation::resSeq, core::io::pdb::RG, core::io::pdb::TR, numeric::random::RandomGenerator::uniform(), core::io::pdb::AtomInformation::x, core::io::pdb::AtomInformation::y, and core::io::pdb::AtomInformation::z.
Referenced by update_atom_information_based_on_occupancy().
void core::io::pdb::FileData::store_header_record | ( | Record & | R | ) |
Store information in the header record into the HeaderInformation
References header.
Referenced by core::io::pdb::PDB_DReader::createFileData().
void core::io::pdb::FileData::store_heterogen_names | ( | std::string const & | hetID, |
std::string & | text | ||
) |
Store heterogen name information in a map.
References heterogen_names, parse_heterogen_name_for_carbohydrate_residues(), strip_whitespace(), and core::io::pdb::TR.
Referenced by core::io::pdb::PDB_DReader::createFileData().
void core::io::pdb::FileData::store_link_record | ( | Record & | record | ) |
Store (non-standard) polymer linkages in a map.
References link_map, and core::io::pdb::TR.
Referenced by core::io::pdb::PDB_DReader::createFileData().
bool core::io::pdb::FileData::update_atom_information_based_on_occupancy | ( | AtomInformation & | ai, |
FileDataOptions const & | options | ||
) | const |
References core::io::pdb::AtomInformation::chainID, core::io::pdb::AtomInformation::iCode, core::io::pdb::FileDataOptions::ignore_zero_occupancy(), core::io::pdb::AtomInformation::name, core::io::pdb::AtomInformation::occupancy, core::io::pdb::FileDataOptions::randomize_missing_coords(), randomize_missing_coords(), core::io::pdb::AtomInformation::resSeq, and core::io::pdb::TR.
Referenced by create_working_data().
|
friend |
Debug printing.
Debug/Info function. Output FileData object to TR like stream in human redable format.
std::map<std::string, std::string> core::io::pdb::FileData::carbohydrate_residue_type_base_names |
Referenced by core::io::pdb::build_pose_as_is1(), and parse_heterogen_name_for_carbohydrate_residues().
std::vector< AtomChain > core::io::pdb::FileData::chains |
pose::CrystInfo core::io::pdb::FileData::crystinfo |
std::string core::io::pdb::FileData::filename |
HeaderInformationOP core::io::pdb::FileData::header |
utility::vector1<std::pair<std::string, std::string> > core::io::pdb::FileData::heterogen_names |
Referenced by append_residue(), core::io::pdb::PDB_DReader::createRecords(), and store_heterogen_names().
std::map<std::string, utility::vector1<LinkInformation> > core::io::pdb::FileData::link_map |
std::string core::io::pdb::FileData::modeltag |
Referenced by core::io::pdb::build_pose_as_is1(), and core::io::pdb::PDB_DReader::createFileData().
pose::RemarksOP core::io::pdb::FileData::remarks |