summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ml_exp/compound.py3
-rw-r--r--ml_exp/read_qm7_data.py34
2 files changed, 3 insertions, 34 deletions
diff --git a/ml_exp/compound.py b/ml_exp/compound.py
index cfa3e0322..9536767a7 100644
--- a/ml_exp/compound.py
+++ b/ml_exp/compound.py
@@ -41,6 +41,9 @@ class Compound:
if xyz is not None:
self.read_xyz(xyz)
+ def gen_cm(self):
+ pass
+
def read_xyz(self, filename):
"""
Reads an xyz file and adds the corresponding data to the Compound.
diff --git a/ml_exp/read_qm7_data.py b/ml_exp/read_qm7_data.py
index 63c48195c..666f9c3fc 100644
--- a/ml_exp/read_qm7_data.py
+++ b/ml_exp/read_qm7_data.py
@@ -21,10 +21,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
"""
import os
-import time
import numpy as np
import random
-from ml_exp.misc import printc
# 'periodic_table_of_elements.txt' retrieved from
@@ -139,35 +137,3 @@ def read_db_data(zi_data,
if return_atoms:
return molecules, nuclear_charge, energy_pbe0, energy_delta, atoms
return molecules, nuclear_charge, energy_pbe0, energy_delta
-
-
-def read_qm7_data(data_path='data',
- r_seed=111,
- return_atoms=False):
- """
- Reads all the qm7 data.
- data_path: path to the data directory.
- r_seed: random seed to use for the shuffling.
- return_atoms: if atom list should be returned.
- """
- tic = time.perf_counter()
- printc('Data reading started.', 'CYAN')
-
- init_path = os.getcwd()
- os.chdir(data_path)
- data_path = os.getcwd()
-
- zi_data = read_nc_data(data_path)
- if return_atoms:
- molecules, nuclear_charge, energy_pbe0, energy_delta, atoms = \
- read_db_data(zi_data, data_path, r_seed, return_atoms)
- else:
- molecules, nuclear_charge, energy_pbe0, energy_delta = \
- read_db_data(zi_data, data_path, r_seed)
-
- os.chdir(init_path)
- toc = time.perf_counter()
- printc('\tData reading took {:.4f} seconds.'.format(toc-tic), 'GREEN')
- if return_atoms:
- return molecules, nuclear_charge, energy_pbe0, energy_delta, atoms
- return molecules, nuclear_charge, energy_pbe0, energy_delta