| 1 |
from gpaw.tddft import TDDFT, DipoleMomentWriter, RestartFileWriter |
| 2 |
from gpaw.inducedfield.inducedfield_tddft import TDDFTInducedField |
| 3 |
|
| 4 |
# Load TDDFT object |
| 5 |
td_calc = TDDFT('na2_td.gpw') |
| 6 |
DipoleMomentWriter(td_calc, 'na2_td_dm.dat') |
| 7 |
RestartFileWriter(td_calc, 'na2_td.gpw') |
| 8 |
|
| 9 |
# Load and attach InducedField object |
| 10 |
ind = TDDFTInducedField(filename='na2_td.ind', |
| 11 |
paw=td_calc, |
| 12 |
restart_file='na2_td.ind') |
| 13 |
|
| 14 |
# Continue propagation as usual |
| 15 |
time_step = 20.0 |
| 16 |
iterations = 250 |
| 17 |
td_calc.propagate(time_step, iterations) |
| 18 |
|
| 19 |
# Save TDDFT and InducedField objects |
| 20 |
td_calc.write('na2_td.gpw', mode='all') |
| 21 |
ind.write('na2_td.ind') |