mirror of
https://github.com/QuantumPackage/qp2.git
synced 2024-12-22 20:34:58 +01:00
Added CIS_read
This commit is contained in:
parent
1453c461d7
commit
57b47807fa
7
src/cis_read/EZFIO.cfg
Normal file
7
src/cis_read/EZFIO.cfg
Normal file
@ -0,0 +1,7 @@
|
||||
[energy]
|
||||
type: double precision
|
||||
doc: Variational |CIS| energy
|
||||
interface: ezfio
|
||||
size: (determinants.n_states)
|
||||
|
||||
|
3
src/cis_read/NEED
Normal file
3
src/cis_read/NEED
Normal file
@ -0,0 +1,3 @@
|
||||
selectors_full
|
||||
generators_full
|
||||
davidson_undressed
|
5
src/cis_read/README.rst
Normal file
5
src/cis_read/README.rst
Normal file
@ -0,0 +1,5 @@
|
||||
===
|
||||
cis_read
|
||||
===
|
||||
|
||||
Reads the input WF and performs all singles on top of it.
|
88
src/cis_read/cis_read.irp.f
Normal file
88
src/cis_read/cis_read.irp.f
Normal file
@ -0,0 +1,88 @@
|
||||
program cis
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
!
|
||||
! Configuration Interaction with Single excitations.
|
||||
!
|
||||
! This program takes a reference Slater determinant of ROHF-like
|
||||
! occupancy, and performs all single excitations on top of it.
|
||||
! Disregarding spatial symmetry, it computes the `n_states` lowest
|
||||
! eigenstates of that CI matrix. (see :option:`determinants n_states`)
|
||||
!
|
||||
! This program can be useful in many cases:
|
||||
!
|
||||
!
|
||||
! 1. Ground state calculation
|
||||
!
|
||||
! To be sure to have the lowest |SCF| solution, perform an :ref:`scf`
|
||||
! (see the :ref:`module_hartree_fock` module), then a :ref:`cis`, save the
|
||||
! natural orbitals (see :ref:`save_natorb`) and re-run an :ref:`scf`
|
||||
! optimization from this |MO| guess.
|
||||
!
|
||||
!
|
||||
! 2. Excited states calculations
|
||||
!
|
||||
! The lowest excited states are much likely to be dominated by
|
||||
! single-excitations. Therefore, running a :ref:`cis` will save the
|
||||
! `n_states` lowest states within the |CIS| space in the |EZFIO|
|
||||
! directory, which can afterwards be used as guess wave functions for
|
||||
! a further multi-state |FCI| calculation if :option:`determinants
|
||||
! read_wf` is set to |true| before running the :ref:`fci` executable.
|
||||
!
|
||||
!
|
||||
! If :option:`determinants s2_eig` is set to |true|, the |CIS|
|
||||
! will only retain states having the expected |S^2| value (see
|
||||
! :option:`determinants expected_s2`). Otherwise, the |CIS| will take
|
||||
! the lowest :option:`determinants n_states`, whatever multiplicity
|
||||
! they are.
|
||||
!
|
||||
! .. note::
|
||||
!
|
||||
! To discard some orbitals, use the :ref:`qp_set_mo_class`
|
||||
! command to specify:
|
||||
!
|
||||
! * *core* orbitals which will be always doubly occupied
|
||||
!
|
||||
! * *act* orbitals where an electron can be either excited from or to
|
||||
!
|
||||
! * *del* orbitals which will be never occupied
|
||||
!
|
||||
END_DOC
|
||||
read_wf = .True.
|
||||
TOUCH read_wf
|
||||
call run
|
||||
end
|
||||
|
||||
subroutine run
|
||||
implicit none
|
||||
integer :: i
|
||||
|
||||
|
||||
if(pseudo_sym)then
|
||||
call H_apply_cis_sym
|
||||
else
|
||||
call H_apply_cis
|
||||
endif
|
||||
print*,''
|
||||
print *, 'N_det = ', N_det
|
||||
print*,'******************************'
|
||||
print *, 'Energies of the states:'
|
||||
do i = 1,N_states
|
||||
print *, i, CI_energy(i)
|
||||
enddo
|
||||
if (N_states > 1) then
|
||||
print*,''
|
||||
print*,'******************************************************'
|
||||
print*,'Excitation energies (au) (eV)'
|
||||
do i = 2, N_states
|
||||
print*, i ,CI_energy(i) - CI_energy(1), (CI_energy(i) - CI_energy(1))/0.0367502d0
|
||||
enddo
|
||||
print*,''
|
||||
endif
|
||||
|
||||
call ezfio_set_cis_energy(CI_energy)
|
||||
psi_coef = ci_eigenvectors
|
||||
SOFT_TOUCH psi_coef
|
||||
call save_wavefunction_truncated(save_threshold)
|
||||
|
||||
end
|
14
src/cis_read/h_apply.irp.f
Normal file
14
src/cis_read/h_apply.irp.f
Normal file
@ -0,0 +1,14 @@
|
||||
! Generates subroutine H_apply_cis
|
||||
! --------------------------------
|
||||
|
||||
BEGIN_SHELL [ /usr/bin/env python3 ]
|
||||
from generate_h_apply import H_apply
|
||||
H = H_apply("cis",do_double_exc=False)
|
||||
print(H)
|
||||
|
||||
H = H_apply("cis_sym",do_double_exc=False)
|
||||
H.filter_only_connected_to_hf()
|
||||
print(H)
|
||||
|
||||
END_SHELL
|
||||
|
Loading…
Reference in New Issue
Block a user