Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ONIOM results #917

Merged
merged 1 commit into from
Nov 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions src/main/property.F90
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,29 @@ subroutine write_energy_gff(iunit,sccres,frqres,hess)
write(iunit,'(11x,49("-"))')
end subroutine write_energy_gff

subroutine write_energy_oniom(iunit,sccres,frqres,hess)
use xtb_type_data
implicit none
integer, intent(in) :: iunit ! file handle (usually output_unit=6)
logical, intent(in) :: hess
type(scc_results), intent(in) :: sccres
type(freq_results),intent(in) :: frqres
character(len=*),parameter :: outfmt = '(10x,"|",1x,a,f18.12,1x,a,1x,"|")'

write(iunit,'(a)')
write(iunit,'(11x,49("-"))')
if (hess) then
write(iunit,outfmt) "ONIOM TOTAL ENERGY ", frqres%etot, "Eh "
write(iunit,outfmt) "ONIOM TOTAL ENTHALPY ", frqres%etot+frqres%htot,"Eh "
write(iunit,outfmt) "ONIOM TOTAL FREE ENERGY ", frqres%etot+frqres%gtot,"Eh "
write(iunit,outfmt) "ONIOM GRADIENT NORM ", frqres%gnorm, "Eh/α"
else
write(iunit,outfmt) "ONIOM TOTAL ENERGY ", sccres%e_total,"Eh "
write(iunit,outfmt) "ONIOM GRADIENT NORM ", sccres%gnorm, "Eh/α"
endif
write(iunit,'(11x,49("-"))')
end subroutine write_energy_oniom

subroutine main_property &
(iunit,env,mol,wfx,basis,xtbData,res,solvModel,acc)

Expand Down
3 changes: 3 additions & 0 deletions src/prog/main.F90
Original file line number Diff line number Diff line change
Expand Up @@ -958,6 +958,9 @@ subroutine xtbMain(env, argParser)
type is(TxTBCalculator)
call write_energy(env%unit,res,fres, &
& (set%runtyp.eq.p_run_hess).or.(set%runtyp.eq.p_run_ohess).or.(set%runtyp.eq.p_run_bhess))
type is(TOniomCalculator)
call write_energy_oniom(env%unit,res,fres, &
& (set%runtyp.eq.p_run_hess).or.(set%runtyp.eq.p_run_ohess.or.(set%runtyp.eq.p_run_bhess)))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has no effect on functionality of course, but is there a specific reason why you added the brackets like that?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nah, just a typo

class default
call write_energy_gff(env%unit,res,fres, &
& (set%runtyp.eq.p_run_hess).or.(set%runtyp.eq.p_run_ohess).or.(set%runtyp.eq.p_run_bhess))
Expand Down
2 changes: 0 additions & 2 deletions src/xtb/calculator.f90
Original file line number Diff line number Diff line change
Expand Up @@ -298,13 +298,11 @@ subroutine singlepoint(self, env, mol, chk, printlevel, restart, &

! ------------------------------------------------------------------------
! fixing of certain atoms
! print*,abs(efix/etot)
energy = energy + efix
results%e_total = energy
results%gnorm = norm2(gradient)
if (fixset%n.gt.0) then
do i=1, fixset%n
!print*,i,fixset%atoms(i)
gradient(1:3,fixset%atoms(i))=0
enddo
endif
Expand Down
Loading