pwact 0.2.2.dev0__tar.gz → 0.2.4__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.
Files changed (74) hide show
  1. pwact-0.2.4/PKG-INFO +17 -0
  2. pwact-0.2.4/README.md +3 -0
  3. {pwact-0.2.2.dev0 → pwact-0.2.4}/pwact/active_learning/environment.py +1 -1
  4. {pwact-0.2.2.dev0 → pwact-0.2.4}/pwact/active_learning/explore/select_image.py +9 -4
  5. {pwact-0.2.2.dev0 → pwact-0.2.4}/pwact/active_learning/init_bulk/explore.py +2 -3
  6. {pwact-0.2.2.dev0 → pwact-0.2.4}/pwact/active_learning/init_bulk/init_bulk_run.py +24 -27
  7. {pwact-0.2.2.dev0 → pwact-0.2.4}/pwact/active_learning/init_bulk/relabel.py +4 -0
  8. {pwact-0.2.2.dev0 → pwact-0.2.4}/pwact/active_learning/label/labeling.py +10 -10
  9. {pwact-0.2.2.dev0 → pwact-0.2.4}/pwact/active_learning/train/train_model.py +13 -3
  10. {pwact-0.2.2.dev0 → pwact-0.2.4}/pwact/active_learning/user_input/resource.py +1 -1
  11. {pwact-0.2.2.dev0 → pwact-0.2.4}/pwact/main.py +1 -1
  12. pwact-0.2.4/pwact.egg-info/PKG-INFO +17 -0
  13. {pwact-0.2.2.dev0 → pwact-0.2.4}/setup.py +1 -1
  14. pwact-0.2.2.dev0/PKG-INFO +0 -107
  15. pwact-0.2.2.dev0/README.md +0 -93
  16. pwact-0.2.2.dev0/pwact.egg-info/PKG-INFO +0 -107
  17. {pwact-0.2.2.dev0 → pwact-0.2.4}/LICENSE +0 -0
  18. {pwact-0.2.2.dev0 → pwact-0.2.4}/pwact/__init__.py +0 -0
  19. {pwact-0.2.2.dev0 → pwact-0.2.4}/pwact/active_learning/__init__.py +0 -0
  20. {pwact-0.2.2.dev0 → pwact-0.2.4}/pwact/active_learning/explore/__init__.py +0 -0
  21. {pwact-0.2.2.dev0 → pwact-0.2.4}/pwact/active_learning/explore/run_model_md.py +0 -0
  22. {pwact-0.2.2.dev0 → pwact-0.2.4}/pwact/active_learning/init_bulk/__init__.py +0 -0
  23. {pwact-0.2.2.dev0 → pwact-0.2.4}/pwact/active_learning/init_bulk/aimd.py +0 -0
  24. {pwact-0.2.2.dev0 → pwact-0.2.4}/pwact/active_learning/init_bulk/direct.py +0 -0
  25. {pwact-0.2.2.dev0 → pwact-0.2.4}/pwact/active_learning/init_bulk/duplicate_scale.py +0 -0
  26. {pwact-0.2.2.dev0 → pwact-0.2.4}/pwact/active_learning/init_bulk/relax.py +0 -0
  27. {pwact-0.2.2.dev0 → pwact-0.2.4}/pwact/active_learning/label/__init__.py +0 -0
  28. {pwact-0.2.2.dev0 → pwact-0.2.4}/pwact/active_learning/slurm/__init__.py +0 -0
  29. {pwact-0.2.2.dev0 → pwact-0.2.4}/pwact/active_learning/slurm/slurm.py +0 -0
  30. {pwact-0.2.2.dev0 → pwact-0.2.4}/pwact/active_learning/slurm/slurm_tool.py +0 -0
  31. {pwact-0.2.2.dev0 → pwact-0.2.4}/pwact/active_learning/test/__init__.py +0 -0
  32. {pwact-0.2.2.dev0 → pwact-0.2.4}/pwact/active_learning/test/test.py +0 -0
  33. {pwact-0.2.2.dev0 → pwact-0.2.4}/pwact/active_learning/train/__init__.py +0 -0
  34. {pwact-0.2.2.dev0 → pwact-0.2.4}/pwact/active_learning/train/dp_kpu.py +0 -0
  35. {pwact-0.2.2.dev0 → pwact-0.2.4}/pwact/active_learning/user_input/__init__.py +0 -0
  36. {pwact-0.2.2.dev0 → pwact-0.2.4}/pwact/active_learning/user_input/cmd_infos.py +0 -0
  37. {pwact-0.2.2.dev0 → pwact-0.2.4}/pwact/active_learning/user_input/init_bulk_input.py +0 -0
  38. {pwact-0.2.2.dev0 → pwact-0.2.4}/pwact/active_learning/user_input/iter_input.py +0 -0
  39. {pwact-0.2.2.dev0 → pwact-0.2.4}/pwact/active_learning/user_input/scf_param.py +0 -0
  40. {pwact-0.2.2.dev0 → pwact-0.2.4}/pwact/active_learning/user_input/train_param/__init__.py +0 -0
  41. {pwact-0.2.2.dev0 → pwact-0.2.4}/pwact/active_learning/user_input/train_param/model_param.py +0 -0
  42. {pwact-0.2.2.dev0 → pwact-0.2.4}/pwact/active_learning/user_input/train_param/nep_param.py +0 -0
  43. {pwact-0.2.2.dev0 → pwact-0.2.4}/pwact/active_learning/user_input/train_param/nn_feature_type.py +0 -0
  44. {pwact-0.2.2.dev0 → pwact-0.2.4}/pwact/active_learning/user_input/train_param/optimizer_param.py +0 -0
  45. {pwact-0.2.2.dev0 → pwact-0.2.4}/pwact/active_learning/user_input/train_param/train_param.py +0 -0
  46. {pwact-0.2.2.dev0 → pwact-0.2.4}/pwact/active_learning/user_input/train_param/work_file_param.py +0 -0
  47. {pwact-0.2.2.dev0 → pwact-0.2.4}/pwact/active_learning/user_input/workdir.py +0 -0
  48. {pwact-0.2.2.dev0 → pwact-0.2.4}/pwact/bin/__init__.py +0 -0
  49. {pwact-0.2.2.dev0 → pwact-0.2.4}/pwact/data_format/__init__.py +0 -0
  50. {pwact-0.2.2.dev0 → pwact-0.2.4}/pwact/data_format/configop.py +0 -0
  51. {pwact-0.2.2.dev0 → pwact-0.2.4}/pwact/utils/__init__.py +0 -0
  52. {pwact-0.2.2.dev0 → pwact-0.2.4}/pwact/utils/app_lib/__init__.py +0 -0
  53. {pwact-0.2.2.dev0 → pwact-0.2.4}/pwact/utils/app_lib/common.py +0 -0
  54. {pwact-0.2.2.dev0 → pwact-0.2.4}/pwact/utils/app_lib/cp2k.py +0 -0
  55. {pwact-0.2.2.dev0 → pwact-0.2.4}/pwact/utils/app_lib/cp2k_dp.py +0 -0
  56. {pwact-0.2.2.dev0 → pwact-0.2.4}/pwact/utils/app_lib/do_direct_sample.py +0 -0
  57. {pwact-0.2.2.dev0 → pwact-0.2.4}/pwact/utils/app_lib/do_eqv2model.py +0 -0
  58. {pwact-0.2.2.dev0 → pwact-0.2.4}/pwact/utils/app_lib/lammps.py +0 -0
  59. {pwact-0.2.2.dev0 → pwact-0.2.4}/pwact/utils/app_lib/pwmat.py +0 -0
  60. {pwact-0.2.2.dev0 → pwact-0.2.4}/pwact/utils/constant.py +0 -0
  61. {pwact-0.2.2.dev0 → pwact-0.2.4}/pwact/utils/draw/__init__.py +0 -0
  62. {pwact-0.2.2.dev0 → pwact-0.2.4}/pwact/utils/draw/hist_model_devi.py +0 -0
  63. {pwact-0.2.2.dev0 → pwact-0.2.4}/pwact/utils/file_operation.py +0 -0
  64. {pwact-0.2.2.dev0 → pwact-0.2.4}/pwact/utils/format_input_output.py +0 -0
  65. {pwact-0.2.2.dev0 → pwact-0.2.4}/pwact/utils/json_operation.py +0 -0
  66. {pwact-0.2.2.dev0 → pwact-0.2.4}/pwact/utils/pre_al_data_util.py +0 -0
  67. {pwact-0.2.2.dev0 → pwact-0.2.4}/pwact/utils/process_tool.py +0 -0
  68. {pwact-0.2.2.dev0 → pwact-0.2.4}/pwact/utils/slurm_script.py +0 -0
  69. {pwact-0.2.2.dev0 → pwact-0.2.4}/pwact/utils/tmp.py +0 -0
  70. {pwact-0.2.2.dev0 → pwact-0.2.4}/pwact.egg-info/SOURCES.txt +0 -0
  71. {pwact-0.2.2.dev0 → pwact-0.2.4}/pwact.egg-info/dependency_links.txt +0 -0
  72. {pwact-0.2.2.dev0 → pwact-0.2.4}/pwact.egg-info/entry_points.txt +0 -0
  73. {pwact-0.2.2.dev0 → pwact-0.2.4}/pwact.egg-info/top_level.txt +0 -0
  74. {pwact-0.2.2.dev0 → pwact-0.2.4}/setup.cfg +0 -0
pwact-0.2.4/PKG-INFO ADDED
@@ -0,0 +1,17 @@
1
+ Metadata-Version: 2.1
2
+ Name: pwact
3
+ Version: 0.2.4
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.4/README.md ADDED
@@ -0,0 +1,3 @@
1
+ # Dependencies
2
+
3
+ Please refer to the [`user manual`](http://doc.lonxun.com/PWMLFF/pwact/)
@@ -8,7 +8,7 @@ def comm_info():
8
8
  print("\n" + "=" * 50)
9
9
  print(" PWACT Basic Information")
10
10
  print("=" * 50)
11
- print("Version: 0.2.0")
11
+ print("Version: 0.2.3")
12
12
  print("Compatible pwdata: >= 0.5.0")
13
13
  print("Compatible MatPL: >= 2025.3")
14
14
  print("Contact: support@pwmat.com")
@@ -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]) if error_pd is not None else tmp_error_pd
108
- accurate_pd = pd.concat([accurate_pd, tmp_accurate_pd]) if error_pd is not None else tmp_accurate_pd
109
- rand_candi = pd.concat([rand_candi, tmp_rand_candi]) if error_pd is not None else tmp_rand_candi
110
- remove_candi = pd.concat([remove_candi, tmp_remove_candi]) if error_pd is not None else 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.direct_dir):
300
- link_file(self.direct_dir, self.real_direct_dir)
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
- do_collection(resource, input_param)
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,10 +84,10 @@ 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(real_collection_dir, INIT_BULK.bigmodel)
87
- real_direct_dir = os.path.join(real_bigmodel_dir, INIT_BULK.direct)
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
+ result_save_path = []
90
91
  for init_config in init_configs:
91
92
  init_config_name = "init_config_{}".format(init_config.config_index)
92
93
 
@@ -129,22 +130,9 @@ def do_collection(resource: Resource, input_param:InitBulkParam):
129
130
  data_shuffle=input_param.data_shuffle,
130
131
  interval=1
131
132
  )
132
- # print the dir of pwdatas from aimd
133
- if input_param.data_format == PWDATA.extxyz:
134
- pwdatas = search_files(real_collection_dir, "*/{}".format(INIT_BULK.get_save_format(input_param.data_format)))
135
- elif input_param.data_format == PWDATA.pwmlff_npy: # */PWdata/*.npy
136
- tmp = search_files(real_collection_dir, "*/{}/*/position.npy".format(INIT_BULK.get_save_format(input_param.data_format)))
137
- pwdatas = [os.path.dirname(_) for _ in tmp]
138
- if len(pwdatas) > 0:
139
- pwdatas = sorted(pwdatas)
140
- result_lines = ["\"{}\",".format(_) for _ in pwdatas]
141
- result_lines = "\n".join(result_lines)
142
- # result_lines = result_lines[:-1] # Filter the last ','
143
- result_save_path = os.path.join(real_collection_dir, INIT_BULK.npy_format_name)
144
- write_to_file(result_save_path, result_lines, mode='w')
133
+ result_save_path.append(os.path.join(real_collection_dir, init_config_name, INIT_BULK.get_save_format(input_param.data_format)))
145
134
 
146
135
  #6 convert relabel datas
147
- result_save_path = []
148
136
  if input_param.is_scf:
149
137
  source_scf = search_files(relabel_dir,\
150
138
  "*/{}".format(DFT_STYLE.get_scf_config(resource.dft_style)))
@@ -153,13 +141,13 @@ def do_collection(resource: Resource, input_param:InitBulkParam):
153
141
  #5. convert the aimd files (for vasp is outcar, for pwmat is movement) to npy format
154
142
  extract_pwdata(input_data_list=source_scf,
155
143
  intput_data_format= DFT_STYLE.get_format_by_postfix(os.path.basename(source_scf[0])),
156
- save_data_path = relabel_dir,
144
+ save_data_path = os.path.join(collection_dir, INIT_BULK.scf),
157
145
  save_data_name = INIT_BULK.get_save_format(input_param.data_format),
158
146
  save_data_format= input_param.data_format,
159
147
  data_shuffle=input_param.data_shuffle,
160
148
  interval=1
161
149
  )
162
- result_save_path.append(os.path.join(real_relabel_dir, INIT_BULK.get_save_format(input_param.data_format)))
150
+ result_save_path.append(os.path.join(real_collection_dir, INIT_BULK.scf, INIT_BULK.get_save_format(input_param.data_format)))
163
151
  #7 bigmodel infos
164
152
  if input_param.is_bigmodel:
165
153
  if not input_param.is_scf:
@@ -171,12 +159,20 @@ def do_collection(resource: Resource, input_param:InitBulkParam):
171
159
  data_shuffle=input_param.data_shuffle,
172
160
  interval=1
173
161
  )
174
- result_save_path.append(os.path.join(real_direct_dir, INIT_BULK.get_save_format(input_param.data_format)))
175
- # copy bigmodel and direct files to realdir
176
- copy_dir(bigmodel_dir, os.path.join(collection_dir, INIT_BULK.bigmodel))
177
- # delete logs
162
+ 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)))
163
+ # copy bigmodel and direct files to realdir
164
+ copy_dir(bigmodel_dir, os.path.join(collection_dir, INIT_BULK.bigmodel))
165
+
178
166
  if len(result_save_path) > 0:
179
- result_lines = ["\"{}\",".format(_) for _ in result_save_path]
167
+ _path_path = []
168
+ for _data_path in result_save_path:
169
+ if input_param.data_format == PWDATA.extxyz:
170
+ _path_path.append(_data_path)
171
+ elif input_param.data_format == PWDATA.pwmlff_npy: # */PWdata/*.npy
172
+ tmp = search_files(_data_path, "*/position.npy")
173
+ _path_path.extend([os.path.dirname(_) for _ in tmp])
174
+
175
+ result_lines = ["\"{}\",".format(_) for _ in _path_path]
180
176
  result_lines = "\n".join(result_lines)
181
177
  # result_lines = result_lines[:-1] # Filter the last ','
182
178
  result_save_path = os.path.join(collection_dir, INIT_BULK.npy_format_name)
@@ -188,9 +184,10 @@ def do_collection(resource: Resource, input_param:InitBulkParam):
188
184
  del_file(real_pertub_dir)
189
185
  del_file(real_aimd_dir)
190
186
  del_file(real_relabel_dir)
187
+ del_file(real_bigmodel_dir)
191
188
  # del slurm logs and tags
192
- del_file_list_by_patten(real_bigmodel_dir, "slurm-*")
193
- del_file_list_by_patten(real_direct_dir, "slurm-*")
189
+ del_file_list_by_patten(os.path.join(collection_dir, INIT_BULK.bigmodel), "slurm-*")
190
+ del_file_list_by_patten(os.path.join(collection_dir, INIT_BULK.bigmodel, INIT_BULK.direct), "slurm-*")
194
191
  # copy collection file to target
195
192
  copy_dir(collection_dir, real_collection_dir)
196
193
  if not input_param.reserve_work:
@@ -227,3 +227,7 @@ class Relabel(object):
227
227
  gaussian_base_param=self.input_param.dft_input.gaussian_base_param,# these for cp2k
228
228
  is_scf = True
229
229
  )
230
+
231
+ def do_post_process(self):
232
+ if os.path.exists(self.scf_dir):
233
+ link_file(self.scf_dir, self.real_scf_dir)
@@ -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
- 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)
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
- self.make_train_slurm_job_files(train_list)
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 "$SLURM_NTASKS".lower() in command.lower():
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 'al_pwmlff gather_pwdata' to collect all datas sampled from iterations.")
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.4
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.2-dev",
8
+ version="0.2.4",
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
- ```
@@ -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