Short summary:
This repository contains two Fortran implementations of the Appendix B example used for HeH+ SCF.
AppendixBcode.f90original, Fortran-77 style reference source.AppendixBcode_revised.f90Fortran-90 refactor by the author that preserves original variables and algorithms, rewrites control flow (removes GOTOs; usesDO/IF), and performs diagonalization using LAPACK.
The file AppendixBcode_revised.f90 includes the following major modifications relative to AppendixBcode.f90:
-
Removed jumps and rewrote control flow
All unstructured jumps (e.g.,GOTO) were removed and rewritten using structuredDOandIFblocks. -
Retained original variables and integral calculations
The original variable definitions and electronic integral evaluation procedures were preserved to allow direct comparison with the reference code. -
LAPACK-based diagonalization
Matrix diagonalization is performed using LAPACK routines (e.g.,DSYEV).
Some variables are redundant and have intentionally not been removed to facilitate validation against the original implementation.
- Fortran compiler supporting Fortran-90
- LAPACK library (and BLAS, depending on system configuration)
gfortran -o HeH AppendixBcode_revised.f90 -llapack