19 #ifndef OST_MMCIF_INFO_HH
20 #define OST_MMCIF_INFO_HH
24 #include <boost/shared_ptr.hpp>
30 namespace ost {
namespace io {
36 descriptor_(
""), mass_(0.0), mass_method_(
""), model_details_(
""),
37 model_type_details_(
"") {};
112 if (this->entry_id_ != sd.entry_id_) {
115 if (this->casp_flag_ != sd.casp_flag_) {
118 if (this->descriptor_ != sd.descriptor_) {
121 if (this->mass_ != sd.mass_) {
124 if (this->mass_method_ != sd.mass_method_) {
127 if (this->model_details_ != sd.model_details_) {
130 if (this->model_type_details_ != sd.model_type_details_) {
133 if (this->title_ != sd.title_) {
152 String model_type_details_;
186 translation_.SetX(x);
187 translation_.SetY(y);
188 translation_.SetZ(z);
202 rotation_ =
geom::Mat3(i00,i01,i02, i10,i11,i12, i20,i21,i22);
210 if (this->id_ != op.id_) {
213 if (this->type_ != op.type_) {
216 if (this->translation_ != op.translation_) {
219 if (this->rotation_ != op.rotation_) {
274 void AddOperations(std::vector<MMCifInfoTransOpPtr> operations)
276 operations_.push_back(operations);
281 const std::vector<std::vector<MMCifInfoTransOpPtr> >& GetOperations()
287 if (this->id_ != bu.id_) {
290 if (this->details_ != bu.details_) {
293 if (this->chains_ != bu.chains_) {
296 if (this->operations_.size() == bu.operations_.size()) {
297 std::vector<std::vector<MMCifInfoTransOpPtr> >::const_iterator th_ops_it;
298 std::vector<std::vector<MMCifInfoTransOpPtr> >::const_iterator bu_ops_it;
299 std::vector<MMCifInfoTransOpPtr>::const_iterator th_op_it;
300 std::vector<MMCifInfoTransOpPtr>::const_iterator bu_op_it;
302 for (th_ops_it = this->operations_.begin(),
303 bu_ops_it = bu.operations_.begin();
304 th_ops_it != this->operations_.end();
305 ++th_ops_it, ++bu_ops_it) {
306 if (th_ops_it->size() == bu_ops_it->size()) {
307 for (th_op_it = th_ops_it->begin(), bu_op_it = bu_ops_it->begin();
308 th_op_it != th_ops_it->end();
309 ++th_op_it, ++bu_op_it) {
310 if (*th_op_it != *bu_op_it) {
332 std::vector<String> chains_;
333 std::vector<std::vector<MMCifInfoTransOpPtr> > operations_;
340 volume_(
""), page_first_(
""), page_last_(
""), doi_(
""), pubmed_(0),
341 year_(0), title_(
"") {};
465 if (this->year_ != cit.year_) {
468 if (this->pubmed_ != cit.pubmed_) {
471 if (this->where_ != cit.where_) {
474 if (
StringRef(this->id_.c_str(), this->id_.length()) !=
475 StringRef(cit.id_.c_str(), cit.id_.length())) {
478 if (
StringRef(this->cas_.c_str(), this->cas_.length()) !=
479 StringRef(cit.cas_.c_str(), cit.cas_.length())) {
482 if (
StringRef(this->isbn_.c_str(), this->isbn_.length()) !=
483 StringRef(cit.isbn_.c_str(), cit.isbn_.length())) {
486 if (
StringRef(this->published_in_.c_str(), this->published_in_.length()) !=
487 StringRef(cit.published_in_.c_str(), cit.published_in_.length())) {
490 if (
StringRef(this->volume_.c_str(), this->volume_.length()) !=
491 StringRef(cit.volume_.c_str(), cit.volume_.length())) {
494 if (
StringRef(this->page_first_.c_str(), this->page_first_.length()) !=
495 StringRef(cit.page_first_.c_str(), cit.page_first_.length())) {
498 if (
StringRef(this->page_last_.c_str(), this->page_last_.length()) !=
499 StringRef(cit.page_last_.c_str(), cit.page_last_.length())) {
502 if (
StringRef(this->doi_.c_str(), this->doi_.length()) !=
503 StringRef(cit.doi_.c_str(), cit.doi_.length())) {
506 if (
StringRef(this->title_.c_str(), this->title_.length()) !=
507 StringRef(cit.title_.c_str(), cit.title_.length())) {
510 if (this->authors_ != cit.authors_) {
530 MMCifInfoCType where_;
541 std::vector<String> authors_;
550 replaced_pdb_id_(
"") {};
570 else if (type ==
StringRef(
"SPRSDE", 6)) {
618 MMCifObsoleteType id_;
623 class MMCifInfoStructRef;
624 class MMCifInfoStructRefSeq;
640 id_(id), ent_id_(ent_id), db_name_(db_name), db_ident_(db_ident),
641 db_access_(db_access)
649 const String& chain_name,
int seq_begin,
650 int seq_end,
int db_begin,
int db_end);
655 seqs.reserve(seqs_.size());
656 for (std::map<String, MMCifInfoStructRefSeqPtr>::const_iterator
657 i=seqs_.begin(), e=seqs_.end(); i!=e; ++i) {
658 seqs.push_back(i->second);
668 std::map<String, MMCifInfoStructRefSeqPtr> seqs_;
674 int seq_begin,
int seq_end,
675 int db_begin,
int db_end):
676 id_(align_id), chain_name_(chain_name),
677 seq_begin_(seq_begin), seq_end_(seq_end), db_begin_(db_begin), db_end_(db_end)
688 const std::vector<MMCifInfoStructRefSeqDifPtr>&
GetDifs()
const {
return difs_; }
696 std::vector<MMCifInfoStructRefSeqDifPtr> difs_;
702 seq_rnum_(seq_rnum), db_rnum_(db_rnum), details_(details) {}
735 citations_.push_back(citation);
742 void AddAuthorsToCitation(
StringRef id, std::vector<String> list);
747 const std::vector<MMCifInfoCitation>& GetCitations()
const
762 return StringRef(exptl_method_.c_str(), exptl_method_.length());
804 biounits_.push_back(bu);
810 const std::vector<MMCifInfoBioUnit>& GetBioUnits()
const
820 transops_.push_back(op);
826 const std::vector<MMCifInfoTransOpPtr>& GetOperations()
const
836 struct_details_ = details;
844 return struct_details_;
852 obsolete_ = obsolete;
872 std::vector<MMCifInfoCitation> citations_;
873 std::vector<MMCifInfoBioUnit> biounits_;
874 std::vector<MMCifInfoTransOpPtr> transops_;
876 std::map<String, String> cif_2_pdb_chain_id_;
877 std::map<String, String> pdb_2_cif_chain_id_;