19 #ifndef OST_MMCIF_READER_HH
20 #define OST_MMCIF_READER_HH
34 namespace ost {
namespace io {
88 void SetRestrictChains(
const String& restrict_chains);
102 return restrict_chains_;
120 virtual bool OnBeginData(
const StringRef& data_name);
134 const std::vector<StringRef>& columns);
137 virtual void OnEndData();
178 indices_[mapping] = header.
GetIndex(item);
180 if (indices_[mapping] == -1) {
186 this->GetCurrentLinenum()));
203 bool ParseAtomIdent(
const std::vector<StringRef>& columns,
215 void ParseAndAddAtom(
const std::vector<StringRef>& columns);
220 void ParseEntity(
const std::vector<StringRef>& columns);
225 void ParseEntityPoly(
const std::vector<StringRef>& columns);
230 void ParseCitation(
const std::vector<StringRef>& columns);
245 void ParseCitationAuthor(
const std::vector<StringRef>& columns);
248 void ParseStructRef(
const std::vector<StringRef>& columns);
251 void ParseStructRefSeq(
const std::vector<StringRef>& columns);
254 void ParseStructRefSeqDif(
const std::vector<StringRef>& columns);
258 void ParseExptl(
const std::vector<StringRef>& columns);
263 void ParseRefine(
const std::vector<StringRef>& columns);
268 void ParsePdbxStructAssembly(
const std::vector<StringRef>& columns);
273 void ParsePdbxStructAssemblyGen(
const std::vector<StringRef>& columns);
275 std::vector<std::vector<String> > UnPackOperExperession(
StringRef expression);
277 void StoreExpression(
const char* l,
const char* s,
278 bool& is_range,
int lborder,
279 std::vector<String>& single_block);
281 void StoreRange(
const char*& l,
const char* s,
bool& is_range,
int& lborder,
282 std::vector<String>& single_block);
287 void ParsePdbxStructOperList(
const std::vector<StringRef>& columns);
292 void ParseDatabasePDBRev(
const std::vector<StringRef>& columns);
297 void ParsePdbxAuditRevisionHistory(
const std::vector<StringRef>& columns);
302 void ParsePdbxAuditRevisionDetails(
const std::vector<StringRef>& columns);
307 void ParsePdbxDatabaseStatus(
const std::vector<StringRef>& columns);
312 void ParseStruct(
const std::vector<StringRef>& columns);
317 void ParseStructConf(
const std::vector<StringRef>& columns);
322 void ParseStructSheetRange(
const std::vector<StringRef>& columns);
327 void ParsePdbxDatabasePdbObsSpr(
const std::vector<StringRef>& columns);
334 } MMCifSecStructElement;
339 MMCifSecStructElement DetermineSecStructType(
const StringRef& type)
const;
385 PDBX_SEQ_ONE_LETTER_CODE,
386 PDBX_SEQ_ONE_LETTER_CODE_CAN
401 PDBX_DATABASE_ID_DOI,
402 PDBX_DATABASE_ID_PUBMED,
412 } CitationAuthorItems;
434 } PdbxStructAssemblyItems;
462 } StructRefSeqDifItems;
469 } PdbxStructAssemblyGenItems;
487 } PdbxStructOperListItems;
495 PDBX_FORMULA_WEIGHT_METHOD,
497 PDBX_MODEL_TYPE_DETAILS,
504 SC_BEG_LABEL_ASYM_ID,
505 SC_BEG_LABEL_COMP_ID,
509 SC_END_LABEL_ASYM_ID,
510 SC_END_LABEL_COMP_ID,
517 SSR_BEG_LABEL_ASYM_ID,
518 SSR_BEG_LABEL_COMP_ID,
519 SSR_BEG_LABEL_SEQ_ID,
520 SSR_END_LABEL_ASYM_ID,
521 SSR_END_LABEL_COMP_ID,
522 SSR_END_LABEL_SEQ_ID,
525 SSR_BEG_AUTH_ASYM_ID,
526 SSR_END_AUTH_ASYM_ID,
527 } StructSheetRangeItems;
535 } PdbxDatabasePDBObsSpr;
543 } DatabasePDBRevItems;
549 } PdbxAuditRevisionHistoryItems;
553 PARD_REVISION_ORDINAL,
555 } PdbxAuditRevisionDetailsItems;
559 PDS_RECVD_INITIAL_DEPOSITION_DATE,
560 } PdbxDatabaseStatusItems;
571 PDBX_STRUCT_ASSEMBLY,
572 PDBX_STRUCT_ASSEMBLY_GEN,
573 PDBX_STRUCT_OPER_LIST,
577 PDBX_DATABASE_PDB_OBS_SPR,
582 PDBX_AUDIT_REVISION_HISTORY,
583 PDBX_AUDIT_REVISION_DETAILS,
584 PDBX_DATABASE_STATUS,
594 typedef std::map<String, MMCifEntityDesc> MMCifEntityDescMap;
599 std::vector<String> chains;
600 std::vector<std::vector<String> > operations;
604 typedef std::vector<MMCifBioUAssembly> MMCifBioUAssemblyVector;
606 typedef std::map<String, std::pair<std::vector<int>, std::vector<String> > >
607 MMCifCitationAuthorMap;
615 typedef std::vector<MMCifHSEntry> MMCifHSVector;
622 typedef std::map<String, MMCifPSAEntry> MMCifPSAMap;
625 MMCifCategory category_;
627 int indices_[MAX_ITEMS_IN_ROW];
628 const IOProfile& profile_;
629 mol::EntityHandle& ent_handle_;
633 mol::ChainHandle curr_chain_;
634 mol::ResidueHandle curr_residue_;
638 bool warned_name_mismatch_;
639 bool warned_rule_based_;
643 std::vector<std::pair<mol::ChainHandle, String> > chain_id_pairs_;
645 MMCifEntityDescMap entity_desc_map_;
649 MMCifCitationAuthorMap authors_map_;
650 MMCifBioUAssemblyVector bu_assemblies_;
651 MMCifPSAMap bu_origin_map_;
652 MMCifHSVector helix_list_;
653 MMCifHSVector strand_list_;
656 std::map<int, String> revision_dates_;
657 std::map<int, String> revision_types_;
658 bool database_PDB_rev_added_;
convenient datatype for referencing character data
void SetAuthChainID(bool id)
Enable or disable reading of auth_chain_id instead aof label_chain id (default)
container class for additional information from MMCif files
const MMCifInfoStructRefs & GetStructRefs() const
seq::SequenceList GetSeqRes() const
Return sequences.
const String & GetRestrictChains() const
pointer_it< T > end(const std::vector< T > &values)
parser for the STAR file format
boost::shared_ptr< CompoundLib > CompoundLibPtr
std::vector< MMCifInfoStructRefPtr > MMCifInfoStructRefs
std::vector< SequenceImplPtr > SequenceList
void SetReadSeqRes(bool flag)
Toggle reading of SEQRES.
reader for the mmcif file format
const MMCifInfo & GetInfo()
Get additional information of the mmCIF file.
void TryStoreIdx(const int mapping, const String &item, const StarLoopDesc &header)
Store an item index from loop header in preparation for reading a row. Throws an exception if the ite...
const String & GetCategory() const
int GetIndex(const String &name) const
void SetReadCanonicalSeqRes(bool flag)
Toggle reading of canonical sequence residues (entity_poly.pdbx_seq_one_letter_code_can instead of en...
bool GetReadSeqRes() const
Check if reading of SEQRES is enabled.