File: grid_spacing.py

package info (click to toggle)
gpaw 25.7.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 18,888 kB
  • sloc: python: 174,804; ansic: 17,564; cpp: 5,668; sh: 972; csh: 139; makefile: 45
file content (9 lines) | stat: -rw-r--r-- 257 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
from gpaw.utilities.adjust_cell import adjust_cell
from ase import Atoms

d = 0.74
a = 6.0
atoms = Atoms('H2', positions=[(0, 0, 0), (0, 0, d)])
# set the amount of vacuum at least to 4 Å
# and ensure a grid spacing of h=0.2
adjust_cell(atoms, 4.0, h=0.2)