Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Typedefs | Functions | Variables
core::io::pdb Namespace Reference

Classes

class  Field
 Data type Class to represent one field in PDB file. More...
 
class  AtomInformation
 A class that contains information for individual atoms. More...
 
class  ResidueInformation
 Intermediate format for easy construction of core::conformation::Residue objects. More...
 
struct  LinkInformation
 A structure for storing information from PDB LINK records. More...
 
class  FileData
 FileData class. Hold data created from PDB file. More...
 
class  FileDataOptions
 
class  HeaderInformation
 Information stored in the header records http://www.wwpdb.org/documentation/format32/sect2.html HEADER PEPTIDASE 13-JAN-98 1A2Z. More...
 
class  PDB_DReader
 PDB Reader it self, D - for dynamic approch of type handling. More...
 
class  PDB_DReaderOptions
 

Typedefs

typedef std::map< std::string,
Field
Record
 
typedef std::map< std::string,
Record
RecordRef
 collection of all possible records (line types), that can exist in PDB file. More...
 
typedef std::string String
 Record type, represent one line in pdb file. More...
 
typedef std::vector
< AtomInformation
AtomChain
 
typedef
utility::pointer::owning_ptr
< FileDataOptions
FileDataOptionsOP
 
typedef
utility::pointer::owning_ptr
< FileDataOptions const > 
FileDataOptionsCOP
 
typedef
utility::pointer::owning_ptr
< HeaderInformation
HeaderInformationOP
 
typedef
utility::pointer::owning_ptr
< HeaderInformation const > 
HeaderInformationCOP
 
typedef
utility::pointer::owning_ptr
< PDB_DReaderOptions
PDB_DReaderOptionsOP
 
typedef
utility::pointer::owning_ptr
< PDB_DReaderOptions const > 
PDB_DReaderOptionsCOP
 

Functions

std::ostream & operator<< (std::ostream &os, Field const &F)
 Debug output. More...
 
std::ostream & operator<< (std::ostream &os, Record const &R)
 Debug printing, serialazing to Tracer like object. More...
 
static basic::Tracer TR ("core.io.pdb.file_data")
 
static
numeric::random::RandomGenerator 
RG (231411)
 
static string const chr_chains ("ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyz")
 
std::ostream & operator<< (std::ostream &os, FileData const &fd)
 
std::string convert_res_name (std::string const &name)
 
std::string convert_atom_name (std::string const &res_name, std::string atom_name)
 
std::string local_strip_whitespace (std::string const &name)
 
void write_additional_pdb_data (std::ostream &out, pose::Pose const &pose, io::pdb::FileData const &, bool write_fold_tree)
 Writes. More...
 
void build_pose_from_pdb_as_is (pose::Pose &pose, std::string const &filename)
 Builds a pose into <pose>, without repacking or optimizing hydrogens; using the fullatom ResidueTypeSet. More...
 
void build_pose_from_pdb_as_is (pose::Pose &pose, std::string const &filename, PDB_DReaderOptions const &pdr_options)
 Builds a pose into <pose>, without repacking or optimizing hydrogens; using the fullatom ResidueTypeSet and a set of options. More...
 
void build_pose_from_pdb_as_is (pose::Pose &pose, chemical::ResidueTypeSet const &residue_set, std::string const &filename)
 
void build_pose_from_pdb_as_is (pose::Pose &pose, chemical::ResidueTypeSet const &residue_set, std::string const &filename, PDB_DReaderOptions const &pdr_options)
 
void build_pose_as_is1 (io::pdb::FileData &fd, pose::Pose &pose, chemical::ResidueTypeSet const &residue_set, id::AtomID_Mask &missing, FileDataOptions const &options)
 
bool is_residue_type_recognized (Size const pdb_residue_index, std::string const &pdb_name, core::chemical::ResidueTypeCOPs const &rsd_type_list, std::map< std::string, Vector > const &xyz, std::map< std::string, double > const &rtemp, utility::vector1< Size > &UA_res_nums, utility::vector1< std::string > &UA_res_names, utility::vector1< std::string > &UA_atom_names, utility::vector1< numeric::xyzVector< Real > > &UA_coords, utility::vector1< core::Real > &UA_temps)
 
bool is_residue_type_recognized (Size const pdb_residue_index, std::string const &pdb_name, core::chemical::ResidueTypeCOPs const &rsd_type_list, std::map< std::string, Vector > const &xyz, std::map< std::string, double > const &rtemp, utility::vector1< Size > &UA_res_nums, utility::vector1< std::string > &UA_res_names, utility::vector1< std::string > &UA_atom_names, utility::vector1< numeric::xyzVector< Real > > &UA_coords, utility::vector1< core::Real > &UA_temps, FileDataOptions const &options)
 
void pose_from_pose (pose::Pose &new_pose, pose::Pose const &old_pose, utility::vector1< core::Size > const &residue_indices)
 
void pose_from_pose (pose::Pose &new_pose, pose::Pose const &old_pose, utility::vector1< core::Size > const &residue_indices, FileDataOptions const &options)
 
void pose_from_pose (pose::Pose &new_pose, pose::Pose const &old_pose, chemical::ResidueTypeSet const &residue_set, utility::vector1< core::Size > const &residue_indices)
 
void pose_from_pose (pose::Pose &new_pose, pose::Pose const &old_pose, chemical::ResidueTypeSet const &residue_set, utility::vector1< core::Size > const &residue_indices, FileDataOptions const &options)
 
static basic::Tracer TR ("core.io.pdb.HeaderInformation")
 
std::vector< Stringsplit (const String &s)
 
std::string print_i (const char *format, int I)
 
std::string print_d (const char *format, double d)
 
basic::Tracer TR_dump_pdb_dummy ("core.io.pdb.pose_io.dump_pdb_dummy")
 special Tracer instance acting as special param for all traced_dump_pdb functions More...
 
basic::Tracer TR ("core.io.pose_io")
 
void dump_pdb (pose::Pose const &pose, std::ostream &out, id::AtomID_Mask const &mask, std::string const &tag="1")
 Writes <pose> data. More...
 
void dump_bfactor_pdb (pose::Pose const &pose, id::AtomID_Map< Real > const &bfactor, std::ostream &out, std::string const &tag="1")
 Writes <pose> bfactor data. More...
 
void dump_pdb_residue (conformation::Residue const &rsd, Size &atom_number, std::ostream &out)
 Writes pdb data. More...
 
void dump_pdb (pose::Pose const &pose, std::ostream &out, std::string const &tag="1")
 Writes <pose> data. More...
 
void dump_pdb (pose::Pose const &pose, std::string const &filename, std::string const &tag="1")
 Writes the <pose> data to <filename> More...
 
void traced_dump_pdb (basic::Tracer const &tr, pose::Pose const &pose, std::ostream &out, std::string const &tag)
 dump_pdb depending on visibility of tracer More...
 
void traced_dump_pdb (basic::Tracer const &tr, pose::Pose const &pose, std::string const &filename, std::string const &tag)
 dump_pdb depending on visibility of tracer More...
 
core::Real restrict_prec (core::Real inval)
 Utility function to round a real value to the given precisions (number of digits after the decimal place) for output. For use solely by extract_scores() More...
 
void extract_scores (pose::Pose const &pose, utility::io::ozstream &out)
 Write <pose> Energies information into an output stream (e.g. the tail of a pdb file) More...
 
void dump_connect_info (pose::Pose const &pose, std::ostream &out, std::map< id::AtomID, Size > &atom_id_output)
 
void dump_connect_info (pose::Pose const &pose, std::ostream &out)
 dump_connect_info Figure out CONECT fields for PDB output – atoms that are bonded in Rosetta but won't look that way to RASMOL or Pymol because of distance – useful for centroid poses. More...
 

Variables

basic::Tracer TR_dump_pdb_dummy
 special Tracer instance acting as special param for all traced_dump_pdb functions More...
 

Typedef Documentation

typedef std::map<std::string, Field> core::io::pdb::Record
typedef std::map<std::string, Record> core::io::pdb::RecordRef

collection of all possible records (line types), that can exist in PDB file.

typedef std::string core::io::pdb::String

Record type, represent one line in pdb file.

Function Documentation

void core::io::pdb::build_pose_as_is1 ( io::pdb::FileData fd,
pose::Pose pose,
chemical::ResidueTypeSet const &  residue_set,
id::AtomID_Mask missing,
FileDataOptions const &  options 
)

References core::chemical::ResidueType::aa(), core::chemical::aa_cys, core::pose::add_lower_terminus_type_to_pose_residue(), core::pose::add_upper_terminus_type_to_pose_residue(), core::pose::add_variant_type_to_pose_residue(), core::pose::Pose::append_residue_by_bond(), core::pose::Pose::append_residue_by_jump(), core::chemical::ResidueType::atom_index(), core::chemical::ResidueType::atom_name(), core::chemical::BRANCH_LOWER_TERMINUS, core::chemical::BRANCH_POINT, core::io::pdb::FileData::carbohydrate_residue_type_base_names, core::io::pdb::ResidueInformation::chainID, protocols::loops::chainID, core::io::pdb::FileDataOptions::chains_whose_residues_are_separate_chemical_entities(), core::io::pdb::FileDataOptions::check_if_residues_are_Ctermini(), core::io::pdb::FileDataOptions::check_if_residues_are_Ntermini(), core::pose::Pose::clear(), core::pose::Pose::conformation(), core::conformation::ResidueFactory::create_residue(), core::io::pdb::FileData::create_working_data(), core::chemical::DEPROTONATED, core::conformation::Conformation::detect_bonds(), core::conformation::Conformation::detect_pseudobonds(), core::chemical::DISULFIDE, core::io::pdb::FileDataOptions::exit_if_missing_heavy_atoms(), core::io::pdb::FileData::filename, core::conformation::Conformation::fill_missing_atoms(), core::chemical::ResidueType::has(), core::chemical::ResidueType::has_variant_type(), core::io::pdb::FileData::header_information(), core::pose::initialize_atomid_map(), core::pose::initialize_disulfide_bonds(), core::conformation::Conformation::insert_chain_ending(), core::chemical::ResidueType::is_carbohydrate(), core::chemical::ResidueType::is_lower_terminus(), core::chemical::ResidueType::is_polymer(), is_residue_type_recognized(), core::chemical::ResidueType::is_upper_terminus(), core::io::pdb::FileDataOptions::keep_input_protonation_state(), core::io::pdb::FileData::links, local_strip_whitespace(), core::chemical::LOWER_TERMINUS, core::chemical::ResidueType::mainchain_atoms(), core::io::pdb::FileData::modeltag, core::pose::Pose::n_residue(), core::chemical::ResidueType::name(), core::chemical::ResidueTypeSet::name3_map(), core::chemical::ResidueType::natoms(), core::pose::Pose::pdb_info(), core::io::pdb::FileDataOptions::preserve_header(), core::chemical::PROTONATED, core::io::pdb::FileData::remarks, core::io::pdb::ResidueInformation::resid, core::pose::Pose::residue(), core::pose::Pose::residue_type(), core::chemical::residue_type_base_name(), core::io::pdb::ResidueInformation::resName, core::io::pdb::ResidueInformation::temps, core::io::pdb::ResidueInformation::terCount, core::pose::Pose::total_residue(), TR(), core::conformation::Residue::type(), core::chemical::UPPER_TERMINUS, protocols::kinmatch::xyz(), and core::io::pdb::ResidueInformation::xyz.

Referenced by core::import_pose::build_pose_as_is(), build_pose_from_pdb_as_is(), and pose_from_pose().

void core::io::pdb::build_pose_from_pdb_as_is ( pose::Pose pose,
std::string const &  filename 
)
void core::io::pdb::build_pose_from_pdb_as_is ( pose::Pose pose,
std::string const &  filename,
PDB_DReaderOptions const &  pdr_options 
)

Builds a pose into <pose>, without repacking or optimizing hydrogens; using the fullatom ResidueTypeSet and a set of options.

References build_pose_from_pdb_as_is(), core::chemical::FA_STANDARD, and core::chemical::ChemicalManager::get_instance().

void core::io::pdb::build_pose_from_pdb_as_is ( pose::Pose pose,
chemical::ResidueTypeSet const &  residue_set,
std::string const &  filename 
)
void core::io::pdb::build_pose_from_pdb_as_is ( pose::Pose pose,
chemical::ResidueTypeSet const &  residue_set,
std::string const &  filename,
PDB_DReaderOptions const &  pdr_options 
)
static string const core::io::pdb::chr_chains ( "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyz"  )
static
std::string core::io::pdb::convert_atom_name ( std::string const &  res_name,
std::string  atom_name 
)
std::string core::io::pdb::convert_res_name ( std::string const &  name)

Temporary hacky hack Need better mechanism for this

References TR().

Referenced by core::io::pdb::FileData::create_working_data().

void core::io::pdb::dump_bfactor_pdb ( pose::Pose const &  pose,
id::AtomID_Map< Real > const &  bfactor,
std::ostream &  out,
std::string const &  tag 
)

Writes <pose> bfactor data.

References core::pose::Pose::residue(), and core::pose::Pose::total_residue().

void core::io::pdb::dump_connect_info ( pose::Pose const &  pose,
std::ostream &  out,
std::map< id::AtomID, Size > &  atom_id_output 
)
void core::io::pdb::dump_connect_info ( pose::Pose const &  pose,
std::ostream &  out 
)

dump_connect_info Figure out CONECT fields for PDB output – atoms that are bonded in Rosetta but won't look that way to RASMOL or Pymol because of distance – useful for centroid poses.

References dump_connect_info(), core::pose::Pose::residue(), and core::pose::Pose::total_residue().

void core::io::pdb::dump_pdb ( pose::Pose const &  pose,
std::ostream &  out,
id::AtomID_Mask const &  mask,
std::string const &  tag 
)
void core::io::pdb::dump_pdb ( pose::Pose const &  pose,
std::ostream &  out,
std::string const &  tag 
)

Writes <pose> data.

References core::pose::Pose::dump_pdb().

void core::io::pdb::dump_pdb ( pose::Pose const &  pose,
std::string const &  filename,
std::string const &  tag = "1" 
)

Writes the <pose> data to <filename>

example(s): dump_pdb(pose,'my_pose.pdb') See also: Pose Pose.dump_pdb

References core::pose::Pose::dump_pdb().

void core::io::pdb::dump_pdb_residue ( conformation::Residue const &  rsd,
Size atom_number,
std::ostream &  out 
)
void core::io::pdb::extract_scores ( core::pose::Pose const &  pose,
utility::io::ozstream &  out 
)
bool core::io::pdb::is_residue_type_recognized ( Size const  pdb_residue_index,
std::string const &  pdb_name,
core::chemical::ResidueTypeCOPs const &  rsd_type_list,
std::map< std::string, Vector > const &  xyz,
std::map< std::string, double > const &  rtemp,
utility::vector1< Size > &  UA_res_nums,
utility::vector1< std::string > &  UA_res_names,
utility::vector1< std::string > &  UA_atom_names,
utility::vector1< numeric::xyzVector< Real > > &  UA_coords,
utility::vector1< core::Real > &  UA_temps 
)

The input rsd_type_list are all the residue types that have the same 3 letter code as pdb_name. Return true if the list is non-empty and false otherwise. If no residue types match, then either exit, ignore or remember the residue based on the following options in the option system:

-in:ignore_waters -in:ignore_unrecognized_res -in:remember_unrecognized_waters -in:remember_unrecognized_res

Referenced by build_pose_as_is1().

bool core::io::pdb::is_residue_type_recognized ( Size const  pdb_residue_index,
std::string const &  pdb_name,
core::chemical::ResidueTypeCOPs const &  rsd_type_list,
std::map< std::string, Vector > const &  xyz,
std::map< std::string, double > const &  rtemp,
utility::vector1< Size > &  UA_res_nums,
utility::vector1< std::string > &  UA_res_names,
utility::vector1< std::string > &  UA_atom_names,
utility::vector1< numeric::xyzVector< Real > > &  UA_coords,
utility::vector1< core::Real > &  UA_temps,
FileDataOptions const &  options 
)

The input rsd_type_list are all the residue types that have the same 3 letter code as pdb_name. Return true if the list is non-empty and false otherwise. If no residue types match, then either exit, ignore or remember the residue based on the following options in a FileDataOptions instance:

-ignore_waters -ignore_unrecognized_res -remember_unrecognized_waters -remember_unrecognized_res

References core::io::pdb::FileDataOptions::ignore_unrecognized_res(), core::io::pdb::FileDataOptions::ignore_waters(), local_strip_whitespace(), core::io::pdb::FileDataOptions::remember_unrecognized_res(), core::io::pdb::FileDataOptions::remember_unrecognized_water(), and TR().

std::string core::io::pdb::local_strip_whitespace ( std::string const &  name)
inline

Remove spaces from given string.

Referenced by build_pose_as_is1(), and is_residue_type_recognized().

std::ostream& core::io::pdb::operator<< ( std::ostream &  os,
Field const &  F 
)
std::ostream & core::io::pdb::operator<< ( std::ostream &  os,
Record const &  R 
)

Debug printing, serialazing to Tracer like object.

Debug printing, serializing to Tracer like object.

std::ostream& core::io::pdb::operator<< ( std::ostream &  os,
FileData const &  fd 
)

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

References core::io::pdb::FileData::chains.

void core::io::pdb::pose_from_pose ( pose::Pose new_pose,
pose::Pose const &  old_pose,
utility::vector1< core::Size > const &  residue_indices 
)
void core::io::pdb::pose_from_pose ( pose::Pose new_pose,
pose::Pose const &  old_pose,
utility::vector1< core::Size > const &  residue_indices,
FileDataOptions const &  options 
)
void core::io::pdb::pose_from_pose ( pose::Pose new_pose,
pose::Pose const &  old_pose,
chemical::ResidueTypeSet const &  residue_set,
utility::vector1< core::Size > const &  residue_indices 
)

References pose_from_pose().

void core::io::pdb::pose_from_pose ( pose::Pose new_pose,
pose::Pose const &  old_pose,
chemical::ResidueTypeSet const &  residue_set,
utility::vector1< core::Size > const &  residue_indices,
FileDataOptions const &  options 
)
std::string core::io::pdb::print_d ( const char *  format,
double  d 
)

print double with format to string

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

std::string core::io::pdb::print_i ( const char *  format,
int  I 
)

print int with format to string

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

core::Real core::io::pdb::restrict_prec ( core::Real  inval)

Utility function to round a real value to the given precisions (number of digits after the decimal place) for output. For use solely by extract_scores()

Apparently, there isn't an easy way to do this in C++, or even the general goal of limiting the precision in output streams. (setprecision() with default formatting doesn't correctly handle very small numbers, and with fixed precision outputs superfluous zeros.)

Referenced by extract_scores().

static numeric::random::RandomGenerator core::io::pdb::RG ( 231411  )
static
std::vector<String> core::io::pdb::split ( const String s)

split String by new line symbols, return vector of string.

References core::io::serialization::size(), and protocols::loops::start.

Referenced by core::conformation::symmetry::VirtualCoordinate::add_coordinate_from_string(), core::conformation::symmetry::VirtualCoordinates::add_coordinate_from_string(), protocols::jd2::JobOutputter::affixed_numbered_name(), protocols::features::deserialize_db_listener_data(), protocols::loophash::extract_sample_weights(), core::kinematics::MoveMap::init_from_file(), protocols::enzdes::EnzdesScorefileFilter::initialize_value_evaluators_from_file(), protocols::loophash::MPI_LoopHashRefine_Master::load_sample_weight(), main(), protocols::match::MatcherTask::modify_pose_build_resids_from_endes_input(), protocols::jobdist::BasicJob::output_tag(), core::io::pdb::PDB_DReader::parse(), core::chemical::sdf::parse_bond_type_data(), protocols::hotspot_hashing::LSMSearchPattern::parse_lsm_spec(), core::chemical::sdf::V3Parser::ParseAtom(), core::chemical::sdf::ctabV3000Parser::ParseAtom(), core::chemical::sdf::ctabV2000Parser::ParseAtomTypeData(), core::chemical::sdf::V3Parser::ParseBond(), core::chemical::sdf::ctabV3000Parser::ParseBond(), core::chemical::sdf::V3Parser::ParseTable(), core::chemical::sdf::ctabV3000Parser::ParseTable(), core::import_pose::pose_from_pdb(), core::conformation::symmetry::SymDof::read(), protocols::jd2::parser::BluePrint::read_blueprint(), protocols::toolbox::match_enzdes_util::ResInteractions::read_data(), protocols::toolbox::match_enzdes_util::CstResInteractions::read_data(), core::io::PositionDdGInfo::read_ddg_predictions_file(), core::scoring::methods::SequenceDependentRefEnergy::read_energy_weight_table(), protocols::loophash::BackboneDB::read_homologs(), protocols::loops::LoopsFileIO::read_loop_file_stream(), protocols::toolbox::match_enzdes_util::EnzdesLoopInfo::read_loops_file_block(), core::scoring::methods::NMerPSSMEnergy::read_nmer_pssm_list(), core::scoring::methods::NMerRefEnergy::read_nmer_table(), core::scoring::methods::NMerRefEnergy::read_nmer_table_list(), protocols::loops::PoseNumberedLoopFileReader::read_pose_numbered_loops_file(), protocols::relax::FastRelax::read_script_file(), core::conformation::symmetry::SymmData::read_symmetry_data_from_stream(), core::conformation::symmetry::SymmData::read_symmetry_info_from_pdb(), protocols::fldsgn::potentials::SetAACompositionPotential::set_parameters(), protocols::relax::FastRelax::set_script_to_batchrelax_default(), core::scoring::SS_Killhairpins_Info::setup_killhairpins(), and protocols::moves::StructureRestrictor::setup_relevant_chains().

static basic::Tracer core::io::pdb::TR ( "core.io.pdb.HeaderInformation"  )
static
basic::Tracer core::io::pdb::TR ( "core.io.pose_io"  )
static basic::Tracer core::io::pdb::TR ( "core.io.pdb.file_data"  )
static
basic::Tracer core::io::pdb::TR_dump_pdb_dummy ( "core.io.pdb.pose_io.dump_pdb_dummy"  )

special Tracer instance acting as special param for all traced_dump_pdb functions

void core::io::pdb::traced_dump_pdb ( basic::Tracer const &  tr,
pose::Pose const &  pose,
std::ostream &  out,
std::string const &  tag 
)

dump_pdb depending on visibility of tracer

Parameters
[in]troutput performed if tracer is visible or if passed dummy tracer core::io::pdb::TR_dump_pdb_dummy

References core::pose::Pose::dump_pdb(), and TR_dump_pdb_dummy.

void core::io::pdb::traced_dump_pdb ( basic::Tracer const &  tr,
pose::Pose const &  pose,
std::string const &  filename,
std::string const &  tag 
)

dump_pdb depending on visibility of tracer

Parameters
[in]troutput performed if tracer is visible or if passed dummy tracer core::io::pdb::TR_dump_pdb_dummy

References core::pose::Pose::dump_pdb(), and TR_dump_pdb_dummy.

void core::io::pdb::write_additional_pdb_data ( std::ostream &  out,
pose::Pose const &  pose,
io::pdb::FileData const &  ,
bool  write_fold_tree 
)

Variable Documentation

basic::Tracer core::io::pdb::TR_dump_pdb_dummy

special Tracer instance acting as special param for all traced_dump_pdb functions

Referenced by traced_dump_pdb().