mirror of
https://github.com/QuantumPackage/qp2.git
synced 2024-12-22 11:33:29 +01:00
the casscf does not work with mo optimization ...
This commit is contained in:
parent
228796cff5
commit
6985d4d549
@ -79,3 +79,9 @@ type: logical
|
|||||||
doc: If |true|, the pt2_max value in the CIPSI is set to 10-10 and will not change
|
doc: If |true|, the pt2_max value in the CIPSI is set to 10-10 and will not change
|
||||||
interface: ezfio,provider,ocaml
|
interface: ezfio,provider,ocaml
|
||||||
default: False
|
default: False
|
||||||
|
|
||||||
|
[act_mos_opt]
|
||||||
|
type: logical
|
||||||
|
doc: If |true|, the active orbitals are also optimized variationally
|
||||||
|
interface: ezfio,provider,ocaml
|
||||||
|
default: False
|
||||||
|
@ -3,4 +3,4 @@ selectors_full
|
|||||||
generators_cas
|
generators_cas
|
||||||
two_body_rdm
|
two_body_rdm
|
||||||
dav_general_mat
|
dav_general_mat
|
||||||
mo_optimization
|
mo_optimization_utils
|
||||||
|
@ -46,6 +46,11 @@ subroutine run
|
|||||||
do while (.not.converged)
|
do while (.not.converged)
|
||||||
print*,'pt2_max = ',pt2_max
|
print*,'pt2_max = ',pt2_max
|
||||||
call run_stochastic_cipsi(Ev,PT2)
|
call run_stochastic_cipsi(Ev,PT2)
|
||||||
|
! if(act_mos_opt)then DOES NOT WORK
|
||||||
|
! call run_orb_opt_trust_v2
|
||||||
|
! call run_stochastic_cipsi(Ev,PT2)
|
||||||
|
! endif
|
||||||
|
if(.True.)then
|
||||||
print*,'Ev,PT2',Ev(1),PT2(1)
|
print*,'Ev,PT2',Ev(1),PT2(1)
|
||||||
E_PT2(1:N_states) = Ev(1:N_states) + PT2(1:N_states)
|
E_PT2(1:N_states) = Ev(1:N_states) + PT2(1:N_states)
|
||||||
energy_old = energy
|
energy_old = energy
|
||||||
@ -55,9 +60,9 @@ subroutine run
|
|||||||
call write_time(6)
|
call write_time(6)
|
||||||
call write_int(6,iteration,'CAS-SCF iteration = ')
|
call write_int(6,iteration,'CAS-SCF iteration = ')
|
||||||
call write_double(6,energy,'State-average CAS-SCF energy = ')
|
call write_double(6,energy,'State-average CAS-SCF energy = ')
|
||||||
! if(n_states == 1)then
|
!! if(n_states == 1)then
|
||||||
! call ezfio_get_casscf_cipsi_energy_pt2(E_PT2)
|
!! call ezfio_get_casscf_cipsi_energy_pt2(E_PT2)
|
||||||
! call ezfio_get_casscf_cipsi_energy(PT2)
|
!! call ezfio_get_casscf_cipsi_energy(PT2)
|
||||||
double precision :: delta_E_istate, e_av
|
double precision :: delta_E_istate, e_av
|
||||||
e_av = 0.d0
|
e_av = 0.d0
|
||||||
do istate=1,N_states
|
do istate=1,N_states
|
||||||
@ -68,12 +73,12 @@ subroutine run
|
|||||||
endif
|
endif
|
||||||
write(*,'(A6,I2,A18,F16.10)')'state ',istate,' E + PT2 energy = ',E_PT2(istate)
|
write(*,'(A6,I2,A18,F16.10)')'state ',istate,' E + PT2 energy = ',E_PT2(istate)
|
||||||
write(*,'(A6,I2,A18,F16.10)')'state ',istate,' PT2 energy = ',PT2(istate)
|
write(*,'(A6,I2,A18,F16.10)')'state ',istate,' PT2 energy = ',PT2(istate)
|
||||||
! call write_double(6,E_PT2(istate),'E + PT2 energy = ')
|
!! call write_double(6,E_PT2(istate),'E + PT2 energy = ')
|
||||||
! call write_double(6,PT2(istate),' PT2 = ')
|
!! call write_double(6,PT2(istate),' PT2 = ')
|
||||||
enddo
|
enddo
|
||||||
call write_double(6,e_av,'State-average CAS-SCF energy bis = ')
|
call write_double(6,e_av,'State-average CAS-SCF energy bis = ')
|
||||||
call write_double(6,pt2_max,' PT2_MAX = ')
|
call write_double(6,pt2_max,' PT2_MAX = ')
|
||||||
! endif
|
!! endif
|
||||||
|
|
||||||
print*,''
|
print*,''
|
||||||
call write_double(6,norm_grad_vec2,'Norm of gradients = ')
|
call write_double(6,norm_grad_vec2,'Norm of gradients = ')
|
||||||
@ -132,8 +137,10 @@ subroutine run
|
|||||||
soft_touch state_following_casscf
|
soft_touch state_following_casscf
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
enddo
|
enddo
|
||||||
|
if(.True.)then
|
||||||
integer :: i
|
integer :: i
|
||||||
print*,'Converged CASSCF '
|
print*,'Converged CASSCF '
|
||||||
print*,'--------------------------'
|
print*,'--------------------------'
|
||||||
@ -153,6 +160,7 @@ subroutine run
|
|||||||
! write(*,*)mcscf_fock_alpha_mo(i,i)
|
! write(*,*)mcscf_fock_alpha_mo(i,i)
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
|
endif
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user