From c2b15a51e80a051fe9dbc2e558937f54bf4a459c Mon Sep 17 00:00:00 2001 From: David Luevano <55825613+luevano@users.noreply.github.com> Date: Thu, 12 Dec 2019 19:38:23 -0700 Subject: Reformat data reading --- main.py | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) (limited to 'main.py') diff --git a/main.py b/main.py index 88734d57f..f37054b3b 100644 --- a/main.py +++ b/main.py @@ -20,34 +20,20 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. """ -import os import time from misc import printc # import matplotlib.pyplot as plt -from read_nc_data import read_nc_data -from read_db_edata import read_db_edata from c_matrix import c_matrix_multiple from lj_matrix import lj_matrix_multiple from do_ml import do_ml +from read_qm7_data import read_qm7_data # Initialization time. init_time = time.perf_counter() # Data reading. -tic = time.perf_counter() -printc('Data reading started.', 'CYAN') - -init_path = os.getcwd() -os.chdir('data') -data_path = os.getcwd() - -zi_data = read_nc_data(data_path) -molecules, nuclear_charge, energy_pbe0, energy_delta = \ - read_db_edata(zi_data, data_path) - -os.chdir(init_path) -toc = time.perf_counter() -printc('\tData reading took {:.4f} seconds.'.format(toc-tic), 'GREEN') +zi_data, molecules, nuclear_charge, energy_pbe0, energy_delta =\ + read_qm7_data() # Matrices calculation. cm_data = c_matrix_multiple(molecules, nuclear_charge, as_eig=True) -- cgit v1.2.3-70-g09d2