From a0e73407bfef3569a994c07d5bb9c8df97518e30 Mon Sep 17 00:00:00 2001
From: David Luevano Alvarado <55825613+luevano@users.noreply.github.com>
Date: Wed, 26 Feb 2020 05:32:35 -0700
Subject: Add feature

---
 ml_exp/compound.py | 2 ++
 ml_exp/qm7db.py    | 6 +++---
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/ml_exp/compound.py b/ml_exp/compound.py
index 0a8b89610..9c7102860 100644
--- a/ml_exp/compound.py
+++ b/ml_exp/compound.py
@@ -36,6 +36,7 @@ class Compound:
         self.name = None
 
         self.n = None
+        self.extra = None  # In case a comment is in the compound file.
         self.atoms = None
         self.atoms_nc = None
         self.coordinates = None
@@ -139,6 +140,7 @@ class Compound:
 
         self.name = filename.split('/')[-1]
         self.n = int(lines[0])
+        self.extra = lines[1]
         self.atoms = []
         self.atoms_nc = np.empty(self.n, dtype=int)
         self.coordinates = np.empty((self.n, 3), dtype=float)
diff --git a/ml_exp/qm7db.py b/ml_exp/qm7db.py
index f9950c317..8d2453f45 100644
--- a/ml_exp/qm7db.py
+++ b/ml_exp/qm7db.py
@@ -49,9 +49,9 @@ def qm7db(nc,
         compounds[i].pbe0 = float(line[1])
         compounds[i].delta = float(line[1]) - float(line[2])
 
-    # Shuffle the compounds list
-    random.seed(r_seed)
-    random.shuffle(compounds)
+    if is_shuffled:
+        random.seed(r_seed)
+        random.shuffle(compounds)
 
     e_pbe0 = np.array([compound.pbe0 for compound in compounds], dtype=float)
     e_delta = np.array([compound.delta for compound in compounds], dtype=float)
-- 
cgit v1.2.3-70-g09d2