OpenStructure
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
mmcif_info.hh
Go to the documentation of this file.
1 //------------------------------------------------------------------------------
2 // This file is part of the OpenStructure project <www.openstructure.org>
3 //
4 // Copyright (C) 2008-2011 by the OpenStructure authors
5 //
6 // This library is free software; you can redistribute it and/or modify it under
7 // the terms of the GNU Lesser General Public License as published by the Free
8 // Software Foundation; either version 3.0 of the License, or (at your option)
9 // any later version.
10 // This library is distributed in the hope that it will be useful, but WITHOUT
11 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12 // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
13 // details.
14 //
15 // You should have received a copy of the GNU Lesser General Public License
16 // along with this library; if not, write to the Free Software Foundation, Inc.,
17 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 //------------------------------------------------------------------------------
19 #ifndef OST_MMCIF_INFO_HH
20 #define OST_MMCIF_INFO_HH
21 
22 #include <vector>
23 #include <map>
24 #include <boost/shared_ptr.hpp>
25 #include <ost/seq/sequence_list.hh>
26 #include <ost/geom/geom.hh>
27 #include <ost/string_ref.hh>
28 #include <ost/io/module_config.hh>
29 
30 namespace ost { namespace io {
31 
32 class DLLEXPORT_OST_IO MMCifInfoStructDetails {
33 public:
35  MMCifInfoStructDetails(): entry_id_(""), title_(""), casp_flag_('\0'),
36  descriptor_(""), mass_(0.0), mass_method_(""), model_details_(""),
37  model_type_details_("") {};
38 
42  void SetEntryID(String id) { entry_id_ = id; }
46  String GetEntryID() const { return entry_id_; }
47 
51  void SetCASPFlag(char flag) { casp_flag_ = flag; }
55  char GetCASPFlag() const { return casp_flag_; }
56 
60  void SetDescriptor(String desc) { descriptor_ = desc; }
64  String GetDescriptor() const { return descriptor_; }
65 
69  void SetMass(Real mass) { mass_ = mass; }
73  Real GetMass() const { return mass_; }
74 
78  void SetMassMethod(String method) { mass_method_ = method; }
82  String GetMassMethod() const { return mass_method_; }
83 
87  void SetModelDetails(String desc) { model_details_ = desc; }
91  String GetModelDetails() const { return model_details_; }
92 
96  void SetModelTypeDetails(String desc) { model_type_details_ = desc; }
100  String GetModelTypeDetails() const { return model_type_details_; }
101 
105  void SetTitle(String title) { title_ = title; }
109  String GetTitle() const { return title_; }
110 
111  bool operator==(const MMCifInfoStructDetails& sd) const {
112  if (this->entry_id_ != sd.entry_id_) {
113  return false;
114  }
115  if (this->casp_flag_ != sd.casp_flag_) {
116  return false;
117  }
118  if (this->descriptor_ != sd.descriptor_) {
119  return false;
120  }
121  if (this->mass_ != sd.mass_) {
122  return false;
123  }
124  if (this->mass_method_ != sd.mass_method_) {
125  return false;
126  }
127  if (this->model_details_ != sd.model_details_) {
128  return false;
129  }
130  if (this->model_type_details_ != sd.model_type_details_) {
131  return false;
132  }
133  if (this->title_ != sd.title_) {
134  return false;
135  }
136 
137  return true;
138  }
139 
140  bool operator!=(const MMCifInfoStructDetails& sd) const {
141  return !this->operator == (sd);
142  }
143 
144 private:
145  String entry_id_;
146  String title_;
147  char casp_flag_;
148  String descriptor_;
149  Real mass_;
150  String mass_method_;
151  String model_details_;
152  String model_type_details_;
153 };
154 
155 class DLLEXPORT_OST_IO MMCifInfoTransOp {
156 public:
158  MMCifInfoTransOp(): id_(""), type_("")
159  {
160  translation_ = geom::Vec3();
161  };
162 
166  void SetID(String id) { id_ = id; }
170  String GetID() const { return id_; }
171 
175  void SetType(String type) { type_ = type; }
179  String GetType() const { return type_; }
180 
186  void SetVector(Real x, Real y, Real z)
187  {
188  translation_.SetX(x);
189  translation_.SetY(y);
190  translation_.SetZ(z);
191  }
195  geom::Vec3 GetVector() const { return translation_; }
196 
208  void SetMatrix(Real i00, Real i01, Real i02,
209  Real i10, Real i11, Real i12,
210  Real i20, Real i21, Real i22)
211  {
212  rotation_ = geom::Mat3(i00,i01,i02, i10,i11,i12, i20,i21,i22);
213  }
217  geom::Mat3 GetMatrix() const { return rotation_; }
218 
219  bool operator==(const MMCifInfoTransOp& op) const {
220  if (this->id_ != op.id_) {
221  return false;
222  }
223  if (this->type_ != op.type_) {
224  return false;
225  }
226  if (this->translation_ != op.translation_) {
227  return false;
228  }
229  if (this->rotation_ != op.rotation_) {
230  return false;
231  }
232 
233  return true;
234  }
235 
236  bool operator!=(const MMCifInfoTransOp& op) const {
237  return !this->operator==(op);
238  }
239 
240 private:
241  String id_;
242  String type_;
243  geom::Vec3 translation_;
244  geom::Mat3 rotation_;
245 };
246 typedef boost::shared_ptr<MMCifInfoTransOp> MMCifInfoTransOpPtr;
247 
248 
249 class DLLEXPORT_OST_IO MMCifInfoBioUnit {
250 public:
252  MMCifInfoBioUnit(): id_(""), details_("") {};
253 
257  void Merge(MMCifInfoBioUnit& from);
258 
262  void SetID(String id) { id_ = id; }
266  String GetID() const { return id_; }
267 
271  void SetDetails(String details) { details_ = details; }
275  String GetDetails() const { return details_; }
276 
280  void SetMethodDetails(String method_details) {
281  method_details_ = method_details;
282  }
286  String GetMethodDetails() const { return method_details_; }
287 
291  void AddChain(String chain);
292 
296  void SetChainList(std::vector<String> chains);
297 
301  const std::vector<String>& GetChainList() const { return chains_; }
302 
306  const std::vector<std::pair<int, int> >& GetChainIntervalList()
307  {
308  return tr_chains_;
309  }
310 
314  void AddOperations(std::vector<MMCifInfoTransOpPtr> operations);
315 
319  const std::vector<std::pair<int, int> >& GetOperationsIntervalList()
320  {
321  return tr_operations_;
322  }
323 
327  const std::vector<std::vector<MMCifInfoTransOpPtr> >& GetOperations()
328  {
329  return operations_;
330  }
331 
332  bool operator==(const MMCifInfoBioUnit& bu) const {
333  if (this->id_ != bu.id_) {
334  return false;
335  }
336  if (this->details_ != bu.details_) {
337  return false;
338  }
339  if (this->chains_ != bu.chains_) {
340  return false;
341  }
342  if (this->tr_chains_ != bu.tr_chains_) {
343  return false;
344  }
345  if (this->tr_operations_ != bu.tr_operations_) {
346  return false;
347  }
348  if (this->operations_.size() == bu.operations_.size()) {
349  std::vector<std::vector<MMCifInfoTransOpPtr> >::const_iterator th_ops_it;
350  std::vector<std::vector<MMCifInfoTransOpPtr> >::const_iterator bu_ops_it;
351  std::vector<MMCifInfoTransOpPtr>::const_iterator th_op_it;
352  std::vector<MMCifInfoTransOpPtr>::const_iterator bu_op_it;
353 
354  for (th_ops_it = this->operations_.begin(),
355  bu_ops_it = bu.operations_.begin();
356  th_ops_it != this->operations_.end();
357  ++th_ops_it, ++bu_ops_it) {
358  if (th_ops_it->size() == bu_ops_it->size()) {
359  for (th_op_it = th_ops_it->begin(), bu_op_it = bu_ops_it->begin();
360  th_op_it != th_ops_it->end();
361  ++th_op_it, ++bu_op_it) {
362  if (*th_op_it != *bu_op_it) {
363  return false;
364  }
365  }
366  } else {
367  return false;
368  }
369  }
370  } else {
371  return false;
372  }
373 
374  return true;
375  }
376 
377  bool operator!=(const MMCifInfoBioUnit& bu) const {
378  return !this->operator==(bu);
379  }
380 
381 private:
382  String id_;
383  String details_;
384  String method_details_;
385  std::vector<String> chains_;
386  std::vector<std::pair<int, int> > tr_chains_; //< chains of a transformation
387  std::vector<std::vector<MMCifInfoTransOpPtr> > operations_;
388  std::vector<std::pair<int, int> > tr_operations_; //< ops. of a transformation
389 };
390 
391 class DLLEXPORT_OST_IO MMCifInfoCitation {
392 public:
394  typedef enum {
395  JOURNAL,
396  BOOK,
397  UNKNOWN
398  } MMCifInfoCType;
399 
401  MMCifInfoCitation(): id_(""), where_(UNKNOWN), cas_(""), published_in_(""),
402  volume_(""), page_first_(""), page_last_(""), doi_(""), pubmed_(0),
403  year_(0), title_(""), book_publisher_(""), book_publisher_city_("") {};
407  void SetID(String id) { id_ = id; }
411  String GetID() const { return id_; }
412 
416  void SetCAS(String id) { cas_ = id; }
420  String GetCAS() const { return cas_; }
421 
425  void SetISBN(String code) { isbn_ = code; }
426 
430  String GetISBN() const { return isbn_; }
431 
435  void SetPublishedIn(String title) { published_in_ = title; }
436 
440  String GetPublishedIn() const { return published_in_; }
441 
445  void SetVolume(String volume) { volume_ = volume; }
446 
450  String GetVolume() const { return volume_; }
451 
455  void SetPageFirst(String first) { page_first_ = first; }
456 
460  String GetPageFirst() const { return page_first_; }
461 
465  void SetPageLast(String last) { page_last_ = last; }
466 
470  String GetPageLast() const { return page_last_; }
471 
475  void SetBookPublisher(String publisher) { book_publisher_ = publisher; }
476 
480  String GetBookPublisher() const { return book_publisher_; }
481 
485  void SetBookPublisherCity(String publisher_city) {
486  book_publisher_city_ = publisher_city;
487  }
488 
492  String GetBookPublisherCity() const { return book_publisher_city_; }
493 
494 //book_publisher_city_
495 
499  void SetDOI(String doi) { doi_ = doi; }
500 
504  String GetDOI() const { return doi_; }
505 
509  void SetPubMed(int no) { pubmed_ = no; }
510 
514  int GetPubMed() const { return pubmed_; }
515 
519  void SetYear(int year) { year_ = year; }
520 
521 
525  int GetYear() const { return year_; }
526 
527 
531  void SetTitle(String title) { title_ = title; }
532 
536  String GetTitle() const { return title_; }
537 
541  void SetCitationType(MMCifInfoCType publication_type) {
542  where_ = publication_type;
543  }
544 
548  }
549 
552  where_ = MMCifInfoCitation::BOOK;
553  }
554 
558  }
559 
563  MMCifInfoCType GetCitationType() const { return where_; }
564 
568  bool IsCitationTypeJournal() const {
569  return where_ == MMCifInfoCitation::JOURNAL;
570  }
571 
575  bool IsCitationTypeBook() const {
576  return where_ == MMCifInfoCitation::BOOK;
577  }
578 
582  bool IsCitationTypeUnknown() const {
583  return where_ == MMCifInfoCitation::UNKNOWN;
584  }
585 
589  void SetAuthorList(std::vector<String> list) { authors_ = list; }
590 
594  const std::vector<String>& GetAuthorList() const { return authors_; }
595 
596  bool operator==(const MMCifInfoCitation& cit) const {
597  if (this->year_ != cit.year_) {
598  return false;
599  }
600  if (this->pubmed_ != cit.pubmed_) {
601  return false;
602  }
603  if (this->where_ != cit.where_) {
604  return false;
605  }
606  if (StringRef(this->id_.c_str(), this->id_.length()) !=
607  StringRef(cit.id_.c_str(), cit.id_.length())) {
608  return false;
609  }
610  if (StringRef(this->cas_.c_str(), this->cas_.length()) !=
611  StringRef(cit.cas_.c_str(), cit.cas_.length())) {
612  return false;
613  }
614  if (StringRef(this->isbn_.c_str(), this->isbn_.length()) !=
615  StringRef(cit.isbn_.c_str(), cit.isbn_.length())) {
616  return false;
617  }
618  if (StringRef(this->published_in_.c_str(), this->published_in_.length()) !=
619  StringRef(cit.published_in_.c_str(), cit.published_in_.length())) {
620  return false;
621  }
622  if (StringRef(this->volume_.c_str(), this->volume_.length()) !=
623  StringRef(cit.volume_.c_str(), cit.volume_.length())) {
624  return false;
625  }
626  if (StringRef(this->page_first_.c_str(), this->page_first_.length()) !=
627  StringRef(cit.page_first_.c_str(), cit.page_first_.length())) {
628  return false;
629  }
630  if (StringRef(this->page_last_.c_str(), this->page_last_.length()) !=
631  StringRef(cit.page_last_.c_str(), cit.page_last_.length())) {
632  return false;
633  }
634  if (StringRef(this->doi_.c_str(), this->doi_.length()) !=
635  StringRef(cit.doi_.c_str(), cit.doi_.length())) {
636  return false;
637  }
638  if (StringRef(this->title_.c_str(), this->title_.length()) !=
639  StringRef(cit.title_.c_str(), cit.title_.length())) {
640  return false;
641  }
642  if (StringRef(this->book_publisher_.c_str(),
643  this->book_publisher_.length()) !=
644  StringRef(cit.book_publisher_.c_str(),
645  cit.book_publisher_.length())) {
646  return false;
647  }
648  if (StringRef(this->book_publisher_city_.c_str(),
649  this->book_publisher_city_.length()) !=
650  StringRef(cit.book_publisher_city_.c_str(),
651  cit.book_publisher_city_.length())) {
652  return false;
653  }
654  if (this->authors_ != cit.authors_) {
655  return false;
656  }
657 
658  return true;
659  }
660 
661  bool operator!=(const MMCifInfoCitation& cit) const {
662  return !this->operator==(cit);
663  }
664 
665 private:
666  String id_;
667  MMCifInfoCType where_;
668  String cas_;
669  String isbn_;
670  String published_in_;
671  String volume_;
672  String page_first_;
673  String page_last_;
674  String doi_;
675  int pubmed_;
676  int year_;
677  String title_;
678  String book_publisher_;
679  String book_publisher_city_;
680  std::vector<String> authors_;
681 };
682 
685 class DLLEXPORT_OST_IO MMCifInfoObsolete {
686 public:
688  MMCifInfoObsolete(): date_(""), id_(UNKNOWN), pdb_id_(""),
689  replaced_pdb_id_("") {};
690 
694  void SetDate(String date) { date_ = date; }
695 
699  String GetDate() { return date_; }
700 
704  void SetID(StringRef type)
705  {
706  if (type == StringRef("OBSLTE", 6)) {
707  id_ = OBSLTE;
708  }
709  else if (type == StringRef("SPRSDE", 6)) {
710  id_ = SPRSDE;
711  }
712  }
713 
718  {
719  if (id_ == OBSLTE) {
720  return "Obsolete";
721  }
722  if (id_ == SPRSDE) {
723  return "Supersede";
724  }
725  return "Unknown";
726  }
727 
731  void SetPDBID(String id) { pdb_id_ = id; }
732 
736  String GetPDBID() { return pdb_id_; }
737 
741  void SetReplacedPDBID(String id) { replaced_pdb_id_ = id; }
742 
746  String GetReplacedPDBID() { return replaced_pdb_id_; }
747 
748 private:
750  typedef enum {
751  OBSLTE,
752  SPRSDE,
753  UNKNOWN
754  } MMCifObsoleteType;
755 
756  String date_;
757  MMCifObsoleteType id_;
758  String pdb_id_;
759  String replaced_pdb_id_;
760 };
761 
764 class DLLEXPORT_OST_IO MMCifInfoRevisions {
765 public:
767  MMCifInfoRevisions(): date_original_("?"), first_release_(0) {};
768 
772  void SetDateOriginal(String date) { date_original_ = date; }
773 
777  String GetDateOriginal() const { return date_original_; }
778 
784  void AddRevision(int num, String date, String status)
785  {
786  if (num_.size() && (num_.back() >= num)) {
787  std::stringstream ss;
788  ss << "Unique ID of revision has to increase with every revision, "
789  << "last was " << num_.back() << ", trying to add " << num;
790  throw IOException(ss.str());
791  }
792  num_.push_back(num);
793  date_.push_back(date);
794  status_.push_back(status);
795  // set first release date if not already occupied
796  if (first_release_ == 0) {
797  if (status == "full release" || status == "Initial release") {
798  first_release_ = status_.size();
799  }
800  }
801  }
802 
806  size_t GetSize() const { return num_.size(); }
807 
812  String GetDate(size_t i) const { return date_.at(i); }
813 
818  int GetNum(size_t i) const { return num_.at(i); }
819 
824  String GetStatus(size_t i) const { return status_.at(i); }
825 
829  String GetLastDate() const {
830  if (date_.empty()) return "?";
831  else return date_.back();
832  }
833 
837  size_t GetFirstRelease() const
838  {
839  return first_release_;
840  }
841 
842 private:
843  String date_original_;
844  size_t first_release_;
845  std::vector<int> num_;
846  std::vector<String> date_;
847  std::vector<String> status_;
848 };
849 
850 
851 class MMCifInfoStructRef;
852 class MMCifInfoStructRefSeq;
853 class MMCifInfoStructRefSeqDif;
854 
855 
856 typedef boost::shared_ptr<MMCifInfoStructRef> MMCifInfoStructRefPtr;
857 typedef boost::shared_ptr<MMCifInfoStructRefSeq> MMCifInfoStructRefSeqPtr;
858 typedef boost::shared_ptr<MMCifInfoStructRefSeqDif> MMCifInfoStructRefSeqDifPtr;
859 
860 typedef std::vector<MMCifInfoStructRefPtr> MMCifInfoStructRefs;
861 typedef std::vector<MMCifInfoStructRefSeqPtr> MMCifInfoStructRefSeqs;
862 typedef std::vector<MMCifInfoStructRefSeqDifPtr> MMCifInfoStructRefSeqDifs;
863 class DLLEXPORT_OST_IO MMCifInfoStructRef {
864 public:
865  MMCifInfoStructRef(const String& id, const String& ent_id,
866  const String& db_name,
867  const String& db_ident, const String& db_access):
868  id_(id), ent_id_(ent_id), db_name_(db_name), db_ident_(db_ident),
869  db_access_(db_access)
870  { }
871  const String& GetID() const { return id_; }
872  const String& GetDBName() const { return db_name_; }
873  const String& GetDBID() const { return db_ident_; }
874  const String& GetEntityID() const { return ent_id_; }
875  const String& GetDBAccess() const { return db_access_; }
876  MMCifInfoStructRefSeqPtr AddAlignedSeq(const String& align_id,
877  const String& chain_name, int seq_begin,
878  int seq_end, int db_begin, int db_end);
879  MMCifInfoStructRefSeqPtr GetAlignedSeq(const String& align_id) const;
881  {
883  seqs.reserve(seqs_.size());
884  for (std::map<String, MMCifInfoStructRefSeqPtr>::const_iterator
885  i=seqs_.begin(), e=seqs_.end(); i!=e; ++i) {
886  seqs.push_back(i->second);
887  }
888  return seqs;
889  }
890 private:
891  String id_;
892  String ent_id_;
893  String db_name_;
894  String db_ident_;
895  String db_access_;
896  std::map<String, MMCifInfoStructRefSeqPtr> seqs_;
897 };
898 
899 class DLLEXPORT_OST_IO MMCifInfoStructRefSeq {
900 public:
901  MMCifInfoStructRefSeq(const String& align_id, const String& chain_name,
902  int seq_begin, int seq_end,
903  int db_begin, int db_end):
904  id_(align_id), chain_name_(chain_name),
905  seq_begin_(seq_begin), seq_end_(seq_end), db_begin_(db_begin), db_end_(db_end)
906  { }
907 
908  const String& GetID() const { return id_; }
909  const String& GetChainName() const { return chain_name_; }
910  int GetSeqBegin() const { return seq_begin_; }
911  int GetSeqEnd() const { return seq_end_; }
912  int GetDBBegin() const { return db_begin_; }
913  int GetDBEnd() const { return db_end_; }
914  MMCifInfoStructRefSeqDifPtr AddDif(int seq_num, const String& db_rnum,
915  const String& details);
916  const std::vector<MMCifInfoStructRefSeqDifPtr>& GetDifs() const { return difs_; }
917 private:
918  String id_;
919  String chain_name_;
920  int seq_begin_;
921  int seq_end_;
922  int db_begin_;
923  int db_end_;
924  std::vector<MMCifInfoStructRefSeqDifPtr> difs_;
925 };
926 
927 class DLLEXPORT_OST_IO MMCifInfoStructRefSeqDif {
928 public:
929  MMCifInfoStructRefSeqDif(int seq_rnum, const String& db_rnum, const String& details):
930  seq_rnum_(seq_rnum), db_rnum_(db_rnum), details_(details) {}
931  int GetSeqRNum() const { return seq_rnum_;}
932  const String& GetDBRNum() const { return db_rnum_; }
933  const String& GetDetails() const { return details_; }
934 private:
935  int seq_rnum_;
936  String db_rnum_;
937  String details_;
938 };
939 
953 class DLLEXPORT_OST_IO MMCifInfo {
954 public:
956  MMCifInfo(): exptl_method_(""), resolution_(0), r_free_(0), r_work_(0) { }
957 
961  void AddCitation(MMCifInfoCitation citation) // unit test
962  {
963  citations_.push_back(citation);
964  }
965 
970  void AddAuthorsToCitation(StringRef id, std::vector<String> list); //unit test
971 
975  const std::vector<MMCifInfoCitation>& GetCitations() const
976  {
977  return citations_;
978  }
979 
983  void SetMethod(String method) { exptl_method_ = method; }
984 
988  const StringRef GetMethod() const
989  {
990  return StringRef(exptl_method_.c_str(), exptl_method_.length());
991  }
992 
996  void SetResolution(Real res) { resolution_ = res; }
997 
1001  Real GetResolution() const { return resolution_; }
1002 
1006  void SetRFree(Real r_free) { r_free_ = r_free; }
1007 
1011  Real GetRFree() const { return r_free_; }
1012 
1016  void SetRWork(Real r_work) { r_work_ = r_work; }
1017 
1021  Real GetRWork() const { return r_work_; }
1022 
1027  void AddMMCifPDBChainTr(String cif, String pdb);
1028 
1033  String GetMMCifPDBChainTr(String cif) const;
1034 
1039  void AddPDBMMCifChainTr(String pdb, String cif);
1040 
1045  String GetPDBMMCifChainTr(String pdb) const;
1046 
1051  void AddMMCifEntityIdTr(String cif, String ent_id);
1052 
1057  String GetMMCifEntityIdTr(String cif) const;
1058 
1062  void AddBioUnit(MMCifInfoBioUnit bu);
1063 
1067  const std::vector<MMCifInfoBioUnit>& GetBioUnits() const
1068  {
1069  return biounits_;
1070  }
1071 
1075  void AddOperation(MMCifInfoTransOpPtr op) // unit test
1076  {
1077  transops_.push_back(op);
1078  }
1079 
1083  const std::vector<MMCifInfoTransOpPtr>& GetOperations() const
1084  {
1085  return transops_;
1086  }
1087 
1092  {
1093  struct_details_ = details;
1094  }
1095 
1100  {
1101  return struct_details_;
1102  }
1103 
1108  {
1109  obsolete_ = obsolete;
1110  }
1111 
1116  {
1117  return obsolete_;
1118  }
1119  const MMCifInfoStructRefs& GetStructRefs() const { return struct_refs_; }
1120  void SetStructRefs(const MMCifInfoStructRefs& sr) { struct_refs_=sr; }
1121 
1126  {
1127  // only set once
1128  if (revisions_.GetDateOriginal() == "?") {
1129  revisions_.SetDateOriginal(date);
1130  }
1131  }
1132 
1138  void AddRevision(int num, String date, String status)
1139  {
1140  revisions_.AddRevision(num, date, status);
1141  }
1142 
1147  {
1148  return revisions_;
1149  }
1150 //protected:
1151 
1152 private:
1153  // members
1154  String exptl_method_;
1155  Real resolution_;
1156  Real r_free_;
1157  Real r_work_;
1158  MMCifInfoStructDetails struct_details_;
1159  MMCifInfoObsolete obsolete_;
1160  MMCifInfoRevisions revisions_;
1161  std::vector<MMCifInfoCitation> citations_;
1162  std::vector<MMCifInfoBioUnit> biounits_;
1163  std::vector<MMCifInfoTransOpPtr> transops_;
1164  MMCifInfoStructRefs struct_refs_;
1165  std::map<String, String> cif_2_pdb_chain_id_;
1166  std::map<String, String> pdb_2_cif_chain_id_;
1167  std::map<String, String> cif_2_entity_id_;
1168 };
1169 
1170 
1171 }} // ns
1172 
1173 #endif
void SetID(String id)
Set ID.
Definition: mmcif_info.hh:407
const std::vector< MMCifInfoCitation > & GetCitations() const
Get the list of citations stored in an info object.
Definition: mmcif_info.hh:975
void SetCitationTypeUnknown()
Set the type of a publication to unknown.
Definition: mmcif_info.hh:556
container class for information on obsolete entries
Definition: mmcif_info.hh:685
String GetID()
Get type of entry.
Definition: mmcif_info.hh:717
MMCifInfoObsolete GetObsoleteInfo() const
Get information on an obsolete entries.
Definition: mmcif_info.hh:1115
const StringRef GetMethod() const
Get an experimental method.
Definition: mmcif_info.hh:988
bool operator!=(const MMCifInfoStructDetails &sd) const
Definition: mmcif_info.hh:140
convenient datatype for referencing character data
Definition: string_ref.hh:39
void SetTitle(String title)
Set the title of a publication.
Definition: mmcif_info.hh:531
String GetBookPublisher() const
Get the publisher of a book.
Definition: mmcif_info.hh:480
void SetPubMed(int no)
Set the PubMed accession number.
Definition: mmcif_info.hh:509
void SetAuthorList(std::vector< String > list)
Set the list of authors.
Definition: mmcif_info.hh:589
void SetObsoleteInfo(MMCifInfoObsolete obsolete)
Add a block of information on obsolete entries.
Definition: mmcif_info.hh:1107
boost::shared_ptr< MMCifInfoStructRefSeqDif > MMCifInfoStructRefSeqDifPtr
Definition: mmcif_info.hh:858
const String & GetDBAccess() const
Definition: mmcif_info.hh:875
String GetISBN() const
Get an ISBN code.
Definition: mmcif_info.hh:430
std::vector< MMCifInfoStructRefSeqDifPtr > MMCifInfoStructRefSeqDifs
Definition: mmcif_info.hh:862
const MMCifInfoStructRefs & GetStructRefs() const
Definition: mmcif_info.hh:1119
MMCifInfo()
Create an info object.
Definition: mmcif_info.hh:956
String GetDetails() const
Get details.
Definition: mmcif_info.hh:275
std::vector< MMCifInfoStructRefSeqPtr > MMCifInfoStructRefSeqs
Definition: mmcif_info.hh:861
const MMCifInfoStructDetails GetStructDetails() const
Get the list of details about structures.
Definition: mmcif_info.hh:1099
void SetType(String type)
Set type.
Definition: mmcif_info.hh:175
MMCifInfoStructDetails()
Create a details object.
Definition: mmcif_info.hh:35
void SetModelTypeDetails(String desc)
Set a description for the type of the structure model.
Definition: mmcif_info.hh:96
void SetMethod(String method)
Set an experimental method.
Definition: mmcif_info.hh:983
bool IsCitationTypeUnknown() const
Check if the citation type is unknow.
Definition: mmcif_info.hh:582
void SetCitationTypeBook()
Set the type of a publication to book.
Definition: mmcif_info.hh:551
std::string String
Definition: base.hh:54
void SetPublishedIn(String title)
Set a book title or journal name.
Definition: mmcif_info.hh:435
float Real
Definition: base.hh:44
char GetCASPFlag() const
Get CASP flag.
Definition: mmcif_info.hh:55
void SetMethodDetails(String method_details)
Set method details.
Definition: mmcif_info.hh:280
MMCifInfoStructRef(const String &id, const String &ent_id, const String &db_name, const String &db_ident, const String &db_access)
Definition: mmcif_info.hh:865
void SetCitationType(MMCifInfoCType publication_type)
Set the type of a publication.
Definition: mmcif_info.hh:541
void SetDetails(String details)
Set details.
Definition: mmcif_info.hh:271
void SetID(String id)
Set id.
Definition: mmcif_info.hh:166
Real GetResolution() const
Get resolution.
Definition: mmcif_info.hh:1001
const std::vector< std::pair< int, int > > & GetOperationsIntervalList()
Get the list of intervals of operations.
Definition: mmcif_info.hh:319
MMCifInfoCType GetCitationType() const
Get the type of a publication.
Definition: mmcif_info.hh:563
void AddCitation(MMCifInfoCitation citation)
Add an item to the list of citations.
Definition: mmcif_info.hh:961
bool operator!=(const MMCifInfoBioUnit &bu) const
Definition: mmcif_info.hh:377
boost::shared_ptr< MMCifInfoStructRef > MMCifInfoStructRefPtr
Definition: mmcif_info.hh:853
const String & GetDBName() const
Definition: mmcif_info.hh:872
String GetBookPublisherCity() const
Get the publisher city of a book.
Definition: mmcif_info.hh:492
const String & GetDetails() const
Definition: mmcif_info.hh:933
String GetVolume() const
Get a journal volume.
Definition: mmcif_info.hh:450
def Merge
Definition: table.py:3055
bool DLLEXPORT_OST_GEOM operator==(const Line2 &l1, const Line2 &l2)
String GetID() const
Get ID.
Definition: mmcif_info.hh:411
const std::vector< MMCifInfoStructRefSeqDifPtr > & GetDifs() const
Definition: mmcif_info.hh:916
size_t GetSize() const
Get number of revisions stored.
Definition: mmcif_info.hh:806
boost::shared_ptr< MMCifInfoTransOp > MMCifInfoTransOpPtr
Definition: mmcif_info.hh:246
Container class for information on file revisions.
Definition: mmcif_info.hh:764
void SetRWork(Real r_work)
Set R-work value.
Definition: mmcif_info.hh:1016
String GetTitle() const
Get the title of a publication.
Definition: mmcif_info.hh:536
String GetLastDate() const
Get date of last revision.
Definition: mmcif_info.hh:829
const String & GetDBID() const
Definition: mmcif_info.hh:873
std::vector< MMCifInfoStructRefPtr > MMCifInfoStructRefs
Definition: mmcif_info.hh:860
void SetTitle(String title)
Set a title for the data block.
Definition: mmcif_info.hh:105
void AddRevision(int num, String date, String status)
Add a revision to history.
Definition: mmcif_info.hh:1138
void SetRevisionsDateOriginal(String date)
Set date_original of revisions.
Definition: mmcif_info.hh:1125
Real GetMass() const
Get molecular weight.
Definition: mmcif_info.hh:73
MMCifInfoBioUnit()
Create a biounit.
Definition: mmcif_info.hh:252
String GetDate()
Get the date string.
Definition: mmcif_info.hh:699
void SetCAS(String id)
Set a CAS identifier.
Definition: mmcif_info.hh:416
const std::vector< String > & GetChainList() const
Get vector of chain names.
Definition: mmcif_info.hh:301
void SetResolution(Real res)
Set resolution.
Definition: mmcif_info.hh:996
void SetReplacedPDBID(String id)
Set id of replaced entry.
Definition: mmcif_info.hh:741
const String & GetID() const
Definition: mmcif_info.hh:871
String GetCAS() const
Get a CAS identifier.
Definition: mmcif_info.hh:420
void AddOperation(MMCifInfoTransOpPtr op)
Add a operation.
Definition: mmcif_info.hh:1075
geom::Vec3 GetVector() const
Get the translational vector.
Definition: mmcif_info.hh:195
const std::vector< String > & GetAuthorList() const
Get the list of authors.
Definition: mmcif_info.hh:594
int GetPubMed() const
Get the PubMed accession number.
Definition: mmcif_info.hh:514
bool operator!=(const MMCifInfoCitation &cit) const
Definition: mmcif_info.hh:661
const String & GetDBRNum() const
Definition: mmcif_info.hh:932
const std::vector< MMCifInfoTransOpPtr > & GetOperations() const
Get the list of operations stored in an info object.
Definition: mmcif_info.hh:1083
String GetID() const
Get id.
Definition: mmcif_info.hh:170
void SetEntryID(String id)
Set id.
Definition: mmcif_info.hh:42
size_t GetFirstRelease() const
Get the index of the full release revision.
Definition: mmcif_info.hh:837
bool operator==(const MMCifInfoCitation &cit) const
Definition: mmcif_info.hh:596
void SetDateOriginal(String date)
Set date the entry entered PDB.
Definition: mmcif_info.hh:772
void SetCASPFlag(char flag)
Set CASP flag.
Definition: mmcif_info.hh:51
void SetDate(String date)
Set date of replacement.
Definition: mmcif_info.hh:694
MMCifInfoTransOp()
Create an operation.
Definition: mmcif_info.hh:158
Real GetRWork() const
Get R-work value.
Definition: mmcif_info.hh:1021
String GetPublishedIn() const
Get a book title or journal name.
Definition: mmcif_info.hh:440
MMCifInfoStructRefSeqDif(int seq_rnum, const String &db_rnum, const String &details)
Definition: mmcif_info.hh:929
bool operator==(const MMCifInfoStructDetails &sd) const
Definition: mmcif_info.hh:111
Three dimensional vector class, using Real precision.
Definition: vec3.hh:42
const std::vector< std::vector< MMCifInfoTransOpPtr > > & GetOperations()
Get the list of operations.
Definition: mmcif_info.hh:327
void SetStructDetails(MMCifInfoStructDetails details)
Add a set of structure details.
Definition: mmcif_info.hh:1091
void SetID(String id)
Set id.
Definition: mmcif_info.hh:262
String GetDate(size_t i) const
Get revision date by index in list.
Definition: mmcif_info.hh:812
void AddRevision(int num, String date, String status)
Add a revision to history.
Definition: mmcif_info.hh:784
void SetMassMethod(String method)
Set the method how the molecular weight was detected.
Definition: mmcif_info.hh:78
bool IsCitationTypeBook() const
Check a citation to be published in a book.
Definition: mmcif_info.hh:575
#define DLLEXPORT_OST_IO
String GetType() const
Get type.
Definition: mmcif_info.hh:179
void SetStructRefs(const MMCifInfoStructRefs &sr)
Definition: mmcif_info.hh:1120
String GetModelDetails() const
Get the details how the structure was determined.
Definition: mmcif_info.hh:91
void SetMatrix(Real i00, Real i01, Real i02, Real i10, Real i11, Real i12, Real i20, Real i21, Real i22)
Set the rotational matrix.
Definition: mmcif_info.hh:208
void SetRFree(Real r_free)
Set R-free value.
Definition: mmcif_info.hh:1006
boost::shared_ptr< MMCifInfoStructRefSeq > MMCifInfoStructRefSeqPtr
Definition: mmcif_info.hh:857
void SetBookPublisherCity(String publisher_city)
Set the publisher city for a book.
Definition: mmcif_info.hh:485
bool operator==(const MMCifInfoBioUnit &bu) const
Definition: mmcif_info.hh:332
bool IsCitationTypeJournal() const
Check a citation to be published in a journal.
Definition: mmcif_info.hh:568
void SetPageFirst(String first)
Set the start page for a publication.
Definition: mmcif_info.hh:455
void SetMass(Real mass)
Set mass.
Definition: mmcif_info.hh:69
String GetPageFirst() const
Get the start page of a publication.
Definition: mmcif_info.hh:460
void SetID(StringRef type)
Set type of entry.
Definition: mmcif_info.hh:704
void SetBookPublisher(String publisher)
Set the publisher for a book.
Definition: mmcif_info.hh:475
const String & GetEntityID() const
Definition: mmcif_info.hh:874
String GetID() const
Get id.
Definition: mmcif_info.hh:266
String GetMassMethod() const
Get the method how the molecular weight was determined.
Definition: mmcif_info.hh:82
int GetYear() const
Get the year of a publication.
Definition: mmcif_info.hh:525
String GetEntryID() const
Get id.
Definition: mmcif_info.hh:46
const std::vector< std::pair< int, int > > & GetChainIntervalList()
Get the list of intervals of chains.
Definition: mmcif_info.hh:306
const String & GetID() const
Definition: mmcif_info.hh:908
const String & GetChainName() const
Definition: mmcif_info.hh:909
void SetModelDetails(String desc)
Set the description about the production of this structure.
Definition: mmcif_info.hh:87
MMCifInfoStructRefSeq(const String &align_id, const String &chain_name, int seq_begin, int seq_end, int db_begin, int db_end)
Definition: mmcif_info.hh:901
MMCifInfoObsolete()
Create an object of information about an obsolete entry.
Definition: mmcif_info.hh:688
void SetPageLast(String last)
Set the end page for a publication.
Definition: mmcif_info.hh:465
void SetCitationTypeJournal()
Set the type of a publication to journal.
Definition: mmcif_info.hh:546
String GetMethodDetails() const
Get method details.
Definition: mmcif_info.hh:286
String GetDateOriginal() const
Get date the entry entered PDB.
Definition: mmcif_info.hh:777
bool operator==(const MMCifInfoTransOp &op) const
Definition: mmcif_info.hh:219
String GetDOI() const
Get the DOI of a document.
Definition: mmcif_info.hh:504
String GetPageLast() const
Get the last page of a publication.
Definition: mmcif_info.hh:470
MMCifInfoRevisions()
Start recording a revision process.
Definition: mmcif_info.hh:767
void SetISBN(String code)
Set an ISBN code.
Definition: mmcif_info.hh:425
Real GetRFree() const
Get R-free value.
Definition: mmcif_info.hh:1011
String GetStatus(size_t i) const
Get revision status by index in list.
Definition: mmcif_info.hh:824
void SetDescriptor(String desc)
Set descriptor.
Definition: mmcif_info.hh:60
bool operator!=(const MMCifInfoTransOp &op) const
Definition: mmcif_info.hh:236
MMCifInfoStructRefSeqs GetAlignedSeqs() const
Definition: mmcif_info.hh:880
const std::vector< MMCifInfoBioUnit > & GetBioUnits() const
Get the list of biounits stored in an info object.
Definition: mmcif_info.hh:1067
String GetDescriptor() const
Get CASP flag.
Definition: mmcif_info.hh:64
int GetNum(size_t i) const
Get revision num by index in list.
Definition: mmcif_info.hh:818
MMCifInfoRevisions GetRevisions() const
Get history.
Definition: mmcif_info.hh:1146
String GetModelTypeDetails() const
Get the description for the type of the structure model.
Definition: mmcif_info.hh:100
String GetPDBID()
Get id of replacement.
Definition: mmcif_info.hh:736
geom::Mat3 GetMatrix() const
Get the rotational matrix.
Definition: mmcif_info.hh:217
void SetVector(Real x, Real y, Real z)
Set the translational vector.
Definition: mmcif_info.hh:186
MMCifInfoCitation()
Create a citation.
Definition: mmcif_info.hh:401
String GetTitle() const
Get the title of the structure model.
Definition: mmcif_info.hh:109
void SetYear(int year)
Set the year of a publication.
Definition: mmcif_info.hh:519
void SetPDBID(String id)
Set id of replacement.
Definition: mmcif_info.hh:731
void SetVolume(String volume)
Set a journal volume.
Definition: mmcif_info.hh:445
void SetDOI(String doi)
Set the DOI of a document.
Definition: mmcif_info.hh:499
String GetReplacedPDBID()
Get id of replaced entry.
Definition: mmcif_info.hh:746