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 
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 
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 
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 
392 public:
394  typedef enum {
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 
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 
765 public:
767  MMCifInfoRevisions(): date_original_("?"), first_release_(0) {};
768 
769  // original depositon date
770  void SetDateOriginal(String date) { date_original_ = date; }
771  String GetDateOriginal() const { return date_original_; }
772 
773  // revision history
774  void AddRevision(int num, String date, String status, int major = -1,
775  int minor = -1)
776  {
777  if (num_.size() && (num_.back() >= num)) {
778  std::stringstream ss;
779  ss << "Unique ID of revision has to increase with every revision, "
780  << "last was " << num_.back() << ", trying to add " << num;
781  throw IOException(ss.str());
782  }
783  num_.push_back(num);
784  date_.push_back(date);
785  status_.push_back(status);
786  major_.push_back(major);
787  minor_.push_back(minor);
788  // set first release date if not already occupied
789  if (first_release_ == 0) {
790  if (status == "full release" || status == "Initial release") {
791  first_release_ = status_.size();
792  }
793  }
794  }
795 
796  // revision history getters
797  size_t GetSize() const { return num_.size(); }
798  String GetDate(size_t i) const { return date_.at(i); }
799  int GetNum(size_t i) const { return num_.at(i); }
800  String GetStatus(size_t i) const { return status_.at(i); }
801  int GetMajor(size_t i) const { return major_.at(i); }
802  int GetMinor(size_t i) const { return minor_.at(i); }
803 
804  // get info of first and last revision
805  String GetLastDate() const {
806  if (date_.empty()) return "?";
807  else return date_.back();
808  }
809  int GetLastMajor() const {
810  if (major_.empty()) return -1;
811  else return major_.back();
812  }
813  int GetLastMinor() const {
814  if (minor_.empty()) return -1;
815  else return minor_.back();
816  }
817  size_t GetFirstRelease() const {
818  return first_release_;
819  }
820 
821 private:
822  String date_original_;
823  size_t first_release_;
824  std::vector<int> num_;
825  std::vector<String> date_;
826  std::vector<String> status_;
827  std::vector<int> major_;
828  std::vector<int> minor_;
829 };
830 
831 
832 class MMCifInfoStructRef;
833 class MMCifInfoStructRefSeq;
835 
836 
837 typedef boost::shared_ptr<MMCifInfoStructRef> MMCifInfoStructRefPtr;
838 typedef boost::shared_ptr<MMCifInfoStructRefSeq> MMCifInfoStructRefSeqPtr;
839 typedef boost::shared_ptr<MMCifInfoStructRefSeqDif> MMCifInfoStructRefSeqDifPtr;
840 
841 typedef std::vector<MMCifInfoStructRefPtr> MMCifInfoStructRefs;
842 typedef std::vector<MMCifInfoStructRefSeqPtr> MMCifInfoStructRefSeqs;
843 typedef std::vector<MMCifInfoStructRefSeqDifPtr> MMCifInfoStructRefSeqDifs;
845 public:
846  MMCifInfoStructRef(const String& id, const String& ent_id,
847  const String& db_name,
848  const String& db_ident, const String& db_access):
849  id_(id), ent_id_(ent_id), db_name_(db_name), db_ident_(db_ident),
850  db_access_(db_access)
851  { }
852  const String& GetID() const { return id_; }
853  const String& GetDBName() const { return db_name_; }
854  const String& GetDBID() const { return db_ident_; }
855  const String& GetEntityID() const { return ent_id_; }
856  const String& GetDBAccess() const { return db_access_; }
857  MMCifInfoStructRefSeqPtr AddAlignedSeq(const String& align_id,
858  const String& chain_name, int seq_begin,
859  int seq_end, int db_begin, int db_end);
860  MMCifInfoStructRefSeqPtr GetAlignedSeq(const String& align_id) const;
862  {
864  seqs.reserve(seqs_.size());
865  for (std::map<String, MMCifInfoStructRefSeqPtr>::const_iterator
866  i=seqs_.begin(), e=seqs_.end(); i!=e; ++i) {
867  seqs.push_back(i->second);
868  }
869  return seqs;
870  }
871 private:
872  String id_;
873  String ent_id_;
874  String db_name_;
875  String db_ident_;
876  String db_access_;
877  std::map<String, MMCifInfoStructRefSeqPtr> seqs_;
878 };
879 
881 public:
882  MMCifInfoStructRefSeq(const String& align_id, const String& chain_name,
883  int seq_begin, int seq_end,
884  int db_begin, int db_end):
885  id_(align_id), chain_name_(chain_name),
886  seq_begin_(seq_begin), seq_end_(seq_end), db_begin_(db_begin), db_end_(db_end)
887  { }
888 
889  const String& GetID() const { return id_; }
890  const String& GetChainName() const { return chain_name_; }
891  int GetSeqBegin() const { return seq_begin_; }
892  int GetSeqEnd() const { return seq_end_; }
893  int GetDBBegin() const { return db_begin_; }
894  int GetDBEnd() const { return db_end_; }
895  MMCifInfoStructRefSeqDifPtr AddDif(int seq_num, const String& db_rnum,
896  const String& details);
897  const std::vector<MMCifInfoStructRefSeqDifPtr>& GetDifs() const { return difs_; }
898 private:
899  String id_;
900  String chain_name_;
901  int seq_begin_;
902  int seq_end_;
903  int db_begin_;
904  int db_end_;
905  std::vector<MMCifInfoStructRefSeqDifPtr> difs_;
906 };
907 
909 public:
910  MMCifInfoStructRefSeqDif(int seq_rnum, const String& db_rnum, const String& details):
911  seq_rnum_(seq_rnum), db_rnum_(db_rnum), details_(details) {}
912  int GetSeqRNum() const { return seq_rnum_;}
913  const String& GetDBRNum() const { return db_rnum_; }
914  const String& GetDetails() const { return details_; }
915 private:
916  int seq_rnum_;
917  String db_rnum_;
918  String details_;
919 };
920 
935 public:
937  MMCifInfo(): exptl_method_(""), resolution_(0), r_free_(0), r_work_(0) { }
938 
942  void AddCitation(MMCifInfoCitation citation) // unit test
943  {
944  citations_.push_back(citation);
945  }
946 
951  void AddAuthorsToCitation(StringRef id, std::vector<String> list); //unit test
952 
956  const std::vector<MMCifInfoCitation>& GetCitations() const
957  {
958  return citations_;
959  }
960 
964  void SetMethod(String method) { exptl_method_ = method; }
965 
969  const StringRef GetMethod() const
970  {
971  return StringRef(exptl_method_.c_str(), exptl_method_.length());
972  }
973 
977  void SetResolution(Real res) { resolution_ = res; }
978 
982  Real GetResolution() const { return resolution_; }
983 
987  void SetRFree(Real r_free) { r_free_ = r_free; }
988 
992  Real GetRFree() const { return r_free_; }
993 
997  void SetRWork(Real r_work) { r_work_ = r_work; }
998 
1002  Real GetRWork() const { return r_work_; }
1003 
1008  void AddMMCifPDBChainTr(String cif, String pdb);
1009 
1014  String GetMMCifPDBChainTr(String cif) const;
1015 
1020  void AddPDBMMCifChainTr(String pdb, String cif);
1021 
1026  String GetPDBMMCifChainTr(String pdb) const;
1027 
1032  void AddMMCifEntityIdTr(String cif, String ent_id);
1033 
1038  String GetMMCifEntityIdTr(String cif) const;
1039 
1043  void AddBioUnit(MMCifInfoBioUnit bu);
1044 
1048  const std::vector<MMCifInfoBioUnit>& GetBioUnits() const
1049  {
1050  return biounits_;
1051  }
1052 
1056  void AddOperation(MMCifInfoTransOpPtr op) // unit test
1057  {
1058  transops_.push_back(op);
1059  }
1060 
1064  const std::vector<MMCifInfoTransOpPtr>& GetOperations() const
1065  {
1066  return transops_;
1067  }
1068 
1073  {
1074  struct_details_ = details;
1075  }
1076 
1081  {
1082  return struct_details_;
1083  }
1084 
1089  {
1090  obsolete_ = obsolete;
1091  }
1092 
1097  {
1098  return obsolete_;
1099  }
1100  const MMCifInfoStructRefs& GetStructRefs() const { return struct_refs_; }
1101  void SetStructRefs(const MMCifInfoStructRefs& sr) { struct_refs_=sr; }
1102 
1107  {
1108  // only set once
1109  if (revisions_.GetDateOriginal() == "?") {
1110  revisions_.SetDateOriginal(date);
1111  }
1112  }
1113 
1116  void AddRevision(int num, String date, String status, int major = -1,
1117  int minor = -1)
1118  {
1119  revisions_.AddRevision(num, date, status, major, minor);
1120  }
1121 
1126  {
1127  return revisions_;
1128  }
1129 //protected:
1130 
1131 private:
1132  // members
1133  String exptl_method_;
1134  Real resolution_;
1135  Real r_free_;
1136  Real r_work_;
1137  MMCifInfoStructDetails struct_details_;
1138  MMCifInfoObsolete obsolete_;
1139  MMCifInfoRevisions revisions_;
1140  std::vector<MMCifInfoCitation> citations_;
1141  std::vector<MMCifInfoBioUnit> biounits_;
1142  std::vector<MMCifInfoTransOpPtr> transops_;
1143  MMCifInfoStructRefs struct_refs_;
1144  std::map<String, String> cif_2_pdb_chain_id_;
1145  std::map<String, String> pdb_2_cif_chain_id_;
1146  std::map<String, String> cif_2_entity_id_;
1147 };
1148 
1149 
1150 }} // ns
1151 
1152 #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:956
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:1096
const StringRef GetMethod() const
Get an experimental method.
Definition: mmcif_info.hh:969
bool operator!=(const MMCifInfoStructDetails &sd) const
Definition: mmcif_info.hh:140
void AddRevision(int num, String date, String status, int major=-1, int minor=-1)
Add a revision to history.
Definition: mmcif_info.hh:1116
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:1088
boost::shared_ptr< MMCifInfoStructRefSeqDif > MMCifInfoStructRefSeqDifPtr
Definition: mmcif_info.hh:839
const String & GetDBAccess() const
Definition: mmcif_info.hh:856
String GetISBN() const
Get an ISBN code.
Definition: mmcif_info.hh:430
std::vector< MMCifInfoStructRefSeqDifPtr > MMCifInfoStructRefSeqDifs
Definition: mmcif_info.hh:843
const MMCifInfoStructRefs & GetStructRefs() const
Definition: mmcif_info.hh:1100
MMCifInfo()
Create an info object.
Definition: mmcif_info.hh:937
container class for additional information from MMCif files
Definition: mmcif_info.hh:934
String GetDetails() const
Get details.
Definition: mmcif_info.hh:275
std::vector< MMCifInfoStructRefSeqPtr > MMCifInfoStructRefSeqs
Definition: mmcif_info.hh:842
const MMCifInfoStructDetails GetStructDetails() const
Get the list of details about structures.
Definition: mmcif_info.hh:1080
int GetMajor(size_t i) const
Definition: mmcif_info.hh:801
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:964
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:846
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:982
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:942
bool operator!=(const MMCifInfoBioUnit &bu) const
Definition: mmcif_info.hh:377
boost::shared_ptr< MMCifInfoStructRef > MMCifInfoStructRefPtr
Definition: mmcif_info.hh:834
const String & GetDBName() const
Definition: mmcif_info.hh:853
int GetMinor(size_t i) const
Definition: mmcif_info.hh:802
String GetBookPublisherCity() const
Get the publisher city of a book.
Definition: mmcif_info.hh:492
const String & GetDetails() const
Definition: mmcif_info.hh:914
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:897
boost::shared_ptr< MMCifInfoTransOp > MMCifInfoTransOpPtr
Definition: mmcif_info.hh:246
Container class for information on file revisions See Python doc.
Definition: mmcif_info.hh:764
void SetRWork(Real r_work)
Set R-work value.
Definition: mmcif_info.hh:997
String GetTitle() const
Get the title of a publication.
Definition: mmcif_info.hh:536
String GetLastDate() const
Definition: mmcif_info.hh:805
const String & GetDBID() const
Definition: mmcif_info.hh:854
std::vector< MMCifInfoStructRefPtr > MMCifInfoStructRefs
Definition: mmcif_info.hh:841
void SetTitle(String title)
Set a title for the data block.
Definition: mmcif_info.hh:105
void SetRevisionsDateOriginal(String date)
Set date_original of revisions.
Definition: mmcif_info.hh:1106
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:977
void SetReplacedPDBID(String id)
Set id of replaced entry.
Definition: mmcif_info.hh:741
const String & GetID() const
Definition: mmcif_info.hh:852
String GetCAS() const
Get a CAS identifier.
Definition: mmcif_info.hh:420
void AddOperation(MMCifInfoTransOpPtr op)
Add a operation.
Definition: mmcif_info.hh:1056
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:913
const std::vector< MMCifInfoTransOpPtr > & GetOperations() const
Get the list of operations stored in an info object.
Definition: mmcif_info.hh:1064
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
Definition: mmcif_info.hh:817
bool operator==(const MMCifInfoCitation &cit) const
Definition: mmcif_info.hh:596
void SetDateOriginal(String date)
Definition: mmcif_info.hh:770
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:1002
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:910
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:1072
void AddRevision(int num, String date, String status, int major=-1, int minor=-1)
Definition: mmcif_info.hh:774
void SetID(String id)
Set id.
Definition: mmcif_info.hh:262
String GetDate(size_t i) const
Definition: mmcif_info.hh:798
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:1101
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:987
boost::shared_ptr< MMCifInfoStructRefSeq > MMCifInfoStructRefSeqPtr
Definition: mmcif_info.hh:838
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:855
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:889
const String & GetChainName() const
Definition: mmcif_info.hh:890
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:882
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
Definition: mmcif_info.hh:771
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:992
String GetStatus(size_t i) const
Definition: mmcif_info.hh:800
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:861
const std::vector< MMCifInfoBioUnit > & GetBioUnits() const
Get the list of biounits stored in an info object.
Definition: mmcif_info.hh:1048
String GetDescriptor() const
Get CASP flag.
Definition: mmcif_info.hh:64
int GetNum(size_t i) const
Definition: mmcif_info.hh:799
MMCifInfoRevisions GetRevisions() const
Get history.
Definition: mmcif_info.hh:1125
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