Rosetta Core  2014.35
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Friends | List of all members
core::io::pdb::FileData Class Reference

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< AtomChainchains
 

Friends

std::ostream & operator<< (std::ostream &os, FileData const &)
 Debug printing. More...
 

Detailed Description

FileData class. Hold data created from PDB file.

Member Typedef Documentation

Constructor & Destructor Documentation

core::io::pdb::FileData::FileData ( )
core::io::pdb::FileData::~FileData ( )

empty destructor in C++ file to reduce number of necessary includes.

Member Function Documentation

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 
)
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 
)
void core::io::pdb::FileData::dump_pdb ( core::pose::Pose const &  pose,
std::ostream &  out,
std::string const &  tag = "",
bool  write_fold_tree = false 
)
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().

bool core::io::pdb::FileData::dump_pdb ( core::pose::Pose const &  pose,
std::string const &  file_name,
std::string const &  tag = "",
bool  write_fold_tree = false 
)
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.

Returns
true if operation was completed without error, false otherwise.

References dump_pdb(), Error(), and file.

void core::io::pdb::FileData::dump_pdb ( core::pose::Pose const &  pose,
std::ostream &  out,
utility::vector1< core::Size > const &  residue_indices,
std::string const &  tag = "" 
)
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

Remarks
HeaderInformation must be created explicitly before it can be filled!

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

Remarks
HeaderInformation must be created explicitly before it can be filled!

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
HeaderInformationOP core::io::pdb::FileData::header_information ( ) const
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.

Note
The alternative of constructing new subposes for output only would be unnecessary/less efficient (?)

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.

Author
Labonte

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

Remarks
HeaderInformation must be created explicitly before it can be filled!

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.

Remarks
heterogen "names" for carbohydrates (from "Rosetta-ready" PDB files) instead have the name field parsed to extract the base (non-variant) ResidueType needed for a particular residue.
Author
Labonte

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.

Author
Labonte

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

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
FileData const &  fd 
)
friend

Debug printing.

Debug/Info function. Output FileData object to TR like stream in human redable format.

Member Data Documentation

std::map<std::string, std::string> core::io::pdb::FileData::carbohydrate_residue_type_base_names
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
std::map<std::string, utility::vector1<LinkInformation> > core::io::pdb::FileData::link_map
std::string core::io::pdb::FileData::modeltag
pose::RemarksOP core::io::pdb::FileData::remarks

The documentation for this class was generated from the following files: