diff --git a/modules/io/src/mol/omf.cc b/modules/io/src/mol/omf.cc
index 2de1e477f116633ece80e044e1b715f768955e50..bad82b3dfde6e4dd34763f48a6f03ade376ece83 100644
--- a/modules/io/src/mol/omf.cc
+++ b/modules/io/src/mol/omf.cc
@@ -3295,7 +3295,10 @@ void OMF::ToStream(std::ostream& stream) const {
 
   uint32_t magic_number = 42;
   stream.write(reinterpret_cast<char*>(&magic_number), sizeof(uint32_t));
-  uint32_t version = 2;
+  // We set it to the current version...
+  // If you loaded a structure from a previous version and you dump it again,
+  // the version will be updated.
+  uint32_t version = OMF_VERSION;
   stream.write(reinterpret_cast<char*>(&version), sizeof(uint32_t));
   stream.write(reinterpret_cast<const char*>(&options_), sizeof(uint8_t));
 
@@ -3335,7 +3338,9 @@ void OMF::FromStream(std::istream& stream) {
     throw ost::Error(ss.str());
   }
 
-  if(version > 1) {
+  version_ = version;
+
+  if(version_ > 1) {
     stream.read(reinterpret_cast<char*>(&options_), sizeof(uint8_t));
   }
 
diff --git a/modules/io/src/mol/omf.hh b/modules/io/src/mol/omf.hh
index a1756bf6112a82cbf33e0101450a6e96cc4253f7..dc9dfc131897326b7a3c464ac439d214c305fa99 100644
--- a/modules/io/src/mol/omf.hh
+++ b/modules/io/src/mol/omf.hh
@@ -30,6 +30,8 @@
 
 namespace ost { namespace io {
 
+const int OMF_VERSION = 2;
+
 class ChainData;
 class BioUnitData;
 class OMF;
@@ -181,6 +183,10 @@ public:
 
   ost::mol::EntityHandle GetBU(int bu_idx) const;
 
+  int GetVersion() const { return version_; }
+
+  static int GetCurrentOMFVersion() { return OMF_VERSION; }
+
 private:
   // only construct with static functions
   OMF(): options_(0) { }
@@ -208,6 +214,8 @@ private:
 
   // bitfield with options
   uint8_t options_;
+
+  int version_;
 };
 
 }} //ns