pwact 0.1.25__py3-none-any.whl → 0.1.26__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pwact/active_learning/explore/run_model_md.py +17 -0
- pwact/utils/file_operation.py +6 -1
- pwact/utils/tmp.py +3 -3
- {pwact-0.1.25.dist-info → pwact-0.1.26.dist-info}/METADATA +1 -1
- {pwact-0.1.25.dist-info → pwact-0.1.26.dist-info}/RECORD +9 -9
- {pwact-0.1.25.dist-info → pwact-0.1.26.dist-info}/LICENSE +0 -0
- {pwact-0.1.25.dist-info → pwact-0.1.26.dist-info}/WHEEL +0 -0
- {pwact-0.1.25.dist-info → pwact-0.1.26.dist-info}/entry_points.txt +0 -0
- {pwact-0.1.25.dist-info → pwact-0.1.26.dist-info}/top_level.txt +0 -0
|
@@ -26,6 +26,7 @@ from pwact.utils.constant import AL_STRUCTURE, TEMP_STRUCTURE, EXPLORE_FILE_STRU
|
|
|
26
26
|
from pwact.utils.format_input_output import get_iter_from_iter_name, get_sub_md_sys_template_name,\
|
|
27
27
|
make_md_sys_name, get_md_sys_template_name, make_temp_press_name, make_temp_name, make_train_name
|
|
28
28
|
from pwact.utils.file_operation import write_to_file, add_postfix_dir, link_file, read_data, search_files, copy_dir, copy_file, del_file, del_dir, del_file_list, del_file_list_by_patten, mv_file
|
|
29
|
+
from pwact.utils.draw.hist_model_devi import draw_hist_list
|
|
29
30
|
from pwact.utils.app_lib.lammps import make_lammps_input
|
|
30
31
|
from pwact.data_format.configop import save_config, get_atom_type
|
|
31
32
|
|
|
@@ -288,7 +289,16 @@ class Explore(object):
|
|
|
288
289
|
'''
|
|
289
290
|
def post_process_md(self):
|
|
290
291
|
md_sys_dir_list = search_files(self.md_dir, get_md_sys_template_name())
|
|
292
|
+
# draw model deviation
|
|
291
293
|
is_kpu = self.input_param.strategy.uncertainty.upper() == UNCERTAINTY.kpu.upper()
|
|
294
|
+
if is_kpu is False:
|
|
295
|
+
for md_sys_dir in md_sys_dir_list:
|
|
296
|
+
draw_hist_list(file_path=[md_sys_dir],
|
|
297
|
+
legend_label=["{}-{}".format(self.itername, os.path.basename(md_sys_dir))],
|
|
298
|
+
save_path = os.path.join(md_sys_dir, "model_devi_distribution.png"),
|
|
299
|
+
low=self.input_param.strategy.lower_model_deiv_f,
|
|
300
|
+
high=self.input_param.strategy.upper_model_deiv_f)
|
|
301
|
+
|
|
292
302
|
for md_sys_dir in md_sys_dir_list:
|
|
293
303
|
sub_md_sys_dir_list =search_files(md_sys_dir, get_md_sys_template_name())
|
|
294
304
|
for sub_md_sys in sub_md_sys_dir_list:
|
|
@@ -313,6 +323,13 @@ class Explore(object):
|
|
|
313
323
|
copy_file(file, os.path.join(self.real_md_dir, os.path.basename(file)))
|
|
314
324
|
for file in md_slurm_scripts:
|
|
315
325
|
copy_file(file, os.path.join(self.real_md_dir, os.path.basename(file)))
|
|
326
|
+
if os.path.exists(os.path.join(md_sys_dir, "model_devi_distribution.png")):
|
|
327
|
+
copy_file(os.path.join(md_sys_dir, "model_devi_distribution.png"),
|
|
328
|
+
os.path.join(self.real_md_dir, os.path.basename(md_sys_dir), "model_devi_distribution.png"))
|
|
329
|
+
link_file(
|
|
330
|
+
os.path.join(self.real_md_dir, os.path.basename(md_sys_dir), "model_devi_distribution.png"),
|
|
331
|
+
os.path.join(self.select_dir, "model_devi_distribution-{}.png".format(os.path.basename(md_sys_dir)))
|
|
332
|
+
)
|
|
316
333
|
copy_dir(self.select_dir, self.real_select_dir)
|
|
317
334
|
|
|
318
335
|
'''
|
pwact/utils/file_operation.py
CHANGED
|
@@ -65,7 +65,12 @@ def file_read_lines(file_path, data_type="float"):
|
|
|
65
65
|
|
|
66
66
|
'''
|
|
67
67
|
description:
|
|
68
|
-
load txt data
|
|
68
|
+
load txt data: the content as :
|
|
69
|
+
# step avg_devi_f min_devi_f max_devi_f avg_devi_e min_devi_e max_devi_e
|
|
70
|
+
0 0.016176053 0.000004773 0.023921006 0.494110683 0.007786004 0.680908664
|
|
71
|
+
10 0.020843630 0.000576891 0.033193308 0.481147298 0.001424875 0.696843965
|
|
72
|
+
20 0.020738273 0.001127881 0.031809715 0.478043120 0.001433802 0.703810561
|
|
73
|
+
...
|
|
69
74
|
param {str} file_path
|
|
70
75
|
param {*} skiprows
|
|
71
76
|
return {*}
|
pwact/utils/tmp.py
CHANGED
|
@@ -2,8 +2,8 @@ from pwdata import Config
|
|
|
2
2
|
import os, sys, glob
|
|
3
3
|
import numpy as np
|
|
4
4
|
|
|
5
|
-
def count_pwdata():
|
|
6
|
-
|
|
5
|
+
def count_pwdata(work_dir):
|
|
6
|
+
|
|
7
7
|
dir_list = glob.glob(os.path.join(work_dir, "*"))
|
|
8
8
|
res = []
|
|
9
9
|
for dir in dir_list:
|
|
@@ -58,6 +58,6 @@ def save_mlmd():
|
|
|
58
58
|
|
|
59
59
|
|
|
60
60
|
if __name__=="__main__":
|
|
61
|
-
count_pwdata()
|
|
61
|
+
count_pwdata(work_dir = "/data/home/wuxingxing/datas/debugs/dengjiapei/run_iter/mlmd_pwdata")
|
|
62
62
|
# count_outmlmd()
|
|
63
63
|
# save_mlmd()
|
|
@@ -3,7 +3,7 @@ pwact/main.py,sha256=EKFcwo_gk9BWhg3zU36RW7NXMLDfyhzrtjtvcv4h5dQ,17036
|
|
|
3
3
|
pwact/active_learning/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
4
|
pwact/active_learning/environment.py,sha256=KvyMaOXrM-HMMma4SnoOQFO6fZxDsk0Fsyyy7xqfGCo,684
|
|
5
5
|
pwact/active_learning/explore/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
|
-
pwact/active_learning/explore/run_model_md.py,sha256=
|
|
6
|
+
pwact/active_learning/explore/run_model_md.py,sha256=opflniIxbT8SSPNwkGXcd8j_GVpWvDexhFhxYXXO8Yk,21053
|
|
7
7
|
pwact/active_learning/explore/select_image.py,sha256=dmsMoxFwQ7JDPHK2vRFzUfXeEovT86cmUnmEm-qrfwE,12665
|
|
8
8
|
pwact/active_learning/init_bulk/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
9
9
|
pwact/active_learning/init_bulk/aimd.py,sha256=XzDlX2vylaljQKoUnv6nrI2NfiOdHZpq8qr3DenA1F4,10465
|
|
@@ -40,22 +40,22 @@ pwact/data_format/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU
|
|
|
40
40
|
pwact/data_format/configop.py,sha256=S2WaES4-9_FX_o6fLaBMw2uSIF1cUMLGj9APRRASy6Q,11984
|
|
41
41
|
pwact/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
42
42
|
pwact/utils/constant.py,sha256=ZM43rI0JNHA_nVKdRW1YvPGCEkomRNgdmA3_L8hAVSY,18379
|
|
43
|
-
pwact/utils/file_operation.py,sha256=
|
|
43
|
+
pwact/utils/file_operation.py,sha256=LFQ247afF_nUhxagZTYqIYs9GrJCwsiI2EuDhoxWIKQ,9032
|
|
44
44
|
pwact/utils/format_input_output.py,sha256=oYFydQy3-btXzieO2O2LbHFoeRyhPnLVE4c5TNgS-IQ,1798
|
|
45
45
|
pwact/utils/json_operation.py,sha256=BqBsnIjk1URoMW_s2yu7Gk8IBxlir-oo6ivt8P3RIqg,1794
|
|
46
46
|
pwact/utils/pre_al_data_util.py,sha256=QE-axnVYUIyORFiVs-WK9-UaJlMUFY816_rSyYOOJc8,2542
|
|
47
47
|
pwact/utils/process_tool.py,sha256=trzp6GbP_SYFiS_vheobV_FI4PSWVJvX3xHsFQ6DWME,478
|
|
48
48
|
pwact/utils/slurm_script.py,sha256=mgueOrhYteg6XXvJitdjmbV4lzxMujuna9Jxr3wgC7Q,8237
|
|
49
|
-
pwact/utils/tmp.py,sha256=
|
|
49
|
+
pwact/utils/tmp.py,sha256=en_GltoNwfA40vSHttMRi9cEg-8xnPZlvnnBq1_vHfw,2285
|
|
50
50
|
pwact/utils/app_lib/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
51
51
|
pwact/utils/app_lib/common.py,sha256=lQmI-9Qumq62MNjr-eVlLL88ISDHBOb6vAfYYFcDIgM,6040
|
|
52
52
|
pwact/utils/app_lib/cp2k.py,sha256=ljhCCHmZ2kfoXEXn5O7-D56EgTLn2a7H3y_TIkHiasY,13157
|
|
53
53
|
pwact/utils/app_lib/cp2k_dp.py,sha256=VP4gyPGhLcMAqAjrqCQSUiiGlESNlyYz7Gs3Q4QoUHo,6912
|
|
54
54
|
pwact/utils/app_lib/lammps.py,sha256=2oxHJHdDxfDDWWmnjo0gMNwgGvxABwuDgDlb8kbhgfk,8037
|
|
55
55
|
pwact/utils/app_lib/pwmat.py,sha256=PTRPkG_d00ibGhpCe2-4M7MW3dx2ZuAyb9hT2jl_LAs,18047
|
|
56
|
-
pwact-0.1.
|
|
57
|
-
pwact-0.1.
|
|
58
|
-
pwact-0.1.
|
|
59
|
-
pwact-0.1.
|
|
60
|
-
pwact-0.1.
|
|
61
|
-
pwact-0.1.
|
|
56
|
+
pwact-0.1.26.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
57
|
+
pwact-0.1.26.dist-info/METADATA,sha256=8wGRhGuChezjba5MhX5Sk4xWOWuBIs1tmzdiSFHckcU,3659
|
|
58
|
+
pwact-0.1.26.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
|
|
59
|
+
pwact-0.1.26.dist-info/entry_points.txt,sha256=p61auAnpbn8E2WjvHNBA7rb9_NRAOCew4zdcCj33cGc,42
|
|
60
|
+
pwact-0.1.26.dist-info/top_level.txt,sha256=fY1_7sH5Lke4dC9L8MbYM4fT5aat5eCkAmpkIzY1SlM,6
|
|
61
|
+
pwact-0.1.26.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|