Commit 7ba9bc39 authored by Tuomas Rossi's avatar Tuomas Rossi

Remove out-dated, unreferenced scripts

parent 95bf464c
import matplotlib.pyplot as plt
from ase.io import read
from gpaw.lcaotddft.tddfpt import transform_local_operator
transform_local_operator(gpw_file='Na8_gs.gpw',
tdop_file='Na8.TdDen',
fqop_file='Na8.FqDen',
omega=1.8,
eta=0.23)
dct = read('Na8.FqDen.imag.cube', full_output=True)
data = dct['data'][:, :, 16]
atoms = dct['atoms']
extent = [0, atoms.cell[0][0], 0, atoms.cell[1][1]]
plt.imshow(data.T, origin='lower', extent=extent)
for atom in atoms:
circle = plt.Circle((atom.position[0], atom.position[1]),
0.3, color='r', clip_on=False)
fig = plt.gcf()
fig.gca().add_artist(circle)
plt.title('Induced density of $Na_{8}$')
plt.xlabel('$\\AA$')
plt.ylabel('$\\AA$')
plt.savefig('Na8_imag.png')
from ase import Atoms
from gpaw.tddft import photoabsorption_spectrum
from gpaw import PoissonSolver
from gpaw.lcaotddft.tddfpt import DensityCollector
from gpaw.lcaotddft import LCAOTDDFT
atoms = Atoms('Na8', positions=[[i * 3.0, 0, 0] for i in range(8)])
atoms.center(vacuum=5.0)
# Calculate all bands
td_calc = LCAOTDDFT(
basis='dzp', setups={'Na': '1'}, xc='LDA', h=0.3, nbands=4,
convergence={'density': 1e-7},
poissonsolver=PoissonSolver(eps=1e-14, remove_moment=1 + 3 + 5))
atoms.set_calculator(td_calc)
atoms.get_potential_energy()
td_calc.write('Na8_gs.gpw', mode='all')
td_calc = LCAOTDDFT('Na8_gs.gpw')
td_calc.attach(DensityCollector('Na8.TdDen', td_calc))
td_calc.absorption_kick([1e-4, 0.0, 0.0])
td_calc.propagate(20, 1000, 'Na8.dm')
photoabsorption_spectrum('Na8.dm', 'Na8.spec', width=0.15)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment