19 #ifndef OST_MMCIF_READER_HH
20 #define OST_MMCIF_READER_HH
34 namespace ost {
namespace io {
84 void SetRestrictChains(
const String& restrict_chains);
91 void SetReadCanonicalSeqRes(
bool flag)
96 const String& GetRestrictChains()
const
98 return restrict_chains_;
105 void SetAuthChainID(
bool id)
116 virtual bool OnBeginData(
const StringRef& data_name);
130 const std::vector<StringRef>& columns);
133 virtual void OnEndData();
145 void SetReadSeqRes(
bool flag)
153 bool GetReadSeqRes()
const
170 void TryStoreIdx(
const int mapping,
174 indices_[mapping] = header.
GetIndex(item);
176 if (indices_[mapping] == -1) {
182 this->GetCurrentLinenum()));
191 bool IsValidPDBIdent(
const StringRef& pdbid);
205 bool ParseAtomIdent(
const std::vector<StringRef>& columns,
217 void ParseAndAddAtom(
const std::vector<StringRef>& columns);
222 void ParseEntity(
const std::vector<StringRef>& columns);
227 void ParseEntityPoly(
const std::vector<StringRef>& columns);
232 void ParseCitation(
const std::vector<StringRef>& columns);
247 void ParseCitationAuthor(
const std::vector<StringRef>& columns);
250 void ParseStructRef(
const std::vector<StringRef>& columns);
253 void ParseStructRefSeq(
const std::vector<StringRef>& columns);
256 void ParseStructRefSeqDif(
const std::vector<StringRef>& columns);
260 void ParseExptl(
const std::vector<StringRef>& columns);
265 void ParseRefine(
const std::vector<StringRef>& columns);
270 void ParsePdbxStructAssembly(
const std::vector<StringRef>& columns);
275 void ParsePdbxStructAssemblyGen(
const std::vector<StringRef>& columns);
277 std::vector<std::vector<String> > UnPackOperExperession(
StringRef expression);
279 void StoreExpression(
const char* l,
const char* s,
280 bool& is_range,
int lborder,
281 std::vector<String>& single_block);
283 void StoreRange(
const char*& l,
const char* s,
bool& is_range,
int& lborder,
284 std::vector<String>& single_block);
289 void ParsePdbxStructOperList(
const std::vector<StringRef>& columns);
294 void ParseDatabasePDBRev(
const std::vector<StringRef>& columns);
299 void ParseStruct(
const std::vector<StringRef>& columns);
304 void ParseStructConf(
const std::vector<StringRef>& columns);
309 void ParseStructSheetRange(
const std::vector<StringRef>& columns);
314 void ParsePdbxDatabasePdbObsSpr(
const std::vector<StringRef>& columns);
321 } MMCifSecStructElement;
326 MMCifSecStructElement DetermineSecStructType(
const StringRef& type)
const;
373 PDBX_SEQ_ONE_LETTER_CODE,
374 PDBX_SEQ_ONE_LETTER_CODE_CAN
387 PDBX_DATABASE_ID_DOI,
388 PDBX_DATABASE_ID_PUBMED,
398 } CitationAuthorItems;
418 } PdbxStructAssemblyItems;
446 } StructRefSeqDifItems;
453 } PdbxStructAssemblyGenItems;
471 } PdbxStructOperListItems;
479 PDBX_FORMULA_WEIGHT_METHOD,
481 PDBX_MODEL_TYPE_DETAILS,
488 SC_BEG_LABEL_ASYM_ID,
489 SC_BEG_LABEL_COMP_ID,
493 SC_END_LABEL_ASYM_ID,
494 SC_END_LABEL_COMP_ID,
501 SSR_BEG_LABEL_ASYM_ID,
502 SSR_BEG_LABEL_COMP_ID,
503 SSR_BEG_LABEL_SEQ_ID,
504 SSR_END_LABEL_ASYM_ID,
505 SSR_END_LABEL_COMP_ID,
506 SSR_END_LABEL_SEQ_ID,
509 SSR_BEG_AUTH_ASYM_ID,
510 SSR_END_AUTH_ASYM_ID,
511 } StructSheetRangeItems;
519 } PdbxDatabasePDBObsSpr;
527 } DatabasePDBRevItems;
538 PDBX_STRUCT_ASSEMBLY,
539 PDBX_STRUCT_ASSEMBLY_GEN,
540 PDBX_STRUCT_OPER_LIST,
544 PDBX_DATABASE_PDB_OBS_SPR,
558 typedef std::map<String, MMCifEntityDesc> MMCifEntityDescMap;
563 std::vector<String> chains;
565 std::vector<std::vector<String> > operations;
568 typedef std::vector<MMCifBioUAssembly> MMCifBioUAssemblyVector;
570 typedef std::map<String, std::pair<std::vector<int>, std::vector<String> > >
571 MMCifCitationAuthorMap;
579 typedef std::vector<MMCifHSEntry> MMCifHSVector;
582 MMCifCategory category_;
584 int indices_[MAX_ITEMS_IN_ROW];
585 const IOProfile& profile_;
586 mol::EntityHandle& ent_handle_;
590 mol::ChainHandle curr_chain_;
591 mol::ResidueHandle curr_residue_;
595 bool warned_name_mismatch_;
596 bool warned_rule_based_;
600 std::vector<std::pair<mol::ChainHandle, String> > chain_id_pairs_;
602 MMCifEntityDescMap entity_desc_map_;
606 MMCifCitationAuthorMap authors_map_;
607 MMCifBioUAssemblyVector bu_assemblies_;
608 std::map<String, String> bu_origin_map_;
609 MMCifHSVector helix_list_;
610 MMCifHSVector strand_list_;