From 3a8dc3e9dc64b71a5732fac45df39a7fe41b58cd Mon Sep 17 00:00:00 2001
From: Marco Biasini <marco.biasini@unibas.ch>
Date: Wed, 10 Aug 2011 18:57:54 +0200
Subject: [PATCH] use _entity.pdbx_description not _entity.detail

---
 modules/io/src/mol/mmcif_reader.cc               | 6 +++---
 modules/io/src/mol/mmcif_reader.hh               | 2 +-
 modules/io/tests/testfiles/mmcif/atom_site.mmcif | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/modules/io/src/mol/mmcif_reader.cc b/modules/io/src/mol/mmcif_reader.cc
index 98c357225..bb5241e7e 100644
--- a/modules/io/src/mol/mmcif_reader.cc
+++ b/modules/io/src/mol/mmcif_reader.cc
@@ -158,7 +158,7 @@ bool MMCifParser::OnBeginLoop(const StarLoopDesc& header)
     this->TryStoreIdx(E_ID, "id", header);
     // optional
     indices_[E_TYPE]  = header.GetIndex("type");
-    indices_[DETAILS] = header.GetIndex("details");
+    indices_[PDBX_DESCRIPTION] = header.GetIndex("pdbx_description");
     cat_available = true;
   } else if (header.GetCategory() == "entity_poly") {
     category_ = ENTITY_POLY;
@@ -473,8 +473,8 @@ void MMCifParser::ParseEntity(const std::vector<StringRef>& columns)
   }
 
   // description
-  if (indices_[DETAILS] != -1) {
-    desc.details = columns[indices_[DETAILS]].str();
+  if (indices_[PDBX_DESCRIPTION] != -1) {
+    desc.details = columns[indices_[PDBX_DESCRIPTION]].str();
   } else {
     desc.details = "";
   }
diff --git a/modules/io/src/mol/mmcif_reader.hh b/modules/io/src/mol/mmcif_reader.hh
index 5fe61d5c8..2d1990b80 100644
--- a/modules/io/src/mol/mmcif_reader.hh
+++ b/modules/io/src/mol/mmcif_reader.hh
@@ -233,7 +233,7 @@ private:
   typedef enum {
     E_ID,              ///< unique identifier
     E_TYPE,            ///< polymer, non-polymer or water
-    DETAILS            ///< special aspects of the entity
+    PDBX_DESCRIPTION   ///< special aspects of the entity
   } EntityItems;
 
   /// \enum items of the entity_poly category
diff --git a/modules/io/tests/testfiles/mmcif/atom_site.mmcif b/modules/io/tests/testfiles/mmcif/atom_site.mmcif
index 2dd1c2c52..2a01dc733 100644
--- a/modules/io/tests/testfiles/mmcif/atom_site.mmcif
+++ b/modules/io/tests/testfiles/mmcif/atom_site.mmcif
@@ -9,7 +9,7 @@ data_1BAR
 loop_
 _entity.id
 _entity.type
-_entity.details
+_entity.pdbx_description
 1 polymer 
 ;              Very important information.
 ;
-- 
GitLab