Rosetta  2020.37
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Public Types | Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
core::pose::PDBInfo Class Reference

maintains pdb residue & atom information inside a Pose More...

#include <PDBInfo.hh>

Inheritance diagram for core::pose::PDBInfo:
Inheritance graph
[legend]

Classes

struct  AtomRecord
 internal struct for storing PDB atom related information More...
 
struct  ResidueRecord
 internal struct for storing PDB residue related information More...
 

Public Types

typedef utility::VirtualBase Super
 
typedef core::Size Size
 
typedef core::Real Real
 
typedef std::string String
 
typedef core::io::Remarks Remarks
 
typedef core::io::CrystInfo CrystInfo
 

Public Member Functions

 PDBInfo ()
 default constructor, obsolete is true More...
 
 PDBInfo (Size const n)
 size constructor (ensure space for 'n' residue records), obsolete is true More...
 
 PDBInfo (Pose const &pose, bool init=true)
 Pose constructor (ensures space for residue and atom records relative to Pose) More...
 
 PDBInfo (PDBInfo const &info)
 copy constructor More...
 
 ~PDBInfo () override
 default destructor More...
 
PDBInfooperator= (PDBInfo const &info)
 copy assignment More...
 
core::conformation::ConformationCAP is_observing ()
 Returns the Conformation if this PDBInfo is currently observing a conformation, otherwise return NULL. More...
 
void attach_to (core::conformation::Conformation &conf)
 Attaches the Conformation <conf> and begins observation. More...
 
void detach_from ()
 Detaches the Conformation and stops observation. More...
 
void on_connection_change (core::conformation::signals::ConnectionEvent const &event)
 Updates when connection to Conformation is changed. More...
 
void on_identity_change (core::conformation::signals::IdentityEvent const &event)
 Updates atom records when residue identity changes in Conformation. More...
 
void on_length_change (core::conformation::signals::LengthEvent const &event)
 Updates residue and atom records when length changes in Conformation, obsoletes PDBInfo. More...
 
bool obsolete () const
 Returns true if PDBInfo is obsolete and needs updating. More...
 
void obsolete (bool flag)
 Sets the obsolete state to <flag> More...
 
Size nres () const
 Returns the number of residues represented in PDBInfo. More...
 
Size natoms (Size const res) const
 Returns the number of atoms represented for the residue <res> More...
 
void resize_residue_records (Size const n)
 Resizes for <n> residue records. More...
 
void resize_atom_records (Size const res, Size const n, bool const zero=true)
 Ensures <n> atom records for residue <res> are available. More...
 
void resize_atom_records (Size const n, bool const zero=true)
 Ensures <n> atom records for residue <res> are available. More...
 
void resize_atom_records (Pose const &pose)
 Updates the number of atom records with respect to atoms in <pose> More...
 
void tighten_memory ()
 Tightens memory usage. More...
 
String const & name () const
 Returns the pdb name. More...
 
void name (String const &s)
 Sets the pdb name. More...
 
String const & modeltag () const
 Returns the model tag for a multi-model pdb. More...
 
void modeltag (String const &tag)
 Sets the model tag for a multi-model pdb to <tag> More...
 
Remarks const & remarks () const
 Returns the pdb remarks (const) More...
 
Remarksremarks ()
 Returns the pdb remarks (mutable) More...
 
void remarks (Remarks const &in)
 Sets the pdb remarks to <in> More...
 
CrystInfo crystinfo () const
 Returns the pdb crystinfo. More...
 
void set_crystinfo (CrystInfo crystinfoin)
 Sets the pdb crystinfo. More...
 
void header_information (io::HeaderInformationOP header_information)
 For structures deposited into the protein databank, the header information record stores the classfication, deposition date and the 4 character identification code. More...
 
io::HeaderInformationCOP header_information () const
 
io::HeaderInformationOP header_information ()
 
void chain_sequences (std::map< char, utility::vector1< std::string > > chain_sequences)
 For structures deposited into the protein databank, the chain sequences stores the SEQRES records. A listing of the consecutive chemical components covalently linked in a linear fashion to form a polymer. In short, the sequence (as a vector of three letter codes) that the researcher performed the experiment on. More...
 
utility::vector1< std::string > chain_sequences (char chain)
 
std::map< char,
utility::vector1< std::string > > 
chain_sequences ()
 
char const & chain (Size const res) const
 Returns the chain letter for pose residue <res> More...
 
int const & number (Size const res) const
 Returns the pdb sequence number of pose residue <res> More...
 
char const & icode (Size const res) const
 Returns the pdb insertion code of residue <res> More...
 
std::string const & segmentID (Size const res) const
 Returns the segment ID code of residue <res> More...
 
std::string tag (Size const res) const
 Returns a tag for residue <res> like C:1235 (or C:QA:1235 if segment ID is present) More...
 
Size pdb2pose (char const chain, int const res, char const icode= ' ', std::string const &segmentID=" ") const
 Returns the pose numbering of the pdb residue with chain letter <chain>, pdb residue <res>, and insertion code <icode> More...
 
String pose2pdb (Size const res) const
 Returns the pdb numbering string of pose residue <res> More...
 
int num_chains () const
 Returns the total number of (chain letter) chains in the pose. More...
 
utility::vector1< std::string > get_reslabels (Size const res) const
 returns the pose(number) labels associated to the residue More...
 
void chain (Size const res, char const chain_id)
 Sets the chain letter of pose residue <res> to <chain_id> More...
 
void number (Size const res, int const pdb_res)
 Sets the pdb sequence residue number of pose residue <res> to <pdb_res> More...
 
void icode (Size const res, char const ins_code)
 Sets the insertion code of pose residue <res> to <ins_code> More...
 
void segmentID (Size const res, std::string const &segmentID)
 Sets the insertion code of pose residue <res> to <ins_code> More...
 
void set_resinfo (Size const res, char const chain_id, int const pdb_res, char const ins_code= ' ', std::string const &segmentID=" ", bool clear_labels=true)
 Sets the chain letter, pdb sequence residue numbering, and insertion code for pose residue <res> to <chain_id> , <pdb_res> , and <ins_code> respectfully. More...
 
void add_reslabel (Size res, std::string const &label)
 adds a label associated to a pose resid. More...
 
void clear_reslabel (Size const res)
 clean all the label(s) associated to a pose resid. More...
 
bool res_haslabel (Size res, std::string const &target_label) const
 uses std iterators to check if a residue has a label associated to it More...
 
void parse_pdbinfo_labels (utility::vector1< std::string > const &lines, Pose const &pose)
 parse PDBInfo-LABEL: lines from a collection of lines More...
 
void write_pdbinfo_labels (utility::vector1< std::string > &remark_lines) const
 write REMARK PDBInfo-LABEL: lines for output to pose More...
 
bool const & is_het (Size const res, Size const atom_index) const
 Returns true if the <atom_index> atom of pose residue <res> is a heteratom. More...
 
char const & alt_loc (Size const res, Size const atom_index) const
 Returns the alternate location for the <atom_index> atom of pose residue <res> More...
 
Real const & occupancy (Size const res, Size const atom_index) const
 Returns the occupancy for the <atom_index> atom of pose residue <res> More...
 
Real const & temperature (Size const res, Size const atom_index) const
 Returns the temperature for the <atom_index> atom of pose residue <res> More...
 
Real const & bfactor (Size const res, Size const atom_index) const
 Returns the temperature for the <atom_index> atom of pose residue <res> More...
 
void is_het (Size const res, Size const atom_index, bool const flag)
 Sets the heteroatom flag of the <atom_index> atom of pose residue <res> to <flag> More...
 
void alt_loc (Size const res, Size const atom_index, char const loc)
 Sets the alternate location of the <atom_index> atom of pose residue <res> to <loc> More...
 
void occupancy (Size const res, Size const atom_index, Real const occ)
 Sets the occupancy of the <atom_index> atom of pose residue <res> to <occ> More...
 
void temperature (Size const res, Size const atom_index, Real const t)
 Sets the temperature of the <atom_index> atom of pose residue <res> to <t> More...
 
void bfactor (Size const res, Size const atom_index, Real const t)
 Sets the temperature of the <atom_index> atom of pose residue <res> to <t> More...
 
PDBPoseMap const & pdb2pose () const
 Returns the internally maintained PDBPoseMap. More...
 
void show (std::ostream &out) const
 Displays segments of PDB information, segments may or may not be entire chains. More...
 
std::string short_desc () const
 Returns a short description of the contents of the PDBInfo. The current format of this is something like "A:1-3 B:9-11". More...
 
void set_chains (char const id)
 Sets all residue chain ids to the character <id> More...
 
template<typename CharIterator >
void set_chains (CharIterator const &begin, CharIterator const &end)
 Sets the residue chain letters from some char container, iterator version. More...
 
template<typename CharContainer >
void set_chains (CharContainer const &c)
 Sets the residue chain letters from some char container, e.g. utility::vector1. More...
 
template<typename IntIterator >
void set_numbering (IntIterator const &begin, IntIterator const &end)
 Sets the pdb sequence residue numbering from some int container, iterator version. More...
 
template<typename IntContainer >
void set_numbering (IntContainer const &c)
 Sets the pdb sequence residue numbering from some int container, e.g. utility::vector1. More...
 
template<typename CharIterator >
void set_icodes (CharIterator const &begin, CharIterator const &end)
 Sets the insertion codes from some char container, iterator version. More...
 
template<typename CharContainer >
void set_icodes (CharContainer const &c)
 Sets the insertion codes from some char container, e.g. utility::vector1. More...
 
template<typename StringIterator >
void set_segment_ids (StringIterator const &begin, StringIterator const &end)
 
template<typename StringContainer >
void set_segment_ids (StringContainer const &s)
 
void copy (PDBInfo const &input_info, Size const copy_from, Size const copy_to, Size const start_from)
 Copyies a section from PDBInfo <input_info> More...
 
void append_res (Size const res, Size const natoms, Size const n=1)
 Appends residue records given a pose residue number <res> More...
 
void prepend_res (Size const res, Size const natoms, Size const n=1)
 Prepends residue records before given pose residue number <res> More...
 
void replace_res (Size const res, Size const natoms)
 "Replaces" residue record for pose residue <res> More...
 
void replace_res_remap_bfactors (Size const res, conformation::Residue const &tgt)
 same as replace_res BUT remaps B factors from src to tgt More...
 
void delete_res (Size const res, Size const n=1)
 Deletes <n> residue records starting from pose residue <res> More...
 
utility::vector1
< UnrecognizedAtomRecord >
const & 
get_unrecognized_atoms () const
 remembers info about atoms not read into the pose More...
 
core::Size const & get_num_unrecognized_atoms () const
 
core::Size const & get_num_unrecognized_res () const
 
std::string const & get_unrecognized_res_name (core::Size const &i) const
 
core::Size const & get_unrecognized_res_size (core::Size const &i) const
 
void add_unrecognized_atoms (utility::vector1< UnrecognizedAtomRecord > UAs)
 remembers info about atoms not read into the pose More...
 
void rebuild_pdb2pose ()
 rebuilds PDBPoseMap from scratch More...
 

Static Public Member Functions

static char empty_record ()
 Returns the chain letter character specifying "empty record", currently '^'. More...
 

Private Types

typedef utility::vector1
< AtomRecord
AtomRecords
 
typedef utility::vector1
< ResidueRecord
ResidueRecords
 

Private Member Functions

void check_residue_records_size (Size const size) const
 if size of residue records != passed value, fail fast More...
 

Private Attributes

bool obsolete_
 indicates object is out of sync with reference (e.g. parent Pose) More...
 
String name_
 name of pdb/structure More...
 
String modeltag_
 model tag for multi-model pdbs More...
 
io::HeaderInformationOP header_information_
 header information More...
 
std::map< char,
utility::vector1< std::string > > 
chain_sequences_
 chain sequences More...
 
Remarks remarks_
 pdb remarks More...
 
ResidueRecords residue_rec_
 residue records in internal rosetta numbering from 1 .. n More...
 
PDBPoseMap pdb2pose_
 maps PDB chain,residue -> internal residue numbering More...
 
core::conformation::ConformationCAP conf_
 Conformation being observed, NULL if not attached. More...
 
utility::vector1
< UnrecognizedAtomRecord
unrecognized_atoms_
 information about unrecognized residues More...
 
std::map< core::Size, std::string > unrecognized_res_num2name_
 
std::map< core::Size, core::Sizeunrecognized_res_size_
 
core::Size num_unrecognized_res_
 
core::Size num_unrecognized_atoms_
 
CrystInfo crystinfo_
 

Detailed Description

maintains pdb residue & atom information inside a Pose

Upon creation of new residue records, e.g. when calling the constructors without 'init' or appending/prepending residues, the chain letter for the new records will be set to a character, currently '^', denoting "empty record". This character may be looked up by calling the static method PDBInfo::empty_record().

Remarks
Class implementation is biased towards simplicity and fast lookup. Residue/atom information are kept in vectors. An internally maintained PDBPoseMap provides mapping from pdb -> pose residue numbering. This causes residue mutators to be a bit more expensive due to map updates, but this is ok because they are typically called sparingly. Accessors and mutators have overloaded method convention, while special mutators use .set_* convention.

Member Typedef Documentation

typedef utility::vector1< AtomRecord > core::pose::PDBInfo::AtomRecords
private
typedef utility::vector1< ResidueRecord > core::pose::PDBInfo::ResidueRecords
private
typedef std::string core::pose::PDBInfo::String
typedef utility::VirtualBase core::pose::PDBInfo::Super

Constructor & Destructor Documentation

core::pose::PDBInfo::PDBInfo ( )

default constructor, obsolete is true

core::pose::PDBInfo::PDBInfo ( Size const  n)

size constructor (ensure space for 'n' residue records), obsolete is true

core::pose::PDBInfo::PDBInfo ( Pose const &  pose,
bool  init = true 
)

Pose constructor (ensures space for residue and atom records relative to Pose)

Parameters
[in]posePose
[in]initif true (default), then residue records are initialized and obsolete set to false, otherwise obsolete is true using Pose residue numbering and chains of the Residues in the Conformation

References core::conformation::Residue::chain(), core::pose::PDBInfo::ResidueRecord::chainID, chr_chains(), rebuild_pdb2pose(), core::pose::Pose::residue(), residue_rec_, resize_atom_records(), core::pose::PDBInfo::ResidueRecord::resSeq, and core::pose::Pose::size().

core::pose::PDBInfo::PDBInfo ( PDBInfo const &  info)

copy constructor

core::pose::PDBInfo::~PDBInfo ( )
override

default destructor

References detach_from().

Member Function Documentation

void core::pose::PDBInfo::add_reslabel ( Size  res,
std::string const &  label 
)

adds a label associated to a pose resid.

Parameters
[in]resresidue in pose numbering
[in]labelstring that is the "label"

References core::pose::PDBInfo::ResidueRecord::label, and residue_rec_.

Referenced by parse_pdbinfo_labels().

void core::pose::PDBInfo::add_unrecognized_atoms ( utility::vector1< UnrecognizedAtomRecord UAs)

remembers info about atoms not read into the pose

remembers info about all atoms not read into the pose

References num_unrecognized_atoms_, num_unrecognized_res_, unrecognized_atoms_, unrecognized_res_num2name_, and unrecognized_res_size_.

char const& core::pose::PDBInfo::alt_loc ( Size const  res,
Size const  atom_index 
) const
inline

Returns the alternate location for the <atom_index> atom of pose residue <res>

example(s): pose.pdb_info().alt_loc(1,1) See also: Pose PDBInfo PDBInfo.pdb2pose PDBInfo.pose2pdb

References residue_rec_.

void core::pose::PDBInfo::alt_loc ( Size const  res,
Size const  atom_index,
char const  loc 
)
inline

Sets the alternate location of the <atom_index> atom of pose residue <res> to <loc>

Note
: <loc> is an alternate location character

References residue_rec_.

void core::pose::PDBInfo::append_res ( Size const  res,
Size const  natoms,
Size const  n = 1 
)

Appends residue records given a pose residue number <res>

append residue records after given residue number

Parameters
[in]resresidue to append after (in internal/pose numbering)
[in]natomsnumber of atoms in type of appended residue
[in]nnumber of residue records to append

References core::pose::PDBInfo::ResidueRecord::atomRec, core::pose::PDBPoseMap::insert(), pdb2pose_, and residue_rec_.

Referenced by on_length_change().

void core::pose::PDBInfo::attach_to ( core::conformation::Conformation conf)
Real const& core::pose::PDBInfo::bfactor ( Size const  res,
Size const  atom_index 
) const
inline

Returns the temperature for the <atom_index> atom of pose residue <res>

example(s): pose.pdb_info().temperature(1,1) See also: Pose PDBInfo PDBInfo.pdb2pose PDBInfo.pose2pdb

References residue_rec_.

void core::pose::PDBInfo::bfactor ( Size const  res,
Size const  atom_index,
Real const  t 
)
inline

Sets the temperature of the <atom_index> atom of pose residue <res> to <t>

References residue_rec_, and protocols::hybridization::t.

char const& core::pose::PDBInfo::chain ( Size const  res) const
inline
void core::pose::PDBInfo::chain ( Size const  res,
char const  chain_id 
)

Sets the chain letter of pose residue <res> to <chain_id>

set chain id for residue

Remarks
chain_id should not be the empty record character, currently '^' Returns the pdb insertion code of residue <res>

See the documentation of Pose::num_chains() for details about chain numbers, chain letters and jumps.

example(s): pose.pdb_info().chain(3,"R") See also: Pose PDBInfo PDBInfo.pdb2pose PDBInfo.pose2pdb

Remarks
chain id should not be the empty record character, currently '^'

References core::pose::PDBInfo::ResidueRecord::chainID, core::pose::PDBPoseMap::conditional_erase(), core::pose::PDBInfo::ResidueRecord::iCode, core::pose::PDBPoseMap::insert(), pdb2pose_, residue_rec_, core::pose::PDBInfo::ResidueRecord::resSeq, and core::pose::PDBInfo::ResidueRecord::segmentID.

void core::pose::PDBInfo::chain_sequences ( std::map< char, utility::vector1< std::string > >  chain_sequences)
inline

For structures deposited into the protein databank, the chain sequences stores the SEQRES records. A listing of the consecutive chemical components covalently linked in a linear fashion to form a polymer. In short, the sequence (as a vector of three letter codes) that the researcher performed the experiment on.

Note: The chain sequences information is only initialized if it is needed. Generally this requires using the -run:preserve_header options flag.

References chain_sequences(), and chain_sequences_.

utility::vector1< std::string > core::pose::PDBInfo::chain_sequences ( char  chain)
inline

References chain(), and chain_sequences_.

std::map< char, utility::vector1< std::string > > core::pose::PDBInfo::chain_sequences ( )
inline

References chain_sequences_.

Referenced by chain_sequences().

void core::pose::PDBInfo::check_residue_records_size ( Size const  size) const
private

if size of residue records != passed value, fail fast

Note
This is meant to be used only for en masse methods, not individual residue/atom methods

References residue_rec_.

Referenced by set_chains(), set_icodes(), set_numbering(), and set_segment_ids().

void core::pose::PDBInfo::clear_reslabel ( Size const  res)

clean all the label(s) associated to a pose resid.

Parameters
[in]resresidue in pose numbering

References core::pose::PDBInfo::ResidueRecord::label, and residue_rec_.

void core::pose::PDBInfo::copy ( PDBInfo const &  input_info,
Size const  copy_from,
Size const  copy_to,
Size const  start_from 
)

Copyies a section from PDBInfo <input_info>

copy a section from another PDBInfo

Parameters
[in]input_infothe PDBInfo to copy from
[in]copy_fromthe first residue position in input_info to copy
[in]copy_tothe final residue position in input_info to copy
[in]start_fromthe first residue position in this PDBInfo to copy into

References core::sequence::end, core::pose::PDBPoseMap::erase(), core::pose::PDBPoseMap::insert(), pdb2pose_, and residue_rec_.

CrystInfo core::pose::PDBInfo::crystinfo ( ) const
inline

Returns the pdb crystinfo.

References crystinfo_.

void core::pose::PDBInfo::delete_res ( Size const  res,
Size const  n = 1 
)

Deletes <n> residue records starting from pose residue <res>

delete 'n' residue records starting from given residue

Parameters
[in]resresidue to start deleting from (in internal/pose numbering)
[in]nnumber of residue records to delete

References core::pose::PDBInfo::ResidueRecord::chainID, core::pose::PDBPoseMap::erase(), core::pose::PDBInfo::ResidueRecord::iCode, core::pose::PDBPoseMap::insert(), pdb2pose_, residue_rec_, core::pose::PDBInfo::ResidueRecord::resSeq, core::pose::PDBInfo::ResidueRecord::segmentID, and protocols::loops::start.

Referenced by on_length_change().

void core::pose::PDBInfo::detach_from ( )

Detaches the Conformation and stops observation.

detach from Conformation and stop observation

Remarks
takes no arguments because PDBInfo can only observe one Conformation at a time

example(s): pose.pdb_info().detach_from() See also: Pose PDBInfo

Remarks
takes no arguments because PDBInfo can only observe one Conformation at a time

References conf_, on_connection_change(), on_identity_change(), and on_length_change().

Referenced by attach_to(), on_connection_change(), on_identity_change(), on_length_change(), and ~PDBInfo().

static char core::pose::PDBInfo::empty_record ( )
inlinestatic
core::Size const& core::pose::PDBInfo::get_num_unrecognized_atoms ( ) const
inline
core::Size const& core::pose::PDBInfo::get_num_unrecognized_res ( ) const
inline

References num_unrecognized_res_.

utility::vector1< std::string > core::pose::PDBInfo::get_reslabels ( Size const  res) const

returns the pose(number) labels associated to the residue

returns for pose( resnumber) the label associated to the residue

Parameters
[in]resresidue in pose numbering
Note
the retrun string is a concatenation of all the strings inside of the vector label<>
Parameters
[in]resresidue in pose numbering

References residue_rec_.

Referenced by write_pdbinfo_labels().

utility::vector1< UnrecognizedAtomRecord > const& core::pose::PDBInfo::get_unrecognized_atoms ( ) const
inline

remembers info about atoms not read into the pose

References unrecognized_atoms_.

std::string const& core::pose::PDBInfo::get_unrecognized_res_name ( core::Size const &  i) const
inline
core::Size const& core::pose::PDBInfo::get_unrecognized_res_size ( core::Size const &  i) const
inline
void core::pose::PDBInfo::header_information ( io::HeaderInformationOP  header_information)
inline

For structures deposited into the protein databank, the header information record stores the classfication, deposition date and the 4 character identification code.

For now only allow initalizing it with copy and accessing it with a constant owning pointer. Note: The header information is only initialized if it is needed. Generally this requires using the -run:preserve_header options flag.

References header_information(), and header_information_.

io::HeaderInformationCOP core::pose::PDBInfo::header_information ( ) const
inline

References header_information_.

Referenced by header_information().

io::HeaderInformationOP core::pose::PDBInfo::header_information ( )
inline

References header_information_.

char const& core::pose::PDBInfo::icode ( Size const  res) const
inline

Returns the pdb insertion code of residue <res>

example(s): pose.pdb_info().icode(3) See also: Pose PDBInfo PDBInfo.pdb2pose PDBInfo.pose2pdb

References residue_rec_.

Referenced by core::pose::PDBPoseMap::fill(), core::pose::fix_pdbinfo_damaged_by_insertion(), pdb2pose(), core::pose::renumber_pdbinfo_based_on_conf_chains(), show(), and tag().

void core::pose::PDBInfo::icode ( Size const  res,
char const  ins_code 
)
bool const& core::pose::PDBInfo::is_het ( Size const  res,
Size const  atom_index 
) const
inline

Returns true if the <atom_index> atom of pose residue <res> is a heteratom.

Note
: atom index within instance of core::conformation::Residue, currently Rosetta's pdb file output treats the value of .is_het() as an override – if this is set to true, the record will be hetatm, otherwise it will decide by Residue type (the usual default)

References residue_rec_.

void core::pose::PDBInfo::is_het ( Size const  res,
Size const  atom_index,
bool const  flag 
)
inline

Sets the heteroatom flag of the <atom_index> atom of pose residue <res> to <flag>

Note
currently Rosetta's pdb file output treats the value of .is_het() as an override – if this is set to true, the record will be hetatm, otherwise it will decide by Residue type (the usual default)

References residue_rec_.

core::conformation::ConformationCAP core::pose::PDBInfo::is_observing ( )

Returns the Conformation if this PDBInfo is currently observing a conformation, otherwise return NULL.

is this PDBInfo currently observing a conformation?

example(s): pose.pdb_info().is_observing() See also: Pose PDBInfo

Returns
the Conformation being observed, otherwise NULL

References conf_.

String const& core::pose::PDBInfo::modeltag ( ) const
inline

Returns the model tag for a multi-model pdb.

example(s): pose.pdb_info().modeltag() See also: Pose PDBInfo

References modeltag_.

void core::pose::PDBInfo::modeltag ( String const &  tag)
inline

Sets the model tag for a multi-model pdb to <tag>

example(s): pose.pdb_info().modeltag('Number1') See also: Pose PDBInfo

References modeltag_, and tag().

String const& core::pose::PDBInfo::name ( ) const
inline

Returns the pdb name.

example(s): pose.pdb_info().name() See also: Pose PDBInfo

References name_.

Referenced by show().

void core::pose::PDBInfo::name ( String const &  s)
inline

Sets the pdb name.

example(s): pose.pdb_info().name('MyPDB') See also: Pose PDBInfo

References name_.

Size core::pose::PDBInfo::natoms ( Size const  res) const
inline

Returns the number of atoms represented for the residue <res>

Note
: residue <res> must be in pose numbering

example(s): pose.pdb_info().natoms(3) See also: Pose PDBInfo

References residue_rec_.

Referenced by show().

Size core::pose::PDBInfo::nres ( ) const
inline

Returns the number of residues represented in PDBInfo.

example(s): pose.pdb_info().nres() See also: Pose PDBInfo

References residue_rec_.

Referenced by core::pose::PDBPoseMap::fill(), short_desc(), and show().

int core::pose::PDBInfo::num_chains ( ) const

Returns the total number of (chain letter) chains in the pose.

See the documentation of Pose::num_chains() for details about chain numbers, chain letters and jumps.

example(s): pose.pdb_info().num_chains() see also: pose pose.annotated_sequence pose.fold_tree pose.num_jump pose.pdb_info().chain pose.pdb_info().pdb2pose

References protocols::loops::chainID, and residue_rec_.

int const& core::pose::PDBInfo::number ( Size const  res) const
inline
void core::pose::PDBInfo::number ( Size const  res,
int const  pdb_res 
)

Sets the pdb sequence residue number of pose residue <res> to <pdb_res>

set pdb residue sequence number

Returns the pdb insertion code of residue <res>

example(s): pose.pdb_info().number(3,81) See also: Pose PDBInfo PDBInfo.pdb2pose PDBInfo.pose2pdb

References core::pose::PDBInfo::ResidueRecord::chainID, core::pose::PDBPoseMap::conditional_erase(), core::pose::PDBInfo::ResidueRecord::iCode, core::pose::PDBPoseMap::insert(), pdb2pose_, residue_rec_, core::pose::PDBInfo::ResidueRecord::resSeq, and core::pose::PDBInfo::ResidueRecord::segmentID.

bool core::pose::PDBInfo::obsolete ( ) const
inline

Returns true if PDBInfo is obsolete and needs updating.

This flag is currently not used within the class and is provided for user convenience. Setting this will forcibly turn off pdb numbering when dumping pdbs.

example(s): pose.pdb_info().obsolete() See also: Pose PDBInfo

References obsolete_.

Referenced by on_connection_change(), on_identity_change(), and on_length_change().

void core::pose::PDBInfo::obsolete ( bool  flag)
inline

Sets the obsolete state to <flag>

this flag is currently not used within the class and is provided for user convenience. Setting this will forcibly turn off pdb numbering when dumping pdbs.

References obsolete_.

Real const& core::pose::PDBInfo::occupancy ( Size const  res,
Size const  atom_index 
) const
inline

Returns the occupancy for the <atom_index> atom of pose residue <res>

example(s): pose.pdb_info().occupancy(1,1) See also: Pose PDBInfo PDBInfo.pdb2pose PDBInfo.pose2pdb

References residue_rec_.

void core::pose::PDBInfo::occupancy ( Size const  res,
Size const  atom_index,
Real const  occ 
)
inline

Sets the occupancy of the <atom_index> atom of pose residue <res> to <occ>

References residue_rec_.

void core::pose::PDBInfo::on_connection_change ( core::conformation::signals::ConnectionEvent const &  event)

Updates when connection to Conformation is changed.

update when connection to Conformation is changed

References detach_from(), obsolete(), and core::conformation::signals::ConnectionEvent::tag.

Referenced by attach_to(), and detach_from().

void core::pose::PDBInfo::on_identity_change ( core::conformation::signals::IdentityEvent const &  event)

Updates atom records when residue identity changes in Conformation.

update atom records when residue identity changes in Conformation

References detach_from(), core::conformation::Residue::natoms(), obsolete(), core::conformation::signals::IdentityEvent::position, replace_res(), replace_res_remap_bfactors(), core::conformation::signals::IdentityEvent::residue, and core::conformation::signals::IdentityEvent::tag.

Referenced by attach_to(), and detach_from().

void core::pose::PDBInfo::on_length_change ( core::conformation::signals::LengthEvent const &  event)

Updates residue and atom records when length changes in Conformation, obsoletes PDBInfo.

update residue and atom records when length changes in Conformation, obsoletes PDBInfo

Residue and atoms records in PDBInfo will be automatically resized and the obsolete flag will be set to true, causing PDBInfo to not be used on pdb output. Existing data inside the PDBInfo is not touched. After filling in the data for the newly updated residues, setting PDBInfo::obsolete( false ) will re-enable usage of PDBInfo on pdb output. If PDBInfo receives a LengthEvent::INVALIDATE, it will obsolete and then detach itself for safety.

References append_res(), delete_res(), detach_from(), core::conformation::signals::LengthEvent::length_change, core::conformation::Residue::natoms(), obsolete(), core::conformation::signals::LengthEvent::position, prepend_res(), core::conformation::signals::LengthEvent::residue, and core::conformation::signals::LengthEvent::tag.

Referenced by attach_to(), and detach_from().

PDBInfo & core::pose::PDBInfo::operator= ( PDBInfo const &  info)

copy assignment

any Conformation already being observed stays constant, there is no re-assignment

References chain_sequences_, crystinfo_, header_information_, modeltag_, name_, num_unrecognized_atoms_, num_unrecognized_res_, obsolete_, pdb2pose_, remarks_, residue_rec_, unrecognized_atoms_, unrecognized_res_num2name_, and unrecognized_res_size_.

void core::pose::PDBInfo::parse_pdbinfo_labels ( utility::vector1< std::string > const &  lines,
Pose const &  pose 
)

parse PDBInfo-LABEL: lines from a collection of lines

Lines not containing PDBInfo-LABEL are ignored

Parameters
[in]linesthe lines to parse

Lines not containing PDBInfo-LABEL are ignored

Parameters
[in]linesthe lines to parse
[in]posethe pose these lines belong to

References add_reslabel(), core::pose::parse_resnum(), core::pose::Pose::size(), and core::pose::TR().

Size core::pose::PDBInfo::pdb2pose ( char const  chain,
int const  res,
char const  icode = ' ',
std::string const &  segmentID = "    " 
) const
inline

Returns the pose numbering of the pdb residue with chain letter <chain>, pdb residue <res>, and insertion code <icode>

Note
: <icode> is not required, returns 0 if not found, pose numbering is sequential ie. starts at 1 and goes up pdb numbering can be anything

example(s): pose.pdb_info().pdb2pose("B",5) See also: Pose PDBInfo PDBInfo.pose2pdb

References core::pose::PDBPoseMap::find(), icode(), pdb2pose_, and segmentID().

PDBPoseMap const& core::pose::PDBInfo::pdb2pose ( ) const
inline

Returns the internally maintained PDBPoseMap.

example(s):

See also: Pose PDBInfo PDBInfo.pdb2pose PDBInfo.pose2pdb

References pdb2pose_.

PDBInfo::String core::pose::PDBInfo::pose2pdb ( Size const  res) const

Returns the pdb numbering string of pose residue <res>

translates the pose number to pdb numbering string for use in PyRosetta.

Note
: pdb string contains the chain letter and number pose numbering is sequential ie. starts at 1 and goes up pdb numbering can be anything

example(s): pose.pdb_info().pose2pdb(25) See also: Pose PDBInfo PDBInfo.pdb2pose

Parameters
[in]respose residue number
Returns
pdb string containing chainID and number

References residue_rec_.

void core::pose::PDBInfo::prepend_res ( Size const  res,
Size const  natoms,
Size const  n = 1 
)

Prepends residue records before given pose residue number <res>

prepend residue records before given residue number

Parameters
[in]resresidue to prepend before (in internal/pose numbering)
[in]natomsnumber of atoms in type of appended residue
[in]nnumber of residue records to prepend

References core::pose::PDBInfo::ResidueRecord::atomRec, core::pose::PDBPoseMap::insert(), pdb2pose_, and residue_rec_.

Referenced by on_length_change().

void core::pose::PDBInfo::rebuild_pdb2pose ( )
Remarks const& core::pose::PDBInfo::remarks ( ) const
inline

Returns the pdb remarks (const)

example(s): pose.pdb_info().remarks() See also: Pose PDBInfo

References remarks_.

Remarks& core::pose::PDBInfo::remarks ( )
inline

Returns the pdb remarks (mutable)

Note
we allow direct access to the remarks vector because its state is independent of the rest of PDBInfo and it's much more convenient for the user

example(s): pose.pdb_info().remarks() See also: Pose PDBInfo

References remarks_.

void core::pose::PDBInfo::remarks ( Remarks const &  in)
inline

Sets the pdb remarks to <in>

example(s):

See also: Pose PDBInfo

References core::conformation::membrane::in, and remarks_.

void core::pose::PDBInfo::replace_res ( Size const  res,
Size const  natoms 
)

"Replaces" residue record for pose residue <res>

"replace" residue record for given residue number

Leaves information in residue record untouched, but resizes and zeroes atom records for the residue.

Parameters
[in]resresidue to replace
[in]natomsnumber of atoms in type of residue

References residue_rec_.

Referenced by on_identity_change().

void core::pose::PDBInfo::replace_res_remap_bfactors ( Size const  res,
conformation::Residue const &  tgt 
)
bool core::pose::PDBInfo::res_haslabel ( Size  res,
std::string const &  target_label 
) const
inline

uses std iterators to check if a residue has a label associated to it

Parameters
[in]resresidue in pose numbering
[in]target_labelstring to look for inside the labes associated to the residue

References residue_rec_.

void core::pose::PDBInfo::resize_atom_records ( Size const  res,
Size const  n,
bool const  zero = true 
)

Ensures <n> atom records for residue <res> are available.

ensure 'n' available atom records for particular residue

Note
: if <zero> is true, zero the atom records for this residue
Parameters
[in]resresidue
[in]nnumber of atoms
[in]zeroif true, zero the atom records for this residue

References residue_rec_.

Referenced by PDBInfo().

void core::pose::PDBInfo::resize_atom_records ( Size const  n,
bool const  zero = true 
)

Ensures <n> atom records for residue <res> are available.

ensure 'n' available atom records for every residue

Note
: if <zero> is true, zero the atom records for this residue
Parameters
[in]resresidue
[in]nnumber of atoms
[in]zeroif true, zero the atom records

References residue_rec_.

void core::pose::PDBInfo::resize_atom_records ( Pose const &  pose)

Updates the number of atom records with respect to atoms in <pose>

update number of atom records with respect to atoms in Pose

Number of internally available atom records will be adjusted to match number of atoms within each residue in Pose. Only newly created records will be zeroed, any existing records are untouched.

References core::conformation::Residue::natoms(), core::pose::Pose::residue(), residue_rec_, and core::pose::Pose::size().

void core::pose::PDBInfo::resize_residue_records ( Size const  n)

Resizes for <n> residue records.

resize for 'n' residue records

Leaves atom record state inconsistent. Atom records for remaining residues are untouched while new residues have no atom records, so make sure and call one of resize_atom_records() afterwards if necessary.

Warning
Do not use this method for ins/del of residues, as it leaves the data state inconsistent. See append_res/prepend_res/delete_res for that type of functionality.

References rebuild_pdb2pose(), and residue_rec_.

std::string const& core::pose::PDBInfo::segmentID ( Size const  res) const
inline

Returns the segment ID code of residue <res>

example(s): pose.pdb_info().icode(3)

References residue_rec_.

Referenced by core::pose::PDBPoseMap::fill(), pdb2pose(), segmentID(), set_resinfo(), short_desc(), and tag().

void core::pose::PDBInfo::segmentID ( Size const  res,
std::string const &  segmentID 
)

Sets the insertion code of pose residue <res> to <ins_code>

Returns the pdb insertion code of residue <res>

example(s):

See also: Pose PDBInfo PDBInfo.pdb2pose PDBInfo.pose2pdb

References residue_rec_, core::pose::PDBInfo::ResidueRecord::segmentID, and segmentID().

void core::pose::PDBInfo::set_chains ( char const  id)

Sets all residue chain ids to the character <id>

set all residue chain IDs to a single character

See the documentation of Pose::num_chains() for details about chain numbers, chain letters and jumps.

References rebuild_pdb2pose(), and residue_rec_.

Referenced by set_chains().

template<typename CharIterator >
void core::pose::PDBInfo::set_chains ( CharIterator const &  begin,
CharIterator const &  end 
)
inline

Sets the residue chain letters from some char container, iterator version.

Warning
This function does not check if number of elements within span of iterators exceeds number of residues currently defined in object. User must ensure this independently.

See the documentation of Pose::num_chains() for details about chain numbers, chain letters and jumps.

References core::sequence::end, rebuild_pdb2pose(), and residue_rec_.

template<typename CharContainer >
void core::pose::PDBInfo::set_chains ( CharContainer const &  c)
inline

Sets the residue chain letters from some char container, e.g. utility::vector1.

Container must have const .size(), .begin() and .end() iterator access methods.

Warning
This function checks for size first and will cause failure if size of container does not match number of residues currently defined in object.

See the documentation of Pose::num_chains() for details about chain numbers, chain letters and jumps.

References check_residue_records_size(), residue_rec_, and set_chains().

void core::pose::PDBInfo::set_crystinfo ( CrystInfo  crystinfoin)
inline

Sets the pdb crystinfo.

References crystinfo_.

template<typename CharIterator >
void core::pose::PDBInfo::set_icodes ( CharIterator const &  begin,
CharIterator const &  end 
)
inline

Sets the insertion codes from some char container, iterator version.

Warning
This function does not check if number of elements within span of iterators exceeds number of residues currently defined in object. User must ensure this independently.

References core::sequence::end, rebuild_pdb2pose(), and residue_rec_.

Referenced by set_icodes().

template<typename CharContainer >
void core::pose::PDBInfo::set_icodes ( CharContainer const &  c)
inline

Sets the insertion codes from some char container, e.g. utility::vector1.

Container must have const .size(), .begin() and .end() iterator access methods.

Warning
This function checks for size first and will cause failure if size of container does not match number of residues currently defined in object.

References check_residue_records_size(), residue_rec_, and set_icodes().

template<typename IntIterator >
void core::pose::PDBInfo::set_numbering ( IntIterator const &  begin,
IntIterator const &  end 
)
inline

Sets the pdb sequence residue numbering from some int container, iterator version.

Warning
This function does not check if number of elements within span of iterators exceeds number of residues currently defined in object. User must ensure this independently.

References core::sequence::end, rebuild_pdb2pose(), and residue_rec_.

Referenced by set_numbering().

template<typename IntContainer >
void core::pose::PDBInfo::set_numbering ( IntContainer const &  c)
inline

Sets the pdb sequence residue numbering from some int container, e.g. utility::vector1.

Container must have const .size(), .begin() and .end() iterator access methods.

Warning
This function checks for size first and will cause failure if size of container does not match number of residues currently defined in object.

References check_residue_records_size(), residue_rec_, and set_numbering().

void core::pose::PDBInfo::set_resinfo ( Size const  res,
char const  chain_id,
int const  pdb_res,
char const  ins_code = ' ',
std::string const &  segmentID = "    ",
bool  clear_labels = true 
)

Sets the chain letter, pdb sequence residue numbering, and insertion code for pose residue <res> to <chain_id> , <pdb_res> , and <ins_code> respectfully.

set chain/pdb/insertion code for residue simultaneously

Note
: convenience method; more efficient than doing each individually due to map updates Returns the pdb insertion code of residue <res>

example(s): pose.pdb_info().icode(3) See also: Pose PDBInfo PDBInfo.chain PDBInfo.icode PDBInfo.number PDBInfo.pdb2pose PDBInfo.pose2pdb

Note
convenience method; more efficient than doing each individually due to map updates
Parameters
[in]resresidue in pose numbering
[in]chain_idpdb chain id
[in]pdb_resresidue in pdb numbering
[in]ins_codepdb insertion code

References core::pose::PDBInfo::ResidueRecord::chainID, core::pose::PDBPoseMap::conditional_erase(), core::pose::PDBInfo::ResidueRecord::iCode, core::pose::PDBPoseMap::insert(), core::pose::PDBInfo::ResidueRecord::label, pdb2pose_, residue_rec_, core::pose::PDBInfo::ResidueRecord::resSeq, core::pose::PDBInfo::ResidueRecord::segmentID, and segmentID().

Referenced by core::pose::renumber_pdbinfo_based_on_conf_chains().

template<typename StringIterator >
void core::pose::PDBInfo::set_segment_ids ( StringIterator const &  begin,
StringIterator const &  end 
)
inline
template<typename StringContainer >
void core::pose::PDBInfo::set_segment_ids ( StringContainer const &  s)
inline
std::string core::pose::PDBInfo::short_desc ( ) const

Returns a short description of the contents of the PDBInfo. The current format of this is something like "A:1-3 B:9-11".

example(s); pose.pdb_info().short_desc()

See Also: PDBInfo PDBInfo.show Pose.pdb_info

References chain(), nres(), number(), and segmentID().

void core::pose::PDBInfo::show ( std::ostream &  out) const

Displays segments of PDB information, segments may or may not be entire chains.

Displays the PDB info by expressing continuous chain segments.

example(s); pose.pdb_info().show()

See Also: PDBInfo PDBInfo.chain PDBInfo.icode PDBInfo.nres PDBInfo.number Pose Pose.pdb_info

References protocols::comparative_modeling::features::A, chain(), core::chemical::element::I, icode(), name(), natoms(), nres(), and number().

Referenced by core::pose::operator<<().

std::string core::pose::PDBInfo::tag ( Size const  res) const

Returns a tag for residue <res> like C:1235 (or C:QA:1235 if segment ID is present)

example(s): pose.pdb_info().icode(3)

tag of <chain>[:<segid]:<number>[<icode>] that is useful for output, like make_tag_with_dashes() in string_util.hh Kind of like pose2pdb but can carry more information, and no spaces. TODO: where to put icode?

References chain(), icode(), number(), and segmentID().

Referenced by modeltag().

Real const& core::pose::PDBInfo::temperature ( Size const  res,
Size const  atom_index 
) const
inline

Returns the temperature for the <atom_index> atom of pose residue <res>

example(s): pose.pdb_info().temperature(1,1) See also: Pose PDBInfo PDBInfo.pdb2pose PDBInfo.pose2pdb

References residue_rec_.

Referenced by protocols::match::BfactorMPM::get_ca_bfactors().

void core::pose::PDBInfo::temperature ( Size const  res,
Size const  atom_index,
Real const  t 
)
inline

Sets the temperature of the <atom_index> atom of pose residue <res> to <t>

References residue_rec_, and protocols::hybridization::t.

void core::pose::PDBInfo::tighten_memory ( )

Tightens memory usage.

tighten memory usage

References remarks_, and residue_rec_.

void core::pose::PDBInfo::write_pdbinfo_labels ( utility::vector1< std::string > &  remark_lines) const

write REMARK PDBInfo-LABEL: lines for output to pose

Parameters
[out]remark_linesthe output container

References get_reslabels(), core::chemical::element::I, core::conformation::membrane::out, and residue_rec_.

Member Data Documentation

std::map< char, utility::vector1< std::string > > core::pose::PDBInfo::chain_sequences_
private

chain sequences

Referenced by chain_sequences(), and operator=().

core::conformation::ConformationCAP core::pose::PDBInfo::conf_
private

Conformation being observed, NULL if not attached.

Referenced by attach_to(), detach_from(), and is_observing().

CrystInfo core::pose::PDBInfo::crystinfo_
private

Referenced by crystinfo(), operator=(), and set_crystinfo().

io::HeaderInformationOP core::pose::PDBInfo::header_information_
private

header information

Referenced by header_information(), and operator=().

String core::pose::PDBInfo::modeltag_
private

model tag for multi-model pdbs

Referenced by modeltag(), and operator=().

String core::pose::PDBInfo::name_
private

name of pdb/structure

Referenced by name(), and operator=().

core::Size core::pose::PDBInfo::num_unrecognized_atoms_
private
core::Size core::pose::PDBInfo::num_unrecognized_res_
private
bool core::pose::PDBInfo::obsolete_
private

indicates object is out of sync with reference (e.g. parent Pose)

control boolean prevents PDB emitter access if info out of sync

Referenced by obsolete(), and operator=().

PDBPoseMap core::pose::PDBInfo::pdb2pose_
private

maps PDB chain,residue -> internal residue numbering

Referenced by append_res(), chain(), copy(), delete_res(), icode(), number(), operator=(), pdb2pose(), prepend_res(), rebuild_pdb2pose(), and set_resinfo().

Remarks core::pose::PDBInfo::remarks_
private

pdb remarks

Referenced by operator=(), remarks(), and tighten_memory().

ResidueRecords core::pose::PDBInfo::residue_rec_
private
utility::vector1< UnrecognizedAtomRecord > core::pose::PDBInfo::unrecognized_atoms_
private

information about unrecognized residues

Referenced by add_unrecognized_atoms(), get_unrecognized_atoms(), and operator=().

std::map< core::Size, std::string > core::pose::PDBInfo::unrecognized_res_num2name_
private
std::map< core::Size, core::Size > core::pose::PDBInfo::unrecognized_res_size_
private

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