pwdata 0.2.13__tar.gz → 0.2.15__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.13 → pwdata-0.2.15}/PKG-INFO +1 -1
- {pwdata-0.2.13 → pwdata-0.2.15}/pwdata/build/supercells.py +1 -1
- {pwdata-0.2.13 → pwdata-0.2.15}/pwdata/build/write_struc.py +30 -24
- {pwdata-0.2.13 → pwdata-0.2.15}/pwdata.egg-info/PKG-INFO +1 -1
- {pwdata-0.2.13 → pwdata-0.2.15}/setup.py +1 -1
- {pwdata-0.2.13 → pwdata-0.2.15}/LICENSE +0 -0
- {pwdata-0.2.13 → pwdata-0.2.15}/README.md +0 -0
- {pwdata-0.2.13 → pwdata-0.2.15}/pwdata/__init__.py +0 -0
- {pwdata-0.2.13 → pwdata-0.2.15}/pwdata/atomconfig.py +0 -0
- {pwdata-0.2.13 → pwdata-0.2.15}/pwdata/build/__init__.py +0 -0
- {pwdata-0.2.13 → pwdata-0.2.15}/pwdata/build/cell.py +0 -0
- {pwdata-0.2.13 → pwdata-0.2.15}/pwdata/build/geometry.py +0 -0
- {pwdata-0.2.13 → pwdata-0.2.15}/pwdata/calculators/__init__.py +0 -0
- {pwdata-0.2.13 → pwdata-0.2.15}/pwdata/calculators/const.py +0 -0
- {pwdata-0.2.13 → pwdata-0.2.15}/pwdata/calculators/unitconvert_lmps.py +0 -0
- {pwdata-0.2.13 → pwdata-0.2.15}/pwdata/calculators/units.py +0 -0
- {pwdata-0.2.13 → pwdata-0.2.15}/pwdata/cp2kdata.py +0 -0
- {pwdata-0.2.13 → pwdata-0.2.15}/pwdata/datasets_saver.py +0 -0
- {pwdata-0.2.13 → pwdata-0.2.15}/pwdata/deepmd.py +0 -0
- {pwdata-0.2.13 → pwdata-0.2.15}/pwdata/dump.py +0 -0
- {pwdata-0.2.13 → pwdata-0.2.15}/pwdata/extendedxyz.py +0 -0
- {pwdata-0.2.13 → pwdata-0.2.15}/pwdata/image.py +0 -0
- {pwdata-0.2.13 → pwdata-0.2.15}/pwdata/lammpsdata.py +0 -0
- {pwdata-0.2.13 → pwdata-0.2.15}/pwdata/lmps.py +0 -0
- {pwdata-0.2.13 → pwdata-0.2.15}/pwdata/main.py +0 -0
- {pwdata-0.2.13 → pwdata-0.2.15}/pwdata/movement.py +0 -0
- {pwdata-0.2.13 → pwdata-0.2.15}/pwdata/movement_saver.py +0 -0
- {pwdata-0.2.13 → pwdata-0.2.15}/pwdata/outcar.py +0 -0
- {pwdata-0.2.13 → pwdata-0.2.15}/pwdata/pertub/__init__.py +0 -0
- {pwdata-0.2.13 → pwdata-0.2.15}/pwdata/pertub/perturbation.py +0 -0
- {pwdata-0.2.13 → pwdata-0.2.15}/pwdata/pertub/scale.py +0 -0
- {pwdata-0.2.13 → pwdata-0.2.15}/pwdata/poscar.py +0 -0
- {pwdata-0.2.13 → pwdata-0.2.15}/pwdata/pwmlff.py +0 -0
- {pwdata-0.2.13 → pwdata-0.2.15}/pwdata.egg-info/SOURCES.txt +0 -0
- {pwdata-0.2.13 → pwdata-0.2.15}/pwdata.egg-info/dependency_links.txt +0 -0
- {pwdata-0.2.13 → pwdata-0.2.15}/pwdata.egg-info/top_level.txt +0 -0
- {pwdata-0.2.13 → pwdata-0.2.15}/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.15
|
|
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
|
|
@@ -21,7 +21,7 @@ def make_supercell(image_data, supercell_matrix: list, pbc: list = None, wrap=Tr
|
|
|
21
21
|
lattice_points_frac = lattice_points_in_supercell(supercell_matrix)
|
|
22
22
|
lattice_points = np.dot(lattice_points_frac, supercell)
|
|
23
23
|
|
|
24
|
-
superatoms = Image(lattice=supercell, pbc=pbc)
|
|
24
|
+
superatoms = Image(lattice=supercell, pbc=pbc, atom_type=image_data.atom_type)
|
|
25
25
|
for lp in lattice_points:
|
|
26
26
|
shifted_atoms = prim.copy()
|
|
27
27
|
shifted_atoms.arrays['position'] += lp
|
|
@@ -82,22 +82,24 @@ def write_config(image,
|
|
|
82
82
|
|
|
83
83
|
if sort:
|
|
84
84
|
if len(image.get_atomic_numbers()) == 0:
|
|
85
|
-
|
|
86
|
-
|
|
85
|
+
atom_types_image = np.array(image.atom_types_image)
|
|
86
|
+
indices_dict = {type: np.where(atom_types_image == type)[0] for type in image.atom_type}
|
|
87
|
+
sorted_indices = np.concatenate([np.sort(indices) for indices in indices_dict.values()])
|
|
88
|
+
symbols = atom_types_image[sorted_indices]
|
|
87
89
|
else:
|
|
88
|
-
|
|
89
|
-
symbols = np.array(image.get_atomic_numbers())[
|
|
90
|
-
coord = np.array(coord)[
|
|
90
|
+
sorted_indices = np.argsort(image.get_atomic_numbers())
|
|
91
|
+
symbols = np.array(image.get_atomic_numbers())[sorted_indices]
|
|
92
|
+
coord = np.array(coord)[sorted_indices]
|
|
91
93
|
# if constraints:
|
|
92
94
|
# sflags = sflags[ind]
|
|
93
95
|
else:
|
|
94
96
|
symbols = image.atom_types_image
|
|
95
|
-
|
|
97
|
+
|
|
96
98
|
# Create a list sc of (symbol, count) pairs
|
|
97
99
|
if symbol_count:
|
|
98
100
|
# sc = symbol_count
|
|
99
101
|
pass
|
|
100
|
-
elif image.
|
|
102
|
+
elif image.atom_type_num is None:
|
|
101
103
|
sc = Counter(symbols)
|
|
102
104
|
atom_type = list(sc.keys())
|
|
103
105
|
atom_type_num = list(sc.values())
|
|
@@ -196,32 +198,35 @@ def write_vasp(image,
|
|
|
196
198
|
'VASP requires that the direction of FixedLine '
|
|
197
199
|
'constraints is parallel with one of the cell axis')
|
|
198
200
|
sflags[constr.a] = ~mask'''
|
|
199
|
-
|
|
201
|
+
|
|
202
|
+
|
|
200
203
|
if sort:
|
|
201
204
|
if len(image.get_atomic_numbers()) == 0:
|
|
202
|
-
|
|
203
|
-
|
|
205
|
+
atom_types_image = np.array(image.atom_types_image)
|
|
206
|
+
indices_dict = {type: np.where(atom_types_image == type)[0] for type in image.atom_type}
|
|
207
|
+
sorted_indices = np.concatenate([np.sort(indices) for indices in indices_dict.values()])
|
|
208
|
+
symbols = atom_types_image[sorted_indices]
|
|
204
209
|
else:
|
|
205
|
-
|
|
206
|
-
symbols = np.array(image.get_atomic_numbers())[
|
|
207
|
-
coord = np.array(coord)[
|
|
210
|
+
sorted_indices = np.argsort(image.get_atomic_numbers())
|
|
211
|
+
symbols = np.array(image.get_atomic_numbers())[sorted_indices]
|
|
212
|
+
coord = np.array(coord)[sorted_indices]
|
|
208
213
|
# if constraints:
|
|
209
214
|
# sflags = sflags[ind]
|
|
210
215
|
else:
|
|
211
216
|
symbols = image.atom_types_image
|
|
212
|
-
|
|
217
|
+
|
|
213
218
|
# Create a list sc of (symbol, count) pairs
|
|
214
219
|
if symbol_count:
|
|
215
220
|
# sc = symbol_count
|
|
216
221
|
pass
|
|
217
|
-
elif image.
|
|
222
|
+
elif image.atom_type_num is None:
|
|
218
223
|
sc = Counter(symbols)
|
|
219
224
|
atom_type = list(sc.keys())
|
|
220
225
|
atom_type_num = list(sc.values())
|
|
221
226
|
else:
|
|
222
227
|
atom_type = image.atom_type
|
|
223
228
|
atom_type_num = image.atom_type_num
|
|
224
|
-
|
|
229
|
+
|
|
225
230
|
atom_type = [elements[_] for _ in atom_type]
|
|
226
231
|
# Write to file
|
|
227
232
|
output_file = open(os.path.join(filepath, data_name), 'w')
|
|
@@ -298,25 +303,26 @@ def write_lammps(image,
|
|
|
298
303
|
image._set_orthorhombic()
|
|
299
304
|
coord = image._set_cartesian().position
|
|
300
305
|
|
|
301
|
-
|
|
302
306
|
if sort:
|
|
303
307
|
if len(image.get_atomic_numbers()) == 0:
|
|
304
|
-
|
|
305
|
-
|
|
308
|
+
atom_types_image = np.array(image.atom_types_image)
|
|
309
|
+
indices_dict = {type: np.where(atom_types_image == type)[0] for type in image.atom_type}
|
|
310
|
+
sorted_indices = np.concatenate([np.sort(indices) for indices in indices_dict.values()])
|
|
311
|
+
symbols = atom_types_image[sorted_indices]
|
|
306
312
|
else:
|
|
307
|
-
|
|
308
|
-
symbols = np.array(image.get_atomic_numbers())[
|
|
309
|
-
coord = np.array(coord)[
|
|
313
|
+
sorted_indices = np.argsort(image.get_atomic_numbers())
|
|
314
|
+
symbols = np.array(image.get_atomic_numbers())[sorted_indices]
|
|
315
|
+
coord = np.array(coord)[sorted_indices]
|
|
310
316
|
# if constraints:
|
|
311
317
|
# sflags = sflags[ind]
|
|
312
318
|
else:
|
|
313
319
|
symbols = image.atom_types_image
|
|
314
|
-
|
|
320
|
+
|
|
315
321
|
# Create a list sc of (symbol, count) pairs
|
|
316
322
|
if symbol_count:
|
|
317
323
|
# sc = symbol_count
|
|
318
324
|
pass
|
|
319
|
-
elif image.
|
|
325
|
+
elif image.atom_type_num is None:
|
|
320
326
|
sc = Counter(symbols)
|
|
321
327
|
atom_type = list(sc.keys())
|
|
322
328
|
atom_type_num = list(sc.values())
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: pwdata
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.15
|
|
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.15",
|
|
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
|