Skip to content

Commit

Permalink
add Orca engrad printout routine
Browse files Browse the repository at this point in the history
  • Loading branch information
awvwgk committed Jan 30, 2020
1 parent 735cfcf commit 4fdf050
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
1 change: 0 additions & 1 deletion xtb/molecule_reader.f90
Original file line number Diff line number Diff line change
Expand Up @@ -977,5 +977,4 @@ subroutine read_molecule_gaussian(mol, unit, status, iomsg)
end subroutine read_molecule_gaussian



end submodule molecule_reader
21 changes: 21 additions & 0 deletions xtb/output_writer.f90
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,27 @@ module tbmod_output_writer

contains

subroutine write_orca_engrad(unit, mol, energy, gradient)
use tbdef_molecule
type(tb_molecule), intent(in) :: mol
integer, intent(in) :: unit
real(wp), intent(in) :: energy
real(wp), intent(in) :: gradient(:, :)
integer :: i

write(unit, '(a)') "#", "# Number of atoms", "#"
write(unit, '(i10)') mol%n
write(unit, '(a)') "#", "# The current total energy in Eh", "#"
write(unit, '(f20.12)') energy
write(unit, '(a)') "#", "# The current gradient in Eh/bohr", "#"
write(unit, '(1x,f20.12)') gradient
write(unit, '(a)') "#", "# The atomic numbers and current coordinates in Bohr", "#"
do i = 1, mol%n
write(unit, '(1x,i3,1x,(3(1x,f12.7))') mol%at(i), mol%xyz(:, i)
end do

end subroutine write_orca_engrad

subroutine write_gaussian_eou(unit, energy, dipole, gradient)
integer, intent(in) :: unit
real(wp), intent(in) :: energy
Expand Down

0 comments on commit 4fdf050

Please sign in to comment.