10
0
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-06-28 08:02:33 +02:00

starting complex determinants

This commit is contained in:
Kevin Gasperich 2020-02-19 12:47:22 -06:00
parent 9843df68c4
commit ce87a62086
2 changed files with 52 additions and 5 deletions

View File

@ -80,6 +80,33 @@ subroutine build_singly_excited_wavefunction(i_hole,i_particle,ispin,det_out,coe
enddo enddo
end end
subroutine build_singly_excited_wavefunction_complex(i_hole,i_particle,ispin,det_out,coef_out)
implicit none
BEGIN_DOC
! Applies the single excitation operator : a^{dager}_(i_particle) a_(i_hole) of
! spin = ispin to the current wave function (psi_det, psi_coef)
END_DOC
integer, intent(in) :: i_hole,i_particle,ispin
integer(bit_kind), intent(out) :: det_out(N_int,2,N_det)
complex*16, intent(out) :: coef_out(N_det,N_states)
integer :: k
integer :: i_ok
double precision :: phase
do k=1,N_det
coef_out(k,:) = psi_coef(k,:)
det_out(:,:,k) = psi_det(:,:,k)
call do_single_excitation(det_out(1,1,k),i_hole,i_particle,ispin,i_ok)
if (i_ok == 1) then
call get_phase(psi_det(1,1,k), det_out(1,1,k),phase,N_int)
coef_out(k,:) = phase * coef_out(k,:)
else
coef_out(k,:) = (0.d0,0.d0)
det_out(:,:,k) = psi_det(:,:,k)
endif
enddo
end
logical function is_spin_flip_possible(key_in,i_flip,ispin) logical function is_spin_flip_possible(key_in,i_flip,ispin)
implicit none implicit none
BEGIN_DOC BEGIN_DOC

View File

@ -1,10 +1,22 @@
-------------------------------------------------------------------------------------
current:
determinants:
TODO
create_excitations
do_single_excitation
use symmetry rules to simplify?
should this be general, or should we only allow singles that conserve momentum?
density_matrix
...
DONE
create_excitations
build_singly_excited_wavefunction{_complex}
2e integrals printed from pyscf are in physicists' notation -------------------------------------------------------------------------------------
mo energies from pyscf include ewald correction; in qp we just fold that into the nuclear repulsion
this may need to change for addition/removal of electrons (shift in enuc depends on number of electrons)
for complex data, add extra dim (size 2) and treat as real in EZFIO.cfg for complex data, add extra dim (size 2) and treat as real in EZFIO.cfg
@ -34,6 +46,8 @@ translational symmetry:
I + J = K + L I + J = K + L
kconserv(I,J,K)=L kconserv(I,J,K)=L
------------------------------------------------------------------------------
TODO: TODO:
symmetry symmetry
restructure arrays? restructure arrays?
@ -71,6 +85,12 @@ later:
NOTES: NOTES:
2e integrals printed from pyscf are in physicists' notation
mo energies from pyscf include ewald correction; in qp we just fold that into the nuclear repulsion
this may need to change for addition/removal of electrons
(shift in enuc depends on number of electrons)
3-index integrals 3-index integrals
<ij|kl> = \sum_\mu (ik|\mu)(jl|\mu) <ij|kl> = \sum_\mu (ik|\mu)(jl|\mu)
store (ik|\mu) for I<=K store (ik|\mu) for I<=K