pwact 0.2.0__py3-none-any.whl → 0.2.1__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.
@@ -0,0 +1,145 @@
1
+ from maml.sampling.direct import DIRECTSampler, BirchClustering, SelectKFromClusters
2
+ import numpy as np
3
+ import matplotlib.pyplot as plt
4
+ import matplotlib.ticker as mtick
5
+ from ase.io import read
6
+ import subprocess, os, sys
7
+
8
+ write_file = "select.xyz"
9
+ if os.path.exists(write_file):
10
+ os.remove(write_file)
11
+ filenames = ["candidate.xyz"]
12
+ k = 1
13
+ threshold = .04
14
+ def load_ase_MD_traj(filenames: list):
15
+ """
16
+ Load .traj to pymatgen structures
17
+ """
18
+ structs = []
19
+ trajs = []
20
+ lens = []
21
+ for filename in filenames:
22
+ traj = read(filename,index=":")
23
+ structs += [i for i in traj]
24
+ trajs.append(traj)
25
+ lens.append(len(traj))
26
+ return structs, trajs, lens
27
+
28
+ structures, trajs, lens = load_ase_MD_traj(filenames)
29
+ n_image = len(structures)
30
+
31
+ DIRECT_sampler = DIRECTSampler(
32
+ clustering=BirchClustering(n=None, threshold_init=threshold), select_k_from_clusters=SelectKFromClusters(k=k)
33
+ )
34
+
35
+ DIRECT_selection = DIRECT_sampler.fit_transform(structures)
36
+ n, m = DIRECT_selection["PCAfeatures"].shape
37
+
38
+ explained_variance = DIRECT_sampler.pca.pca.explained_variance_ratio_
39
+ DIRECT_selection["PCAfeatures_unweighted"] = DIRECT_selection["PCAfeatures"] / explained_variance[:m]
40
+
41
+ plt.plot(
42
+ range(1, explained_variance.shape[0]+1),
43
+ explained_variance * 100,
44
+ "o-",
45
+ )
46
+ plt.xlabel("i$^{\mathrm{th}}$ PC", size=20)
47
+ plt.ylabel("Explained variance", size=20)
48
+ ax = plt.gca()
49
+ ax.yaxis.set_major_formatter(mtick.PercentFormatter())
50
+ plt.tight_layout()
51
+ plt.savefig("PCA_variance.png",dpi=360)
52
+ plt.close()
53
+
54
+ def plot_PCAfeature_coverage(all_features, selected_indexes, method="DIRECT"):
55
+ fig, ax = plt.subplots(figsize=(5, 5))
56
+ selected_features = all_features[selected_indexes]
57
+ plt.plot(all_features[:, 0], all_features[:, 1], "*", alpha=0.5, label=f"All {len(all_features):,} structures")
58
+ plt.plot(
59
+ selected_features[:, 0],
60
+ selected_features[:, 1],
61
+ "*",
62
+ alpha=0.5,
63
+ label=f"{method} sampled {len(selected_features):,}",
64
+ )
65
+ legend = plt.legend(frameon=False, fontsize=14, loc="upper left", bbox_to_anchor=(-0.02, 1.02), reverse=True)
66
+ #for lh in legend.legendHandles:
67
+ # lh.set_alpha(1)
68
+ plt.ylabel("PC 2", size=20)
69
+ plt.xlabel("PC 1", size=20)
70
+
71
+ all_features = DIRECT_selection["PCAfeatures_unweighted"]
72
+ selected_indexes = DIRECT_selection["selected_indexes"]
73
+ plot_PCAfeature_coverage(all_features, selected_indexes)
74
+ plt.tight_layout()
75
+ plt.savefig("PCA_direct.png",dpi=360)
76
+ plt.close()
77
+
78
+ #manual_selection_index = np.arange(0, n_image, int(n_image/n))
79
+ #plot_PCAfeature_coverage(all_features, manual_selection_index, "Manually")
80
+ #plt.tight_layout()
81
+ #plt.savefig("PCA_manually.png",dpi=360)
82
+ #plt.close()
83
+
84
+ def calculate_feature_coverage_score(all_features, selected_indexes, n_bins=100):
85
+ selected_features = all_features[selected_indexes]
86
+ n_all = np.count_nonzero(
87
+ np.histogram(all_features, bins=np.linspace(min(all_features), max(all_features), n_bins))[0]
88
+ )
89
+ n_select = np.count_nonzero(
90
+ np.histogram(selected_features, bins=np.linspace(min(all_features), max(all_features), n_bins))[0]
91
+ )
92
+ return n_select / n_all
93
+
94
+ def calculate_all_FCS(all_features, selected_indexes, b_bins=100):
95
+ select_scores = [
96
+ calculate_feature_coverage_score(all_features[:, i], selected_indexes, n_bins=b_bins)
97
+ for i in range(all_features.shape[1])
98
+ ]
99
+ return select_scores
100
+
101
+ all_features = DIRECT_selection["PCAfeatures_unweighted"]
102
+ scores_DIRECT = calculate_all_FCS(all_features, DIRECT_selection["selected_indexes"], b_bins=100)
103
+ #scores_MS = calculate_all_FCS(all_features, manual_selection_index, b_bins=100)
104
+ x = np.arange(len(scores_DIRECT))
105
+ x_ticks = [f"PC {n+1}" for n in range(len(x))]
106
+
107
+ plt.figure(figsize=(15, 4))
108
+ plt.bar(
109
+ x,
110
+ scores_DIRECT,
111
+ width=0.3,
112
+ label=f"DIRECT, $\overline{{\mathrm{{Coverage\ score}}}}$ = {np.mean(scores_DIRECT):.3f}",
113
+ )
114
+ #plt.bar(
115
+ # x + 0.3, scores_MS, width=0.3, label=f"Manual, $\overline{{\mathrm{{Coverage\ score}}}}$ = {np.mean(scores_MS):.3f}"
116
+ #)
117
+ plt.xticks(x, x_ticks, size=16)
118
+ plt.yticks(np.linspace(0, 1.0, 6), size=16)
119
+ plt.ylabel("Coverage score", size=20)
120
+ plt.legend(shadow=True, loc="lower right", fontsize=16)
121
+ plt.tight_layout()
122
+ plt.savefig("Cov_score.png",dpi=360)
123
+ plt.close()
124
+
125
+ def get2index(num: int, list_lens: list):
126
+ for idx, i in enumerate(list_lens):
127
+ if num >= i:
128
+ num -= i
129
+ else:
130
+ break
131
+ return idx, num
132
+
133
+ indices = DIRECT_selection["selected_indexes"]
134
+ select_idx = []
135
+ for ii,index in enumerate(indices):
136
+ idx, num = get2index(index, lens)
137
+ atoms = trajs[idx][num]
138
+ angles = atoms.cell.cellpar()[-3:]
139
+ if angles.max() > 140 or angles.min() < 40:
140
+ continue
141
+ else:
142
+ atoms.set_scaled_positions(atoms.get_scaled_positions())
143
+ atoms.write(write_file,format="extxyz",append=True)
144
+ select_idx.append(idx)
145
+ np.savetxt("select_idx.dat",np.array(indices),fmt="%8d")
@@ -0,0 +1,41 @@
1
+ from ase.io import read
2
+ from fairchem.core import OCPCalculator
3
+ import os
4
+ output_file = 'train.xyz'
5
+ traj = read("select.xyz", index=":")
6
+ calc = OCPCalculator(
7
+ checkpoint_path="/share/public/PWMLFF_test_data/eqv2-models/eqV2_31M_omat.pt",
8
+ cpu=False,
9
+ )
10
+
11
+ def atoms2xyzstr(atoms):
12
+ num_atom = atoms.get_global_number_of_atoms()
13
+ vol = atoms.get_volume()
14
+ pos = atoms.positions
15
+ forces = atoms.get_forces()
16
+ energy = atoms.get_potential_energy()
17
+ cell = atoms.cell
18
+ virial = -atoms.get_stress(voigt=False) * vol
19
+ xyzstr = "%d\n" % num_atom
20
+ xyz_head = 'Lattice="%.3f %.3f %.3f %.3f %.3f %.3f %.3f %.3f %.3f" Properties=species:S:1:pos:R:3:forces:R:3 energy=%.8f'
21
+ xyz_format = (cell[0,0],cell[0,1],cell[0,2],cell[1,0],cell[1,1],cell[1,2],cell[2,0],cell[2,1],cell[2,2],energy)
22
+ if virial is not None:
23
+ xyz_head += ' virial="%.8f %.8f %.8f %.8f %.8f %.8f %.8f %.8f %.8f"'
24
+ xyz_format += (
25
+ virial[0,0], virial[0,1], virial[0,2],
26
+ virial[1,0], virial[1,1], virial[1,2],
27
+ virial[2,0], virial[2,1], virial[2,2]
28
+ )
29
+ xyz_head += '\n'
30
+ xyzstr += xyz_head % xyz_format
31
+ for i in range(num_atom):
32
+ xyzstr += "%2s %14.8f %14.8f %14.8f %14.8f %14.8f %14.8f\n" %\
33
+ (atoms[i].symbol,pos[i,0],pos[i,1],pos[i,2],forces[i,0],forces[i,1],forces[i,2])
34
+ return xyzstr
35
+
36
+ f = open(output_file, "w")
37
+ for i in range(len(traj)):
38
+ atoms = traj[i]
39
+ atoms.calc = calc
40
+ f.write(atoms2xyzstr(atoms))
41
+ f.close()
pwact/utils/constant.py CHANGED
@@ -41,6 +41,7 @@ class SLURM_JOB_TYPE:
41
41
  vasp_scf = "vasp/scf"
42
42
  vasp_aimd = "vasp/aimd"
43
43
  lammps = "lammps"
44
+ direct = "direct"
44
45
 
45
46
  '''
46
47
  description:
@@ -138,6 +139,7 @@ class DFT_STYLE:
138
139
  pwmat = "pwmat"
139
140
  cp2k = "cp2k"
140
141
  lammps = "lammps"
142
+ bigmodel="bigmodel"
141
143
 
142
144
  '''
143
145
  description:
@@ -156,6 +158,8 @@ class DFT_STYLE:
156
158
  return PWDATA.cp2k_scf
157
159
  else:
158
160
  return PWDATA.vasp_poscar
161
+ if dft_style.lower() == DFT_STYLE.bigmodel.lower():
162
+ return PWDATA.extxyz
159
163
 
160
164
  @staticmethod
161
165
  def get_normal_config(dft_style:str): # the input config file name of pwmat vasp and cp2k
@@ -249,17 +253,6 @@ class DFT_STYLE:
249
253
  scf_list = [_.lower() for _ in scf_list]
250
254
  return scf_list
251
255
 
252
- '''
253
- description:
254
- the files in scf does not need reserve
255
- return {*}
256
- author: wuxingxing
257
- '''
258
- @staticmethod
259
- def get_scf_del_list():
260
- del_list = ["final.config"]
261
- return del_list
262
-
263
256
  @staticmethod
264
257
  def get_aimd_config(dft_style:str):
265
258
  if dft_style == DFT_STYLE.pwmat:
@@ -357,6 +350,20 @@ class INIT_BULK:
357
350
  scf_tag = "tag.scf.success"
358
351
  scf_tag_failed ="tag.scf.failed"
359
352
 
353
+ bigmodel="bigmodel"
354
+ bigmodel_job = "bigmodel.job"
355
+ bigmodel_tag = "tag.bigmodel.success"
356
+ bigmodel_tag_failed ="tag.bigmodel.failed"
357
+ bigmodel_traj = "traj.xyz"
358
+
359
+ direct="direct"
360
+ direct_job = "direct.job"
361
+ direct_tag = "tag.direct.success"
362
+ direct_tag_failed ="tag.direct.failed"
363
+ candidate_xyz="candidate.xyz"
364
+ candidate_idx="candidate.json"
365
+ direct_traj = "select.xyz"
366
+
360
367
  collection = "collection"
361
368
  npy_format_save_dir = "PWdata"
362
369
  npy_format_name = "datapath.txt"
@@ -413,11 +420,18 @@ class EXPLORE_FILE_STRUCTURE:
413
420
  kpu= "kpu"
414
421
  md = "md"
415
422
  select = "select"
423
+ direct = "direct"
416
424
  md_tag = "tag.md.success"
417
425
  md_tag_faild = "tag.md.error"
418
426
  md_job = "md.job"
427
+ direct_tag = "tag.direct.success"
428
+ direct_tag_faild = "tag.direct.error"
429
+ direct_job = "direct.job"
419
430
  # selected image info file names
420
431
  candidate = "candidate.csv"
432
+ candidate_xyz="candidate.xyz"
433
+ select_idx = "select_idx.dat"
434
+ select_xyz = "select.xyz"
421
435
  # candidate_random = "candidate_random.csv"
422
436
  candidate_delete = "candidate_delete.csv"
423
437
  failed = "fail.csv"
@@ -446,11 +460,17 @@ class EXPLORE_FILE_STRUCTURE:
446
460
 
447
461
 
448
462
  class LABEL_FILE_STRUCTURE:
463
+ bigmodel="bigmodel"
449
464
  scf = "scf"
450
465
  result = "result"
451
466
  scf_tag = "tag.scf.success"
452
467
  scf_tag_failed = "tag.scf.failed"
453
468
  scf_job = "scf.job"
469
+ bigmodel_job="bigmodel.job"
470
+ bigmodel_tag = "tag.bigmodel.success"
471
+ bigmodel_tag_failed = "tag.bigmodel.failed"
472
+ train_xyz = "train.xyz"
473
+
454
474
 
455
475
  class LAMMPS:
456
476
  input_lammps="in.lammps"
@@ -318,8 +318,15 @@ def get_file_extension(file_name:str, split_char = "."):
318
318
  @Author :wuxingxing
319
319
  """
320
320
 
321
- def get_random_nums(start, end, n):
322
- numsArray = set()
323
- while len(numsArray) < n:
324
- numsArray.add(random.randint(start, end-1))
325
- return list(numsArray)
321
+ def get_random_nums(start, end, n, seed=None):
322
+ if seed is not None:
323
+ local_random = random.Random(seed) # 独立的随机实例
324
+ numsArray = set()
325
+ while len(numsArray) < n:
326
+ numsArray.add(local_random.randint(start, end-1))
327
+ return list(numsArray)
328
+ else:
329
+ numsArray = set()
330
+ while len(numsArray) < n:
331
+ numsArray.add(random.randint(start, end-1))
332
+ return list(numsArray)
@@ -0,0 +1,17 @@
1
+ Metadata-Version: 2.1
2
+ Name: pwact
3
+ Version: 0.2.1
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/)
@@ -1,18 +1,20 @@
1
1
  pwact/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- pwact/main.py,sha256=gsWBnVrBXLbclzonbYhZKPgVOQxb3_FVfKCezlJZz9Y,15100
2
+ pwact/main.py,sha256=jCqNp0tn8P7R8EdPt81bqZlC-Ixjp_rnnFxMT7JAfXI,15375
3
3
  pwact/active_learning/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
4
  pwact/active_learning/environment.py,sha256=1vzOWnCNR2OXMFKz4DjQF2wb0aw1Xkjnz7cy1YGQrus,512
5
5
  pwact/active_learning/explore/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
- pwact/active_learning/explore/run_model_md.py,sha256=hrE-vMJBlvgxTiG0WFG86RX2Gi7ImtutF0PoT2RTTN0,21312
7
- pwact/active_learning/explore/select_image.py,sha256=bDhDbdu6aoFfAdq_z3ha6qnxDGrQjfoHPVOKH7_u1VQ,14470
6
+ pwact/active_learning/explore/run_model_md.py,sha256=n3f6aSMr1Cpw_cSUrlH28JwoWW7VLwUMcF1XB0ao2sw,27448
7
+ pwact/active_learning/explore/select_image.py,sha256=1zpTCs_15FRlffBYfy1HQ1r79p2dNM8u8ZHvPysQTvc,14597
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
10
- pwact/active_learning/init_bulk/duplicate_scale.py,sha256=Z9mYBASy9gNLTV_db8lqfXpcahHbrQq6emae169P2wM,9468
11
- pwact/active_learning/init_bulk/init_bulk_run.py,sha256=B6miVKjY9ClxYW-SyhsY63OHdJRDeL6zc0BMW75SBg8,9151
12
- pwact/active_learning/init_bulk/relabel.py,sha256=DJR90gnC_AIWkcbWGcf2FYVCwPU40iP1uB48cTgGn7k,10447
10
+ pwact/active_learning/init_bulk/direct.py,sha256=TBB7f13wbbURDgn4_IkgRZ-rwQ3p4gviNVYIAldi97U,9680
11
+ pwact/active_learning/init_bulk/duplicate_scale.py,sha256=hlGAr27YJhOElMz5GMyN0wWoChia4Jj_tvENsJ3wSBs,9481
12
+ pwact/active_learning/init_bulk/explore.py,sha256=IAxdOHPzCWjfvrHywyOuBQG2V76rpBZtsyNLQyIMThs,15932
13
+ pwact/active_learning/init_bulk/init_bulk_run.py,sha256=QX0x1-DevQPSYP1PlWji3hZN55DbeSXJJxgCZZkJXBM,11514
14
+ pwact/active_learning/init_bulk/relabel.py,sha256=gP_qqMWT_hMIcwFBdNmyVBHBpkQS52BzbQK80rGTvPQ,11974
13
15
  pwact/active_learning/init_bulk/relax.py,sha256=edyCZLEylUckIwOLBa55agUMo-aedj0dvoyG165YpuE,10450
14
16
  pwact/active_learning/label/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
15
- pwact/active_learning/label/labeling.py,sha256=qtJdAGI_TyO0PtfexqCOITnHOnbTwVZCcaAH7BPGLCk,15102
17
+ pwact/active_learning/label/labeling.py,sha256=Vq2hH9i3DH4X0XidrzxwE-MzgYiWQ0VkFWZKj1Lhc_I,21800
16
18
  pwact/active_learning/slurm/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
17
19
  pwact/active_learning/slurm/slurm.py,sha256=-Dmc2B9y4_27THCR2tZFXnwJvMmifivJeZ2FX8iy2Tw,16881
18
20
  pwact/active_learning/slurm/slurm_tool.py,sha256=-4tc5dkpAUP0vmEdmqM8oYLcsUwixa4Z8h5_E9Gevdg,1249
@@ -20,27 +22,27 @@ pwact/active_learning/test/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJ
20
22
  pwact/active_learning/test/test.py,sha256=TXsk-gDDOHDLywVljpqA-zHK3-PrZbGAHnK1T7T6T-o,3587
21
23
  pwact/active_learning/train/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
22
24
  pwact/active_learning/train/dp_kpu.py,sha256=GkGKEGhLmOvPERqgTkf_0_vD9zOEPlBX2N7vuSQG_-c,9317
23
- pwact/active_learning/train/train_model.py,sha256=F6DUOuTsYGvinv-qz2iqa2j7DPy3hnCySVUkx8DpR_U,11605
25
+ pwact/active_learning/train/train_model.py,sha256=Hh6_yq_86Y4pqP60sbEaeCJexD9a-BTqop07l2FAQSI,12021
24
26
  pwact/active_learning/user_input/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
25
27
  pwact/active_learning/user_input/cmd_infos.py,sha256=g1QW5Wi3JvmC5xEY4F-7AO1xBuJSjHG8IhZjom8haxQ,3728
26
- pwact/active_learning/user_input/init_bulk_input.py,sha256=7Suhxtgu84bn0ziL1RFF-7eSJUcLKJ2HF132RZmpNxw,6982
27
- pwact/active_learning/user_input/iter_input.py,sha256=ffGNq8Qm2mALEviVHpZ0nFuKrqy1FuWriI2hg8F54X0,12131
28
- pwact/active_learning/user_input/resource.py,sha256=bg1rkdjIzuj7pDUvp6h1yMWFT0PqYzH4BfX5tJ7MZzc,6812
29
- pwact/active_learning/user_input/scf_param.py,sha256=tHmGnWrWiZ1dD-EZHfvWtzKGnT6BjIhXKMXNhPmWSQc,10376
28
+ pwact/active_learning/user_input/init_bulk_input.py,sha256=M8IlT4ABJUEwomb6eQGq8d3h1darMHtDlws1fcq077k,9422
29
+ pwact/active_learning/user_input/iter_input.py,sha256=7k0M3BaP1dMWK2Bglvb2WXQ2Ugrfy0v7yMqPqWqNCdE,12744
30
+ pwact/active_learning/user_input/resource.py,sha256=OtsJEAWmMknLyrPB309C6ipyL1fCXHriF8sjXs5pjmg,7351
31
+ pwact/active_learning/user_input/scf_param.py,sha256=QX_Dd6c9Q2sjV4lIKjfV7t-DgIwDKZp7fh2KY5HyKOU,11262
30
32
  pwact/active_learning/user_input/workdir.py,sha256=64J3wBbYzy6ztYHs513YHfEIF5d8zwv_WpF-U9HOEkA,8245
31
33
  pwact/active_learning/user_input/train_param/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
32
34
  pwact/active_learning/user_input/train_param/model_param.py,sha256=4-bJAGOJDTLT11lLqpEZAWMqgen7zghHESfHeb0UUb4,4574
33
35
  pwact/active_learning/user_input/train_param/nep_param.py,sha256=04GEKqT2miZYxgVtxTEGIWJW5mUZriPcvwfgdp7IL0g,21249
34
36
  pwact/active_learning/user_input/train_param/nn_feature_type.py,sha256=eGmqfsPTlIpftzvUqHV_VziGQuUZ_KKqek3SQKZl85o,15640
35
- pwact/active_learning/user_input/train_param/optimizer_param.py,sha256=1Vl_BulrLkJmOPSetyn2HJMcwjizkkjrhvz0x8DzLRU,13084
37
+ pwact/active_learning/user_input/train_param/optimizer_param.py,sha256=8zG3l6DqEjmwNCqRwpcA1J1oY2tm-J-V4zl3sM0G_ek,13085
36
38
  pwact/active_learning/user_input/train_param/train_param.py,sha256=rpLmOncwqQ82Hudwwl-VzZKJv2jCtrsCsJN2UpuHqKg,16640
37
39
  pwact/active_learning/user_input/train_param/work_file_param.py,sha256=3sQiHcquQO9hw0JexiMXkuf01gy871yjYz9GEZ3Icoo,12239
38
40
  pwact/bin/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
39
41
  pwact/data_format/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
40
42
  pwact/data_format/configop.py,sha256=6JA84cK7Ck-t1z3iLz3pPVJ-q4srhDiQQhs9-G-cxY0,11772
41
43
  pwact/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
42
- pwact/utils/constant.py,sha256=swLs-0Lulc22ZvJ_cwEYTO8r5cxB3y5YB2EnwxhfRNE,18757
43
- pwact/utils/file_operation.py,sha256=1W5kGzGAznbAs2vyUhh5sDim62qQOkTPgphSOe_oDvI,9536
44
+ pwact/utils/constant.py,sha256=qKiASMwMpROa_w29NEyUG6Uov8di4UGprXBIa7tUGjc,19482
45
+ pwact/utils/file_operation.py,sha256=bfLezgJHD3BRtZFm0HwSGTNBPukVNICZFpXYWMs68A4,9827
44
46
  pwact/utils/format_input_output.py,sha256=oYFydQy3-btXzieO2O2LbHFoeRyhPnLVE4c5TNgS-IQ,1798
45
47
  pwact/utils/json_operation.py,sha256=BqBsnIjk1URoMW_s2yu7Gk8IBxlir-oo6ivt8P3RIqg,1794
46
48
  pwact/utils/pre_al_data_util.py,sha256=QE-axnVYUIyORFiVs-WK9-UaJlMUFY816_rSyYOOJc8,2542
@@ -51,13 +53,15 @@ pwact/utils/app_lib/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSu
51
53
  pwact/utils/app_lib/common.py,sha256=lQmI-9Qumq62MNjr-eVlLL88ISDHBOb6vAfYYFcDIgM,6040
52
54
  pwact/utils/app_lib/cp2k.py,sha256=txd-eMDUOsWPug395WJOQz3aqhwz7eU4hcEZIWTF1OY,15492
53
55
  pwact/utils/app_lib/cp2k_dp.py,sha256=VP4gyPGhLcMAqAjrqCQSUiiGlESNlyYz7Gs3Q4QoUHo,6912
56
+ pwact/utils/app_lib/do_direct_sample.py,sha256=G8VZH23c2vBJwG9pp_H9EvRVaRJPsQVliDH-v6l2Gek,4947
57
+ pwact/utils/app_lib/do_eqv2model.py,sha256=cRVzagozELK6kCZuX6dqg2gDHQPr7n3TQk6JghDjiy4,1509
54
58
  pwact/utils/app_lib/lammps.py,sha256=t3nkBqwkViO6UbnInGKAHiwVngHKayeat2pPEtaZZIU,8015
55
59
  pwact/utils/app_lib/pwmat.py,sha256=PTRPkG_d00ibGhpCe2-4M7MW3dx2ZuAyb9hT2jl_LAs,18047
56
60
  pwact/utils/draw/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
57
61
  pwact/utils/draw/hist_model_devi.py,sha256=o1Try-ekith2A7S6u1mt3zuTqaQwyw5tdURReh8BeLY,4945
58
- pwact-0.2.0.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
59
- pwact-0.2.0.dist-info/METADATA,sha256=wlqbUATqsi_RBbpLC_1SytmOIFiUtIKqTIXNLs2bV9U,3658
60
- pwact-0.2.0.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
61
- pwact-0.2.0.dist-info/entry_points.txt,sha256=p61auAnpbn8E2WjvHNBA7rb9_NRAOCew4zdcCj33cGc,42
62
- pwact-0.2.0.dist-info/top_level.txt,sha256=fY1_7sH5Lke4dC9L8MbYM4fT5aat5eCkAmpkIzY1SlM,6
63
- pwact-0.2.0.dist-info/RECORD,,
62
+ pwact-0.2.1.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
63
+ pwact-0.2.1.dist-info/METADATA,sha256=wk-2qBIua2agM_XNjx-pQ17K9dXDjbL0g88Caz-41kc,612
64
+ pwact-0.2.1.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
65
+ pwact-0.2.1.dist-info/entry_points.txt,sha256=p61auAnpbn8E2WjvHNBA7rb9_NRAOCew4zdcCj33cGc,42
66
+ pwact-0.2.1.dist-info/top_level.txt,sha256=fY1_7sH5Lke4dC9L8MbYM4fT5aat5eCkAmpkIzY1SlM,6
67
+ pwact-0.2.1.dist-info/RECORD,,
@@ -1,107 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: pwact
3
- Version: 0.2.0
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