From 6c892803e9c0156210fb416d7d54f138d290e7d4 Mon Sep 17 00:00:00 2001 From: Liang Tian Date: Thu, 8 Nov 2018 15:05:42 -0600 Subject: [PATCH] remove early stage test scripts --- scripts/event_filter.py | 26 --------- scripts/local_atom_index_finder.py | 23 -------- scripts/num_local_atoms.py | 19 ------- scripts/num_local_atoms_threshold_sweep.py | 21 -------- scripts/residual_threshold_finder.py | 22 -------- scripts/strain_calc.py | 53 ------------------- scripts/strain_stats_visualizer.py | 17 ------ scripts/strain_visualization.py | 14 ----- .../trigger_atom_is_max_disp_atom_checker.py | 16 ------ scripts/voronoi_class_plot.py | 12 ----- scripts/voronoi_index_calc.py | 41 -------------- scripts/voronoi_index_classify.py | 35 ------------ 12 files changed, 299 deletions(-) delete mode 100755 scripts/event_filter.py delete mode 100755 scripts/local_atom_index_finder.py delete mode 100755 scripts/num_local_atoms.py delete mode 100755 scripts/num_local_atoms_threshold_sweep.py delete mode 100755 scripts/residual_threshold_finder.py delete mode 100755 scripts/strain_calc.py delete mode 100755 scripts/strain_stats_visualizer.py delete mode 100755 scripts/strain_visualization.py delete mode 100755 scripts/trigger_atom_is_max_disp_atom_checker.py delete mode 100755 scripts/voronoi_class_plot.py delete mode 100755 scripts/voronoi_index_calc.py delete mode 100755 scripts/voronoi_index_classify.py diff --git a/scripts/event_filter.py b/scripts/event_filter.py deleted file mode 100755 index ea307af..0000000 --- a/scripts/event_filter.py +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env python -import os -from event_selector import filter_events_all_tests_stage_2 -import multiprocessing as mp - -#input -path_to_data_dir = os.environ['DATA_DIR'] -# make it a user input by either terminal arguments or from input file -#num_of_tests = 2000 -#list_of_test_id = xrange(num_of_tests+1) -list_of_test_id = [x+1 for x in xrange(2000)] - -size = 32.130125 - 0.299875 -box_dim = [size, size, size] -identical_event_criteria = {"D_init_fin": 0.1, "E_init_fin": 0.005, "E_init_sad": 0.01} - -num_of_proc = mp.cpu_count() - -re_calc = True - -# identical_event_criteria -input_param = {"list_of_test_id": list_of_test_id, "box_dim": box_dim, "identical_event_criteria": identical_event_criteria,"num_of_proc": num_of_proc, "re_calc": re_calc} - -filter_events_all_tests_stage_2(path_to_data_dir, input_param) - - diff --git a/scripts/local_atom_index_finder.py b/scripts/local_atom_index_finder.py deleted file mode 100755 index 44ae496..0000000 --- a/scripts/local_atom_index_finder.py +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env python -import os -import multiprocessing as mp -import numpy as np -from correlation_model.correlation_model import all_events_local_atoms_finder - -#input -path_to_data_dir = os.environ['DATA_DIR'] -# make it a user input by either terminal arguments or from input file -#num_of_tests = 2000 -#list_of_test_id = xrange(num_of_tests+1) -list_of_test_id = [1,2] -num_of_proc = mp.cpu_count() -model = "LinearSVR" -feature = "displacement" -target = "shear_strain" -re_calc = True -# results using LinearSVR: at relative threshold:0.54, average number of locally involved atoms: 4.8 -residual_threshold = 0.54 -input_param = {"list_of_test_id":list_of_test_id, "num_of_proc": num_of_proc,"model":model,"feature":feature,"target": target,"re_calc": re_calc} -all_events_local_atoms_finder(path_to_data_dir, input_param, residual_threshold) - - diff --git a/scripts/num_local_atoms.py b/scripts/num_local_atoms.py deleted file mode 100755 index 0864cee..0000000 --- a/scripts/num_local_atoms.py +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/env python -import os -import pickle -import multiprocessing as mp -from correlation_model.correlation_model import events_local_atoms - -#input -path_to_data_dir = os.environ['DATA_DIR'] -# make it a user input by either terminal arguments or from input file -#num_of_tests = 2000 -#list_of_test_id = xrange(num_of_tests+1) -list_of_test_id = [1,2] -num_of_proc = mp.cpu_count() -model = "LinearSVR" -#model = "linear_model" -feature = "displacement" -target = "shear_strain" -input_param = {"list_of_test_id":list_of_test_id, "num_of_proc": num_of_proc,"model":model,"feature":feature,"target": target} -events_local_atoms(path_to_data_dir, input_param) diff --git a/scripts/num_local_atoms_threshold_sweep.py b/scripts/num_local_atoms_threshold_sweep.py deleted file mode 100755 index 8a7f129..0000000 --- a/scripts/num_local_atoms_threshold_sweep.py +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env python -import os -import multiprocessing as mp -import numpy as np -from correlation_model.correlation_model import events_local_atoms_threshold_sweep - -#input -path_to_data_dir = os.environ['DATA_DIR'] -# make it a user input by either terminal arguments or from input file -#num_of_tests = 2000 -#list_of_test_id = xrange(num_of_tests+1) -list_of_test_id = [1,2] -num_of_proc = mp.cpu_count() -model = "linear_model" -#model = "LinearSVR" -feature = "displacement" -target = "shear_strain" -#residual_threshold = np.arange(0.3, 1.0, 0.01) -residual_threshold = np.arange(0.01, 0.3, 0.01) -input_param = {"list_of_test_id":list_of_test_id, "num_of_proc": num_of_proc,"model":model,"feature":feature,"target": target,"residual_threshold":residual_threshold} -events_local_atoms_threshold_sweep(path_to_data_dir, input_param) diff --git a/scripts/residual_threshold_finder.py b/scripts/residual_threshold_finder.py deleted file mode 100755 index 887e0c8..0000000 --- a/scripts/residual_threshold_finder.py +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env python -import os -import multiprocessing as mp -import numpy as np -from correlation_model.correlation_model import residual_threshold_finder - -#input -path_to_data_dir = os.environ['DATA_DIR'] -# make it a user input by either terminal arguments or from input file -#num_of_tests = 2000 -#list_of_test_id = xrange(num_of_tests+1) -list_of_test_id = [1,2] -num_of_proc = mp.cpu_count() -model = "LinearSVR" -#model = "linear_model" -feature = "displacement" -target = "shear_strain" -residual_threshold = np.arange(0.01, 1.0, 0.01) -input_param = {"list_of_test_id":list_of_test_id, "num_of_proc": num_of_proc,"model":model,"feature":feature,"target": target,"residual_threshold":residual_threshold} -residual_threshold_finder(path_to_data_dir, input_param) - -# results using LinearSVR: at relative threshold:0.54, average number of locally involved atoms: 4.8 diff --git a/scripts/strain_calc.py b/scripts/strain_calc.py deleted file mode 100755 index 8b90e25..0000000 --- a/scripts/strain_calc.py +++ /dev/null @@ -1,53 +0,0 @@ -#!/usr/bin/env python -import os -import pickle -import json -import time -import multiprocessing as mp -from calculator.strain_calculator import strain_calculator_run_all_tests_mp - -path_to_data_dir = os.environ['DATA_DIR'] - -# save some backup files that might be useful after running the tests -path_to_test_dir = os.environ['TEST_DIR'] - -if not os.path.exists(path_to_test_dir): - os.makedirs(path_to_test_dir) - -# make this an input file to load from test_dir -# need to make it multiple test cases -# in the future let strain_calc.py load input file called input.json -path_to_input_file = path_to_test_dir + "/input.json" - -cut_off_distance = {(1,1):3.7,(1,2):3.7,(2,2):3.7} -size = 32.130125 - 0.299875 -box_dim = [size, size, size] -# num_of_tests = 2000 -list_of_test_id = [x+1 for x in xrange(2000)] -num_of_proc = mp.cpu_count() -re_calc = True -atom_list = None -#atom_list = {"local":6} -# this will be part of the input file, but not used by strain_calc.py, in -# event_filter.py -identical_event_criteria = {"D_init_fin": 0.1, "E_init_fin":0.005, "E_init_sad":0.01} -input_param = {'cut_off':cut_off_distance,'box_dim':box_dim,'list_of_test_id':list_of_test_id,'num_of_proc':num_of_proc,"re_calc": re_calc, "atom_list":atom_list,"identical_event_criteria":identical_event_criteria} - - -if 'num_of_proc' not in input_param: - input_param["num_of_proc"] = mp.cpu_count() - -start_time = time.time() -strain_calculator_run_all_tests_mp(path_to_data_dir, input_param) -print "total run time:", time.time() - start_time, "seconds" - - - - - - - - - - - diff --git a/scripts/strain_stats_visualizer.py b/scripts/strain_stats_visualizer.py deleted file mode 100755 index 46515be..0000000 --- a/scripts/strain_stats_visualizer.py +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env python -import os -import multiprocessing as mp -from visualizer.strain_visualizer import strain_events_stats_visualization - -#input -path_to_data_dir = os.environ['DATA_DIR'] -# make it a user input by either terminal arguments or from input file -#num_of_tests = 2000 -#list_of_test_id = xrange(num_of_tests+1) -list_of_test_id = [1,2] -num_of_proc = mp.cpu_count() -input_param = {"list_of_test_id":list_of_test_id,"num_of_proc": num_of_proc} - -# this visualization can also be done by running strain_calc.py with re_calc=False,list_of_test_id = [1,2] -# it takes the events_stats.pkl in each test of list_of_test_id and make the plot -strain_events_stats_visualization(path_to_data_dir, input_param) diff --git a/scripts/strain_visualization.py b/scripts/strain_visualization.py deleted file mode 100755 index cca8d8a..0000000 --- a/scripts/strain_visualization.py +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env python -import os -import multiprocessing as mp -from visualizer.strain_visualizer import events_strain_visualization - -#input -path_to_data_dir = os.environ['DATA_DIR'] -# make it a user input by either terminal arguments or from input file -#num_of_tests = 2000 -#list_of_test_id = xrange(num_of_tests+1) -list_of_test_id = [1,2] -num_of_proc = mp.cpu_count() -input_param = {"list_of_test_id":list_of_test_id, "num_of_proc": num_of_proc} -events_strain_visualization(path_to_data_dir, input_param) diff --git a/scripts/trigger_atom_is_max_disp_atom_checker.py b/scripts/trigger_atom_is_max_disp_atom_checker.py deleted file mode 100755 index f0b96db..0000000 --- a/scripts/trigger_atom_is_max_disp_atom_checker.py +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env python -import os -import multiprocessing as mp -import numpy as np -from util import run_tests_triggered_atom_is_max_disp - -path_to_data_dir = os.environ['DATA_DIR'] - - -#list_of_test_id = xrange(num_of_tests+1) -list_of_test_id = [1,2] -num_of_proc = mp.cpu_count() - -input_param = {"list_of_test_id":list_of_test_id, "num_of_proc": num_of_proc} - -run_tests_triggered_atom_is_max_disp(path_to_data_dir, input_param) diff --git a/scripts/voronoi_class_plot.py b/scripts/voronoi_class_plot.py deleted file mode 100755 index 6c9848c..0000000 --- a/scripts/voronoi_class_plot.py +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env python -import os -from visualizer.voronoi_visualizer import voronoi_scatter_3d,voronoi_contour_2d - -path_to_data_dir = os.environ['DATA_DIR'] - -path_to_curr_event = path_to_data_dir + "test1/results/event_min1000_sad1001_min1001" - -path_to_config = path_to_data_dir + "test1/" + "min1000.dump" - -voronoi_scatter_3d(path_to_curr_event, path_to_config) -voronoi_contour_2d(path_to_curr_event, path_to_config) diff --git a/scripts/voronoi_index_calc.py b/scripts/voronoi_index_calc.py deleted file mode 100755 index 8fd9f88..0000000 --- a/scripts/voronoi_index_calc.py +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/env python -import os -import pickle -import json -import time -import multiprocessing as mp -from calculator.voronoi_structural_analysis import run_all_tests_voronoi_calculator - -path_to_data_dir = os.environ['DATA_DIR'] - -cut_off = 3.7 -l_range = [0.299875, 32.130125] -box_range = [l_range, l_range, l_range] -# num_of_tests = 2000 -# list_of_test_id = [x+1 for x in xrange(2000)] -list_of_test_id = [1,2] -num_of_proc = mp.cpu_count() -re_calc = True -atom_list = None -periodic = [True, True, True] -#atom_list = {"local":6} -input_param = {'cut_off':cut_off,'box_range':box_range,'list_of_test_id':list_of_test_id,'num_of_proc':num_of_proc,"re_calc": re_calc, "atom_list":atom_list, "periodic": periodic} - - -if 'num_of_proc' not in input_param: - input_param["num_of_proc"] = mp.cpu_count() - -start_time = time.time() -run_all_tests_voronoi_calculator(path_to_data_dir,input_param) -print "total run time:", time.time() - start_time, "seconds" - - - - - - - - - - - diff --git a/scripts/voronoi_index_classify.py b/scripts/voronoi_index_classify.py deleted file mode 100755 index 1ad0965..0000000 --- a/scripts/voronoi_index_classify.py +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/env python -import os -import pickle -import json -import time -import multiprocessing as mp -from calculator.voronoi_structural_analysis import run_all_tests_voronoi_classifier - -path_to_data_dir = os.environ['DATA_DIR'] - -# num_of_tests = 2000 -# list_of_test_id = [x+1 for x in xrange(2000)] -list_of_test_id = [1,2] -num_of_proc = mp.cpu_count() - -input_param = {"list_of_test_id": list_of_test_id, 'num_of_proc': num_of_proc} - - -if 'num_of_proc' not in input_param: - input_param["num_of_proc"] = mp.cpu_count() - -start_time = time.time() -run_all_tests_voronoi_classifier(path_to_data_dir,input_param) -print "total run time:", time.time() - start_time, "seconds" - - - - - - - - - - -