pwdata 0.2.14__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.

Files changed (37) hide show
  1. {pwdata-0.2.14 → pwdata-0.2.15}/PKG-INFO +1 -1
  2. {pwdata-0.2.14 → pwdata-0.2.15}/pwdata/build/supercells.py +1 -1
  3. {pwdata-0.2.14 → pwdata-0.2.15}/pwdata/build/write_struc.py +44 -46
  4. {pwdata-0.2.14 → pwdata-0.2.15}/pwdata.egg-info/PKG-INFO +1 -1
  5. {pwdata-0.2.14 → pwdata-0.2.15}/setup.py +1 -1
  6. {pwdata-0.2.14 → pwdata-0.2.15}/LICENSE +0 -0
  7. {pwdata-0.2.14 → pwdata-0.2.15}/README.md +0 -0
  8. {pwdata-0.2.14 → pwdata-0.2.15}/pwdata/__init__.py +0 -0
  9. {pwdata-0.2.14 → pwdata-0.2.15}/pwdata/atomconfig.py +0 -0
  10. {pwdata-0.2.14 → pwdata-0.2.15}/pwdata/build/__init__.py +0 -0
  11. {pwdata-0.2.14 → pwdata-0.2.15}/pwdata/build/cell.py +0 -0
  12. {pwdata-0.2.14 → pwdata-0.2.15}/pwdata/build/geometry.py +0 -0
  13. {pwdata-0.2.14 → pwdata-0.2.15}/pwdata/calculators/__init__.py +0 -0
  14. {pwdata-0.2.14 → pwdata-0.2.15}/pwdata/calculators/const.py +0 -0
  15. {pwdata-0.2.14 → pwdata-0.2.15}/pwdata/calculators/unitconvert_lmps.py +0 -0
  16. {pwdata-0.2.14 → pwdata-0.2.15}/pwdata/calculators/units.py +0 -0
  17. {pwdata-0.2.14 → pwdata-0.2.15}/pwdata/cp2kdata.py +0 -0
  18. {pwdata-0.2.14 → pwdata-0.2.15}/pwdata/datasets_saver.py +0 -0
  19. {pwdata-0.2.14 → pwdata-0.2.15}/pwdata/deepmd.py +0 -0
  20. {pwdata-0.2.14 → pwdata-0.2.15}/pwdata/dump.py +0 -0
  21. {pwdata-0.2.14 → pwdata-0.2.15}/pwdata/extendedxyz.py +0 -0
  22. {pwdata-0.2.14 → pwdata-0.2.15}/pwdata/image.py +0 -0
  23. {pwdata-0.2.14 → pwdata-0.2.15}/pwdata/lammpsdata.py +0 -0
  24. {pwdata-0.2.14 → pwdata-0.2.15}/pwdata/lmps.py +0 -0
  25. {pwdata-0.2.14 → pwdata-0.2.15}/pwdata/main.py +0 -0
  26. {pwdata-0.2.14 → pwdata-0.2.15}/pwdata/movement.py +0 -0
  27. {pwdata-0.2.14 → pwdata-0.2.15}/pwdata/movement_saver.py +0 -0
  28. {pwdata-0.2.14 → pwdata-0.2.15}/pwdata/outcar.py +0 -0
  29. {pwdata-0.2.14 → pwdata-0.2.15}/pwdata/pertub/__init__.py +0 -0
  30. {pwdata-0.2.14 → pwdata-0.2.15}/pwdata/pertub/perturbation.py +0 -0
  31. {pwdata-0.2.14 → pwdata-0.2.15}/pwdata/pertub/scale.py +0 -0
  32. {pwdata-0.2.14 → pwdata-0.2.15}/pwdata/poscar.py +0 -0
  33. {pwdata-0.2.14 → pwdata-0.2.15}/pwdata/pwmlff.py +0 -0
  34. {pwdata-0.2.14 → pwdata-0.2.15}/pwdata.egg-info/SOURCES.txt +0 -0
  35. {pwdata-0.2.14 → pwdata-0.2.15}/pwdata.egg-info/dependency_links.txt +0 -0
  36. {pwdata-0.2.14 → pwdata-0.2.15}/pwdata.egg-info/top_level.txt +0 -0
  37. {pwdata-0.2.14 → 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.14
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
@@ -80,23 +80,10 @@ def write_config(image,
80
80
  'constraints is parallel with one of the cell axis')
81
81
  sflags[constr.a] = ~mask'''
82
82
 
83
- # Create a list sc of (symbol, count) pairs
84
- if symbol_count:
85
- # sc = symbol_count
86
- pass
87
- elif image.atom_type is None:
88
- sc = Counter(symbols)
89
- atom_type = list(sc.keys())
90
- atom_type_num = list(sc.values())
91
- else:
92
- atom_type = image.atom_type
93
- atom_type_num = image.atom_type_num
94
-
95
- atom_types_image = np.array(image.atom_types_image)
96
-
97
83
  if sort:
98
84
  if len(image.get_atomic_numbers()) == 0:
99
- indices_dict = {type: np.where(atom_types_image == type)[0] for type in atom_type}
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}
100
87
  sorted_indices = np.concatenate([np.sort(indices) for indices in indices_dict.values()])
101
88
  symbols = atom_types_image[sorted_indices]
102
89
  else:
@@ -107,6 +94,18 @@ def write_config(image,
107
94
  # sflags = sflags[ind]
108
95
  else:
109
96
  symbols = image.atom_types_image
97
+
98
+ # Create a list sc of (symbol, count) pairs
99
+ if symbol_count:
100
+ # sc = symbol_count
101
+ pass
102
+ elif image.atom_type_num is None:
103
+ sc = Counter(symbols)
104
+ atom_type = list(sc.keys())
105
+ atom_type_num = list(sc.values())
106
+ else:
107
+ atom_type = image.atom_type
108
+ atom_type_num = image.atom_type_num
110
109
 
111
110
  # Write to file
112
111
  output_file = open(os.path.join(filepath, data_name), 'w')
@@ -199,24 +198,12 @@ def write_vasp(image,
199
198
  'VASP requires that the direction of FixedLine '
200
199
  'constraints is parallel with one of the cell axis')
201
200
  sflags[constr.a] = ~mask'''
202
-
203
- # Create a list sc of (symbol, count) pairs
204
- if symbol_count:
205
- # sc = symbol_count
206
- pass
207
- elif image.atom_type is None:
208
- sc = Counter(symbols)
209
- atom_type = list(sc.keys())
210
- atom_type_num = list(sc.values())
211
- else:
212
- atom_type = image.atom_type
213
- atom_type_num = image.atom_type_num
214
201
 
215
- atom_types_image = np.array(image.atom_types_image)
216
202
 
217
203
  if sort:
218
204
  if len(image.get_atomic_numbers()) == 0:
219
- indices_dict = {type: np.where(atom_types_image == type)[0] for type in atom_type}
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}
220
207
  sorted_indices = np.concatenate([np.sort(indices) for indices in indices_dict.values()])
221
208
  symbols = atom_types_image[sorted_indices]
222
209
  else:
@@ -228,6 +215,18 @@ def write_vasp(image,
228
215
  else:
229
216
  symbols = image.atom_types_image
230
217
 
218
+ # Create a list sc of (symbol, count) pairs
219
+ if symbol_count:
220
+ # sc = symbol_count
221
+ pass
222
+ elif image.atom_type_num is None:
223
+ sc = Counter(symbols)
224
+ atom_type = list(sc.keys())
225
+ atom_type_num = list(sc.values())
226
+ else:
227
+ atom_type = image.atom_type
228
+ atom_type_num = image.atom_type_num
229
+
231
230
  atom_type = [elements[_] for _ in atom_type]
232
231
  # Write to file
233
232
  output_file = open(os.path.join(filepath, data_name), 'w')
@@ -304,33 +303,32 @@ def write_lammps(image,
304
303
  image._set_orthorhombic()
305
304
  coord = image._set_cartesian().position
306
305
 
307
- # Create a list sc of (symbol, count) pairs
308
- if symbol_count:
309
- # sc = symbol_count
310
- pass
311
- elif image.atom_type is None:
312
- sc = Counter(symbols)
313
- atom_type = list(sc.keys())
314
- atom_type_num = list(sc.values())
315
- else:
316
- atom_type = image.atom_type
317
- atom_type_num = image.atom_type_num
318
-
319
- atom_types_image = np.array(image.atom_types_image)
320
-
321
306
  if sort:
322
307
  if len(image.get_atomic_numbers()) == 0:
323
- indices_dict = {type: np.where(atom_types_image == type)[0] for type in atom_type}
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}
324
310
  sorted_indices = np.concatenate([np.sort(indices) for indices in indices_dict.values()])
325
311
  symbols = atom_types_image[sorted_indices]
326
312
  else:
327
313
  sorted_indices = np.argsort(image.get_atomic_numbers())
328
314
  symbols = np.array(image.get_atomic_numbers())[sorted_indices]
329
315
  coord = np.array(coord)[sorted_indices]
330
- # if constraints:
331
- # sflags = sflags[ind]
316
+ # if constraints:
317
+ # sflags = sflags[ind]
332
318
  else:
333
319
  symbols = image.atom_types_image
320
+
321
+ # Create a list sc of (symbol, count) pairs
322
+ if symbol_count:
323
+ # sc = symbol_count
324
+ pass
325
+ elif image.atom_type_num is None:
326
+ sc = Counter(symbols)
327
+ atom_type = list(sc.keys())
328
+ atom_type_num = list(sc.values())
329
+ else:
330
+ atom_type = image.atom_type
331
+ atom_type_num = image.atom_type_num
334
332
 
335
333
  p = 1
336
334
  atype = []
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pwdata
3
- Version: 0.2.14
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.14",
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