mirror of
https://github.com/nwchemgit/nwchem.git
synced 2026-07-28 22:25:48 -04:00
some enhancements and cleanup
This commit is contained in:
parent
6f6e16d938
commit
eef6d39d43
5 changed files with 25 additions and 15 deletions
|
|
@ -275,15 +275,11 @@ c CI^{J}_{jb}(t),j=>occ, b=>vir
|
|||
cilo2(2)=1; cihi2(2)=nvir(ispin)
|
||||
c
|
||||
c S_{jb}(t-dt,t)=S_{bj}(t,t-dt), j=>occ, b=>vir
|
||||
cc ga_ddot check dimensions before transpose,
|
||||
cc so don't transpose indices
|
||||
molo2(1)=nocc(ispin)+1; mohi2(1)=nmo(ispin)
|
||||
molo2(2)=1; mohi2(2)=nocc(ispin)
|
||||
c
|
||||
scr_co=nga_ddot_patch(g_cix2(ispin),'n',cilo2,cihi2,
|
||||
$ g_mo(ispin),'t',molo2,mohi2)
|
||||
c
|
||||
c if (.not.tda) scr_co=scr_co/dsqrt(en(jstate+1)-en(1))
|
||||
c
|
||||
coup(1,jstate+1)=coup(1,jstate+1)+scr_co
|
||||
c
|
||||
|
|
@ -298,8 +294,6 @@ c S_{jb}(t,t-dt), j=>occ, b=>vir
|
|||
c
|
||||
scr_co=nga_ddot_patch(g_cix2(ispin),'n',cilo1,cihi1,
|
||||
$ g_mo(ispin),'n',molo1,mohi1)
|
||||
c
|
||||
c if (.not.tda) scr_co=scr_co/dsqrt(en(jstate+1)-en(1))
|
||||
c
|
||||
coup(1,jstate+1)=coup(1,jstate+1)-scr_co
|
||||
c
|
||||
|
|
@ -513,9 +507,9 @@ c
|
|||
do jstate=1,nstates
|
||||
do istate=1,nstates
|
||||
if (istate.ne.jstate) then
|
||||
write(*,'((f14.8),$)') coup(jstate,istate)
|
||||
write(*,'((es16.8),$)') coup(jstate,istate)
|
||||
else
|
||||
write(*,'((f14.8),$)') en(jstate)
|
||||
write(*,'((es16.8),$)') en(jstate)
|
||||
end if
|
||||
end do
|
||||
write(*,*)
|
||||
|
|
|
|||
|
|
@ -190,7 +190,7 @@ c ***Forces DFT/TDDFT calculation***
|
|||
& l_en_p,k_en_p,l_so,k_so,l_sv,k_sv,state,
|
||||
& state_p,nstates,dt_elec,nroots,ipol,
|
||||
& nocc,nmo,ks_spin,do_tdks,tda,deco)
|
||||
if (mod(dt_nucl*1.d8,dt_elec*1.d8).gt.1.d-8)
|
||||
if (mod(int(dt_nucl*1.d8),int(dt_elec*1.d8)).gt.0)
|
||||
& call errquit(pname//'dt_nucl and dt_elec not compatible',0,
|
||||
& INPUT_ERR)
|
||||
end if
|
||||
|
|
|
|||
|
|
@ -147,6 +147,18 @@ CCC end do
|
|||
PE=en2(curr_state)
|
||||
end if
|
||||
end if
|
||||
c
|
||||
c Check if energy of current state is lower than the energy
|
||||
c of state below it or higher than state above it
|
||||
c (i.e. negative excitation energy)
|
||||
if (curr_state.gt.1) then
|
||||
if (en2(curr_state).lt.en2(curr_state-1))
|
||||
$ curr_state=curr_state-1
|
||||
end if
|
||||
if (curr_state.lt.nstates) then
|
||||
if (en2(curr_state).gt.en2(curr_state+1))
|
||||
$ curr_state=curr_state+1
|
||||
end if
|
||||
c
|
||||
coup1(:,:)=coup2(:,:)
|
||||
en1(:)=en2(:)
|
||||
|
|
|
|||
|
|
@ -94,7 +94,10 @@ c
|
|||
write(LuOut,*)
|
||||
write(LuOut,110) "Elec. time step:", dt_elec
|
||||
write(LuOut,120) "Number of states:", nstates
|
||||
write(LuOut,120) "Initial state:", state
|
||||
c For input/output state runs 0:nstates-1
|
||||
c Inside code states runs 1:nstates
|
||||
write(LuOut,120) "Initial state:", state-1
|
||||
write(LuOut,130) "Decoherence:", deco
|
||||
end if
|
||||
c
|
||||
if (do_tdks) then
|
||||
|
|
@ -104,11 +107,11 @@ c 1=alpha,2=beta
|
|||
if ((ks_spin.gt.2).or.(ks_spin.lt.1))
|
||||
$ call errquit(pname//'invalid spin specified ',0,RTDB_ERR)
|
||||
if (ga_nodeid().eq.0) then
|
||||
write(LuOut,130) "Will do TDKS"
|
||||
write(LuOut,140) "Will do TDKS"
|
||||
if (ks_spin.eq.1) then
|
||||
write(LuOut,130) "TDKS spin channel: alpha"
|
||||
write(LuOut,140) "TDKS spin channel: alpha"
|
||||
else
|
||||
write(LuOut,130) "TDKS spin channel: beta"
|
||||
write(LuOut,140) "TDKS spin channel: beta"
|
||||
end if
|
||||
end if
|
||||
c
|
||||
|
|
@ -213,7 +216,8 @@ c
|
|||
c
|
||||
110 format(A25,F20.4)
|
||||
120 format(A25,I20)
|
||||
130 format(A25)
|
||||
130 format(A25,L20)
|
||||
140 format(A25)
|
||||
c
|
||||
return
|
||||
end
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@ c Initial state
|
|||
1 'default value of 1 will be used'
|
||||
state=1
|
||||
end if
|
||||
c we have input and output set up so state runs from 0 to nstates-1
|
||||
c For input/output state runs from 0 to nstates-1
|
||||
c inside the code state runs from 1 to nstates
|
||||
state=state+1
|
||||
if (.not.rtdb_put(rtdb,'qmd:init_state',mt_int,1,state))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue