surface-construct 0.12.3__tar.gz → 0.12.4__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.12.3/surface_construct.egg-info → surface_construct-0.12.4}/PKG-INFO +1 -1
- {surface_construct-0.12.3 → surface_construct-0.12.4}/setup.py +1 -1
- {surface_construct-0.12.3 → surface_construct-0.12.4}/surface_construct/structures/adsorbate.py +5 -4
- {surface_construct-0.12.3 → surface_construct-0.12.4/surface_construct.egg-info}/PKG-INFO +1 -1
- {surface_construct-0.12.3 → surface_construct-0.12.4}/tests/test_task.py +27 -0
- {surface_construct-0.12.3 → surface_construct-0.12.4}/LICENSE +0 -0
- {surface_construct-0.12.3 → surface_construct-0.12.4}/README.md +0 -0
- {surface_construct-0.12.3 → surface_construct-0.12.4}/setup.cfg +0 -0
- {surface_construct-0.12.3 → surface_construct-0.12.4}/surface_construct/__init__.py +0 -0
- {surface_construct-0.12.3 → surface_construct-0.12.4}/surface_construct/db.py +0 -0
- {surface_construct-0.12.3 → surface_construct-0.12.4}/surface_construct/default_parameter.py +0 -0
- {surface_construct-0.12.3 → surface_construct-0.12.4}/surface_construct/sg_sampler.py +0 -0
- {surface_construct-0.12.3 → surface_construct-0.12.4}/surface_construct/structures/__init__.py +0 -0
- {surface_construct-0.12.3 → surface_construct-0.12.4}/surface_construct/structures/combiner.py +0 -0
- {surface_construct-0.12.3 → surface_construct-0.12.4}/surface_construct/structures/pymsym_test.py +0 -0
- {surface_construct-0.12.3 → surface_construct-0.12.4}/surface_construct/structures/surface.py +0 -0
- {surface_construct-0.12.3 → surface_construct-0.12.4}/surface_construct/structures/surface_grid.py +0 -0
- {surface_construct-0.12.3 → surface_construct-0.12.4}/surface_construct/tasks/__init__.py +0 -0
- {surface_construct-0.12.3 → surface_construct-0.12.4}/surface_construct/tasks/afm.py +0 -0
- {surface_construct-0.12.3 → surface_construct-0.12.4}/surface_construct/tasks/sitesampling.py +0 -0
- {surface_construct-0.12.3 → surface_construct-0.12.4}/surface_construct/tasks/taskbase.py +0 -0
- {surface_construct-0.12.3 → surface_construct-0.12.4}/surface_construct/tasks/terminations.py +0 -0
- {surface_construct-0.12.3 → surface_construct-0.12.4}/surface_construct/utils/__init__.py +0 -0
- {surface_construct-0.12.3 → surface_construct-0.12.4}/surface_construct/utils/atoms.py +0 -0
- {surface_construct-0.12.3 → surface_construct-0.12.4}/surface_construct/utils/geometry.py +0 -0
- {surface_construct-0.12.3 → surface_construct-0.12.4}/surface_construct/utils/pymsym_wrapper.py +0 -0
- {surface_construct-0.12.3 → surface_construct-0.12.4}/surface_construct/utils/spglib_wrapper.py +0 -0
- {surface_construct-0.12.3 → surface_construct-0.12.4}/surface_construct/utils/weight_functions.py +0 -0
- {surface_construct-0.12.3 → surface_construct-0.12.4}/surface_construct.egg-info/SOURCES.txt +0 -0
- {surface_construct-0.12.3 → surface_construct-0.12.4}/surface_construct.egg-info/dependency_links.txt +0 -0
- {surface_construct-0.12.3 → surface_construct-0.12.4}/surface_construct.egg-info/requires.txt +0 -0
- {surface_construct-0.12.3 → surface_construct-0.12.4}/surface_construct.egg-info/top_level.txt +0 -0
- {surface_construct-0.12.3 → surface_construct-0.12.4}/tests/test_adsorbate.py +0 -0
- {surface_construct-0.12.3 → surface_construct-0.12.4}/tests/test_combiner.py +0 -0
- {surface_construct-0.12.3 → surface_construct-0.12.4}/tests/test_sampling1.py +0 -0
- {surface_construct-0.12.3 → surface_construct-0.12.4}/tests/test_sampling2.py +0 -0
- {surface_construct-0.12.3 → surface_construct-0.12.4}/tests/test_simple_surface.py +0 -0
- {surface_construct-0.12.3 → surface_construct-0.12.4}/tests/test_surface_grid.py +0 -0
{surface_construct-0.12.3 → surface_construct-0.12.4}/surface_construct/structures/adsorbate.py
RENAMED
|
@@ -139,9 +139,10 @@ class Adsorbate:
|
|
|
139
139
|
for ids in self.dock_point_indices for i in ids])
|
|
140
140
|
return self._rads
|
|
141
141
|
|
|
142
|
+
atoms = self.atoms.copy()
|
|
142
143
|
if not self.is_regulated:
|
|
143
|
-
|
|
144
|
-
positions =
|
|
144
|
+
atoms_regulate(atoms)
|
|
145
|
+
positions = atoms.positions
|
|
145
146
|
dim_length = np.array([
|
|
146
147
|
max(positions[:,0]) - min(positions[:,0]),
|
|
147
148
|
max(positions[:,1]) - min(positions[:,1]),
|
|
@@ -150,8 +151,8 @@ class Adsorbate:
|
|
|
150
151
|
shortest_dim = np.argmin(dim_length)
|
|
151
152
|
idx0 =np.argmin(positions[:,shortest_dim])
|
|
152
153
|
idx1 =np.argmax(positions[:,shortest_dim])
|
|
153
|
-
num0 =
|
|
154
|
-
num1 =
|
|
154
|
+
num0 = atoms.numbers[idx0]
|
|
155
|
+
num1 = atoms.numbers[idx1]
|
|
155
156
|
self._rads = (dim_length[shortest_dim] + radii[num0] + radii[num1]) / 2
|
|
156
157
|
return self._rads
|
|
157
158
|
|
|
@@ -85,6 +85,33 @@ class TestTask:
|
|
|
85
85
|
task_obj.run()
|
|
86
86
|
print('Done')
|
|
87
87
|
|
|
88
|
+
def test_H2O_CuO_Cu(self):
|
|
89
|
+
"""
|
|
90
|
+
Water on CuO/Cu surface
|
|
91
|
+
:return:
|
|
92
|
+
"""
|
|
93
|
+
shutil.copyfile('../atoms_files/CuCHO_lasp.in', 'lasp.in')
|
|
94
|
+
shutil.copyfile('../atoms_files/CuCHO.pot', 'CuCHO.pot')
|
|
95
|
+
atoms = ase.io.read('../atoms_files/CuOx-Cu100-CONTCAR')
|
|
96
|
+
atoms.calc = Lasp()
|
|
97
|
+
ads_atoms = ase.Atoms('H2O',[[0.,0.,-1.],[0.,0.86,0.5],[0.,0.,0.]])
|
|
98
|
+
ads_obj = Adsorbate(ads_atoms,rtype='vdw_radii')
|
|
99
|
+
sg_obj = SurfaceGrid(atoms,rsub='vdw_radii',rads=ads_obj.rads)
|
|
100
|
+
ads_grid_comb = AdsGridCombiner(sg_obj, ads_obj)
|
|
101
|
+
sampler =[
|
|
102
|
+
{
|
|
103
|
+
'surface': "KeyPointSGSampler", # 表面采样方法
|
|
104
|
+
}, # 第一步采样
|
|
105
|
+
{
|
|
106
|
+
'size': 3, # 采样大小
|
|
107
|
+
'surface': ("MaxDiversitySGSampler", "MinEnergySGSampler", "MaxSigmaSGSampler"), # 表面采样方法
|
|
108
|
+
'weight': (0.4, 0.3, 0.3), # 表面采样方法的权重
|
|
109
|
+
} # 第二步采样
|
|
110
|
+
]
|
|
111
|
+
task_obj = SurfaceSiteSampleTask(combiner=ads_grid_comb, sampler=sampler, optimizer=LBFGS)
|
|
112
|
+
task_obj.run()
|
|
113
|
+
print('Done')
|
|
114
|
+
|
|
88
115
|
def test_C4H9_Ru(self):
|
|
89
116
|
adsatoms = ase.io.read('../atoms_files/C4H9.xyz')
|
|
90
117
|
adsatoms.append(Atom('X', adsatoms.positions[0])) # Add dock point with same pos with atoms[0]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{surface_construct-0.12.3 → surface_construct-0.12.4}/surface_construct/default_parameter.py
RENAMED
|
File without changes
|
|
File without changes
|
{surface_construct-0.12.3 → surface_construct-0.12.4}/surface_construct/structures/__init__.py
RENAMED
|
File without changes
|
{surface_construct-0.12.3 → surface_construct-0.12.4}/surface_construct/structures/combiner.py
RENAMED
|
File without changes
|
{surface_construct-0.12.3 → surface_construct-0.12.4}/surface_construct/structures/pymsym_test.py
RENAMED
|
File without changes
|
{surface_construct-0.12.3 → surface_construct-0.12.4}/surface_construct/structures/surface.py
RENAMED
|
File without changes
|
{surface_construct-0.12.3 → surface_construct-0.12.4}/surface_construct/structures/surface_grid.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{surface_construct-0.12.3 → surface_construct-0.12.4}/surface_construct/tasks/sitesampling.py
RENAMED
|
File without changes
|
|
File without changes
|
{surface_construct-0.12.3 → surface_construct-0.12.4}/surface_construct/tasks/terminations.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{surface_construct-0.12.3 → surface_construct-0.12.4}/surface_construct/utils/pymsym_wrapper.py
RENAMED
|
File without changes
|
{surface_construct-0.12.3 → surface_construct-0.12.4}/surface_construct/utils/spglib_wrapper.py
RENAMED
|
File without changes
|
{surface_construct-0.12.3 → surface_construct-0.12.4}/surface_construct/utils/weight_functions.py
RENAMED
|
File without changes
|
{surface_construct-0.12.3 → surface_construct-0.12.4}/surface_construct.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{surface_construct-0.12.3 → surface_construct-0.12.4}/surface_construct.egg-info/requires.txt
RENAMED
|
File without changes
|
{surface_construct-0.12.3 → surface_construct-0.12.4}/surface_construct.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|