surface-construct 0.10.2__tar.gz → 0.10.3__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 (30) hide show
  1. {surface_construct-0.10.2/surface_construct.egg-info → surface_construct-0.10.3}/PKG-INFO +1 -1
  2. {surface_construct-0.10.2 → surface_construct-0.10.3}/setup.py +1 -1
  3. {surface_construct-0.10.2 → surface_construct-0.10.3}/surface_construct/structures/surface_grid.py +10 -7
  4. {surface_construct-0.10.2 → surface_construct-0.10.3/surface_construct.egg-info}/PKG-INFO +1 -1
  5. {surface_construct-0.10.2 → surface_construct-0.10.3}/tests/test_surface_grid.py +1 -1
  6. {surface_construct-0.10.2 → surface_construct-0.10.3}/LICENSE +0 -0
  7. {surface_construct-0.10.2 → surface_construct-0.10.3}/README.md +0 -0
  8. {surface_construct-0.10.2 → surface_construct-0.10.3}/setup.cfg +0 -0
  9. {surface_construct-0.10.2 → surface_construct-0.10.3}/surface_construct/__init__.py +0 -0
  10. {surface_construct-0.10.2 → surface_construct-0.10.3}/surface_construct/db.py +0 -0
  11. {surface_construct-0.10.2 → surface_construct-0.10.3}/surface_construct/default_parameter.py +0 -0
  12. {surface_construct-0.10.2 → surface_construct-0.10.3}/surface_construct/sg_sampler.py +0 -0
  13. {surface_construct-0.10.2 → surface_construct-0.10.3}/surface_construct/structures/__init__.py +0 -0
  14. {surface_construct-0.10.2 → surface_construct-0.10.3}/surface_construct/structures/adsorbate.py +0 -0
  15. {surface_construct-0.10.2 → surface_construct-0.10.3}/surface_construct/structures/surface.py +0 -0
  16. {surface_construct-0.10.2 → surface_construct-0.10.3}/surface_construct/tasks/__init__.py +0 -0
  17. {surface_construct-0.10.2 → surface_construct-0.10.3}/surface_construct/tasks/sitesampling.py +0 -0
  18. {surface_construct-0.10.2 → surface_construct-0.10.3}/surface_construct/tasks/taskbase.py +0 -0
  19. {surface_construct-0.10.2 → surface_construct-0.10.3}/surface_construct/tasks/terminations.py +0 -0
  20. {surface_construct-0.10.2 → surface_construct-0.10.3}/surface_construct/utils/__init__.py +0 -0
  21. {surface_construct-0.10.2 → surface_construct-0.10.3}/surface_construct/utils/atoms.py +0 -0
  22. {surface_construct-0.10.2 → surface_construct-0.10.3}/surface_construct/utils/weight_functions.py +0 -0
  23. {surface_construct-0.10.2 → surface_construct-0.10.3}/surface_construct.egg-info/SOURCES.txt +0 -0
  24. {surface_construct-0.10.2 → surface_construct-0.10.3}/surface_construct.egg-info/dependency_links.txt +0 -0
  25. {surface_construct-0.10.2 → surface_construct-0.10.3}/surface_construct.egg-info/requires.txt +0 -0
  26. {surface_construct-0.10.2 → surface_construct-0.10.3}/surface_construct.egg-info/top_level.txt +0 -0
  27. {surface_construct-0.10.2 → surface_construct-0.10.3}/tests/test_sampling1.py +0 -0
  28. {surface_construct-0.10.2 → surface_construct-0.10.3}/tests/test_sampling2.py +0 -0
  29. {surface_construct-0.10.2 → surface_construct-0.10.3}/tests/test_simple_surface.py +0 -0
  30. {surface_construct-0.10.2 → surface_construct-0.10.3}/tests/test_task.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: surface_construct
3
- Version: 0.10.2
3
+ Version: 0.10.3
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
@@ -15,7 +15,7 @@ install_requires = [
15
15
 
16
16
  setup(
17
17
  name='surface_construct',
18
- version='0.10.2',
18
+ version='0.10.3',
19
19
  packages=find_packages(),
20
20
  url='https://gitee.com/pjren/surface_construct/',
21
21
  license='GPL',
@@ -399,13 +399,6 @@ class SurfaceGrid:
399
399
 
400
400
  self.atoms = atoms
401
401
  self.subtype = subtype
402
- if self.subtype == 'slab':
403
- self.pbc = [True, True, False]
404
- elif self.subtype == 'cluster':
405
- self.pbc = [False, False, False]
406
- else:
407
- self.pbc = self.atoms.pbc
408
-
409
402
  num_set = set(self.atoms.numbers)
410
403
  num_list = list(self.atoms.numbers)
411
404
  self.species = sorted([(num, num_list.count(num)) for num in num_set], key=lambda x: x[0])
@@ -473,6 +466,15 @@ class SurfaceGrid:
473
466
  # 格点向量化
474
467
  self.vectorize()
475
468
 
469
+ @property
470
+ def pbc(self):
471
+ if self.subtype == 'slab':
472
+ return [True, True, False]
473
+ elif self.subtype == 'cluster':
474
+ return [False, False, False]
475
+ else:
476
+ return self.atoms.pbc
477
+
476
478
  def gridize(self, **kwargs):
477
479
  """
478
480
  格点化。
@@ -485,6 +487,7 @@ class SurfaceGrid:
485
487
  if subtype is None:
486
488
  subtype = 'slab' # default is slab
487
489
  self.subtype = subtype
490
+
488
491
  gridgen = GridGenerator(self.atoms,
489
492
  interval=self.interval, subtype=subtype, rads=self.rads, rsub=self.rsub)
490
493
  self._gridgen = gridgen
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: surface_construct
3
- Version: 0.10.2
3
+ Version: 0.10.3
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
@@ -111,7 +111,7 @@ class TestSurfaceGrid:
111
111
  # This a large surface, contain about 75K points.
112
112
  atoms = ase.io.read('atoms_files/POSCAR_In2O3_110')
113
113
  superatoms = atoms.repeat([2,2,1])
114
- sg_obj = SurfaceGrid(superatoms, interval=0.2, ads_num=6, lpca=False)
114
+ sg_obj = SurfaceGrid(superatoms, interval=0.1, ads_num=6, lpca=False)
115
115
  sg_obj.gridize(subtype='slab')
116
116
  Lga = sg_obj._Lga
117
117
  print(Lga.shape)