diff options
author | David Luevano <55825613+luevano@users.noreply.github.com> | 2019-12-28 11:37:22 -0700 |
---|---|---|
committer | David Luevano <55825613+luevano@users.noreply.github.com> | 2019-12-28 11:37:22 -0700 |
commit | 4704314c9b4d1066383da5c3d6ca87bba9067c8d (patch) | |
tree | 47efddb979957029945a473fde6ed2cde2c2b196 /lj_matrix/read_qm7_data.py | |
parent | e4f9e15588ec796f73c000a683cc9152454a913c (diff) |
Refactor code
Diffstat (limited to 'lj_matrix/read_qm7_data.py')
-rw-r--r-- | lj_matrix/read_qm7_data.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lj_matrix/read_qm7_data.py b/lj_matrix/read_qm7_data.py index 9bb7629ca..4401ca1c0 100644 --- a/lj_matrix/read_qm7_data.py +++ b/lj_matrix/read_qm7_data.py @@ -59,7 +59,7 @@ def read_db_data(zi_data, its contents as usable variables. zi_data: dictionary containing nuclear charge data. data_path: path to the data directory. - r_seed: random seed. + r_seed: random seed to use for the shuffling. """ os.chdir(data_path) @@ -122,9 +122,10 @@ def read_db_data(zi_data, return molecules, nuclear_charge, energy_pbe0, energy_delta -def read_qm7_data(): +def read_qm7_data(r_seed=111): """ Reads all the qm7 data. + r_seed: random seed to use for the shuffling. """ tic = time.perf_counter() printc('Data reading started.', 'CYAN') @@ -135,7 +136,7 @@ def read_qm7_data(): zi_data = read_nc_data(data_path) molecules, nuclear_charge, energy_pbe0, energy_delta = \ - read_db_data(zi_data, data_path) + read_db_data(zi_data, data_path, r_seed) os.chdir(init_path) toc = time.perf_counter() |