pwact 0.1.24__tar.gz → 0.1.25__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 (66) hide show
  1. {pwact-0.1.24 → pwact-0.1.25}/PKG-INFO +1 -1
  2. {pwact-0.1.24 → pwact-0.1.25}/pwact/active_learning/user_input/cmd_infos.py +8 -4
  3. pwact-0.1.25/pwact/utils/tmp.py +63 -0
  4. {pwact-0.1.24 → pwact-0.1.25}/pwact.egg-info/PKG-INFO +1 -1
  5. {pwact-0.1.24 → pwact-0.1.25}/setup.py +1 -1
  6. pwact-0.1.24/pwact/utils/tmp.py +0 -29
  7. {pwact-0.1.24 → pwact-0.1.25}/LICENSE +0 -0
  8. {pwact-0.1.24 → pwact-0.1.25}/README.md +0 -0
  9. {pwact-0.1.24 → pwact-0.1.25}/pwact/__init__.py +0 -0
  10. {pwact-0.1.24 → pwact-0.1.25}/pwact/active_learning/__init__.py +0 -0
  11. {pwact-0.1.24 → pwact-0.1.25}/pwact/active_learning/environment.py +0 -0
  12. {pwact-0.1.24 → pwact-0.1.25}/pwact/active_learning/explore/__init__.py +0 -0
  13. {pwact-0.1.24 → pwact-0.1.25}/pwact/active_learning/explore/run_model_md.py +0 -0
  14. {pwact-0.1.24 → pwact-0.1.25}/pwact/active_learning/explore/select_image.py +0 -0
  15. {pwact-0.1.24 → pwact-0.1.25}/pwact/active_learning/init_bulk/__init__.py +0 -0
  16. {pwact-0.1.24 → pwact-0.1.25}/pwact/active_learning/init_bulk/aimd.py +0 -0
  17. {pwact-0.1.24 → pwact-0.1.25}/pwact/active_learning/init_bulk/duplicate_scale.py +0 -0
  18. {pwact-0.1.24 → pwact-0.1.25}/pwact/active_learning/init_bulk/init_bulk_run.py +0 -0
  19. {pwact-0.1.24 → pwact-0.1.25}/pwact/active_learning/init_bulk/relabel.py +0 -0
  20. {pwact-0.1.24 → pwact-0.1.25}/pwact/active_learning/init_bulk/relax.py +0 -0
  21. {pwact-0.1.24 → pwact-0.1.25}/pwact/active_learning/label/__init__.py +0 -0
  22. {pwact-0.1.24 → pwact-0.1.25}/pwact/active_learning/label/labeling.py +0 -0
  23. {pwact-0.1.24 → pwact-0.1.25}/pwact/active_learning/slurm/__init__.py +0 -0
  24. {pwact-0.1.24 → pwact-0.1.25}/pwact/active_learning/slurm/slurm.py +0 -0
  25. {pwact-0.1.24 → pwact-0.1.25}/pwact/active_learning/slurm/slurm_tool.py +0 -0
  26. {pwact-0.1.24 → pwact-0.1.25}/pwact/active_learning/test/__init__.py +0 -0
  27. {pwact-0.1.24 → pwact-0.1.25}/pwact/active_learning/test/test.py +0 -0
  28. {pwact-0.1.24 → pwact-0.1.25}/pwact/active_learning/train/__init__.py +0 -0
  29. {pwact-0.1.24 → pwact-0.1.25}/pwact/active_learning/train/dp_kpu.py +0 -0
  30. {pwact-0.1.24 → pwact-0.1.25}/pwact/active_learning/train/train_model.py +0 -0
  31. {pwact-0.1.24 → pwact-0.1.25}/pwact/active_learning/user_input/__init__.py +0 -0
  32. {pwact-0.1.24 → pwact-0.1.25}/pwact/active_learning/user_input/init_bulk_input.py +0 -0
  33. {pwact-0.1.24 → pwact-0.1.25}/pwact/active_learning/user_input/iter_input.py +0 -0
  34. {pwact-0.1.24 → pwact-0.1.25}/pwact/active_learning/user_input/resource.py +0 -0
  35. {pwact-0.1.24 → pwact-0.1.25}/pwact/active_learning/user_input/scf_param.py +0 -0
  36. {pwact-0.1.24 → pwact-0.1.25}/pwact/active_learning/user_input/train_param/__init__.py +0 -0
  37. {pwact-0.1.24 → pwact-0.1.25}/pwact/active_learning/user_input/train_param/model_param.py +0 -0
  38. {pwact-0.1.24 → pwact-0.1.25}/pwact/active_learning/user_input/train_param/nep_param.py +0 -0
  39. {pwact-0.1.24 → pwact-0.1.25}/pwact/active_learning/user_input/train_param/nn_feature_type.py +0 -0
  40. {pwact-0.1.24 → pwact-0.1.25}/pwact/active_learning/user_input/train_param/optimizer_param.py +0 -0
  41. {pwact-0.1.24 → pwact-0.1.25}/pwact/active_learning/user_input/train_param/train_param.py +0 -0
  42. {pwact-0.1.24 → pwact-0.1.25}/pwact/active_learning/user_input/train_param/work_file_param.py +0 -0
  43. {pwact-0.1.24 → pwact-0.1.25}/pwact/active_learning/user_input/workdir.py +0 -0
  44. {pwact-0.1.24 → pwact-0.1.25}/pwact/bin/__init__.py +0 -0
  45. {pwact-0.1.24 → pwact-0.1.25}/pwact/data_format/__init__.py +0 -0
  46. {pwact-0.1.24 → pwact-0.1.25}/pwact/data_format/configop.py +0 -0
  47. {pwact-0.1.24 → pwact-0.1.25}/pwact/main.py +0 -0
  48. {pwact-0.1.24 → pwact-0.1.25}/pwact/utils/__init__.py +0 -0
  49. {pwact-0.1.24 → pwact-0.1.25}/pwact/utils/app_lib/__init__.py +0 -0
  50. {pwact-0.1.24 → pwact-0.1.25}/pwact/utils/app_lib/common.py +0 -0
  51. {pwact-0.1.24 → pwact-0.1.25}/pwact/utils/app_lib/cp2k.py +0 -0
  52. {pwact-0.1.24 → pwact-0.1.25}/pwact/utils/app_lib/cp2k_dp.py +0 -0
  53. {pwact-0.1.24 → pwact-0.1.25}/pwact/utils/app_lib/lammps.py +0 -0
  54. {pwact-0.1.24 → pwact-0.1.25}/pwact/utils/app_lib/pwmat.py +0 -0
  55. {pwact-0.1.24 → pwact-0.1.25}/pwact/utils/constant.py +0 -0
  56. {pwact-0.1.24 → pwact-0.1.25}/pwact/utils/file_operation.py +0 -0
  57. {pwact-0.1.24 → pwact-0.1.25}/pwact/utils/format_input_output.py +0 -0
  58. {pwact-0.1.24 → pwact-0.1.25}/pwact/utils/json_operation.py +0 -0
  59. {pwact-0.1.24 → pwact-0.1.25}/pwact/utils/pre_al_data_util.py +0 -0
  60. {pwact-0.1.24 → pwact-0.1.25}/pwact/utils/process_tool.py +0 -0
  61. {pwact-0.1.24 → pwact-0.1.25}/pwact/utils/slurm_script.py +0 -0
  62. {pwact-0.1.24 → pwact-0.1.25}/pwact.egg-info/SOURCES.txt +0 -0
  63. {pwact-0.1.24 → pwact-0.1.25}/pwact.egg-info/dependency_links.txt +0 -0
  64. {pwact-0.1.24 → pwact-0.1.25}/pwact.egg-info/entry_points.txt +0 -0
  65. {pwact-0.1.24 → pwact-0.1.25}/pwact.egg-info/top_level.txt +0 -0
  66. {pwact-0.1.24 → pwact-0.1.25}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pwact
3
- Version: 0.1.24
3
+ Version: 0.1.25
4
4
  Summary: PWACT is an open-source automated active learning platform based on PWMLFF for efficient data sampling.
5
5
  Home-page: https://github.com/LonxunQuantum/PWact
6
6
  Author: LonxunQuantum
@@ -21,19 +21,23 @@ def cmd_infos(cmd_type=None):
21
21
  cmd_info += "'pwact kill init_bulk' for 'init_bulk' tasks\n"
22
22
  cmd_info += "'pwact kill run' for 'run' tasks\n\n"
23
23
 
24
+ cmd_info += "gather_pwdata".lower() + "\n"
25
+ cmd_info += "you could use this method to extract pwdatas after active learing done.\nFor more detail for this command, you could use 'pwact gather_pwdata -h'\n\n"
26
+
27
+ cmd_info += "filter" + "\n"
28
+ cmd_info += "you could use this method to test the selection results corresponding to the upper and lower limit settings, you could use 'pwact filter -h'\n"
29
+
24
30
  cmd_info += "to_pwdata".lower() + "\n"
25
31
  cmd_info += "(This method has been abandoned, new conversion methods refer to the pwdata documentation http://doc.lonxun.com/PWMLFF/Appendix-2/)\n\n"
26
- cmd_info += "you could use this method to change outcars or movements to pwdata format.\nFor more detail for this command, you could use 'PWact to_pwdata -h'\n\n"
32
+ cmd_info += "you could use this method to change outcars or movements to pwdata format.\nFor more detail for this command, you could use 'pwact to_pwdata -h'\n\n"
27
33
 
28
- cmd_info += "gather_pwdata".lower() + "\n"
29
- cmd_info += "you could use this method to extract pwdatas after active learing done.\nFor more detail for this command, you could use 'PWact gather_pwdata -h'\n\n"
30
-
31
34
  cmd_info += "\n\n"
32
35
  cmd_info += "examples of pwact are located at the dir 'pwact/example'\n"
33
36
  cmd_info += "you can alse download them from github link:\n"
34
37
  cmd_info += "https://github.com/LonxunQuantum/PWact/tree/main/pwact/example\n\n"
35
38
  cmd_info += "or download from BaiduNetdisk included the calculation results of examples:\n"
36
39
  cmd_info += "https://pan.baidu.com/s/14E0u_7cpntiBZgg-C1S5XA?pwd=pwmt\n\n"
40
+
37
41
  elif cmd_type == "init_bulk":
38
42
  cmd_info = cmd_info_init_bulk()
39
43
  elif cmd_type == "run":
@@ -0,0 +1,63 @@
1
+ from pwdata import Config
2
+ import os, sys, glob
3
+ import numpy as np
4
+
5
+ def count_pwdata():
6
+ work_dir = "/data/home/wuxingxing/datas/debugs/dengjiapei/run_iter/mlmd_pwdata"
7
+ dir_list = glob.glob(os.path.join(work_dir, "*"))
8
+ res = []
9
+ for dir in dir_list:
10
+ # train
11
+ train_num = np.load(os.path.join(dir, "train/energies.npy")).shape[0]
12
+ res.append(train_num)
13
+
14
+ if os.path.exists(os.path.join(dir, "valid/energies.npy")):
15
+ test_num = np.load(os.path.join(dir, "valid/energies.npy")).shape[0]
16
+ res.append(test_num)
17
+ print("{} {} {}".format( dir, train_num, test_num))
18
+ else:
19
+ print("{} {}".format(dir, train_num))
20
+ print(np.sum(res))
21
+
22
+ def count_outmlmd():
23
+ work_dir = "/data/home/wuxingxing/datas/debugs/dengjiapei/run_iter/iter.0000/label/scf"
24
+ mlmds = glob.glob(os.path.join(work_dir, "*/*/*/OUT.MLMD"))
25
+ print(len(mlmds))
26
+
27
+ def save_mlmd():
28
+ work_dir = "/data/home/wuxingxing/datas/debugs/dengjiapei/run_iter"
29
+ data_list = glob.glob(os.path.join(work_dir, "iter.*/label/scf/*/*/*/OUT.MLMD"))
30
+ datasets_path = "/data/home/wuxingxing/datas/debugs/dengjiapei/run_iter/mlmd_pwdata"
31
+ # data_name = datasets_path
32
+ image_data = None
33
+ for data_path in data_list:
34
+ if image_data is not None:
35
+ tmp_config = Config("pwmat/movement", data_path)
36
+ # if not isinstance(tmp_config, list):
37
+ # tmp_config = [tmp_config]
38
+ image_data.images.extend(tmp_config.images)
39
+ else:
40
+ image_data = Config("pwmat/movement", data_path)
41
+
42
+ if not isinstance(image_data.images, list):
43
+ image_data.images = [image_data.images]
44
+
45
+ # if not isinstance(image_data, list):
46
+ # image_data = [image_data]
47
+ image_data.to(
48
+ output_path=datasets_path,
49
+ save_format="pwmlff/npy",
50
+ train_ratio = 0.8,
51
+ train_data_path="train",
52
+ valid_data_path="valid",
53
+ random=True,
54
+ seed = 2024,
55
+ retain_raw = False
56
+ )
57
+ print(len(image_data.images))
58
+
59
+
60
+ if __name__=="__main__":
61
+ count_pwdata()
62
+ # count_outmlmd()
63
+ # save_mlmd()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pwact
3
- Version: 0.1.24
3
+ Version: 0.1.25
4
4
  Summary: PWACT is an open-source automated active learning platform based on PWMLFF for efficient data sampling.
5
5
  Home-page: https://github.com/LonxunQuantum/PWact
6
6
  Author: LonxunQuantum
@@ -5,7 +5,7 @@ with open("README.md", "r") as fh:
5
5
 
6
6
  setuptools.setup(
7
7
  name="pwact",
8
- version="0.1.24",
8
+ version="0.1.25",
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.",
@@ -1,29 +0,0 @@
1
- from pwdata import Config
2
- import os, sys, glob
3
- import numpy as np
4
-
5
- def count_pwdata():
6
- work_dir = "/data/home/wuxingxing/datas/debugs/dengjiapei/run_iter/iter.0000/label/result_bk"
7
- dir_list = glob.glob(os.path.join(work_dir, "*"))
8
- res = []
9
- for dir in dir_list:
10
- # train
11
- train_num = np.load(os.path.join(dir, "train/energies.npy")).shape[0]
12
- res.append(train_num)
13
-
14
- if os.path.exists(os.path.join(dir, "valid/energies.npy")):
15
- test_num = np.load(os.path.join(dir, "valid/energies.npy")).shape[0]
16
- res.append(test_num)
17
- print("{} {} {}".format( dir, train_num, test_num))
18
- else:
19
- print("{} {}".format(dir, train_num))
20
- print(np.sum(res))
21
-
22
- def count_outmlmd():
23
- work_dir = "/data/home/wuxingxing/datas/debugs/dengjiapei/run_iter/iter.0000/label/scf"
24
- mlmds = glob.glob(os.path.join(work_dir, "*/*/*/OUT.MLMD"))
25
- print(len(mlmds))
26
-
27
- if __name__=="__main__":
28
- count_pwdata()
29
- count_outmlmd()
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes