surface-construct 0.5.10__tar.gz → 0.5.11__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.
Files changed (21) hide show
  1. {surface_construct-0.5.10/surface_construct.egg-info → surface_construct-0.5.11}/PKG-INFO +6 -1
  2. {surface_construct-0.5.10 → surface_construct-0.5.11}/README.md +5 -0
  3. {surface_construct-0.5.10 → surface_construct-0.5.11}/setup.py +1 -1
  4. {surface_construct-0.5.10 → surface_construct-0.5.11}/surface_construct/surface_grid.py +10 -6
  5. {surface_construct-0.5.10 → surface_construct-0.5.11/surface_construct.egg-info}/PKG-INFO +6 -1
  6. {surface_construct-0.5.10 → surface_construct-0.5.11}/LICENSE +0 -0
  7. {surface_construct-0.5.10 → surface_construct-0.5.11}/setup.cfg +0 -0
  8. {surface_construct-0.5.10 → surface_construct-0.5.11}/surface_construct/__init__.py +0 -0
  9. {surface_construct-0.5.10 → surface_construct-0.5.11}/surface_construct/atoms.py +0 -0
  10. {surface_construct-0.5.10 → surface_construct-0.5.11}/surface_construct/db.py +0 -0
  11. {surface_construct-0.5.10 → surface_construct-0.5.11}/surface_construct/default_parameter.py +0 -0
  12. {surface_construct-0.5.10 → surface_construct-0.5.11}/surface_construct/sampling.py +0 -0
  13. {surface_construct-0.5.10 → surface_construct-0.5.11}/surface_construct/structure.py +0 -0
  14. {surface_construct-0.5.10 → surface_construct-0.5.11}/surface_construct/surface.py +0 -0
  15. {surface_construct-0.5.10 → surface_construct-0.5.11}/surface_construct/utils.py +0 -0
  16. {surface_construct-0.5.10 → surface_construct-0.5.11}/surface_construct.egg-info/SOURCES.txt +0 -0
  17. {surface_construct-0.5.10 → surface_construct-0.5.11}/surface_construct.egg-info/dependency_links.txt +0 -0
  18. {surface_construct-0.5.10 → surface_construct-0.5.11}/surface_construct.egg-info/requires.txt +0 -0
  19. {surface_construct-0.5.10 → surface_construct-0.5.11}/surface_construct.egg-info/top_level.txt +0 -0
  20. {surface_construct-0.5.10 → surface_construct-0.5.11}/tests/test_surface_grid.py +0 -0
  21. {surface_construct-0.5.10 → surface_construct-0.5.11}/tests/test_systematic_opt.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: surface_construct
3
- Version: 0.5.10
3
+ Version: 0.5.11
4
4
  Summary: Surface termination construction especially for complex model, such as oxides or carbides.
5
5
  Home-page: https://gitee.com/pjren/surface_construct/
6
6
  Author: ren
@@ -67,6 +67,11 @@ A Method with Stratified Sampling Strategy for Comprehensive Analysis of Catalys
67
67
 
68
68
  `pip install -U surface-construct`
69
69
 
70
+ ## 发布新版本 (only for 管理员)
71
+
72
+ python -m build
73
+ twine upload --verbose dist/*
74
+
70
75
  ## 使用方法 Manual
71
76
 
72
77
  ### 所需文件 Required Files
@@ -44,6 +44,11 @@ A Method with Stratified Sampling Strategy for Comprehensive Analysis of Catalys
44
44
 
45
45
  `pip install -U surface-construct`
46
46
 
47
+ ## 发布新版本 (only for 管理员)
48
+
49
+ python -m build
50
+ twine upload --verbose dist/*
51
+
47
52
  ## 使用方法 Manual
48
53
 
49
54
  ### 所需文件 Required Files
@@ -17,7 +17,7 @@ install_requires = [
17
17
 
18
18
  setup(
19
19
  name='surface_construct',
20
- version='0.5.10',
20
+ version='0.5.11',
21
21
  packages=['surface_construct'],
22
22
  url='https://gitee.com/pjren/surface_construct/',
23
23
  license='GPL',
@@ -165,7 +165,7 @@ class SurfaceGrid:
165
165
  result[dim, int((sign+1)/2)] = v
166
166
  return np.concatenate(result) # [xmin, xmax, ymin, ymax, zmin, zmax]
167
167
 
168
- def gridize(self):
168
+ def gridize(self, surface_index=None):
169
169
  """
170
170
  格点化。
171
171
  这种方法仅仅适用于无孔的材料,表面为z方向,且方向向上。
@@ -189,15 +189,19 @@ class SurfaceGrid:
189
189
  xyz[:, 2] = zmax
190
190
  z = zmax
191
191
  nonbond_index = np.ones(len(xyz), bool)
192
- grid_dist_array = np.zeros((len(xyz), len(self.atoms), 3))
193
- grid_dist = np.zeros((len(xyz), len(self.atoms)))
192
+ atoms_pos = self.atoms.positions
193
+ atoms_num = self.atoms.numbers
194
+ if surface_index is not None:
195
+ atoms_pos = atoms_pos[surface_index]
196
+ atoms_num = atoms_num[surface_index]
197
+ grid_dist_array = np.zeros((len(xyz), len(atoms_pos), 3))
198
+ grid_dist = np.zeros((len(xyz), len(atoms_pos)))
194
199
  while np.any(nonbond_index):
195
200
  z -= self.interval / 10.0
196
201
  xyz[nonbond_index, 2] = z
197
202
  grid_dist_array[nonbond_index], grid_dist[nonbond_index] = get_distances(
198
- xyz[nonbond_index], self.atoms.positions,
199
- cell=self.atoms.cell, pbc=self.atoms.pbc)
200
- R0 = np.asarray([self.radii[i] for i in self.atoms.numbers]) + self.rads
203
+ xyz[nonbond_index], atoms_pos, cell=self.atoms.cell, pbc=self.atoms.pbc)
204
+ R0 = np.asarray([self.radii[i] for i in atoms_num]) + self.rads
201
205
  # 判断最小距离是否小于共价半径之和
202
206
  nonbond_index = nonbond_index & (~np.any(grid_dist - R0 <= 0, axis=1))
203
207
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: surface_construct
3
- Version: 0.5.10
3
+ Version: 0.5.11
4
4
  Summary: Surface termination construction especially for complex model, such as oxides or carbides.
5
5
  Home-page: https://gitee.com/pjren/surface_construct/
6
6
  Author: ren
@@ -67,6 +67,11 @@ A Method with Stratified Sampling Strategy for Comprehensive Analysis of Catalys
67
67
 
68
68
  `pip install -U surface-construct`
69
69
 
70
+ ## 发布新版本 (only for 管理员)
71
+
72
+ python -m build
73
+ twine upload --verbose dist/*
74
+
70
75
  ## 使用方法 Manual
71
76
 
72
77
  ### 所需文件 Required Files