pwact 0.4.2__py3-none-any.whl → 0.4.4__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/main.py CHANGED
@@ -7,7 +7,7 @@ import json
7
7
  import argparse
8
8
  from pwact.utils.constant import TEMP_STRUCTURE, UNCERTAINTY, AL_WORK, AL_STRUCTURE, LABEL_FILE_STRUCTURE, EXPLORE_FILE_STRUCTURE, DFT_STYLE
9
9
  from pwact.utils.format_input_output import make_iter_name
10
- from pwact.utils.file_operation import write_to_file, del_file_list, search_files, del_dir, copy_dir
10
+ from pwact.utils.file_operation import write_to_file, del_file_list, search_files, del_dir, copy_dir, copy_file
11
11
  from pwact.utils.json_operation import convert_keys_to_lowercase
12
12
 
13
13
  from pwact.active_learning.user_input.resource import Resource
@@ -183,19 +183,18 @@ def gather_pwmata(input_cmds):
183
183
  pwdata_lists = sorted(pwdata_lists)
184
184
  save_dir = "./final_pwdata"
185
185
  res_data_list = []
186
-
187
186
  for pwdata in pwdata_lists: # /path/iter.0001/label/result/*
188
187
  data_name = os.path.basename(pwdata)
189
188
  iter_name = os.path.basename(os.path.dirname(os.path.dirname(os.path.dirname(pwdata)))) #iter.0001
190
- target_dir = os.path.join(save_dir, iter_name, data_name) #./final_pwdata/iter.0001
191
- copy_dir(pwdata, target_dir)
192
- for path, dirList, fileList in os.walk(pwdata):
193
- for _ in fileList:
194
- if "train.xyz" in _:
195
- res_data_list.append(os.path.join(path, _))
196
- for root, dirs, files in os.walk(pwdata):
197
- if 'energies.npy' in files:
198
- res_data_list.append(root)
189
+ target_dir = os.path.join(save_dir, iter_name, data_name) #./final_pwdata/iter.0001/train.xyz or ./final_pwdata/iter.0001/pwdata/...
190
+ if os.path.isfile(pwdata) and data_name == "train.xyz":
191
+ copy_file(pwdata, target_dir)
192
+ res_data_list.append(os.path.realpath(target_dir))
193
+ else:
194
+ copy_dir(pwdata, target_dir)
195
+ for root, dirs, files in os.walk(pwdata):
196
+ if 'energies.npy' in files:
197
+ res_data_list.append(root)
199
198
 
200
199
  result_lines = ["\"{}\",".format(_) for _ in res_data_list]
201
200
  result_lines = "\n".join(result_lines)
@@ -48,7 +48,7 @@ def read_model_devi(file_path, low=None, high=None):
48
48
  for file in devi_files:
49
49
  _data = np.loadtxt(file, skiprows=0)
50
50
  if _data.shape[0] > 1:
51
- data.extend(list(_data[:, 1])) # force
51
+ data.extend(list(_data[:, 3])) # force
52
52
 
53
53
  right = 0
54
54
  mid = 0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pwact
3
- Version: 0.4.2
3
+ Version: 0.4.4
4
4
  Summary: PWACT is an open-source automated active learning platform based on MatPL for efficient data sampling.
5
5
  Home-page: https://github.com/LonxunQuantum/PWact
6
6
  Author: LonxunQuantum
@@ -1,5 +1,5 @@
1
1
  pwact/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- pwact/main.py,sha256=ZmfzShuphHUuVH9OsPV_obf0g0jK3ka9UwStim_YJ7s,15538
2
+ pwact/main.py,sha256=c729C2FaZfcV_TKRAr1PTr4xJYBqKQBLB-BXvD9tqWg,15608
3
3
  pwact/active_learning/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
4
  pwact/active_learning/environment.py,sha256=aySFa--fTWAgIR9_PKwfJ9pLKVexmL22lJ1NTtnQuNo,512
5
5
  pwact/active_learning/explore/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -59,10 +59,10 @@ pwact/utils/app_lib/do_eqv2model.py,sha256=cRVzagozELK6kCZuX6dqg2gDHQPr7n3TQk6Jg
59
59
  pwact/utils/app_lib/lammps.py,sha256=iXAuCNWA-J6decwKEwT36CAqrnP7Uvs45lAV_diFtug,13778
60
60
  pwact/utils/app_lib/pwmat.py,sha256=PTRPkG_d00ibGhpCe2-4M7MW3dx2ZuAyb9hT2jl_LAs,18047
61
61
  pwact/utils/draw/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
62
- pwact/utils/draw/hist_model_devi.py,sha256=o1Try-ekith2A7S6u1mt3zuTqaQwyw5tdURReh8BeLY,4945
63
- pwact-0.4.2.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
64
- pwact-0.4.2.dist-info/METADATA,sha256=c5LRppBzy_z68Ru94Gw-Dh8ED6ApN52FfTMtbeiqf38,611
65
- pwact-0.4.2.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
66
- pwact-0.4.2.dist-info/entry_points.txt,sha256=p61auAnpbn8E2WjvHNBA7rb9_NRAOCew4zdcCj33cGc,42
67
- pwact-0.4.2.dist-info/top_level.txt,sha256=fY1_7sH5Lke4dC9L8MbYM4fT5aat5eCkAmpkIzY1SlM,6
68
- pwact-0.4.2.dist-info/RECORD,,
62
+ pwact/utils/draw/hist_model_devi.py,sha256=WB0vv9kp35_0pvfq53RMdDTbPEsYcM2ASxQs6lz6Bow,4945
63
+ pwact-0.4.4.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
64
+ pwact-0.4.4.dist-info/METADATA,sha256=0dkeV4ik6nEFlEqCCdIdvyzxEQqOi0mXdcUvWqHgtqQ,611
65
+ pwact-0.4.4.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
66
+ pwact-0.4.4.dist-info/entry_points.txt,sha256=p61auAnpbn8E2WjvHNBA7rb9_NRAOCew4zdcCj33cGc,42
67
+ pwact-0.4.4.dist-info/top_level.txt,sha256=fY1_7sH5Lke4dC9L8MbYM4fT5aat5eCkAmpkIzY1SlM,6
68
+ pwact-0.4.4.dist-info/RECORD,,
File without changes
File without changes