10
0
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-11-15 02:23:51 +01:00
QuantumPackage/src/cis/cis.irp.f

90 lines
2.5 KiB
Fortran
Raw Normal View History

2019-01-25 11:39:31 +01:00
program cis
implicit none
BEGIN_DOC
2019-01-29 15:40:00 +01:00
!
! 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
!
2019-01-25 11:39:31 +01:00
END_DOC
read_wf = .False.
SOFT_TOUCH read_wf
call run
end
subroutine run
implicit none
integer :: i
2019-04-26 17:32:52 +02:00
if(pseudo_sym)then
call H_apply_cis_sym
else
call H_apply_cis
endif
2019-01-25 11:39:31 +01:00
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*,'Excitation energies '
do i = 2, N_states
print*, i ,CI_energy(i) - CI_energy(1)
enddo
endif
call ezfio_set_cis_energy(CI_energy)
2020-07-01 20:20:35 +02:00
if (is_complex) then
psi_coef_complex = ci_eigenvectors_complex
SOFT_TOUCH psi_coef_complex
else
psi_coef = ci_eigenvectors
SOFT_TOUCH psi_coef
endif
2019-01-25 11:39:31 +01:00
call save_wavefunction
end