pwdata 0.2.13__tar.gz → 0.2.14__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.14}/PKG-INFO +1 -1
- {pwdata-0.2.13 → pwdata-0.2.14}/pwdata/build/write_struc.py +48 -40
- {pwdata-0.2.13 → pwdata-0.2.14}/pwdata.egg-info/PKG-INFO +1 -1
- {pwdata-0.2.13 → pwdata-0.2.14}/setup.py +1 -1
- {pwdata-0.2.13 → pwdata-0.2.14}/LICENSE +0 -0
- {pwdata-0.2.13 → pwdata-0.2.14}/README.md +0 -0
- {pwdata-0.2.13 → pwdata-0.2.14}/pwdata/__init__.py +0 -0
- {pwdata-0.2.13 → pwdata-0.2.14}/pwdata/atomconfig.py +0 -0
- {pwdata-0.2.13 → pwdata-0.2.14}/pwdata/build/__init__.py +0 -0
- {pwdata-0.2.13 → pwdata-0.2.14}/pwdata/build/cell.py +0 -0
- {pwdata-0.2.13 → pwdata-0.2.14}/pwdata/build/geometry.py +0 -0
- {pwdata-0.2.13 → pwdata-0.2.14}/pwdata/build/supercells.py +0 -0
- {pwdata-0.2.13 → pwdata-0.2.14}/pwdata/calculators/__init__.py +0 -0
- {pwdata-0.2.13 → pwdata-0.2.14}/pwdata/calculators/const.py +0 -0
- {pwdata-0.2.13 → pwdata-0.2.14}/pwdata/calculators/unitconvert_lmps.py +0 -0
- {pwdata-0.2.13 → pwdata-0.2.14}/pwdata/calculators/units.py +0 -0
- {pwdata-0.2.13 → pwdata-0.2.14}/pwdata/cp2kdata.py +0 -0
- {pwdata-0.2.13 → pwdata-0.2.14}/pwdata/datasets_saver.py +0 -0
- {pwdata-0.2.13 → pwdata-0.2.14}/pwdata/deepmd.py +0 -0
- {pwdata-0.2.13 → pwdata-0.2.14}/pwdata/dump.py +0 -0
- {pwdata-0.2.13 → pwdata-0.2.14}/pwdata/extendedxyz.py +0 -0
- {pwdata-0.2.13 → pwdata-0.2.14}/pwdata/image.py +0 -0
- {pwdata-0.2.13 → pwdata-0.2.14}/pwdata/lammpsdata.py +0 -0
- {pwdata-0.2.13 → pwdata-0.2.14}/pwdata/lmps.py +0 -0
- {pwdata-0.2.13 → pwdata-0.2.14}/pwdata/main.py +0 -0
- {pwdata-0.2.13 → pwdata-0.2.14}/pwdata/movement.py +0 -0
- {pwdata-0.2.13 → pwdata-0.2.14}/pwdata/movement_saver.py +0 -0
- {pwdata-0.2.13 → pwdata-0.2.14}/pwdata/outcar.py +0 -0
- {pwdata-0.2.13 → pwdata-0.2.14}/pwdata/pertub/__init__.py +0 -0
- {pwdata-0.2.13 → pwdata-0.2.14}/pwdata/pertub/perturbation.py +0 -0
- {pwdata-0.2.13 → pwdata-0.2.14}/pwdata/pertub/scale.py +0 -0
- {pwdata-0.2.13 → pwdata-0.2.14}/pwdata/poscar.py +0 -0
- {pwdata-0.2.13 → pwdata-0.2.14}/pwdata/pwmlff.py +0 -0
- {pwdata-0.2.13 → pwdata-0.2.14}/pwdata.egg-info/SOURCES.txt +0 -0
- {pwdata-0.2.13 → pwdata-0.2.14}/pwdata.egg-info/dependency_links.txt +0 -0
- {pwdata-0.2.13 → pwdata-0.2.14}/pwdata.egg-info/top_level.txt +0 -0
- {pwdata-0.2.13 → pwdata-0.2.14}/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.14
|
|
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
|
|
@@ -80,19 +80,6 @@ def write_config(image,
|
|
|
80
80
|
'constraints is parallel with one of the cell axis')
|
|
81
81
|
sflags[constr.a] = ~mask'''
|
|
82
82
|
|
|
83
|
-
if sort:
|
|
84
|
-
if len(image.get_atomic_numbers()) == 0:
|
|
85
|
-
ind = np.argsort(image.atom_types_image)
|
|
86
|
-
symbols = np.array(image.atom_types_image)[ind]
|
|
87
|
-
else:
|
|
88
|
-
ind = np.argsort(image.get_atomic_numbers())
|
|
89
|
-
symbols = np.array(image.get_atomic_numbers())[ind]
|
|
90
|
-
coord = np.array(coord)[ind]
|
|
91
|
-
# if constraints:
|
|
92
|
-
# sflags = sflags[ind]
|
|
93
|
-
else:
|
|
94
|
-
symbols = image.atom_types_image
|
|
95
|
-
|
|
96
83
|
# Create a list sc of (symbol, count) pairs
|
|
97
84
|
if symbol_count:
|
|
98
85
|
# sc = symbol_count
|
|
@@ -105,6 +92,22 @@ def write_config(image,
|
|
|
105
92
|
atom_type = image.atom_type
|
|
106
93
|
atom_type_num = image.atom_type_num
|
|
107
94
|
|
|
95
|
+
atom_types_image = np.array(image.atom_types_image)
|
|
96
|
+
|
|
97
|
+
if sort:
|
|
98
|
+
if len(image.get_atomic_numbers()) == 0:
|
|
99
|
+
indices_dict = {type: np.where(atom_types_image == type)[0] for type in atom_type}
|
|
100
|
+
sorted_indices = np.concatenate([np.sort(indices) for indices in indices_dict.values()])
|
|
101
|
+
symbols = atom_types_image[sorted_indices]
|
|
102
|
+
else:
|
|
103
|
+
sorted_indices = np.argsort(image.get_atomic_numbers())
|
|
104
|
+
symbols = np.array(image.get_atomic_numbers())[sorted_indices]
|
|
105
|
+
coord = np.array(coord)[sorted_indices]
|
|
106
|
+
# if constraints:
|
|
107
|
+
# sflags = sflags[ind]
|
|
108
|
+
else:
|
|
109
|
+
symbols = image.atom_types_image
|
|
110
|
+
|
|
108
111
|
# Write to file
|
|
109
112
|
output_file = open(os.path.join(filepath, data_name), 'w')
|
|
110
113
|
output_file.write('%d\n' % atom_nums)
|
|
@@ -197,19 +200,6 @@ def write_vasp(image,
|
|
|
197
200
|
'constraints is parallel with one of the cell axis')
|
|
198
201
|
sflags[constr.a] = ~mask'''
|
|
199
202
|
|
|
200
|
-
if sort:
|
|
201
|
-
if len(image.get_atomic_numbers()) == 0:
|
|
202
|
-
ind = np.argsort(image.atom_types_image)
|
|
203
|
-
symbols = np.array(image.atom_types_image)[ind]
|
|
204
|
-
else:
|
|
205
|
-
ind = np.argsort(image.get_atomic_numbers())
|
|
206
|
-
symbols = np.array(image.get_atomic_numbers())[ind]
|
|
207
|
-
coord = np.array(coord)[ind]
|
|
208
|
-
# if constraints:
|
|
209
|
-
# sflags = sflags[ind]
|
|
210
|
-
else:
|
|
211
|
-
symbols = image.atom_types_image
|
|
212
|
-
|
|
213
203
|
# Create a list sc of (symbol, count) pairs
|
|
214
204
|
if symbol_count:
|
|
215
205
|
# sc = symbol_count
|
|
@@ -221,6 +211,22 @@ def write_vasp(image,
|
|
|
221
211
|
else:
|
|
222
212
|
atom_type = image.atom_type
|
|
223
213
|
atom_type_num = image.atom_type_num
|
|
214
|
+
|
|
215
|
+
atom_types_image = np.array(image.atom_types_image)
|
|
216
|
+
|
|
217
|
+
if sort:
|
|
218
|
+
if len(image.get_atomic_numbers()) == 0:
|
|
219
|
+
indices_dict = {type: np.where(atom_types_image == type)[0] for type in atom_type}
|
|
220
|
+
sorted_indices = np.concatenate([np.sort(indices) for indices in indices_dict.values()])
|
|
221
|
+
symbols = atom_types_image[sorted_indices]
|
|
222
|
+
else:
|
|
223
|
+
sorted_indices = np.argsort(image.get_atomic_numbers())
|
|
224
|
+
symbols = np.array(image.get_atomic_numbers())[sorted_indices]
|
|
225
|
+
coord = np.array(coord)[sorted_indices]
|
|
226
|
+
# if constraints:
|
|
227
|
+
# sflags = sflags[ind]
|
|
228
|
+
else:
|
|
229
|
+
symbols = image.atom_types_image
|
|
224
230
|
|
|
225
231
|
atom_type = [elements[_] for _ in atom_type]
|
|
226
232
|
# Write to file
|
|
@@ -298,20 +304,6 @@ def write_lammps(image,
|
|
|
298
304
|
image._set_orthorhombic()
|
|
299
305
|
coord = image._set_cartesian().position
|
|
300
306
|
|
|
301
|
-
|
|
302
|
-
if sort:
|
|
303
|
-
if len(image.get_atomic_numbers()) == 0:
|
|
304
|
-
ind = np.argsort(image.atom_types_image)
|
|
305
|
-
symbols = np.array(image.atom_types_image)[ind]
|
|
306
|
-
else:
|
|
307
|
-
ind = np.argsort(image.get_atomic_numbers())
|
|
308
|
-
symbols = np.array(image.get_atomic_numbers())[ind]
|
|
309
|
-
coord = np.array(coord)[ind]
|
|
310
|
-
# if constraints:
|
|
311
|
-
# sflags = sflags[ind]
|
|
312
|
-
else:
|
|
313
|
-
symbols = image.atom_types_image
|
|
314
|
-
|
|
315
307
|
# Create a list sc of (symbol, count) pairs
|
|
316
308
|
if symbol_count:
|
|
317
309
|
# sc = symbol_count
|
|
@@ -324,6 +316,22 @@ def write_lammps(image,
|
|
|
324
316
|
atom_type = image.atom_type
|
|
325
317
|
atom_type_num = image.atom_type_num
|
|
326
318
|
|
|
319
|
+
atom_types_image = np.array(image.atom_types_image)
|
|
320
|
+
|
|
321
|
+
if sort:
|
|
322
|
+
if len(image.get_atomic_numbers()) == 0:
|
|
323
|
+
indices_dict = {type: np.where(atom_types_image == type)[0] for type in atom_type}
|
|
324
|
+
sorted_indices = np.concatenate([np.sort(indices) for indices in indices_dict.values()])
|
|
325
|
+
symbols = atom_types_image[sorted_indices]
|
|
326
|
+
else:
|
|
327
|
+
sorted_indices = np.argsort(image.get_atomic_numbers())
|
|
328
|
+
symbols = np.array(image.get_atomic_numbers())[sorted_indices]
|
|
329
|
+
coord = np.array(coord)[sorted_indices]
|
|
330
|
+
# if constraints:
|
|
331
|
+
# sflags = sflags[ind]
|
|
332
|
+
else:
|
|
333
|
+
symbols = image.atom_types_image
|
|
334
|
+
|
|
327
335
|
p = 1
|
|
328
336
|
atype = []
|
|
329
337
|
# atom num & type list
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: pwdata
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.14
|
|
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.14",
|
|
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
|