pwdata 0.2.16__tar.gz → 0.2.17__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.2.16 → pwdata-0.2.17}/PKG-INFO +1 -1
- {pwdata-0.2.16 → pwdata-0.2.17}/pwdata/datasets_saver.py +1 -1
- {pwdata-0.2.16 → pwdata-0.2.17}/pwdata/extendedxyz.py +4 -3
- {pwdata-0.2.16 → pwdata-0.2.17}/pwdata/image.py +8 -0
- {pwdata-0.2.16 → pwdata-0.2.17}/pwdata.egg-info/PKG-INFO +1 -1
- {pwdata-0.2.16 → pwdata-0.2.17}/setup.py +1 -1
- {pwdata-0.2.16 → pwdata-0.2.17}/LICENSE +0 -0
- {pwdata-0.2.16 → pwdata-0.2.17}/README.md +0 -0
- {pwdata-0.2.16 → pwdata-0.2.17}/pwdata/__init__.py +0 -0
- {pwdata-0.2.16 → pwdata-0.2.17}/pwdata/atomconfig.py +0 -0
- {pwdata-0.2.16 → pwdata-0.2.17}/pwdata/build/__init__.py +0 -0
- {pwdata-0.2.16 → pwdata-0.2.17}/pwdata/build/cell.py +0 -0
- {pwdata-0.2.16 → pwdata-0.2.17}/pwdata/build/geometry.py +0 -0
- {pwdata-0.2.16 → pwdata-0.2.17}/pwdata/build/supercells.py +0 -0
- {pwdata-0.2.16 → pwdata-0.2.17}/pwdata/build/write_struc.py +0 -0
- {pwdata-0.2.16 → pwdata-0.2.17}/pwdata/calculators/__init__.py +0 -0
- {pwdata-0.2.16 → pwdata-0.2.17}/pwdata/calculators/const.py +0 -0
- {pwdata-0.2.16 → pwdata-0.2.17}/pwdata/calculators/unitconvert_lmps.py +0 -0
- {pwdata-0.2.16 → pwdata-0.2.17}/pwdata/calculators/units.py +0 -0
- {pwdata-0.2.16 → pwdata-0.2.17}/pwdata/cp2kdata.py +0 -0
- {pwdata-0.2.16 → pwdata-0.2.17}/pwdata/deepmd.py +0 -0
- {pwdata-0.2.16 → pwdata-0.2.17}/pwdata/dump.py +0 -0
- {pwdata-0.2.16 → pwdata-0.2.17}/pwdata/lammpsdata.py +0 -0
- {pwdata-0.2.16 → pwdata-0.2.17}/pwdata/lmps.py +0 -0
- {pwdata-0.2.16 → pwdata-0.2.17}/pwdata/main.py +0 -0
- {pwdata-0.2.16 → pwdata-0.2.17}/pwdata/movement.py +0 -0
- {pwdata-0.2.16 → pwdata-0.2.17}/pwdata/movement_saver.py +0 -0
- {pwdata-0.2.16 → pwdata-0.2.17}/pwdata/outcar.py +0 -0
- {pwdata-0.2.16 → pwdata-0.2.17}/pwdata/pertub/__init__.py +0 -0
- {pwdata-0.2.16 → pwdata-0.2.17}/pwdata/pertub/perturbation.py +0 -0
- {pwdata-0.2.16 → pwdata-0.2.17}/pwdata/pertub/scale.py +0 -0
- {pwdata-0.2.16 → pwdata-0.2.17}/pwdata/poscar.py +0 -0
- {pwdata-0.2.16 → pwdata-0.2.17}/pwdata/pwmlff.py +0 -0
- {pwdata-0.2.16 → pwdata-0.2.17}/pwdata.egg-info/SOURCES.txt +0 -0
- {pwdata-0.2.16 → pwdata-0.2.17}/pwdata.egg-info/dependency_links.txt +0 -0
- {pwdata-0.2.16 → pwdata-0.2.17}/pwdata.egg-info/top_level.txt +0 -0
- {pwdata-0.2.16 → pwdata-0.2.17}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: pwdata
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.17
|
|
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
|
|
@@ -8,7 +8,7 @@ from pwdata.calculators.const import elements
|
|
|
8
8
|
def save_to_dataset(image_data: list, datasets_path = "./PWdata", train_data_path = "train", valid_data_path = "valid",
|
|
9
9
|
train_ratio = None, random = True, seed = 2024, retain_raw = False, data_name = None):
|
|
10
10
|
|
|
11
|
-
if image_data[0].format == 'extxyz':
|
|
11
|
+
if hasattr(image_data[0], 'format') and image_data[0].format == 'extxyz':
|
|
12
12
|
image_lists = defaultdict(list)
|
|
13
13
|
for image in image_data:
|
|
14
14
|
key = (image.formula, tuple(image.pbc))
|
|
@@ -86,9 +86,10 @@ def save_to_extxyz(image_data_all: list, output_path: str, data_name: str, write
|
|
|
86
86
|
image_data.lattice[2][0], image_data.lattice[2][1], image_data.lattice[2][2])
|
|
87
87
|
if image_data.stress is not None:
|
|
88
88
|
output_head += 'stress="%.8f %.8f %.8f %.8f %.8f %.8f %.8f %.8f %.8f"'
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
89
|
+
stress = image_data.get_stress()
|
|
90
|
+
output_extended += (stress[0][0], stress[0][1], stress[0][2],
|
|
91
|
+
stress[1][0], stress[1][1], stress[1][2],
|
|
92
|
+
stress[2][0], stress[2][1], stress[2][2])
|
|
92
93
|
output_head += '\n'
|
|
93
94
|
data_name.write(output_head % output_extended)
|
|
94
95
|
for j in range(image_data.atom_nums):
|
|
@@ -192,6 +192,14 @@ class Image(object):
|
|
|
192
192
|
"""Get integer array of atomic numbers."""
|
|
193
193
|
return self.arrays['atom_types_image'].copy()
|
|
194
194
|
|
|
195
|
+
def get_stress(self):
|
|
196
|
+
"""Get stress tensor."""
|
|
197
|
+
return self._get_stress()
|
|
198
|
+
|
|
199
|
+
def _get_stress(self):
|
|
200
|
+
stress = np.array(self.stress).reshape(3, 3)
|
|
201
|
+
return stress
|
|
202
|
+
|
|
195
203
|
def _get_positions(self):
|
|
196
204
|
"""Return reference to positions-array for in-place manipulations."""
|
|
197
205
|
return self.arrays['position']
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: pwdata
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.17
|
|
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.2.
|
|
8
|
+
version="0.2.17",
|
|
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
|