File: lcao_opt.py

package info (click to toggle)
gpaw 21.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 14,492 kB
  • sloc: python: 121,997; ansic: 14,138; sh: 1,125; csh: 139; makefile: 43
file content (18 lines) | stat: -rw-r--r-- 638 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
from ase.build import molecule
from ase.optimize import QuasiNewton
from gpaw import GPAW

atoms = molecule('CH3CH2OH', vacuum=4.0)
atoms.rattle(stdev=0.1)  # displace positions randomly a bit

calc = GPAW(mode='lcao',
            basis='dzp',
            nbands='110%',
            parallel=dict(band=2,  # band parallelization
                          augment_grids=True,  # use all cores for XC/Poisson
                          sl_auto=True,  # enable ScaLAPACK parallelization
                          use_elpa=True))  # enable Elpa eigensolver
atoms.calc = calc

opt = QuasiNewton(atoms, trajectory='opt.traj')
opt.run(fmax=0.05)