Commit 275130c3 authored by kuismam's avatar kuismam

Work on lcao-tddft documentation. Shorten lines, add example about basis set

parent c426fcd5
def agts(queue):
basis = queue.add('', ncpus=1, walltime=1)
# Simplest example of use of LCAO-TDDFT code
from ase import Atoms
from gpaw import GPAW
from ase.optimize import BFGS
from gpaw.tddft import photoabsorption_spectrum
from gpaw import PoissonSolver
# Sodium dimer
atoms = Atoms('Na2', positions=[[0.0,0.0,0.0],[3.0,0.0,0.0]])
from gpaw.lcaotddft import LCAOTDDFT
......@@ -16,7 +14,7 @@ from gpaw.lcaotddft import LCAOTDDFT
convergence = {'density':1e-7}
# Increase accuracy of Poisson Solver and apply multipole corrections up to l=2
poissonsolver = PoissonSolver(eps=1e-20, remove_moment=1+3+5)
poissonsolver = PoissonSolver(eps=1e-14, remove_moment=1+3)
td_calc = LCAOTDDFT(setups={'Na':'1'}, basis='1.dzp', xc='LDA', h=0.3, nbands=1,
convergence=convergence, poissonsolver=poissonsolver)
......@@ -26,7 +24,7 @@ atoms.set_calculator(td_calc)
td_calc.absorption_kick([1e-5, 0.0, 0.0])
td_calc.propagate(10, 500, '')
td_calc.propagate(20, 250, '')
photoabsorption_spectrum('','Na2.spec', width=0.4)
This diff is collapsed.
from gpaw.atom.generator import Generator
from gpaw.atom.configurations import parameters
from gpaw.atom.basis import BasisMaker
args = {'core': '[Kr]', 'rcut': 2.45}
print "Generating setup with following parameters", args
generator = Generator('Ag', 'GLLBSC')
generator.N *= 2 # Increase grid resolution**args)
bm = BasisMaker(generator, name='GLLBSC', run=False)
basis = bm.generate(zetacount=2, polarizationcount=0,
jvalues=[0,1,2], # include d, s and p
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment