pwdata 0.5.0__tar.gz → 0.5.1__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.
Potentially problematic release.
This version of pwdata might be problematic. Click here for more details.
- {pwdata-0.5.0 → pwdata-0.5.1}/PKG-INFO +1 -1
- {pwdata-0.5.0 → pwdata-0.5.1}/pwdata/check_envs.py +2 -2
- {pwdata-0.5.0 → pwdata-0.5.1}/pwdata/main.py +1 -1
- {pwdata-0.5.0 → pwdata-0.5.1}/pwdata/meta.py +12 -1
- {pwdata-0.5.0 → pwdata-0.5.1}/pwdata/movement.py +2 -4
- pwdata-0.5.1/pwdata/test/outcar2mvms.py +18 -0
- {pwdata-0.5.0 → pwdata-0.5.1}/pwdata.egg-info/PKG-INFO +1 -1
- {pwdata-0.5.0 → pwdata-0.5.1}/pwdata.egg-info/SOURCES.txt +1 -0
- {pwdata-0.5.0 → pwdata-0.5.1}/setup.py +1 -1
- {pwdata-0.5.0 → pwdata-0.5.1}/LICENSE +0 -0
- {pwdata-0.5.0 → pwdata-0.5.1}/README.md +0 -0
- {pwdata-0.5.0 → pwdata-0.5.1}/pwdata/__init__.py +0 -0
- {pwdata-0.5.0 → pwdata-0.5.1}/pwdata/atomconfig.py +0 -0
- {pwdata-0.5.0 → pwdata-0.5.1}/pwdata/build/__init__.py +0 -0
- {pwdata-0.5.0 → pwdata-0.5.1}/pwdata/build/cell.py +0 -0
- {pwdata-0.5.0 → pwdata-0.5.1}/pwdata/build/geometry.py +0 -0
- {pwdata-0.5.0 → pwdata-0.5.1}/pwdata/build/supercells.py +0 -0
- {pwdata-0.5.0 → pwdata-0.5.1}/pwdata/build/write_struc.py +0 -0
- {pwdata-0.5.0 → pwdata-0.5.1}/pwdata/calculators/__init__.py +0 -0
- {pwdata-0.5.0 → pwdata-0.5.1}/pwdata/calculators/const.py +0 -0
- {pwdata-0.5.0 → pwdata-0.5.1}/pwdata/calculators/unitconvert_lmps.py +0 -0
- {pwdata-0.5.0 → pwdata-0.5.1}/pwdata/calculators/units.py +0 -0
- {pwdata-0.5.0 → pwdata-0.5.1}/pwdata/config.py +0 -0
- {pwdata-0.5.0 → pwdata-0.5.1}/pwdata/convert_files.py +0 -0
- {pwdata-0.5.0 → pwdata-0.5.1}/pwdata/cp2kdata.py +0 -0
- {pwdata-0.5.0 → pwdata-0.5.1}/pwdata/datasets_saver.py +0 -0
- {pwdata-0.5.0 → pwdata-0.5.1}/pwdata/deepmd.py +0 -0
- {pwdata-0.5.0 → pwdata-0.5.1}/pwdata/dump.py +0 -0
- {pwdata-0.5.0 → pwdata-0.5.1}/pwdata/extendedxyz.py +0 -0
- {pwdata-0.5.0 → pwdata-0.5.1}/pwdata/fairchem/__init__.py +0 -0
- {pwdata-0.5.0 → pwdata-0.5.1}/pwdata/fairchem/common/__init__.py +0 -0
- {pwdata-0.5.0 → pwdata-0.5.1}/pwdata/fairchem/common/registry.py +0 -0
- {pwdata-0.5.0 → pwdata-0.5.1}/pwdata/fairchem/common/typing.py +0 -0
- {pwdata-0.5.0 → pwdata-0.5.1}/pwdata/fairchem/common/utils.py +0 -0
- {pwdata-0.5.0 → pwdata-0.5.1}/pwdata/fairchem/datasets/__init__.py +0 -0
- {pwdata-0.5.0 → pwdata-0.5.1}/pwdata/fairchem/datasets/_utils.py +0 -0
- {pwdata-0.5.0 → pwdata-0.5.1}/pwdata/fairchem/datasets/ase_datasets.py +0 -0
- {pwdata-0.5.0 → pwdata-0.5.1}/pwdata/fairchem/datasets/base_dataset.py +0 -0
- {pwdata-0.5.0 → pwdata-0.5.1}/pwdata/fairchem/datasets/embeddings/__init__.py +0 -0
- {pwdata-0.5.0 → pwdata-0.5.1}/pwdata/fairchem/datasets/embeddings/atomic_radii.py +0 -0
- {pwdata-0.5.0 → pwdata-0.5.1}/pwdata/fairchem/datasets/embeddings/continuous_embeddings.py +0 -0
- {pwdata-0.5.0 → pwdata-0.5.1}/pwdata/fairchem/datasets/embeddings/khot_embeddings.py +0 -0
- {pwdata-0.5.0 → pwdata-0.5.1}/pwdata/fairchem/datasets/embeddings/qmof_khot_embeddings.py +0 -0
- {pwdata-0.5.0 → pwdata-0.5.1}/pwdata/fairchem/datasets/lmdb_database.py +0 -0
- {pwdata-0.5.0 → pwdata-0.5.1}/pwdata/fairchem/datasets/target_metadata_guesser.py +0 -0
- {pwdata-0.5.0 → pwdata-0.5.1}/pwdata/fairchem/modules/__init__.py +0 -0
- {pwdata-0.5.0 → pwdata-0.5.1}/pwdata/fairchem/modules/transforms.py +0 -0
- {pwdata-0.5.0 → pwdata-0.5.1}/pwdata/fairchem/preprocessing/__init__.py +0 -0
- {pwdata-0.5.0 → pwdata-0.5.1}/pwdata/image.py +0 -0
- {pwdata-0.5.0 → pwdata-0.5.1}/pwdata/lammpsdata.py +0 -0
- {pwdata-0.5.0 → pwdata-0.5.1}/pwdata/lmps.py +0 -0
- {pwdata-0.5.0 → pwdata-0.5.1}/pwdata/movement_saver.py +0 -0
- {pwdata-0.5.0 → pwdata-0.5.1}/pwdata/outcar.py +0 -0
- {pwdata-0.5.0 → pwdata-0.5.1}/pwdata/pertub/__init__.py +0 -0
- {pwdata-0.5.0 → pwdata-0.5.1}/pwdata/pertub/perturbation.py +0 -0
- {pwdata-0.5.0 → pwdata-0.5.1}/pwdata/pertub/scale.py +0 -0
- {pwdata-0.5.0 → pwdata-0.5.1}/pwdata/poscar.py +0 -0
- {pwdata-0.5.0 → pwdata-0.5.1}/pwdata/pwmlff.py +0 -0
- {pwdata-0.5.0 → pwdata-0.5.1}/pwdata/test/__init__.py +0 -0
- {pwdata-0.5.0 → pwdata-0.5.1}/pwdata/test/matpbe2lmdb.py +0 -0
- {pwdata-0.5.0 → pwdata-0.5.1}/pwdata/test/matrcan2lmdb.py +0 -0
- {pwdata-0.5.0 → pwdata-0.5.1}/pwdata/test/mdtrajs2config.py +0 -0
- {pwdata-0.5.0 → pwdata-0.5.1}/pwdata/test/mptraj2lmdb.py +0 -0
- {pwdata-0.5.0 → pwdata-0.5.1}/pwdata/test.py +0 -0
- {pwdata-0.5.0 → pwdata-0.5.1}/pwdata/utils/__init__.py +0 -0
- {pwdata-0.5.0 → pwdata-0.5.1}/pwdata/utils/constant.py +0 -0
- {pwdata-0.5.0 → pwdata-0.5.1}/pwdata/utils/format_change.py +0 -0
- {pwdata-0.5.0 → pwdata-0.5.1}/pwdata.egg-info/dependency_links.txt +0 -0
- {pwdata-0.5.0 → pwdata-0.5.1}/pwdata.egg-info/entry_points.txt +0 -0
- {pwdata-0.5.0 → pwdata-0.5.1}/pwdata.egg-info/requires.txt +0 -0
- {pwdata-0.5.0 → pwdata-0.5.1}/pwdata.egg-info/top_level.txt +0 -0
- {pwdata-0.5.0 → pwdata-0.5.1}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: pwdata
|
|
3
|
-
Version: 0.5.
|
|
3
|
+
Version: 0.5.1
|
|
4
4
|
Summary: pwdata is a data pre-processing tool for PWMLFF, which can be used to extract features and labels. It also provides convenient interfaces for data conversion between different software.
|
|
5
5
|
Home-page: https://github.com/LonxunQuantum/pwdata
|
|
6
6
|
Author: LonxunQuantum
|
|
@@ -58,8 +58,8 @@ def comm_info():
|
|
|
58
58
|
print("\n" + "=" * 50)
|
|
59
59
|
print(" PWDATA Basic Information")
|
|
60
60
|
print("=" * 50)
|
|
61
|
-
print("Version: 0.5.
|
|
62
|
-
print("support pwact: >= 0.
|
|
61
|
+
print("Version: 0.5.2")
|
|
62
|
+
print("support pwact: >= 0.3.0")
|
|
63
63
|
print("support MatPL: >= 2025.3")
|
|
64
64
|
print("Contact: support@pwmat.com")
|
|
65
65
|
print("Citation: https://github.com/LonxunQuantum/MatPL")
|
|
@@ -204,7 +204,7 @@ def run_convert_config(cmd_list:list[str]):
|
|
|
204
204
|
parser.add_argument('-i', '--input', type=str, required=True, help='The input file path')
|
|
205
205
|
parser.add_argument('-f', '--input_format', type=str, required=False, default=None, help="The input file format, if not specified, the format will be automatically inferred based on the input file. the supported format as ['pwmat/config','vasp/poscar', 'lammps/lmp', 'cp2k/scf']")
|
|
206
206
|
parser.add_argument('-s', '--savename', type=str, required=False, default=None, help="The output file name, if not provided, the 'atom.config' for pwmat/config, 'POSCAR' for vasp/poscar, 'lammps.lmp' for lammps/lmp will be used")
|
|
207
|
-
parser.add_argument('-o', '--output_format', type=str, required=
|
|
207
|
+
parser.add_argument('-o', '--output_format', type=str, required=True, default=None, help="the output file format, only support the format ['pwmat/config','vasp/poscar', 'lammps/lmp']")
|
|
208
208
|
parser.add_argument('-c', '--cartesian', action='store_true', help="if '-c' is set, the cartesian coordinates will be used, otherwise the fractional coordinates will be used. 'pwmat/config' only supports fractional coordinates, in which case this parameter becomes invalid")
|
|
209
209
|
parser.add_argument('-t', '--atom_types', type=str, required=False, default=None, nargs='+', help="the atom type list of 'lammps/lmp' or 'lammps/dump' input file, the order is same as the input file")
|
|
210
210
|
args = parser.parse_args(cmd_list)
|
|
@@ -13,7 +13,8 @@ class META(object):
|
|
|
13
13
|
def __init__(self, files: list[str], atom_names: list[str] = None, query: str = None, cpu_nums: int=None):
|
|
14
14
|
self.image_list:list[Image] = []
|
|
15
15
|
self.load_files_cpus(files, atom_names, query, cpu_nums)
|
|
16
|
-
|
|
16
|
+
if len(self.image_list) < 1:
|
|
17
|
+
print("Warining! No data loaded!")
|
|
17
18
|
# self.load_files(files, atom_names, query, cpu_nums) used to debug on one cpu
|
|
18
19
|
|
|
19
20
|
def get(self):
|
|
@@ -51,6 +52,14 @@ class META(object):
|
|
|
51
52
|
cpu_nums = min(cpu_nums, multiprocessing.cpu_count())
|
|
52
53
|
if isinstance(input, str):
|
|
53
54
|
input = [input]
|
|
55
|
+
# single cpu debug
|
|
56
|
+
# atom_lists = []
|
|
57
|
+
# for i, _ in enumerate(input):
|
|
58
|
+
# print(i)
|
|
59
|
+
# _atom_lists = load_and_query_db(_, atom_types, query, filter_with_elements)
|
|
60
|
+
# for _ in _atom_lists:
|
|
61
|
+
# print(_.formula)
|
|
62
|
+
# atom_lists.extend(_atom_lists)
|
|
54
63
|
# 使用多进程并行加载和查询数据库
|
|
55
64
|
with ProcessPoolExecutor(max_workers=cpu_nums) as executor:
|
|
56
65
|
futures = []
|
|
@@ -65,6 +74,8 @@ class META(object):
|
|
|
65
74
|
# 处理所有结果
|
|
66
75
|
for atom_list in atom_lists:
|
|
67
76
|
if len(atom_list) > 0:
|
|
77
|
+
for _ in atom_list:
|
|
78
|
+
print(_.formula)
|
|
68
79
|
self.image_list.extend([to_image(Atoms) for Atoms in atom_list])
|
|
69
80
|
|
|
70
81
|
@staticmethod
|
|
@@ -60,10 +60,8 @@ class MOVEMENT(object):
|
|
|
60
60
|
atom_nums = int(numbers[0])
|
|
61
61
|
iteration = format(float(numbers[1]), '.2f')
|
|
62
62
|
Etot, Ep, Ek = float(numbers[2]), float(numbers[3]), float(numbers[4])
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
else:
|
|
66
|
-
scf = None
|
|
63
|
+
scf = -1
|
|
64
|
+
|
|
67
65
|
return {"atom_nums": atom_nums, "iteration": iteration, "Etot": Etot, "Ep": Ep, "Ek": Ek, "scf": scf}
|
|
68
66
|
|
|
69
67
|
def parse_lattice_stress(self, lattice_content):
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import os, sys
|
|
2
|
+
from pwdata import Config
|
|
3
|
+
|
|
4
|
+
import argparse
|
|
5
|
+
|
|
6
|
+
def run_convert_configs(cmd_list:list[str]):
|
|
7
|
+
parser = argparse.ArgumentParser(description='This command is used for transferring structural files between different apps. For extxyz format, all configs will save to one file, \nFor pwmlff/npy, configs with same atom types and atom nums in each type will save to one dir.\n')
|
|
8
|
+
|
|
9
|
+
parser.add_argument('-i', '--input', type=str, required=True, help="The directory or file path of the datas.\nYou can also use JSON file to list all file paths in 'datapath': [], such as 'pwdata/test/meta_data.json'")
|
|
10
|
+
parser.add_argument('-s', '--savepath', type=str, required=False, default="MOVEMENT", help="The output dir path, if not provided, the current dir will be used")
|
|
11
|
+
args = parser.parse_args(cmd_list)
|
|
12
|
+
image = Config(data_path=args.input, format="vasp/outcar")
|
|
13
|
+
image.to(format="pwmat/movement", data_path=args.savepath)
|
|
14
|
+
print("covert outcar to movement done!")
|
|
15
|
+
|
|
16
|
+
if __name__=="__main__":
|
|
17
|
+
print(sys.argv)
|
|
18
|
+
run_convert_configs(cmd_list = sys.argv[1:])
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: pwdata
|
|
3
|
-
Version: 0.5.
|
|
3
|
+
Version: 0.5.1
|
|
4
4
|
Summary: pwdata is a data pre-processing tool for PWMLFF, which can be used to extract features and labels. It also provides convenient interfaces for data conversion between different software.
|
|
5
5
|
Home-page: https://github.com/LonxunQuantum/pwdata
|
|
6
6
|
Author: LonxunQuantum
|
|
@@ -5,7 +5,7 @@ with open("README.md", "r") as fh:
|
|
|
5
5
|
|
|
6
6
|
setuptools.setup(
|
|
7
7
|
name="pwdata",
|
|
8
|
-
version="0.5.
|
|
8
|
+
version="0.5.1",
|
|
9
9
|
author="LonxunQuantum",
|
|
10
10
|
author_email="lonxun@pwmat.com",
|
|
11
11
|
description="pwdata is a data pre-processing tool for PWMLFF, which can be used to extract features and labels. It also provides convenient interfaces for data conversion between different software.",
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|