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.
- {surface_construct-0.10.2/surface_construct.egg-info → surface_construct-0.10.3}/PKG-INFO +1 -1
- {surface_construct-0.10.2 → surface_construct-0.10.3}/setup.py +1 -1
- {surface_construct-0.10.2 → surface_construct-0.10.3}/surface_construct/structures/surface_grid.py +10 -7
- {surface_construct-0.10.2 → surface_construct-0.10.3/surface_construct.egg-info}/PKG-INFO +1 -1
- {surface_construct-0.10.2 → surface_construct-0.10.3}/tests/test_surface_grid.py +1 -1
- {surface_construct-0.10.2 → surface_construct-0.10.3}/LICENSE +0 -0
- {surface_construct-0.10.2 → surface_construct-0.10.3}/README.md +0 -0
- {surface_construct-0.10.2 → surface_construct-0.10.3}/setup.cfg +0 -0
- {surface_construct-0.10.2 → surface_construct-0.10.3}/surface_construct/__init__.py +0 -0
- {surface_construct-0.10.2 → surface_construct-0.10.3}/surface_construct/db.py +0 -0
- {surface_construct-0.10.2 → surface_construct-0.10.3}/surface_construct/default_parameter.py +0 -0
- {surface_construct-0.10.2 → surface_construct-0.10.3}/surface_construct/sg_sampler.py +0 -0
- {surface_construct-0.10.2 → surface_construct-0.10.3}/surface_construct/structures/__init__.py +0 -0
- {surface_construct-0.10.2 → surface_construct-0.10.3}/surface_construct/structures/adsorbate.py +0 -0
- {surface_construct-0.10.2 → surface_construct-0.10.3}/surface_construct/structures/surface.py +0 -0
- {surface_construct-0.10.2 → surface_construct-0.10.3}/surface_construct/tasks/__init__.py +0 -0
- {surface_construct-0.10.2 → surface_construct-0.10.3}/surface_construct/tasks/sitesampling.py +0 -0
- {surface_construct-0.10.2 → surface_construct-0.10.3}/surface_construct/tasks/taskbase.py +0 -0
- {surface_construct-0.10.2 → surface_construct-0.10.3}/surface_construct/tasks/terminations.py +0 -0
- {surface_construct-0.10.2 → surface_construct-0.10.3}/surface_construct/utils/__init__.py +0 -0
- {surface_construct-0.10.2 → surface_construct-0.10.3}/surface_construct/utils/atoms.py +0 -0
- {surface_construct-0.10.2 → surface_construct-0.10.3}/surface_construct/utils/weight_functions.py +0 -0
- {surface_construct-0.10.2 → surface_construct-0.10.3}/surface_construct.egg-info/SOURCES.txt +0 -0
- {surface_construct-0.10.2 → surface_construct-0.10.3}/surface_construct.egg-info/dependency_links.txt +0 -0
- {surface_construct-0.10.2 → surface_construct-0.10.3}/surface_construct.egg-info/requires.txt +0 -0
- {surface_construct-0.10.2 → surface_construct-0.10.3}/surface_construct.egg-info/top_level.txt +0 -0
- {surface_construct-0.10.2 → surface_construct-0.10.3}/tests/test_sampling1.py +0 -0
- {surface_construct-0.10.2 → surface_construct-0.10.3}/tests/test_sampling2.py +0 -0
- {surface_construct-0.10.2 → surface_construct-0.10.3}/tests/test_simple_surface.py +0 -0
- {surface_construct-0.10.2 → surface_construct-0.10.3}/tests/test_task.py +0 -0
{surface_construct-0.10.2 → surface_construct-0.10.3}/surface_construct/structures/surface_grid.py
RENAMED
|
@@ -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
|
|
@@ -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.
|
|
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)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{surface_construct-0.10.2 → surface_construct-0.10.3}/surface_construct/default_parameter.py
RENAMED
|
File without changes
|
|
File without changes
|
{surface_construct-0.10.2 → surface_construct-0.10.3}/surface_construct/structures/__init__.py
RENAMED
|
File without changes
|
{surface_construct-0.10.2 → surface_construct-0.10.3}/surface_construct/structures/adsorbate.py
RENAMED
|
File without changes
|
{surface_construct-0.10.2 → surface_construct-0.10.3}/surface_construct/structures/surface.py
RENAMED
|
File without changes
|
|
File without changes
|
{surface_construct-0.10.2 → surface_construct-0.10.3}/surface_construct/tasks/sitesampling.py
RENAMED
|
File without changes
|
|
File without changes
|
{surface_construct-0.10.2 → surface_construct-0.10.3}/surface_construct/tasks/terminations.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{surface_construct-0.10.2 → surface_construct-0.10.3}/surface_construct/utils/weight_functions.py
RENAMED
|
File without changes
|
{surface_construct-0.10.2 → surface_construct-0.10.3}/surface_construct.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{surface_construct-0.10.2 → surface_construct-0.10.3}/surface_construct.egg-info/requires.txt
RENAMED
|
File without changes
|
{surface_construct-0.10.2 → surface_construct-0.10.3}/surface_construct.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|