Rosetta
Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
core::io::HeaderInformation Class Reference

Information stored in the Title Section records http://www.wwpdb.org/documentation/format32/sect2.html HEADER PEPTIDASE 13-JAN-98 1A2Z. More...

#include <HeaderInformation.hh>

Inheritance diagram for core::io::HeaderInformation:
Inheritance graph
[legend]

Public Types

enum  CompoundToken {
  UNKNOWN_CMPD =0 , MOL_ID =1 , MOLECULE , BIOLOGICAL_UNIT ,
  CHAIN , FRAGMENT , SYNONYM , EC ,
  ENGINEERED , MUTATION , OTHER_DETAILS , CompoundToken_max = OTHER_DETAILS
}
 
typedef std::list< std::string > Keywords
 
typedef utility::vector1< std::pair< CompoundToken, std::string > > Compounds
 
typedef std::list< std::string > Authors
 

Public Member Functions

 HeaderInformation ()
 
 HeaderInformation (HeaderInformation const &src)
 
 ~HeaderInformation () override
 
void store_record (pdb::Record &R)
 
void finalize_parse ()
 
bool parse_in_progress () const
 
void fill_records (std::vector< pdb::Record > &VR) const
 
void store_classification (std::string const &classification)
 
std::string classification () const
 
void store_deposition_date (std::string const &deposition_date)
 Store the deposition date using the format like "84-DEC-18". More...
 
void store_deposition_date (Size yy, Size mm, Size dd)
 Store the deposition date using the format of two digit numbers for the year, month and day of the month. More...
 
std::string deposition_date () const
 
void deposition_date (Size &yy, Size &mm, Size &dd) const
 get the deposition date using the format of two digit numbers for the year, month and day of the month More...
 
std::string idCode () const
 
void store_idCode (std::string const &id_code)
 
void fill_header_record (std::vector< pdb::Record > &VR) const
 
void store_title (std::string const &title)
 Append title record onto current title string. More...
 
void clear_title ()
 
std::string const & title () const
 
void fill_title_records (std::vector< pdb::Record > &VR) const
 
void store_keywords (std::string const &keywords)
 
void finalize_keyword_records ()
 
bool keyword_in_progress () const
 
void clear_keywords ()
 
Keywords const & keywords () const
 
void fill_keyword_records (std::vector< pdb::Record > &VR) const
 
void store_compound (std::string const &compound)
 
void store_compound (CompoundToken token, std::string const &value)
 
Compounds const & compounds () const
 
void finalize_compound_records ()
 
bool compound_in_progress () const
 
void clear_compounds ()
 
void fill_compound_records (std::vector< pdb::Record > &VR) const
 
void store_experimental_techniques (std::string const &exp)
 Parse the list of techniques string following the technique field in the EXPDTA record of the pdb format and store the techniques. More...
 
void store_experimental_technique (rcsb::ExperimentalTechnique technique)
 
rcsb::ExperimentalTechniques const & experimental_techniques () const
 
void finalize_experimental_technique_records ()
 
bool experimental_technique_in_progress () const
 
void clear_experimental_techniques ()
 
bool is_experimental_technique (rcsb::ExperimentalTechnique technique) const
 
void fill_experimental_technique_records (std::vector< pdb::Record > &VR) const
 
Authors const & authors () const
 
void clear_authors ()
 
bool author_in_progress () const
 
void finalize_author_records ()
 
void store_authors (std::string const &authors)
 
void add_author (std::string const &author)
 Add an author to this Title section. More...
 
void fill_author_records (std::vector< pdb::Record > &VR) const
 

Static Public Member Functions

static std::string compound_token_to_string (CompoundToken token)
 
static CompoundToken string_to_compound_token (std::string const &token, bool warn_on_unrecognized=true)
 

Private Member Functions

void fill_wrapped_records (std::string const &record_type, std::string const &field_name, std::string const &contents, Size &line_no, std::vector< pdb::Record > &VR) const
 create enough records of <record_type> to express the <contents> string and save them into the Records vector More...
 
void set_line_continuation (pdb::Record &R, Size const line_no) const
 

Private Attributes

std::string classification_
 Possibly abbreviated classification type. More...
 
Size dep_year_
 Deposition date DD-MON-YY. More...
 
Size dep_month_
 
Size dep_day_
 
std::string idCode_
 4-character PDB unique identifier More...
 
std::string title_
 
Keywords keywords_
 
bool keyword_in_progress_
 
Compounds compounds_
 
std::string compound_in_progress_
 
rcsb::ExperimentalTechniques experimental_techniques_
 
std::string experimental_technique_in_progress_
 
Authors authors_
 
bool author_in_progress_
 

Detailed Description

Information stored in the Title Section records http://www.wwpdb.org/documentation/format32/sect2.html HEADER PEPTIDASE 13-JAN-98 1A2Z.

Member Typedef Documentation

◆ Authors

typedef std::list< std::string > core::io::HeaderInformation::Authors

◆ Compounds

typedef utility::vector1< std::pair< CompoundToken, std::string > > core::io::HeaderInformation::Compounds

◆ Keywords

typedef std::list< std::string > core::io::HeaderInformation::Keywords

Member Enumeration Documentation

◆ CompoundToken

Enumerator
UNKNOWN_CMPD 
MOL_ID 
MOLECULE 
BIOLOGICAL_UNIT 
CHAIN 
FRAGMENT 
SYNONYM 
EC 
ENGINEERED 
MUTATION 
OTHER_DETAILS 
CompoundToken_max 

Constructor & Destructor Documentation

◆ HeaderInformation() [1/2]

core::io::HeaderInformation::HeaderInformation ( )

◆ HeaderInformation() [2/2]

core::io::HeaderInformation::HeaderInformation ( HeaderInformation const &  src)

◆ ~HeaderInformation()

core::io::HeaderInformation::~HeaderInformation ( )
overridedefault

Member Function Documentation

◆ add_author()

void core::io::HeaderInformation::add_author ( std::string const &  author)

Add an author to this Title section.

References authors_.

◆ author_in_progress()

bool core::io::HeaderInformation::author_in_progress ( ) const
inline

References author_in_progress_.

Referenced by parse_in_progress().

◆ authors()

Authors const& core::io::HeaderInformation::authors ( ) const
inline

References authors_.

Referenced by fill_author_records(), and store_authors().

◆ classification()

string core::io::HeaderInformation::classification ( ) const

◆ clear_authors()

void core::io::HeaderInformation::clear_authors ( )
inline

References authors_.

◆ clear_compounds()

void core::io::HeaderInformation::clear_compounds ( )

References compounds_.

◆ clear_experimental_techniques()

void core::io::HeaderInformation::clear_experimental_techniques ( )

◆ clear_keywords()

void core::io::HeaderInformation::clear_keywords ( )

References keywords_.

◆ clear_title()

void core::io::HeaderInformation::clear_title ( )

References title_.

◆ compound_in_progress()

bool core::io::HeaderInformation::compound_in_progress ( ) const

References compound_in_progress_.

Referenced by parse_in_progress().

◆ compound_token_to_string()

std::string core::io::HeaderInformation::compound_token_to_string ( CompoundToken  token)
static

◆ compounds()

utility::vector1< pair< HeaderInformation::CompoundToken, string > > const & core::io::HeaderInformation::compounds ( ) const

References compounds_.

◆ deposition_date() [1/2]

string core::io::HeaderInformation::deposition_date ( ) const

◆ deposition_date() [2/2]

void core::io::HeaderInformation::deposition_date ( Size yy,
Size mm,
Size dd 
) const

get the deposition date using the format of two digit numbers for the year, month and day of the month

References dep_day_, dep_month_, and dep_year_.

◆ experimental_technique_in_progress()

bool core::io::HeaderInformation::experimental_technique_in_progress ( ) const

◆ experimental_techniques()

rcsb::ExperimentalTechniques const & core::io::HeaderInformation::experimental_techniques ( ) const

◆ fill_author_records()

void core::io::HeaderInformation::fill_author_records ( std::vector< pdb::Record > &  VR) const

References authors(), authors_, and fill_wrapped_records().

Referenced by fill_records().

◆ fill_compound_records()

void core::io::HeaderInformation::fill_compound_records ( std::vector< pdb::Record > &  VR) const

◆ fill_experimental_technique_records()

void core::io::HeaderInformation::fill_experimental_technique_records ( std::vector< pdb::Record > &  VR) const

◆ fill_header_record()

void core::io::HeaderInformation::fill_header_record ( std::vector< pdb::Record > &  VR) const

◆ fill_keyword_records()

void core::io::HeaderInformation::fill_keyword_records ( std::vector< pdb::Record > &  VR) const

References fill_wrapped_records(), keywords(), and keywords_.

Referenced by fill_records().

◆ fill_records()

void core::io::HeaderInformation::fill_records ( std::vector< pdb::Record > &  VR) const

◆ fill_title_records()

void core::io::HeaderInformation::fill_title_records ( std::vector< pdb::Record > &  VR) const

References fill_wrapped_records(), and title_.

Referenced by fill_records().

◆ fill_wrapped_records()

void core::io::HeaderInformation::fill_wrapped_records ( std::string const &  record_type,
std::string const &  field_name,
std::string const &  contents,
Size line_no,
std::vector< pdb::Record > &  VR 
) const
private

create enough records of <record_type> to express the <contents> string and save them into the Records vector

References core::io::pdb::RecordCollection::record_from_record_type(), set_line_continuation(), and core::io::TR().

Referenced by fill_author_records(), fill_compound_records(), fill_experimental_technique_records(), fill_keyword_records(), and fill_title_records().

◆ finalize_author_records()

void core::io::HeaderInformation::finalize_author_records ( )
inline

References author_in_progress_.

Referenced by finalize_parse().

◆ finalize_compound_records()

void core::io::HeaderInformation::finalize_compound_records ( )

◆ finalize_experimental_technique_records()

void core::io::HeaderInformation::finalize_experimental_technique_records ( )

◆ finalize_keyword_records()

void core::io::HeaderInformation::finalize_keyword_records ( )

References keyword_in_progress_.

Referenced by finalize_parse().

◆ finalize_parse()

void core::io::HeaderInformation::finalize_parse ( )

◆ idCode()

std::string core::io::HeaderInformation::idCode ( ) const

References idCode_.

Referenced by fill_header_record(), and store_idCode().

◆ is_experimental_technique()

bool core::io::HeaderInformation::is_experimental_technique ( rcsb::ExperimentalTechnique  technique) const

◆ keyword_in_progress()

bool core::io::HeaderInformation::keyword_in_progress ( ) const

References keyword_in_progress_.

Referenced by parse_in_progress().

◆ keywords()

list< string > const & core::io::HeaderInformation::keywords ( ) const

References keywords_.

Referenced by fill_keyword_records(), and store_keywords().

◆ parse_in_progress()

bool core::io::HeaderInformation::parse_in_progress ( ) const

◆ set_line_continuation()

void core::io::HeaderInformation::set_line_continuation ( pdb::Record R,
Size const  line_no 
) const
private

References core::io::TR().

Referenced by fill_wrapped_records().

◆ store_authors()

void core::io::HeaderInformation::store_authors ( std::string const &  authors)

◆ store_classification()

void core::io::HeaderInformation::store_classification ( std::string const &  classification)

References classification(), and classification_.

Referenced by store_record().

◆ store_compound() [1/2]

void core::io::HeaderInformation::store_compound ( HeaderInformation::CompoundToken  token,
std::string const &  value 
)

References compounds_.

◆ store_compound() [2/2]

void core::io::HeaderInformation::store_compound ( std::string const &  compound)

Assume each new compound token/value pair begins on a new line but the value can be multiple lines. So, if a compound record is encountered when "in progress" then append the results to the value of the previous pair.

References compound_in_progress_, finalize_compound_records(), string_to_compound_token(), and UNKNOWN_CMPD.

Referenced by store_record().

◆ store_deposition_date() [1/2]

void core::io::HeaderInformation::store_deposition_date ( Size  yy,
Size  mm,
Size  dd 
)

Store the deposition date using the format of two digit numbers for the year, month and day of the month.

Note
These parameters are listed in the opposite order that they are given in a .pdb file!

References dep_day_, dep_month_, dep_year_, and core::io::TR().

◆ store_deposition_date() [2/2]

void core::io::HeaderInformation::store_deposition_date ( std::string const &  deposition_date)

Store the deposition date using the format like "84-DEC-18".

References dep_day_, dep_month_, dep_year_, and core::io::TR().

Referenced by store_record().

◆ store_experimental_technique()

void core::io::HeaderInformation::store_experimental_technique ( rcsb::ExperimentalTechnique  technique)

◆ store_experimental_techniques()

void core::io::HeaderInformation::store_experimental_techniques ( std::string const &  exp)

Parse the list of techniques string following the technique field in the EXPDTA record of the pdb format and store the techniques.

References experimental_technique_in_progress_, experimental_techniques_, core::io::rcsb::string_to_experimental_technique(), and core::io::TR().

Referenced by store_record().

◆ store_idCode()

void core::io::HeaderInformation::store_idCode ( std::string const &  id_code)

References idCode(), and idCode_.

Referenced by store_record().

◆ store_keywords()

void core::io::HeaderInformation::store_keywords ( std::string const &  keywords)

◆ store_record()

void core::io::HeaderInformation::store_record ( pdb::Record R)

◆ store_title()

void core::io::HeaderInformation::store_title ( std::string const &  title)

Append title record onto current title string.

Append title, strip off white space on the left for the first record and on the right for all records.

References core::chemical::orbitals::strip_whitespace(), title(), title_, and core::io::TR().

Referenced by store_record().

◆ string_to_compound_token()

HeaderInformation::CompoundToken core::io::HeaderInformation::string_to_compound_token ( std::string const &  token,
bool  warn_on_unrecognized = true 
)
static

◆ title()

std::string const & core::io::HeaderInformation::title ( ) const

References title_.

Referenced by store_title().

Member Data Documentation

◆ author_in_progress_

bool core::io::HeaderInformation::author_in_progress_
private

◆ authors_

Authors core::io::HeaderInformation::authors_
private

◆ classification_

std::string core::io::HeaderInformation::classification_
private

Possibly abbreviated classification type.

Referenced by classification(), and store_classification().

◆ compound_in_progress_

std::string core::io::HeaderInformation::compound_in_progress_
private

◆ compounds_

Compounds core::io::HeaderInformation::compounds_
private

◆ dep_day_

Size core::io::HeaderInformation::dep_day_
private

◆ dep_month_

Size core::io::HeaderInformation::dep_month_
private

◆ dep_year_

Size core::io::HeaderInformation::dep_year_
private

Deposition date DD-MON-YY.

Referenced by deposition_date(), and store_deposition_date().

◆ experimental_technique_in_progress_

std::string core::io::HeaderInformation::experimental_technique_in_progress_
private

◆ experimental_techniques_

rcsb::ExperimentalTechniques core::io::HeaderInformation::experimental_techniques_
private

◆ idCode_

std::string core::io::HeaderInformation::idCode_
private

4-character PDB unique identifier

Referenced by idCode(), and store_idCode().

◆ keyword_in_progress_

bool core::io::HeaderInformation::keyword_in_progress_
private

◆ keywords_

Keywords core::io::HeaderInformation::keywords_
private

◆ title_

std::string core::io::HeaderInformation::title_
private

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