Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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>

Collaboration diagram for core::io::pdb::FileData:
Collaboration graph
[legend]

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 const &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...
 
void init_from_pose (core::pose::Pose const &pose)
 Fill FileData structure using information from given pose object. More...
 
void init_from_pose (core::pose::Pose const &pose, FileDataOptions const &options)
 Fill FileData structure 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 structure using information from given pose object, for a specified subset of residues. More...
 
void randomize_missing_coords (AtomInformation &ai)
 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...
 
void append_residue (core::conformation::Residue const &rsd, core::Size &atom_index, core::pose::Pose const &pose)
 appends pdb information for a single residue 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::vector< AtomChainchains
 
pose::RemarksOP remarks
 
HeaderInformationOP header
 
std::string filename
 
std::string modeltag
 
std::map< std::string,
LinkInformation
links
 
std::map< std::string,
std::string > 
heterogen_names
 
std::map< std::string,
std::string > 
carbohydrate_residue_type_base_names
 

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

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 std::map< std::string, ResidueTemps > core::io::pdb::FileData::Temps

Constructor & Destructor Documentation

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

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
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 in to PDB format and save it to 'file_name' file. return: true if operation was completed without error, false other wise.

References dump_pdb().

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 in to 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().

HeaderInformationOP core::io::pdb::FileData::header_information ( ) const
void core::io::pdb::FileData::init_from_pose ( core::pose::Pose const &  pose)

Fill FileData structure using information from given pose object.

init FileData structure from pose object. read atoms/residue information from Pose object and put it in FileData object.

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 structure using information from given pose object and a set of options.

init FileData structure from pose object. read atoms/residue information from Pose object and put it in FileData object using options defined in FileDataOptions.

References append_residue(), chains, header, core::pose::Pose::pdb_info(), core::io::pdb::FileDataOptions::preserve_header(), remarks, core::pose::Pose::residue(), and core::pose::Pose::total_residue().

void core::io::pdb::FileData::init_from_pose ( core::pose::Pose const &  pose,
utility::vector1< core::Size > const &  residue_indices 
)

Fill FileData structure 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 the alternative of constructing new subposes for output only would be unnecessary/less efficient (?)

References append_residue(), chains, core::sequence::end, core::pose::Pose::residue(), 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, protocols::loops::chainID, protocols::loops::iCode, and protocols::loops::resSeq.

Referenced by store_heterogen_names().

void core::io::pdb::FileData::randomize_missing_coords ( AtomInformation ai)

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(), core::io::pdb::AtomInformation::x, core::io::pdb::AtomInformation::y, and core::io::pdb::AtomInformation::z.

Referenced by create_working_data().

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 const &  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.

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 links, core::io::pdb::LinkInformation::name1_, and core::io::pdb::TR().

Referenced by core::io::pdb::PDB_DReader::createFileData().

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
std::string core::io::pdb::FileData::filename
HeaderInformationOP core::io::pdb::FileData::header
std::map<std::string, std::string> core::io::pdb::FileData::heterogen_names

Referenced by store_heterogen_names().

std::map<std::string, LinkInformation> core::io::pdb::FileData::links
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: