pwact 0.2.2.dev0__tar.gz → 0.2.3__tar.gz
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-0.2.3/PKG-INFO +17 -0
- pwact-0.2.3/README.md +3 -0
- {pwact-0.2.2.dev0 → pwact-0.2.3}/pwact/active_learning/explore/select_image.py +9 -4
- {pwact-0.2.2.dev0 → pwact-0.2.3}/pwact/active_learning/init_bulk/explore.py +2 -3
- {pwact-0.2.2.dev0 → pwact-0.2.3}/pwact/active_learning/init_bulk/init_bulk_run.py +22 -12
- {pwact-0.2.2.dev0 → pwact-0.2.3}/pwact/active_learning/init_bulk/relabel.py +4 -0
- {pwact-0.2.2.dev0 → pwact-0.2.3}/pwact/active_learning/label/labeling.py +10 -10
- {pwact-0.2.2.dev0 → pwact-0.2.3}/pwact/active_learning/train/train_model.py +13 -3
- {pwact-0.2.2.dev0 → pwact-0.2.3}/pwact/active_learning/user_input/resource.py +1 -1
- {pwact-0.2.2.dev0 → pwact-0.2.3}/pwact/main.py +1 -1
- pwact-0.2.3/pwact.egg-info/PKG-INFO +17 -0
- {pwact-0.2.2.dev0 → pwact-0.2.3}/setup.py +1 -1
- pwact-0.2.2.dev0/PKG-INFO +0 -107
- pwact-0.2.2.dev0/README.md +0 -93
- pwact-0.2.2.dev0/pwact.egg-info/PKG-INFO +0 -107
- {pwact-0.2.2.dev0 → pwact-0.2.3}/LICENSE +0 -0
- {pwact-0.2.2.dev0 → pwact-0.2.3}/pwact/__init__.py +0 -0
- {pwact-0.2.2.dev0 → pwact-0.2.3}/pwact/active_learning/__init__.py +0 -0
- {pwact-0.2.2.dev0 → pwact-0.2.3}/pwact/active_learning/environment.py +0 -0
- {pwact-0.2.2.dev0 → pwact-0.2.3}/pwact/active_learning/explore/__init__.py +0 -0
- {pwact-0.2.2.dev0 → pwact-0.2.3}/pwact/active_learning/explore/run_model_md.py +0 -0
- {pwact-0.2.2.dev0 → pwact-0.2.3}/pwact/active_learning/init_bulk/__init__.py +0 -0
- {pwact-0.2.2.dev0 → pwact-0.2.3}/pwact/active_learning/init_bulk/aimd.py +0 -0
- {pwact-0.2.2.dev0 → pwact-0.2.3}/pwact/active_learning/init_bulk/direct.py +0 -0
- {pwact-0.2.2.dev0 → pwact-0.2.3}/pwact/active_learning/init_bulk/duplicate_scale.py +0 -0
- {pwact-0.2.2.dev0 → pwact-0.2.3}/pwact/active_learning/init_bulk/relax.py +0 -0
- {pwact-0.2.2.dev0 → pwact-0.2.3}/pwact/active_learning/label/__init__.py +0 -0
- {pwact-0.2.2.dev0 → pwact-0.2.3}/pwact/active_learning/slurm/__init__.py +0 -0
- {pwact-0.2.2.dev0 → pwact-0.2.3}/pwact/active_learning/slurm/slurm.py +0 -0
- {pwact-0.2.2.dev0 → pwact-0.2.3}/pwact/active_learning/slurm/slurm_tool.py +0 -0
- {pwact-0.2.2.dev0 → pwact-0.2.3}/pwact/active_learning/test/__init__.py +0 -0
- {pwact-0.2.2.dev0 → pwact-0.2.3}/pwact/active_learning/test/test.py +0 -0
- {pwact-0.2.2.dev0 → pwact-0.2.3}/pwact/active_learning/train/__init__.py +0 -0
- {pwact-0.2.2.dev0 → pwact-0.2.3}/pwact/active_learning/train/dp_kpu.py +0 -0
- {pwact-0.2.2.dev0 → pwact-0.2.3}/pwact/active_learning/user_input/__init__.py +0 -0
- {pwact-0.2.2.dev0 → pwact-0.2.3}/pwact/active_learning/user_input/cmd_infos.py +0 -0
- {pwact-0.2.2.dev0 → pwact-0.2.3}/pwact/active_learning/user_input/init_bulk_input.py +0 -0
- {pwact-0.2.2.dev0 → pwact-0.2.3}/pwact/active_learning/user_input/iter_input.py +0 -0
- {pwact-0.2.2.dev0 → pwact-0.2.3}/pwact/active_learning/user_input/scf_param.py +0 -0
- {pwact-0.2.2.dev0 → pwact-0.2.3}/pwact/active_learning/user_input/train_param/__init__.py +0 -0
- {pwact-0.2.2.dev0 → pwact-0.2.3}/pwact/active_learning/user_input/train_param/model_param.py +0 -0
- {pwact-0.2.2.dev0 → pwact-0.2.3}/pwact/active_learning/user_input/train_param/nep_param.py +0 -0
- {pwact-0.2.2.dev0 → pwact-0.2.3}/pwact/active_learning/user_input/train_param/nn_feature_type.py +0 -0
- {pwact-0.2.2.dev0 → pwact-0.2.3}/pwact/active_learning/user_input/train_param/optimizer_param.py +0 -0
- {pwact-0.2.2.dev0 → pwact-0.2.3}/pwact/active_learning/user_input/train_param/train_param.py +0 -0
- {pwact-0.2.2.dev0 → pwact-0.2.3}/pwact/active_learning/user_input/train_param/work_file_param.py +0 -0
- {pwact-0.2.2.dev0 → pwact-0.2.3}/pwact/active_learning/user_input/workdir.py +0 -0
- {pwact-0.2.2.dev0 → pwact-0.2.3}/pwact/bin/__init__.py +0 -0
- {pwact-0.2.2.dev0 → pwact-0.2.3}/pwact/data_format/__init__.py +0 -0
- {pwact-0.2.2.dev0 → pwact-0.2.3}/pwact/data_format/configop.py +0 -0
- {pwact-0.2.2.dev0 → pwact-0.2.3}/pwact/utils/__init__.py +0 -0
- {pwact-0.2.2.dev0 → pwact-0.2.3}/pwact/utils/app_lib/__init__.py +0 -0
- {pwact-0.2.2.dev0 → pwact-0.2.3}/pwact/utils/app_lib/common.py +0 -0
- {pwact-0.2.2.dev0 → pwact-0.2.3}/pwact/utils/app_lib/cp2k.py +0 -0
- {pwact-0.2.2.dev0 → pwact-0.2.3}/pwact/utils/app_lib/cp2k_dp.py +0 -0
- {pwact-0.2.2.dev0 → pwact-0.2.3}/pwact/utils/app_lib/do_direct_sample.py +0 -0
- {pwact-0.2.2.dev0 → pwact-0.2.3}/pwact/utils/app_lib/do_eqv2model.py +0 -0
- {pwact-0.2.2.dev0 → pwact-0.2.3}/pwact/utils/app_lib/lammps.py +0 -0
- {pwact-0.2.2.dev0 → pwact-0.2.3}/pwact/utils/app_lib/pwmat.py +0 -0
- {pwact-0.2.2.dev0 → pwact-0.2.3}/pwact/utils/constant.py +0 -0
- {pwact-0.2.2.dev0 → pwact-0.2.3}/pwact/utils/draw/__init__.py +0 -0
- {pwact-0.2.2.dev0 → pwact-0.2.3}/pwact/utils/draw/hist_model_devi.py +0 -0
- {pwact-0.2.2.dev0 → pwact-0.2.3}/pwact/utils/file_operation.py +0 -0
- {pwact-0.2.2.dev0 → pwact-0.2.3}/pwact/utils/format_input_output.py +0 -0
- {pwact-0.2.2.dev0 → pwact-0.2.3}/pwact/utils/json_operation.py +0 -0
- {pwact-0.2.2.dev0 → pwact-0.2.3}/pwact/utils/pre_al_data_util.py +0 -0
- {pwact-0.2.2.dev0 → pwact-0.2.3}/pwact/utils/process_tool.py +0 -0
- {pwact-0.2.2.dev0 → pwact-0.2.3}/pwact/utils/slurm_script.py +0 -0
- {pwact-0.2.2.dev0 → pwact-0.2.3}/pwact/utils/tmp.py +0 -0
- {pwact-0.2.2.dev0 → pwact-0.2.3}/pwact.egg-info/SOURCES.txt +0 -0
- {pwact-0.2.2.dev0 → pwact-0.2.3}/pwact.egg-info/dependency_links.txt +0 -0
- {pwact-0.2.2.dev0 → pwact-0.2.3}/pwact.egg-info/entry_points.txt +0 -0
- {pwact-0.2.2.dev0 → pwact-0.2.3}/pwact.egg-info/top_level.txt +0 -0
- {pwact-0.2.2.dev0 → pwact-0.2.3}/setup.cfg +0 -0
pwact-0.2.3/PKG-INFO
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: pwact
|
|
3
|
+
Version: 0.2.3
|
|
4
|
+
Summary: PWACT is an open-source automated active learning platform based on PWMLFF for efficient data sampling.
|
|
5
|
+
Home-page: https://github.com/LonxunQuantum/PWact
|
|
6
|
+
Author: LonxunQuantum
|
|
7
|
+
Author-email: lonxun@pwmat.com
|
|
8
|
+
Classifier: Programming Language :: Python :: 3
|
|
9
|
+
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
|
|
10
|
+
Classifier: Operating System :: OS Independent
|
|
11
|
+
Requires-Python: >=3.9
|
|
12
|
+
Description-Content-Type: text/markdown
|
|
13
|
+
License-File: LICENSE
|
|
14
|
+
|
|
15
|
+
# Dependencies
|
|
16
|
+
|
|
17
|
+
Please refer to the [`user manual`](http://doc.lonxun.com/PWMLFF/pwact/)
|
pwact-0.2.3/README.md
ADDED
|
@@ -90,6 +90,11 @@ def select_image(
|
|
|
90
90
|
accurate_pd =None
|
|
91
91
|
rand_candi =None
|
|
92
92
|
remove_candi =None
|
|
93
|
+
|
|
94
|
+
error_pd = pd.DataFrame(columns=EXPLORE_FILE_STRUCTURE.devi_columns)
|
|
95
|
+
accurate_pd = pd.DataFrame(columns=EXPLORE_FILE_STRUCTURE.devi_columns)
|
|
96
|
+
rand_candi = pd.DataFrame(columns=EXPLORE_FILE_STRUCTURE.devi_columns)
|
|
97
|
+
remove_candi = pd.DataFrame(columns=EXPLORE_FILE_STRUCTURE.devi_columns)
|
|
93
98
|
|
|
94
99
|
for md in md_sys_dict.keys():
|
|
95
100
|
sys_dict = md_sys_dict[md]
|
|
@@ -104,10 +109,10 @@ def select_image(
|
|
|
104
109
|
_lower = lower
|
|
105
110
|
_higer = higer
|
|
106
111
|
tmp_error_pd, tmp_accurate_pd, tmp_rand_candi, tmp_remove_candi = select_pd(tmp_devi_pd, _lower, _higer, select_num)
|
|
107
|
-
error_pd = pd.concat([error_pd, tmp_error_pd])
|
|
108
|
-
accurate_pd = pd.concat([accurate_pd, tmp_accurate_pd])
|
|
109
|
-
rand_candi = pd.concat([rand_candi, tmp_rand_candi])
|
|
110
|
-
remove_candi = pd.concat([remove_candi, tmp_remove_candi])
|
|
112
|
+
error_pd = pd.concat([error_pd, tmp_error_pd])
|
|
113
|
+
accurate_pd = pd.concat([accurate_pd, tmp_accurate_pd])
|
|
114
|
+
rand_candi = pd.concat([rand_candi, tmp_rand_candi])
|
|
115
|
+
remove_candi = pd.concat([remove_candi, tmp_remove_candi])
|
|
111
116
|
right_md, error_md = count_mdstop_info(model_devi_files)
|
|
112
117
|
md_run_info = "A total of {} MD trajectories were run. with {} trajectories correctly executed and {} trajectories normally completed. \nFor detailed information, refer to File {}.".format(len(right_md) + len(error_md), len(right_md), len(error_md), EXPLORE_FILE_STRUCTURE.md_traj_error_record)
|
|
113
118
|
|
|
@@ -296,6 +296,5 @@ class BIGMODEL(object):
|
|
|
296
296
|
write_to_file(slurm_job_file, group_slurm_script, "w")
|
|
297
297
|
|
|
298
298
|
def do_post_process(self):
|
|
299
|
-
if os.path.exists(self.
|
|
300
|
-
link_file(self.
|
|
301
|
-
|
|
299
|
+
if os.path.exists(self.bigmodel_dir):
|
|
300
|
+
link_file(self.bigmodel_dir, self.real_bigmodel_dir)
|
|
@@ -61,8 +61,9 @@ def init_bulk_run(resource: Resource, input_param:InitBulkParam):
|
|
|
61
61
|
if not relabel.check_work_done():
|
|
62
62
|
relabel.make_scf_work()
|
|
63
63
|
relabel.do_scf_jobs()
|
|
64
|
+
relabel.do_post_process()
|
|
64
65
|
|
|
65
|
-
|
|
66
|
+
do_collection(resource, input_param)
|
|
66
67
|
|
|
67
68
|
def do_collection(resource: Resource, input_param:InitBulkParam):
|
|
68
69
|
init_configs = input_param.sys_config
|
|
@@ -83,8 +84,8 @@ def do_collection(resource: Resource, input_param:InitBulkParam):
|
|
|
83
84
|
|
|
84
85
|
relabel_dir = os.path.join(input_param.root_dir, TEMP_STRUCTURE.tmp_init_bulk_dir, INIT_BULK.scf)
|
|
85
86
|
real_relabel_dir = os.path.join(input_param.root_dir, INIT_BULK.scf)
|
|
86
|
-
real_bigmodel_dir = os.path.join(
|
|
87
|
-
real_direct_dir = os.path.join(
|
|
87
|
+
real_bigmodel_dir = os.path.join(input_param.root_dir, INIT_BULK.bigmodel)
|
|
88
|
+
real_direct_dir = os.path.join(input_param.root_dir, INIT_BULK.direct)
|
|
88
89
|
|
|
89
90
|
|
|
90
91
|
for init_config in init_configs:
|
|
@@ -140,7 +141,7 @@ def do_collection(resource: Resource, input_param:InitBulkParam):
|
|
|
140
141
|
result_lines = ["\"{}\",".format(_) for _ in pwdatas]
|
|
141
142
|
result_lines = "\n".join(result_lines)
|
|
142
143
|
# result_lines = result_lines[:-1] # Filter the last ','
|
|
143
|
-
result_save_path = os.path.join(
|
|
144
|
+
result_save_path = os.path.join(collection_dir, INIT_BULK.npy_format_name)
|
|
144
145
|
write_to_file(result_save_path, result_lines, mode='w')
|
|
145
146
|
|
|
146
147
|
#6 convert relabel datas
|
|
@@ -153,13 +154,13 @@ def do_collection(resource: Resource, input_param:InitBulkParam):
|
|
|
153
154
|
#5. convert the aimd files (for vasp is outcar, for pwmat is movement) to npy format
|
|
154
155
|
extract_pwdata(input_data_list=source_scf,
|
|
155
156
|
intput_data_format= DFT_STYLE.get_format_by_postfix(os.path.basename(source_scf[0])),
|
|
156
|
-
save_data_path =
|
|
157
|
+
save_data_path = os.path.join(collection_dir, INIT_BULK.scf),
|
|
157
158
|
save_data_name = INIT_BULK.get_save_format(input_param.data_format),
|
|
158
159
|
save_data_format= input_param.data_format,
|
|
159
160
|
data_shuffle=input_param.data_shuffle,
|
|
160
161
|
interval=1
|
|
161
162
|
)
|
|
162
|
-
result_save_path.append(os.path.join(
|
|
163
|
+
result_save_path.append(os.path.join(real_collection_dir, INIT_BULK.scf, INIT_BULK.get_save_format(input_param.data_format)))
|
|
163
164
|
#7 bigmodel infos
|
|
164
165
|
if input_param.is_bigmodel:
|
|
165
166
|
if not input_param.is_scf:
|
|
@@ -171,12 +172,20 @@ def do_collection(resource: Resource, input_param:InitBulkParam):
|
|
|
171
172
|
data_shuffle=input_param.data_shuffle,
|
|
172
173
|
interval=1
|
|
173
174
|
)
|
|
174
|
-
result_save_path.append(os.path.join(
|
|
175
|
-
|
|
176
|
-
|
|
175
|
+
result_save_path.append(os.path.join(real_collection_dir, INIT_BULK.bigmodel, INIT_BULK.direct, INIT_BULK.get_save_format(input_param.data_format)))
|
|
176
|
+
# copy bigmodel and direct files to realdir
|
|
177
|
+
copy_dir(bigmodel_dir, os.path.join(collection_dir, INIT_BULK.bigmodel))
|
|
177
178
|
# delete logs
|
|
178
179
|
if len(result_save_path) > 0:
|
|
179
|
-
|
|
180
|
+
_path_path = []
|
|
181
|
+
for _data_path in result_save_path:
|
|
182
|
+
if input_param.data_format == PWDATA.extxyz:
|
|
183
|
+
_path_path.append(_data_path)
|
|
184
|
+
elif input_param.data_format == PWDATA.pwmlff_npy: # */PWdata/*.npy
|
|
185
|
+
tmp = search_files(_data_path, "*/position.npy")
|
|
186
|
+
_path_path.extend([os.path.dirname(_) for _ in tmp])
|
|
187
|
+
|
|
188
|
+
result_lines = ["\"{}\",".format(_) for _ in _path_path]
|
|
180
189
|
result_lines = "\n".join(result_lines)
|
|
181
190
|
# result_lines = result_lines[:-1] # Filter the last ','
|
|
182
191
|
result_save_path = os.path.join(collection_dir, INIT_BULK.npy_format_name)
|
|
@@ -188,9 +197,10 @@ def do_collection(resource: Resource, input_param:InitBulkParam):
|
|
|
188
197
|
del_file(real_pertub_dir)
|
|
189
198
|
del_file(real_aimd_dir)
|
|
190
199
|
del_file(real_relabel_dir)
|
|
200
|
+
del_file(real_bigmodel_dir)
|
|
191
201
|
# del slurm logs and tags
|
|
192
|
-
del_file_list_by_patten(
|
|
193
|
-
del_file_list_by_patten(
|
|
202
|
+
del_file_list_by_patten(os.path.join(collection_dir, INIT_BULK.bigmodel), "slurm-*")
|
|
203
|
+
del_file_list_by_patten(os.path.join(collection_dir, INIT_BULK.bigmodel, INIT_BULK.direct), "slurm-*")
|
|
194
204
|
# copy collection file to target
|
|
195
205
|
copy_dir(collection_dir, real_collection_dir)
|
|
196
206
|
if not input_param.reserve_work:
|
|
@@ -380,16 +380,16 @@ class Labeling(object):
|
|
|
380
380
|
|
|
381
381
|
# scf files to pwdata format
|
|
382
382
|
scf_configs = self.collect_scf_configs()
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
383
|
+
if len(scf_configs) > 0:
|
|
384
|
+
extract_pwdata(input_data_list=scf_configs,
|
|
385
|
+
intput_data_format =DFT_STYLE.get_format_by_postfix(os.path.basename(scf_configs[0])),
|
|
386
|
+
save_data_path =self.result_dir,
|
|
387
|
+
save_data_name = INIT_BULK.get_save_format(self.input_param.data_format),
|
|
388
|
+
save_data_format = self.input_param.data_format,
|
|
389
|
+
data_shuffle =self.input_param.train.data_shuffle
|
|
390
|
+
)
|
|
391
|
+
# copy to main dir
|
|
392
|
+
copy_dir(self.result_dir, self.real_result_dir)
|
|
393
393
|
|
|
394
394
|
def do_post_bigmodel(self):
|
|
395
395
|
# copy the bigmodel labeled.xyz to result
|
|
@@ -33,6 +33,7 @@ class ModelTrian(object):
|
|
|
33
33
|
self.itername = itername
|
|
34
34
|
self.resource = resource
|
|
35
35
|
self.input_param = input_param
|
|
36
|
+
self.train_flag = True
|
|
36
37
|
self.iter = get_iter_from_iter_name(self.itername)
|
|
37
38
|
# train work dir
|
|
38
39
|
self.train_dir = os.path.join(self.input_param.root_dir, self.itername, TEMP_STRUCTURE.tmp_run_iter_dir, AL_STRUCTURE.train)
|
|
@@ -68,11 +69,16 @@ class ModelTrian(object):
|
|
|
68
69
|
if not os.path.exists(model_i_dir):
|
|
69
70
|
os.makedirs(model_i_dir)
|
|
70
71
|
# make train.json file
|
|
71
|
-
train_dict = self.set_train_input_dict(work_dir=model_i_dir, model_index = model_index)
|
|
72
|
+
train_dict, train_tag = self.set_train_input_dict(work_dir=model_i_dir, model_index = model_index)
|
|
72
73
|
train_json_file_path = os.path.join(model_i_dir, TRAIN_FILE_STRUCTUR.train_json)
|
|
73
74
|
save_json_file(train_dict, train_json_file_path)
|
|
74
75
|
train_list.append(model_i_dir)
|
|
75
|
-
|
|
76
|
+
if train_tag:
|
|
77
|
+
self.make_train_slurm_job_files(train_list)
|
|
78
|
+
else:
|
|
79
|
+
pre_iter_name = make_iter_name(self.iter - 1)
|
|
80
|
+
pre_iter_dir = os.path.join(self.input_param.root_dir, pre_iter_name, AL_STRUCTURE.train)
|
|
81
|
+
copy_dir(pre_iter_dir, self.train_dir)
|
|
76
82
|
|
|
77
83
|
def make_train_slurm_job_files(self, train_list:list[str]):
|
|
78
84
|
# make train slurm script
|
|
@@ -158,6 +164,7 @@ class ModelTrian(object):
|
|
|
158
164
|
# search train_feature_path in iter*/label/result/*/PWdata/*
|
|
159
165
|
iter_index = get_iter_from_iter_name(self.itername)
|
|
160
166
|
start_iter = 0
|
|
167
|
+
train_tag = True
|
|
161
168
|
while start_iter < iter_index:
|
|
162
169
|
if self.input_param.data_format == PWDATA.extxyz: # result/train.xyz
|
|
163
170
|
iter_data_list = search_files(self.input_param.root_dir,
|
|
@@ -172,6 +179,9 @@ class ModelTrian(object):
|
|
|
172
179
|
train_feature_path.extend(iter_data_list)
|
|
173
180
|
start_iter += 1
|
|
174
181
|
|
|
182
|
+
if start_iter > 0 and len(iter_data_list) == 0:
|
|
183
|
+
train_tag = False
|
|
184
|
+
|
|
175
185
|
# reset seed
|
|
176
186
|
train_json[TRAIN_INPUT_PARAM.seed] = get_seed_by_time()
|
|
177
187
|
train_json[TRAIN_INPUT_PARAM.raw_files] = []
|
|
@@ -181,7 +191,7 @@ class ModelTrian(object):
|
|
|
181
191
|
train_json[TRAIN_INPUT_PARAM.format] = self.input_param.data_format
|
|
182
192
|
if self.input_param.strategy.uncertainty == UNCERTAINTY.kpu:
|
|
183
193
|
train_json[TRAIN_INPUT_PARAM.save_p_matrix] = True
|
|
184
|
-
return train_json
|
|
194
|
+
return train_json, train_tag
|
|
185
195
|
|
|
186
196
|
def do_train_job(self):
|
|
187
197
|
mission = Mission()
|
|
@@ -126,7 +126,7 @@ class ResourceDetail(object):
|
|
|
126
126
|
if self.gpu_per_node is None and self.cpu_per_node is None:
|
|
127
127
|
raise Exception("ERROR! Both CPU and GPU resources are not specified!")
|
|
128
128
|
# check param
|
|
129
|
-
if "$
|
|
129
|
+
if "$SLURM".lower() in command.lower():
|
|
130
130
|
pass
|
|
131
131
|
else:
|
|
132
132
|
if "mpirun -np" in command:
|
|
@@ -79,7 +79,7 @@ def run_iter():
|
|
|
79
79
|
if jj == 2 and not input_param.reserve_work: # delete temp_work_dir under current iteration after the labeling done
|
|
80
80
|
del_file_list([os.path.join(input_param.root_dir, iter_name, TEMP_STRUCTURE.tmp_run_iter_dir)])
|
|
81
81
|
|
|
82
|
-
print("Active learning done! \nYou could use cmd '
|
|
82
|
+
print("Active learning done! \nYou could use cmd 'pwact gather_pwdata' to collect all datas sampled from iterations.")
|
|
83
83
|
|
|
84
84
|
def run_fp(itername:str, resource : Resource, input_param: InputParam):
|
|
85
85
|
lab = Labeling(itername, resource, input_param)
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: pwact
|
|
3
|
+
Version: 0.2.3
|
|
4
|
+
Summary: PWACT is an open-source automated active learning platform based on PWMLFF for efficient data sampling.
|
|
5
|
+
Home-page: https://github.com/LonxunQuantum/PWact
|
|
6
|
+
Author: LonxunQuantum
|
|
7
|
+
Author-email: lonxun@pwmat.com
|
|
8
|
+
Classifier: Programming Language :: Python :: 3
|
|
9
|
+
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
|
|
10
|
+
Classifier: Operating System :: OS Independent
|
|
11
|
+
Requires-Python: >=3.9
|
|
12
|
+
Description-Content-Type: text/markdown
|
|
13
|
+
License-File: LICENSE
|
|
14
|
+
|
|
15
|
+
# Dependencies
|
|
16
|
+
|
|
17
|
+
Please refer to the [`user manual`](http://doc.lonxun.com/PWMLFF/pwact/)
|
|
@@ -5,7 +5,7 @@ with open("README.md", "r") as fh:
|
|
|
5
5
|
|
|
6
6
|
setuptools.setup(
|
|
7
7
|
name="pwact",
|
|
8
|
-
version="0.2.
|
|
8
|
+
version="0.2.3",
|
|
9
9
|
author="LonxunQuantum",
|
|
10
10
|
author_email="lonxun@pwmat.com",
|
|
11
11
|
description="PWACT is an open-source automated active learning platform based on PWMLFF for efficient data sampling.",
|
pwact-0.2.2.dev0/PKG-INFO
DELETED
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.1
|
|
2
|
-
Name: pwact
|
|
3
|
-
Version: 0.2.2.dev0
|
|
4
|
-
Summary: PWACT is an open-source automated active learning platform based on PWMLFF for efficient data sampling.
|
|
5
|
-
Home-page: https://github.com/LonxunQuantum/PWact
|
|
6
|
-
Author: LonxunQuantum
|
|
7
|
-
Author-email: lonxun@pwmat.com
|
|
8
|
-
Classifier: Programming Language :: Python :: 3
|
|
9
|
-
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
|
|
10
|
-
Classifier: Operating System :: OS Independent
|
|
11
|
-
Requires-Python: >=3.9
|
|
12
|
-
Description-Content-Type: text/markdown
|
|
13
|
-
License-File: LICENSE
|
|
14
|
-
|
|
15
|
-
# Dependencies
|
|
16
|
-
|
|
17
|
-
Please refer to the [`user manual`](http://doc.lonxun.com/PWMLFF/active%20learning/)
|
|
18
|
-
|
|
19
|
-
1. AL-PWMLFF job scheduling uses the [SLURM](https://slurm.schedmd.com/documentation.html) cluster management and job scheduling system. SLURM must be installed on your computing cluster.
|
|
20
|
-
|
|
21
|
-
2. DFT calculations in AL-PWMLFF support [PWmat](https://www.pwmat.com/gpu-download), [VASP](https://www.vasp.at/), [CP2K](https://www.cp2k.org/) and DFTB. We have integrated DFTB in PWmat. You can find detailed usage instructions in the `DFTB_DETAIL section` of the [`PWmat Manual`](http://www.pwmat.com/pwmat-resource/Manual.pdf).
|
|
22
|
-
|
|
23
|
-
3. AL-PWMLFF model training is based on [`PWMLFF`](https://github.com/LonxunQuantum/PWMLFF). Refer to the [`PWMLFF documentation`](http://doc.lonxun.com/PWMLFF/Installation) for installation instructions ([`Download address for PWmat version integrated with DFTB`](https://www.pwmat.com/modulefiles/pwmat-resource/mstation-download/cuda-11.6-mstation-beta.zip)).
|
|
24
|
-
|
|
25
|
-
4. AL-PWMLFF Lammps molecular dynamics simulation is based on [Lammps_for_pwmlff](https://github.com/LonxunQuantum/Lammps_for_PWMLFF/tree/libtorch). Refer to the [`Lammps_for_pwmlff documentation`](https://github.com/LonxunQuantum/Lammps_for_PWMLFF/blob/libtorch/README) for installation instructions.
|
|
26
|
-
|
|
27
|
-
# Installation Process
|
|
28
|
-
You can install it through the pip command or the github source code installation.
|
|
29
|
-
|
|
30
|
-
## install by pip
|
|
31
|
-
|
|
32
|
-
```bash
|
|
33
|
-
pip install pwact
|
|
34
|
-
```
|
|
35
|
-
## from github
|
|
36
|
-
|
|
37
|
-
### Code Download
|
|
38
|
-
|
|
39
|
-
git clone https://github.com/LonxunQuantum/PWact.git
|
|
40
|
-
|
|
41
|
-
Then import environment variable.
|
|
42
|
-
|
|
43
|
-
```
|
|
44
|
-
export PATH=/data/home/wuxingxing/codespace/al_pwmlff/bin:$PATH
|
|
45
|
-
```
|
|
46
|
-
AL-PWMLFF is developed in Python and supports Python 3.9 and above. It is recommended to use the Python runtime environment provided by PWMLFF.
|
|
47
|
-
|
|
48
|
-
If you need to create a virtual environment for AL-PWMLFF separately, you only need to install the following dependent packages (compatible with your Python version, Python >= 3.9).
|
|
49
|
-
```bash
|
|
50
|
-
pip install numpy pandas tqdm pwdata
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
# Command List
|
|
55
|
-
|
|
56
|
-
AL-PWMLFF includes the following commands, which are not case sensitive. The starting command is `pwact`
|
|
57
|
-
|
|
58
|
-
### 1. Display the available command list
|
|
59
|
-
|
|
60
|
-
```bash
|
|
61
|
-
pwact [ -h / --help / help ]
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
### 2. Display the parameter list for cmd_name:
|
|
65
|
-
|
|
66
|
-
```bash
|
|
67
|
-
pwact cmd_name -h
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
### 3. Initial Training Set Preparation
|
|
71
|
-
|
|
72
|
-
```bash
|
|
73
|
-
pwact init_bulk param.json resource.json
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
### 4. Active Learning
|
|
77
|
-
|
|
78
|
-
```bash
|
|
79
|
-
pwact run param.json resource.json
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
For the 3-th and 4-th command above, the names of the JSON files can be modified by the user, but it is required that the input order of [`param.json`](#paramjson) and [`resouce.json`](#resourcejson) cannot be changed.
|
|
83
|
-
|
|
84
|
-
### 5. Tool Commands
|
|
85
|
-
|
|
86
|
-
Convert MOVEMENT or OUTCAR to PWdata format
|
|
87
|
-
|
|
88
|
-
```bash
|
|
89
|
-
pwact to_pwdata
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
Search for labeled datasets in the active learning directory
|
|
93
|
-
|
|
94
|
-
```bash
|
|
95
|
-
pwact gather_pwdata
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
### examples download
|
|
99
|
-
from github
|
|
100
|
-
```
|
|
101
|
-
https://github.com/LonxunQuantum/PWact/tree/main/pwact/example
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
from BaiduNetdisk included the calculation results of examples
|
|
105
|
-
```
|
|
106
|
-
https://pan.baidu.com/s/14E0u_7cpntiBZgg-C1S5XA?pwd=pwmt
|
|
107
|
-
```
|
pwact-0.2.2.dev0/README.md
DELETED
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
# Dependencies
|
|
2
|
-
|
|
3
|
-
Please refer to the [`user manual`](http://doc.lonxun.com/PWMLFF/active%20learning/)
|
|
4
|
-
|
|
5
|
-
1. AL-PWMLFF job scheduling uses the [SLURM](https://slurm.schedmd.com/documentation.html) cluster management and job scheduling system. SLURM must be installed on your computing cluster.
|
|
6
|
-
|
|
7
|
-
2. DFT calculations in AL-PWMLFF support [PWmat](https://www.pwmat.com/gpu-download), [VASP](https://www.vasp.at/), [CP2K](https://www.cp2k.org/) and DFTB. We have integrated DFTB in PWmat. You can find detailed usage instructions in the `DFTB_DETAIL section` of the [`PWmat Manual`](http://www.pwmat.com/pwmat-resource/Manual.pdf).
|
|
8
|
-
|
|
9
|
-
3. AL-PWMLFF model training is based on [`PWMLFF`](https://github.com/LonxunQuantum/PWMLFF). Refer to the [`PWMLFF documentation`](http://doc.lonxun.com/PWMLFF/Installation) for installation instructions ([`Download address for PWmat version integrated with DFTB`](https://www.pwmat.com/modulefiles/pwmat-resource/mstation-download/cuda-11.6-mstation-beta.zip)).
|
|
10
|
-
|
|
11
|
-
4. AL-PWMLFF Lammps molecular dynamics simulation is based on [Lammps_for_pwmlff](https://github.com/LonxunQuantum/Lammps_for_PWMLFF/tree/libtorch). Refer to the [`Lammps_for_pwmlff documentation`](https://github.com/LonxunQuantum/Lammps_for_PWMLFF/blob/libtorch/README) for installation instructions.
|
|
12
|
-
|
|
13
|
-
# Installation Process
|
|
14
|
-
You can install it through the pip command or the github source code installation.
|
|
15
|
-
|
|
16
|
-
## install by pip
|
|
17
|
-
|
|
18
|
-
```bash
|
|
19
|
-
pip install pwact
|
|
20
|
-
```
|
|
21
|
-
## from github
|
|
22
|
-
|
|
23
|
-
### Code Download
|
|
24
|
-
|
|
25
|
-
git clone https://github.com/LonxunQuantum/PWact.git
|
|
26
|
-
|
|
27
|
-
Then import environment variable.
|
|
28
|
-
|
|
29
|
-
```
|
|
30
|
-
export PATH=/data/home/wuxingxing/codespace/al_pwmlff/bin:$PATH
|
|
31
|
-
```
|
|
32
|
-
AL-PWMLFF is developed in Python and supports Python 3.9 and above. It is recommended to use the Python runtime environment provided by PWMLFF.
|
|
33
|
-
|
|
34
|
-
If you need to create a virtual environment for AL-PWMLFF separately, you only need to install the following dependent packages (compatible with your Python version, Python >= 3.9).
|
|
35
|
-
```bash
|
|
36
|
-
pip install numpy pandas tqdm pwdata
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
# Command List
|
|
41
|
-
|
|
42
|
-
AL-PWMLFF includes the following commands, which are not case sensitive. The starting command is `pwact`
|
|
43
|
-
|
|
44
|
-
### 1. Display the available command list
|
|
45
|
-
|
|
46
|
-
```bash
|
|
47
|
-
pwact [ -h / --help / help ]
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
### 2. Display the parameter list for cmd_name:
|
|
51
|
-
|
|
52
|
-
```bash
|
|
53
|
-
pwact cmd_name -h
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
### 3. Initial Training Set Preparation
|
|
57
|
-
|
|
58
|
-
```bash
|
|
59
|
-
pwact init_bulk param.json resource.json
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
### 4. Active Learning
|
|
63
|
-
|
|
64
|
-
```bash
|
|
65
|
-
pwact run param.json resource.json
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
For the 3-th and 4-th command above, the names of the JSON files can be modified by the user, but it is required that the input order of [`param.json`](#paramjson) and [`resouce.json`](#resourcejson) cannot be changed.
|
|
69
|
-
|
|
70
|
-
### 5. Tool Commands
|
|
71
|
-
|
|
72
|
-
Convert MOVEMENT or OUTCAR to PWdata format
|
|
73
|
-
|
|
74
|
-
```bash
|
|
75
|
-
pwact to_pwdata
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
Search for labeled datasets in the active learning directory
|
|
79
|
-
|
|
80
|
-
```bash
|
|
81
|
-
pwact gather_pwdata
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
### examples download
|
|
85
|
-
from github
|
|
86
|
-
```
|
|
87
|
-
https://github.com/LonxunQuantum/PWact/tree/main/pwact/example
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
from BaiduNetdisk included the calculation results of examples
|
|
91
|
-
```
|
|
92
|
-
https://pan.baidu.com/s/14E0u_7cpntiBZgg-C1S5XA?pwd=pwmt
|
|
93
|
-
```
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.1
|
|
2
|
-
Name: pwact
|
|
3
|
-
Version: 0.2.2.dev0
|
|
4
|
-
Summary: PWACT is an open-source automated active learning platform based on PWMLFF for efficient data sampling.
|
|
5
|
-
Home-page: https://github.com/LonxunQuantum/PWact
|
|
6
|
-
Author: LonxunQuantum
|
|
7
|
-
Author-email: lonxun@pwmat.com
|
|
8
|
-
Classifier: Programming Language :: Python :: 3
|
|
9
|
-
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
|
|
10
|
-
Classifier: Operating System :: OS Independent
|
|
11
|
-
Requires-Python: >=3.9
|
|
12
|
-
Description-Content-Type: text/markdown
|
|
13
|
-
License-File: LICENSE
|
|
14
|
-
|
|
15
|
-
# Dependencies
|
|
16
|
-
|
|
17
|
-
Please refer to the [`user manual`](http://doc.lonxun.com/PWMLFF/active%20learning/)
|
|
18
|
-
|
|
19
|
-
1. AL-PWMLFF job scheduling uses the [SLURM](https://slurm.schedmd.com/documentation.html) cluster management and job scheduling system. SLURM must be installed on your computing cluster.
|
|
20
|
-
|
|
21
|
-
2. DFT calculations in AL-PWMLFF support [PWmat](https://www.pwmat.com/gpu-download), [VASP](https://www.vasp.at/), [CP2K](https://www.cp2k.org/) and DFTB. We have integrated DFTB in PWmat. You can find detailed usage instructions in the `DFTB_DETAIL section` of the [`PWmat Manual`](http://www.pwmat.com/pwmat-resource/Manual.pdf).
|
|
22
|
-
|
|
23
|
-
3. AL-PWMLFF model training is based on [`PWMLFF`](https://github.com/LonxunQuantum/PWMLFF). Refer to the [`PWMLFF documentation`](http://doc.lonxun.com/PWMLFF/Installation) for installation instructions ([`Download address for PWmat version integrated with DFTB`](https://www.pwmat.com/modulefiles/pwmat-resource/mstation-download/cuda-11.6-mstation-beta.zip)).
|
|
24
|
-
|
|
25
|
-
4. AL-PWMLFF Lammps molecular dynamics simulation is based on [Lammps_for_pwmlff](https://github.com/LonxunQuantum/Lammps_for_PWMLFF/tree/libtorch). Refer to the [`Lammps_for_pwmlff documentation`](https://github.com/LonxunQuantum/Lammps_for_PWMLFF/blob/libtorch/README) for installation instructions.
|
|
26
|
-
|
|
27
|
-
# Installation Process
|
|
28
|
-
You can install it through the pip command or the github source code installation.
|
|
29
|
-
|
|
30
|
-
## install by pip
|
|
31
|
-
|
|
32
|
-
```bash
|
|
33
|
-
pip install pwact
|
|
34
|
-
```
|
|
35
|
-
## from github
|
|
36
|
-
|
|
37
|
-
### Code Download
|
|
38
|
-
|
|
39
|
-
git clone https://github.com/LonxunQuantum/PWact.git
|
|
40
|
-
|
|
41
|
-
Then import environment variable.
|
|
42
|
-
|
|
43
|
-
```
|
|
44
|
-
export PATH=/data/home/wuxingxing/codespace/al_pwmlff/bin:$PATH
|
|
45
|
-
```
|
|
46
|
-
AL-PWMLFF is developed in Python and supports Python 3.9 and above. It is recommended to use the Python runtime environment provided by PWMLFF.
|
|
47
|
-
|
|
48
|
-
If you need to create a virtual environment for AL-PWMLFF separately, you only need to install the following dependent packages (compatible with your Python version, Python >= 3.9).
|
|
49
|
-
```bash
|
|
50
|
-
pip install numpy pandas tqdm pwdata
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
# Command List
|
|
55
|
-
|
|
56
|
-
AL-PWMLFF includes the following commands, which are not case sensitive. The starting command is `pwact`
|
|
57
|
-
|
|
58
|
-
### 1. Display the available command list
|
|
59
|
-
|
|
60
|
-
```bash
|
|
61
|
-
pwact [ -h / --help / help ]
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
### 2. Display the parameter list for cmd_name:
|
|
65
|
-
|
|
66
|
-
```bash
|
|
67
|
-
pwact cmd_name -h
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
### 3. Initial Training Set Preparation
|
|
71
|
-
|
|
72
|
-
```bash
|
|
73
|
-
pwact init_bulk param.json resource.json
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
### 4. Active Learning
|
|
77
|
-
|
|
78
|
-
```bash
|
|
79
|
-
pwact run param.json resource.json
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
For the 3-th and 4-th command above, the names of the JSON files can be modified by the user, but it is required that the input order of [`param.json`](#paramjson) and [`resouce.json`](#resourcejson) cannot be changed.
|
|
83
|
-
|
|
84
|
-
### 5. Tool Commands
|
|
85
|
-
|
|
86
|
-
Convert MOVEMENT or OUTCAR to PWdata format
|
|
87
|
-
|
|
88
|
-
```bash
|
|
89
|
-
pwact to_pwdata
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
Search for labeled datasets in the active learning directory
|
|
93
|
-
|
|
94
|
-
```bash
|
|
95
|
-
pwact gather_pwdata
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
### examples download
|
|
99
|
-
from github
|
|
100
|
-
```
|
|
101
|
-
https://github.com/LonxunQuantum/PWact/tree/main/pwact/example
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
from BaiduNetdisk included the calculation results of examples
|
|
105
|
-
```
|
|
106
|
-
https://pan.baidu.com/s/14E0u_7cpntiBZgg-C1S5XA?pwd=pwmt
|
|
107
|
-
```
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pwact-0.2.2.dev0 → pwact-0.2.3}/pwact/active_learning/user_input/train_param/model_param.py
RENAMED
|
File without changes
|
|
File without changes
|
{pwact-0.2.2.dev0 → pwact-0.2.3}/pwact/active_learning/user_input/train_param/nn_feature_type.py
RENAMED
|
File without changes
|
{pwact-0.2.2.dev0 → pwact-0.2.3}/pwact/active_learning/user_input/train_param/optimizer_param.py
RENAMED
|
File without changes
|
{pwact-0.2.2.dev0 → pwact-0.2.3}/pwact/active_learning/user_input/train_param/train_param.py
RENAMED
|
File without changes
|
{pwact-0.2.2.dev0 → pwact-0.2.3}/pwact/active_learning/user_input/train_param/work_file_param.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|