OpenStructure
|
#include <mmcif_reader.hh>
Inherits StarParser, and StarParser.
Public Member Functions | |
MMCifReader (std::istream &stream, mol::EntityHandle &ent_handle, const IOProfile &profile) | |
MMCifReader (const String &filename, mol::EntityHandle &ent_handle, const IOProfile &profile) | |
void | Init () |
void | ClearState () |
void | SetRestrictChains (const String &restrict_chains) |
void | SetReadCanonicalSeqRes (bool flag) |
const String & | GetRestrictChains () const |
void | SetAuthChainID (bool id) |
virtual bool | OnBeginData (const StringRef &data_name) |
virtual bool | OnBeginLoop (const StarLoopDesc &header) |
virtual void | OnDataRow (const StarLoopDesc &header, const std::vector< StringRef > &columns) |
virtual void | OnEndData () |
seq::SequenceList | GetSeqRes () const |
void | SetReadSeqRes (bool flag) |
bool | GetReadSeqRes () const |
const MMCifInfo & | GetInfo () |
MMCifReader (std::istream &stream, mol::EntityHandle &ent_handle, const IOProfile &profile) | |
MMCifReader (const String &filename, mol::EntityHandle &ent_handle, const IOProfile &profile) | |
void | Init () |
void | ClearState () |
void | SetRestrictChains (const String &restrict_chains) |
void | SetReadCanonicalSeqRes (bool flag) |
const String & | GetRestrictChains () const |
void | SetAuthChainID (bool id) |
virtual bool | OnBeginData (const StringRef &data_name) |
virtual bool | OnBeginLoop (const StarLoopDesc &header) |
virtual void | OnDataRow (const StarLoopDesc &header, const std::vector< StringRef > &columns) |
virtual void | OnEndData () |
seq::SequenceList | GetSeqRes () const |
void | SetReadSeqRes (bool flag) |
bool | GetReadSeqRes () const |
const MMCifInfo & | GetInfo () |
Public Member Functions inherited from StarParser | |
StarParser (std::istream &stream, bool items_as_row=false) | |
StarParser (const String &filename, bool items_as_row=false) | |
virtual | ~StarParser () |
virtual void | OnEndLoop () |
virtual void | OnDataItem (const StarDataItem &item) |
Real | TryGetReal (const StringRef &data, const String &name) const |
float | TryGetFloat (const StringRef &data, const String &name) const |
std::pair< bool, float > | TryGetFloat (const StringRef &data, const String &name, bool may_fail) const |
int | TryGetInt (const StringRef &data, const String &name) const |
std::pair< bool, int > | TryGetInt (const StringRef &data, const String &name, bool may_fail) const |
bool | TryGetBool (const StringRef &data, const String &name) const |
String | FormatDiagnostic (StarDiagType type, const String &message, int line=-1) const |
void | SetFilename (const String &filename) |
int | GetCurrentLinenum () const |
void | Parse () |
StarParser (std::istream &stream, bool items_as_row=false) | |
StarParser (const String &filename, bool items_as_row=false) | |
virtual | ~StarParser () |
virtual void | OnEndLoop () |
virtual void | OnDataItem (const StarDataItem &item) |
Real | TryGetReal (const StringRef &data, const String &name) const |
float | TryGetFloat (const StringRef &data, const String &name) const |
std::pair< bool, float > | TryGetFloat (const StringRef &data, const String &name, bool may_fail) const |
int | TryGetInt (const StringRef &data, const String &name) const |
std::pair< bool, int > | TryGetInt (const StringRef &data, const String &name, bool may_fail) const |
bool | TryGetBool (const StringRef &data, const String &name) const |
String | FormatDiagnostic (StarDiagType type, const String &message, int line=-1) const |
void | SetFilename (const String &filename) |
int | GetCurrentLinenum () const |
void | Parse () |
Protected Types | |
enum | MMCifSecStructElement { MMCIF_HELIX, MMCIF_STRAND, MMCIF_TURN, MMCIF_HELIX, MMCIF_STRAND, MMCIF_TURN } |
enum | MMCifSecStructElement { MMCIF_HELIX, MMCIF_STRAND, MMCIF_TURN, MMCIF_HELIX, MMCIF_STRAND, MMCIF_TURN } |
Protected Member Functions | |
void | TryStoreIdx (const int mapping, const String &item, const StarLoopDesc &header) |
bool | ParseAtomIdent (const std::vector< StringRef > &columns, String &auth_chain_name, String &cif_chain_name, StringRef &res_name, mol::ResNum &resnum, bool &valid_res_num, StringRef &atom_name, char &alt_loc) |
void | ParseAndAddAtom (const std::vector< StringRef > &columns) |
void | ParseEntity (const std::vector< StringRef > &columns) |
void | ParseEntityPoly (const std::vector< StringRef > &columns) |
void | ParseCitation (const std::vector< StringRef > &columns) |
const MMCifInfoStructRefs & | GetStructRefs () const |
String | ConvertSEQRES (const String &seqres, conop::CompoundLibPtr compound_lib) |
void | ParseCitationAuthor (const std::vector< StringRef > &columns) |
void | ParseStructRef (const std::vector< StringRef > &columns) |
void | ParseStructRefSeq (const std::vector< StringRef > &columns) |
void | ParseStructRefSeqDif (const std::vector< StringRef > &columns) |
void | ParseExptl (const std::vector< StringRef > &columns) |
void | ParseRefine (const std::vector< StringRef > &columns) |
void | ParsePdbxStructAssembly (const std::vector< StringRef > &columns) |
void | ParsePdbxStructAssemblyGen (const std::vector< StringRef > &columns) |
std::vector< std::vector < String > > | UnPackOperExperession (StringRef expression) |
void | StoreExpression (const char *l, const char *s, bool &is_range, int lborder, std::vector< String > &single_block) |
void | StoreRange (const char *&l, const char *s, bool &is_range, int &lborder, std::vector< String > &single_block) |
void | ParsePdbxStructOperList (const std::vector< StringRef > &columns) |
void | ParseDatabasePDBRev (const std::vector< StringRef > &columns) |
void | ParsePdbxAuditRevisionHistory (const std::vector< StringRef > &columns) |
void | ParsePdbxAuditRevisionDetails (const std::vector< StringRef > &columns) |
void | ParsePdbxDatabaseStatus (const std::vector< StringRef > &columns) |
void | ParseStruct (const std::vector< StringRef > &columns) |
void | ParseStructConf (const std::vector< StringRef > &columns) |
void | ParseStructSheetRange (const std::vector< StringRef > &columns) |
void | ParsePdbxDatabasePdbObsSpr (const std::vector< StringRef > &columns) |
MMCifSecStructElement | DetermineSecStructType (const StringRef &type) const |
void | AssignSecStructure (mol::EntityHandle ent) |
void | TryStoreIdx (const int mapping, const String &item, const StarLoopDesc &header) |
bool | ParseAtomIdent (const std::vector< StringRef > &columns, String &auth_chain_name, String &cif_chain_name, StringRef &res_name, mol::ResNum &resnum, bool &valid_res_num, StringRef &atom_name, char &alt_loc) |
void | ParseAndAddAtom (const std::vector< StringRef > &columns) |
void | ParseEntity (const std::vector< StringRef > &columns) |
void | ParseEntityPoly (const std::vector< StringRef > &columns) |
void | ParseCitation (const std::vector< StringRef > &columns) |
const MMCifInfoStructRefs & | GetStructRefs () const |
String | ConvertSEQRES (const String &seqres, conop::CompoundLibPtr compound_lib) |
void | ParseCitationAuthor (const std::vector< StringRef > &columns) |
void | ParseStructRef (const std::vector< StringRef > &columns) |
void | ParseStructRefSeq (const std::vector< StringRef > &columns) |
void | ParseStructRefSeqDif (const std::vector< StringRef > &columns) |
void | ParseExptl (const std::vector< StringRef > &columns) |
void | ParseRefine (const std::vector< StringRef > &columns) |
void | ParsePdbxStructAssembly (const std::vector< StringRef > &columns) |
void | ParsePdbxStructAssemblyGen (const std::vector< StringRef > &columns) |
std::vector< std::vector < String > > | UnPackOperExperession (StringRef expression) |
void | StoreExpression (const char *l, const char *s, bool &is_range, int lborder, std::vector< String > &single_block) |
void | StoreRange (const char *&l, const char *s, bool &is_range, int &lborder, std::vector< String > &single_block) |
void | ParsePdbxStructOperList (const std::vector< StringRef > &columns) |
void | ParseDatabasePDBRev (const std::vector< StringRef > &columns) |
void | ParsePdbxAuditRevisionHistory (const std::vector< StringRef > &columns) |
void | ParsePdbxAuditRevisionDetails (const std::vector< StringRef > &columns) |
void | ParsePdbxDatabaseStatus (const std::vector< StringRef > &columns) |
void | ParseStruct (const std::vector< StringRef > &columns) |
void | ParseStructConf (const std::vector< StringRef > &columns) |
void | ParseStructSheetRange (const std::vector< StringRef > &columns) |
void | ParsePdbxDatabasePdbObsSpr (const std::vector< StringRef > &columns) |
MMCifSecStructElement | DetermineSecStructType (const StringRef &type) const |
void | AssignSecStructure (mol::EntityHandle ent) |
Additional Inherited Members | |
Static Public Member Functions inherited from StarParser | |
static bool | SplitLine (const StringRef &line, std::vector< StringRef > &parts, bool clear=true) |
static bool | SplitLine (const StringRef &line, std::vector< StringRef > &parts, bool clear=true) |
reader for the mmcif file format
mmcif is an instance of the STAR format to store entries of the PDB. The following data categories should be covered by this reader:
Definition at line 59 of file mmcif_reader.hh.
|
protected |
Enumerator | |
---|---|
MMCIF_HELIX | |
MMCIF_STRAND | |
MMCIF_TURN | |
MMCIF_HELIX | |
MMCIF_STRAND | |
MMCIF_TURN |
Definition at line 330 of file mmcif_reader.hh.
|
protected |
Enumerator | |
---|---|
MMCIF_HELIX | |
MMCIF_STRAND | |
MMCIF_TURN | |
MMCIF_HELIX | |
MMCIF_STRAND | |
MMCIF_TURN |
Definition at line 330 of file mmcif_reader.hh.
MMCifReader | ( | std::istream & | stream, |
mol::EntityHandle & | ent_handle, | ||
const IOProfile & | profile | ||
) |
create a MMCifReader
stream | input stream |
ent_handle | |
profile |
MMCifReader | ( | const String & | filename, |
mol::EntityHandle & | ent_handle, | ||
const IOProfile & | profile | ||
) |
create a MMCifReader
filename | input file |
ent_handle | |
profile |
MMCifReader | ( | std::istream & | stream, |
mol::EntityHandle & | ent_handle, | ||
const IOProfile & | profile | ||
) |
create a MMCifReader
stream | input stream |
ent_handle | |
profile |
MMCifReader | ( | const String & | filename, |
mol::EntityHandle & | ent_handle, | ||
const IOProfile & | profile | ||
) |
create a MMCifReader
filename | input file |
ent_handle | |
profile |
|
protected |
Transform data from struct_conf entry into secondary structure.
ent | Entity to assign secondary structure to |
|
protected |
Transform data from struct_conf entry into secondary structure.
ent | Entity to assign secondary structure to |
void ClearState | ( | ) |
Set up a fresh instance.
void ClearState | ( | ) |
Set up a fresh instance.
|
protected |
convert the seqres data item to canonical form.
The seqres sequence lists non-standard residues in paranthesis. For proper handling of our sequence classes, these need to be converted to one-letter-codes. Ideally, we would use the canonical SEQRES. This is not possible, however, since the PDB assigns multiple one letter codes to some of the residues. To be consistent, we have to do the conversion on our own.
|
protected |
convert the seqres data item to canonical form.
The seqres sequence lists non-standard residues in paranthesis. For proper handling of our sequence classes, these need to be converted to one-letter-codes. Ideally, we would use the canonical SEQRES. This is not possible, however, since the PDB assigns multiple one letter codes to some of the residues. To be consistent, we have to do the conversion on our own.
|
protected |
Check whether an element was classified sheet or helix.
type | Type to be classified |
|
protected |
Check whether an element was classified sheet or helix.
type | Type to be classified |
|
inline |
Get additional information of the mmCIF file.
Definition at line 165 of file mmcif_reader.hh.
|
inline |
Get additional information of the mmCIF file.
Definition at line 165 of file mmcif_reader.hh.
|
inline |
Check if reading of SEQRES is enabled.
Definition at line 157 of file mmcif_reader.hh.
|
inline |
Check if reading of SEQRES is enabled.
Definition at line 157 of file mmcif_reader.hh.
|
inline |
Definition at line 100 of file mmcif_reader.hh.
|
inline |
Definition at line 100 of file mmcif_reader.hh.
|
inline |
|
inline |
|
inlineprotected |
Definition at line 232 of file mmcif_reader.hh.
|
inlineprotected |
Definition at line 232 of file mmcif_reader.hh.
void Init | ( | ) |
Initialise the reader.
void Init | ( | ) |
Initialise the reader.
|
virtual |
check mmcif input to be read. Substitutional function for StarParser.
data_name | value of the data_ tag |
Reimplemented from StarParser.
|
virtual |
check mmcif input to be read. Substitutional function for StarParser.
data_name | value of the data_ tag |
Reimplemented from StarParser.
|
virtual |
check if a current loop is to be parsed
header | categories of the upcoming loop block |
Reimplemented from StarParser.
|
virtual |
check if a current loop is to be parsed
header | categories of the upcoming loop block |
Reimplemented from StarParser.
|
virtual |
|
virtual |
|
virtual |
Finalise parsing.
Reimplemented from StarParser.
|
virtual |
Finalise parsing.
Reimplemented from StarParser.
|
protected |
Fetch atom information and store it.
columns | data row |
|
protected |
Fetch atom information and store it.
columns | data row |
|
protected |
fetch values identifying atoms
[in] | columns | data row |
[out] | auth_chain_name | takes atom_site.label_asym_id or, if auth_chain_id_ is set, atom_site.auth_asym_id as a chain name |
[out] | cif_chain_name | |
[out] | res_name | fetches atom_site.label_comp_id |
[out] | resnum | gets atom_site.label_seq_id if available, consecutive numbers, otherwise |
[out] | valid_res_num | shows if we have a valid residue number or if we have to invent our own |
[out] | atom_name | corresponds to label_atom_id |
[out] | alt_loc | gets first letter of atom_site.label_alt_id |
|
protected |
fetch values identifying atoms
[in] | columns | data row |
[out] | auth_chain_name | takes atom_site.label_asym_id or, if auth_chain_id_ is set, atom_site.auth_asym_id as a chain name |
[out] | cif_chain_name | |
[out] | res_name | fetches atom_site.label_comp_id |
[out] | resnum | gets atom_site.label_seq_id if available, consecutive numbers, otherwise |
[out] | valid_res_num | shows if we have a valid residue number or if we have to invent our own |
[out] | atom_name | corresponds to label_atom_id |
[out] | alt_loc | gets first letter of atom_site.label_alt_id |
|
protected |
Fetch mmCIF citation information.
columns | data row |
|
protected |
Fetch mmCIF citation information.
columns | data row |
|
protected |
Fetch mmCIF citation_author information.
columns | data row |
|
protected |
Fetch mmCIF citation_author information.
columns | data row |
|
protected |
Fetch mmCIF database_PDB_rev information.
columns | data row |
|
protected |
Fetch mmCIF database_PDB_rev information.
columns | data row |
|
protected |
Fetch mmCIF entity information.
columns | data row |
|
protected |
Fetch mmCIF entity information.
columns | data row |
|
protected |
Fetch mmCIF entity_poly information.
columns | data row |
|
protected |
Fetch mmCIF entity_poly information.
columns | data row |
|
protected |
Fetch mmCIF exptl information.
columns | data row |
|
protected |
Fetch mmCIF exptl information.
columns | data row |
|
protected |
Fetch mmCIF pdbx_audit_revision_details information.
columns | data row |
|
protected |
Fetch mmCIF pdbx_audit_revision_details information.
columns | data row |
|
protected |
Fetch mmCIF pdbx_audit_revision_history information.
columns | data row |
|
protected |
Fetch mmCIF pdbx_audit_revision_history information.
columns | data row |
|
protected |
Fetch mmCIF pdbx_database_PDB_obs_spr information.
columns | data row |
|
protected |
Fetch mmCIF pdbx_database_PDB_obs_spr information.
columns | data row |
|
protected |
Fetch mmCIF pdbx_database_status information.
columns | data row |
|
protected |
Fetch mmCIF pdbx_database_status information.
columns | data row |
|
protected |
Fetch mmCIF pdbx_struct_assembly information.
columns | data row |
|
protected |
Fetch mmCIF pdbx_struct_assembly information.
columns | data row |
|
protected |
Fetch mmCIF pdbx_struct_assembly_gen information.
columns | data row |
|
protected |
Fetch mmCIF pdbx_struct_assembly_gen information.
columns | data row |
|
protected |
Fetch mmCIF pdbx_struct_oper_list information.
columns | data row |
|
protected |
Fetch mmCIF pdbx_struct_oper_list information.
columns | data row |
|
protected |
Fetch mmCIF refine information.
columns | data row |
|
protected |
Fetch mmCIF refine information.
columns | data row |
|
protected |
Fetch mmCIF struct information.
columns | data row |
|
protected |
Fetch mmCIF struct information.
columns | data row |
|
protected |
Fetch mmCIF struct_conf (secondary structure) information.
columns | data row |
|
protected |
Fetch mmCIF struct_conf (secondary structure) information.
columns | data row |
|
protected |
\ brief parse a row in the struct_ref category
|
protected |
\ brief parse a row in the struct_ref category
|
protected |
parse row in the struct_ref_seq category
|
protected |
parse row in the struct_ref_seq category
|
protected |
parse row in the struct_ref_seq_dif category
|
protected |
parse row in the struct_ref_seq_dif category
|
protected |
Fetch mmCIF struct_sheet_range (beta sheets) information.
columns | data row |
|
protected |
Fetch mmCIF struct_sheet_range (beta sheets) information.
columns | data row |
|
inline |
Enable or disable reading of auth_chain_id instead aof label_chain id (default)
id | enable (true) or disable (false) reading of auth_chain_id. |
Definition at line 109 of file mmcif_reader.hh.
|
inline |
Enable or disable reading of auth_chain_id instead aof label_chain id (default)
id | enable (true) or disable (false) reading of auth_chain_id. |
Definition at line 109 of file mmcif_reader.hh.
|
inline |
Toggle reading of canonical sequence residues (entity_poly.pdbx_seq_one_letter_code_can instead of entity_poly.pdbx_seq_one_letter_code). This flag is exclusive.
flag | True for reading canonical sequences. |
Definition at line 95 of file mmcif_reader.hh.
|
inline |
Toggle reading of canonical sequence residues (entity_poly.pdbx_seq_one_letter_code_can instead of entity_poly.pdbx_seq_one_letter_code). This flag is exclusive.
flag | True for reading canonical sequences. |
Definition at line 95 of file mmcif_reader.hh.
|
inline |
Toggle reading of SEQRES.
flag | True enables, False disables reading SEQRES |
Definition at line 149 of file mmcif_reader.hh.
|
inline |
Toggle reading of SEQRES.
flag | True enables, False disables reading SEQRES |
Definition at line 149 of file mmcif_reader.hh.
void SetRestrictChains | ( | const String & | restrict_chains | ) |
Set names of restricted chains for the reader.
restrict_chains | chain name |
void SetRestrictChains | ( | const String & | restrict_chains | ) |
Set names of restricted chains for the reader.
restrict_chains | chain name |
|
protected |
|
protected |
|
protected |
|
protected |
|
inlineprotected |
Store an item index from loop header in preparation for reading a row. Throws an exception if the item does not exist.
mapping | position the item index is stored at |
item | exact item name to fetch |
header | loop header to pull index from |
Definition at line 174 of file mmcif_reader.hh.
|
inlineprotected |
Store an item index from loop header in preparation for reading a row. Throws an exception if the item does not exist.
mapping | position the item index is stored at |
item | exact item name to fetch |
header | loop header to pull index from |
Definition at line 174 of file mmcif_reader.hh.