1#!/usr/bin/env python
2#
3# Author: Qiming Sun <osirpt.sun@gmail.com>
4#
5
6'''
7Slow solvent and fast slovent in TDDFT calculations.
8'''
9
10from pyscf import gto
11from pyscf import __all__
12
13mol = gto.M(
14    atom = '''
15H     0.   0.   .917
16F     0.   0.   0.
17''',
18basis = '631g')
19
20#
21# Solvent does not respond to the change of electronic structure in vertical
22# excitation. The calculation can be started with an SCF with fully relaxed
23# solvent and followed by a regular TDDFT method
24#
25mf = mol.RHF().ddCOSMO().run()
26td = mf.TDA()
27td.kernel()
28
29
30#
31# Equilibrium solvation allows the solvent rapidly responds to the electronic
32# structure of excited states. The system should converge to equilibrium
33# between solvent and the excited state of the solute.
34#
35mf = mol.RHF().ddCOSMO().run()
36td = mf.TDA().ddCOSMO()
37td.with_solvent.equilibrium_solvation = True
38td.kernel()
39
40#
41# Switch off the fast solvent
42#
43td.with_solvent.equilibrium_solvation = False
44td.kernel()
45