Skip to content

Commit

Permalink
Updated the NaCl(100) slab generator (#158)
Browse files Browse the repository at this point in the history
In this PR, we update the slab with the cell parameters obtained with the UZH basis set and GTH potential containing one valence electron for Na. 9 valence electrons would require a cutoff of 1600 Ry. For the moment, we keep NaCl slabs with this setting. This might change in the future.
  • Loading branch information
cpignedoli authored Jun 16, 2023
1 parent 2f223de commit c13ce96
Showing 1 changed file with 21 additions and 4 deletions.
25 changes: 21 additions & 4 deletions surfaces_tools/widgets/slabs.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,8 +352,14 @@
]

# NaCl(100)
NaCl_100_Lx = 5.7357807389205
NaCl_100_Lz = 5.7357807389205
NaCl_100_Lx = 5.6142796 # DZVP-MOLOPT-PBE-GTH-q1 UZH
NaCl_100_Lz = 5.6142796
NaCl_100_top = [
["Na", 0.0, 0.0, NaCl_100_Lz],
["Na", NaCl_100_Lx / 2, NaCl_100_Lx / 2, NaCl_100_Lz],
["Cl", NaCl_100_Lx / 2, 0, NaCl_100_Lz + 0.1],
["Cl", 0, NaCl_100_Lx / 2, NaCl_100_Lz + 0.1],
]
NaCl_100_unit = [
["Na", 0.0, 0.0, 0],
["Na", NaCl_100_Lx / 2, NaCl_100_Lx / 2, 0],
Expand Down Expand Up @@ -583,8 +589,19 @@ def prepare_slab(mol, dx, dy, dz, phi, nx, ny, nz, which_surf):
)
nacl.cell = (NaCl_100_Lx, NaCl_100_Lx, NaCl_100_Lz)
nacl.pbc = (True, True, True)
# build nx x ny x nz bulk
nacl = nacl.repeat((nx, ny, nz))
# build a 1 x 1 x nz bulk
nacl = nacl.repeat((1, 1, nz))
nacl.cell = (NaCl_100_Lx, NaCl_100_Lx, NaCl_100_Lz * nz + 40.0)
# Add top layers with NaCl termination.
for a in NaCl_100_top:
nacl.append(
ase.Atom(
a[0],
(float(a[1]), float(a[2]), float(a[3]) + (nz - 1) * NaCl_100_Lz),
)
)
# replicate nx x ny
nacl = nacl.repeat((nx, ny, 1))

# Add to cell vacuum.
nacl.cell = (NaCl_100_Lx * nx, NaCl_100_Lx * ny, NaCl_100_Lz * nz + 40.0)
Expand Down

0 comments on commit c13ce96

Please sign in to comment.