diff --git a/.other_libs/build_fcns/configure.ac_FormCHK b/.other_libs/build_fcns/configure.ac_FormCHK index 31eb2e7d..4bff0252 100644 --- a/.other_libs/build_fcns/configure.ac_FormCHK +++ b/.other_libs/build_fcns/configure.ac_FormCHK @@ -1,4 +1,4 @@ -AC_INIT([MQC_Pack], [25.6.0], [hhratchian@ucmerced.edu]) +AC_INIT([MQC_Pack], [25.6.2], [hhratchian@ucmerced.edu]) AM_INIT_AUTOMAKE([foreign]) AC_CONFIG_SRCDIR([src/mqc_general.F03]) AC_PROG_CPP diff --git a/.other_libs/build_fcns/configure.ac_MatrixFile b/.other_libs/build_fcns/configure.ac_MatrixFile index 679513af..ac183b8a 100644 --- a/.other_libs/build_fcns/configure.ac_MatrixFile +++ b/.other_libs/build_fcns/configure.ac_MatrixFile @@ -1,4 +1,4 @@ -AC_INIT([MQC_Pack], [25.6.0], [hhratchian@ucmerced.edu]) +AC_INIT([MQC_Pack], [25.6.2], [hhratchian@ucmerced.edu]) AM_INIT_AUTOMAKE([foreign]) AC_CONFIG_SRCDIR([src/mqc_general.F03]) AC_LANG([Fortran]) diff --git a/README.md b/README.md index 8d4283f3..fc1f97f8 100644 --- a/README.md +++ b/README.md @@ -16,8 +16,8 @@ ** ** ** The Merced Quantum Chemistry Package ** ** (MQCPack) ** - ** Version 25.6.0 ** - ** June 2, 2025 ** + ** Version 25.6.2 ** + ** June 16,2025 ** ** ** ** ** ** Written By: ** diff --git a/releaseNotes.txt b/releaseNotes.txt index 840c0570..0e043c19 100644 --- a/releaseNotes.txt +++ b/releaseNotes.txt @@ -8,6 +8,12 @@ number updates will be documented here. Note that the minor version number will often be updated near the start of the month and the revision number in that case will be set to 0. +June 16, 2025 +* MQCPack version set to 25.6.2. +* Added a couple of debug flag fixes that were hardwired to TRUE. +* Added new routines for linear least squares fitting. +* Added additional functionality to MQC_Integrals. + June 2, 2025 * MQCPack version set to 25.6.0. * Added a fix for the rpower function in MQC_Algebra2 that was causing some diff --git a/src/mqc_FullWavefunction.F03 b/src/mqc_FullWavefunction.F03 index 58642394..c1895d0b 100644 --- a/src/mqc_FullWavefunction.F03 +++ b/src/mqc_FullWavefunction.F03 @@ -11,8 +11,8 @@ module MQC_FullWavefunction ! ** Lee M. Thompson, Xianghai Sheng, Andrew D. Mahler, Dave ** ! ** Mullally, and Hrant P. Hratchian ** ! ** ** -! ** Version 25.6.1 ** -! ** June 2, 2025 ** +! ** Version 25.6.2 ** +! ** June 16, 2025 ** ! ** ** ! ** ** ! ** Modules beloning to MQCPack: ** diff --git a/src/mqc_algebra.F03 b/src/mqc_algebra.F03 index 1e995a3e..8c3121e8 100644 --- a/src/mqc_algebra.F03 +++ b/src/mqc_algebra.F03 @@ -43,8 +43,8 @@ Module MQC_Algebra ! ** Lee M. Thompson, Xianghai Sheng, Andrew D. Mahler, Dave ** ! ** Mullally, and Hrant P. Hratchian ** ! ** ** -! ** Version 25.6.1 ** -! ** June 2, 2025 ** +! ** Version 25.6.2 ** +! ** June 16, 2025 ** ! ** ** ! ** ** ! ** Modules beloning to MQCPack: ** diff --git a/src/mqc_algebra2.F03 b/src/mqc_algebra2.F03 index d4812277..617b05dc 100644 --- a/src/mqc_algebra2.F03 +++ b/src/mqc_algebra2.F03 @@ -12,8 +12,8 @@ Module MQC_Algebra2 ! ** Lee M. Thompson, Xianghai Sheng, Andrew D. Mahler, Dave ** ! ** Mullally, and Hrant P. Hratchian ** ! ** ** -! ** Version 25.6.0 ** -! ** June 2, 2025 ** +! ** Version 25.6.2 ** +! ** June 16, 2025 ** ! ** ** ! ** ** ! ** Modules beloning to MQCPack: ** diff --git a/src/mqc_binary.F03 b/src/mqc_binary.F03 index eeb734c4..9567e6e7 100644 --- a/src/mqc_binary.F03 +++ b/src/mqc_binary.F03 @@ -10,8 +10,8 @@ module MQC_Binary ! ** Lee M. Thompson, Xianghai Sheng, Andrew D. Mahler, Dave ** ! ** Mullally, and Hrant P. Hratchian ** ! ** ** -! ** Version 25.6.1 ** -! ** June 2, 2025 ** +! ** Version 25.6.2 ** +! ** June 16, 2025 ** ! ** ** ! ** ** ! ** Modules beloning to MQCPack: ** diff --git a/src/mqc_datastructures.F03 b/src/mqc_datastructures.F03 index 1eac7026..e5812527 100644 --- a/src/mqc_datastructures.F03 +++ b/src/mqc_datastructures.F03 @@ -10,8 +10,8 @@ Module MQC_DataStructures ! ** Lee M. Thompson, Xianghai Sheng, Andrew D. Mahler, Dave ** ! ** Mullally, and Hrant P. Hratchian ** ! ** ** -! ** Version 25.6.1 ** -! ** June 2, 2025 ** +! ** Version 25.6.2 ** +! ** June 16, 2025 ** ! ** ** ! ** ** ! ** Modules beloning to MQCPack: ** diff --git a/src/mqc_est.F03 b/src/mqc_est.F03 index 9b5a3e15..5b8c8c93 100644 --- a/src/mqc_est.F03 +++ b/src/mqc_est.F03 @@ -38,8 +38,8 @@ Module MQC_EST ! ** Lee M. Thompson, Xianghai Sheng, Andrew D. Mahler, Dave ** ! ** Mullally, and Hrant P. Hratchian ** ! ** ** -! ** Version 25.6.1 ** -! ** June 2, 2025 ** +! ** Version 25.6.2 ** +! ** June 16, 2025 ** ! ** ** ! ** ** ! ** Modules beloning to MQCPack: ** diff --git a/src/mqc_files.F03 b/src/mqc_files.F03 index aa60d175..f82a508d 100644 --- a/src/mqc_files.F03 +++ b/src/mqc_files.F03 @@ -10,8 +10,8 @@ Module MQC_Files ! ** Lee M. Thompson, Xianghai Sheng, Andrew D. Mahler, Dave ** ! ** Mullally, and Hrant P. Hratchian ** ! ** ** -! ** Version 25.6.1 ** -! ** June 2, 2025 ** +! ** Version 25.6.2 ** +! ** June 16, 2025 ** ! ** ** ! ** ** ! ** Modules beloning to MQCPack: ** diff --git a/src/mqc_gaussian.F03 b/src/mqc_gaussian.F03 index 37099842..02a18435 100644 --- a/src/mqc_gaussian.F03 +++ b/src/mqc_gaussian.F03 @@ -10,8 +10,8 @@ Module MQC_Gaussian ! ** Lee M. Thompson, Xianghai Sheng, Andrew D. Mahler, Dave ** ! ** Mullally, and Hrant P. Hratchian ** ! ** ** -! ** Version 25.6.1 ** -! ** June 2, 2025 ** +! ** Version 25.6.2 ** +! ** June 16, 2025 ** ! ** ** ! ** ** ! ** Modules beloning to MQCPack: ** @@ -919,7 +919,7 @@ subroutine MQC_Gaussian_Unformatted_Matrix_Write_Header(fileinfo, & ! ! Local temp variables. character(len=256)::my_filename - logical::DEBUG=.true.,ok,openbool + logical::DEBUG=.false.,ok,openbool ! ! ! Format statements. @@ -1076,11 +1076,11 @@ subroutine MQC_Gaussian_Unformatted_Matrix_Write_Header(fileinfo, & fileinfo%CurrentlyOpen = .true. fileinfo%header_written = .true. ! - if(DEBUG) write(IOut,1010) TRIM(fileinfo%LabFil), & - TRIM(fileinfo%GVers),TRIM(fileinfo%Title),fileinfo%natoms, & - fileinfo%NBasis,fileinfo%nbasisUse,fileinfo%ICharge, & - fileinfo%Multiplicity,fileinfo%nelectrons, & - IOpCl,fileinfo%ICGU + if(DEBUG.or.MQC_Gaussian_DEBUG) write(IOut,1010) & + TRIM(fileinfo%LabFil),TRIM(fileinfo%GVers), & + TRIM(fileinfo%Title),fileinfo%natoms,fileinfo%NBasis, & + fileinfo%nbasisUse,fileinfo%ICharge,fileinfo%Multiplicity, & + fileinfo%nelectrons,IOpCl,fileinfo%ICGU ! return end subroutine MQC_Gaussian_Unformatted_Matrix_Write_Header diff --git a/src/mqc_general.F03 b/src/mqc_general.F03 index 23c13973..0635d7ee 100644 --- a/src/mqc_general.F03 +++ b/src/mqc_general.F03 @@ -10,8 +10,8 @@ Module MQC_General ! ** Lee M. Thompson, Xianghai Sheng, Andrew D. Mahler, Dave ** ! ** Mullally, and Hrant P. Hratchian ** ! ** ** -! ** Version 25.6.1 ** -! ** June 2, 2025 ** +! ** Version 25.6.2 ** +! ** June 16, 2025 ** ! ** ** ! ** ** ! ** Modules beloning to MQCPack: ** @@ -181,8 +181,8 @@ subroutine mqc_version(major,minor,revision,versionString) ! if(PRESENT(major)) major = 25 if(PRESENT(minor)) minor = 6 - if(PRESENT(revision)) revision = 0 - if(PRESENT(versionString)) versionString = '25.6.0' + if(PRESENT(revision)) revision = 2 + if(PRESENT(versionString)) versionString = '25.6.2' ! return end subroutine mqc_version @@ -1647,7 +1647,8 @@ end subroutine mqc_normalizeVector Subroutine mqc_vectorTrimZero(vectorIn,vectorOut,small) ! ! This subroutine accepts a vector, , and sets all entries that -! have absolute values below a threshold to float(0). +! have absolute values below a threshold to float(0). Arguments +! and CANNOT be the same. ! ! If the optional dummy argument is sent, then is ! left unchanged and the zero-d version of the vector is returned in @@ -1762,7 +1763,7 @@ Subroutine mqc_vectorPhase(vector,largestPositive,trimZero) return end subroutine mqc_vectorPhase - +! !PROCEDURE mqc_outerProduct_real Function mqc_outerProduct_real(vector1,vector2,scalar) result(matrixOut) ! @@ -1805,7 +1806,7 @@ Function mqc_outerProduct_real(vector1,vector2,scalar) result(matrixOut) return end function mqc_outerProduct_real - +! !PROCEDURE mqc_packedSymmetricMatrix2FullMatrix_integer Subroutine mqc_packedSymmetricMatrix2FullMatrix_integer(matrixSymmetric, & matrixFull,upperLower) @@ -1883,7 +1884,7 @@ Subroutine mqc_packedSymmetricMatrix2FullMatrix_integer(matrixSymmetric, & return end Subroutine mqc_packedSymmetricMatrix2FullMatrix_integer - +! !PROCEDURE mqc_packedSymmetricMatrix2FullMatrix_real Subroutine mqc_packedSymmetricMatrix2FullMatrix_real(matrixSymmetric, & matrixFull,upperLower) @@ -1961,7 +1962,7 @@ Subroutine mqc_packedSymmetricMatrix2FullMatrix_real(matrixSymmetric, & return end Subroutine mqc_packedSymmetricMatrix2FullMatrix_real - +! !PROCEDURE mqc_matrixSymm2Full_integer function mqc_matrixSymm2Full_integer(matrixSymmetric,upperLower) result(matrixFull) ! @@ -2003,7 +2004,7 @@ function mqc_matrixSymm2Full_integer(matrixSymmetric,upperLower) result(matrixFu return end Function mqc_matrixSymm2Full_integer - +! !PROCEDURE mqc_matrixSymm2Full_real function mqc_matrixSymm2Full_real(matrixSymmetric,upperLower) result(matrixFull) ! @@ -2045,7 +2046,7 @@ function mqc_matrixSymm2Full_real(matrixSymmetric,upperLower) result(matrixFull) return end Function mqc_matrixSymm2Full_real - +! !PROCEDURE mqc_packedDiagonalMatrix2FullMatrix_integer Subroutine mqc_packedDiagonalMatrix2FullMatrix_integer(matrixDiagonal, & matrixFull) @@ -2080,7 +2081,7 @@ Subroutine mqc_packedDiagonalMatrix2FullMatrix_integer(matrixDiagonal, & return end Subroutine mqc_packedDiagonalMatrix2FullMatrix_integer - +! !PROCEDURE mqc_packedDiagonalMatrix2FullMatrix_real subroutine mqc_packedDiagonalMatrix2FullMatrix_real(matrixDiagonal, & matrixFull) @@ -2113,7 +2114,7 @@ subroutine mqc_packedDiagonalMatrix2FullMatrix_real(matrixDiagonal, & ! return end Subroutine mqc_packedDiagonalMatrix2FullMatrix_real -! + ! !PROCEDURE mqc_packedSymmetricSymmetricR4Tensor2Full_real subroutine mqc_packedSymmetricSymmetricR4Tensor2Full_real(r4TensorSymSym, & @@ -2180,7 +2181,7 @@ subroutine mqc_packedSymmetricSymmetricR4Tensor2Full_real(r4TensorSymSym, & ! return end subroutine mqc_packedSymmetricSymmetricR4Tensor2Full_real -! + ! !PROCEDURE mqc_matrixTrace function mqc_matrixTrace(matrix) result(trace) @@ -2207,7 +2208,7 @@ function mqc_matrixTrace(matrix) result(trace) ! return end function mqc_matrixTrace -! + ! !PROCEDURE mqc_diagMatrixTimesFullMatrix subroutine mqc_diagMatrixTimesFullMatrix(diagMatrix,fullMatrix,outputMatrix) @@ -2255,7 +2256,7 @@ subroutine mqc_diagMatrixTimesFullMatrix(diagMatrix,fullMatrix,outputMatrix) ! return end subroutine mqc_diagMatrixTimesFullMatrix -! + ! !PROCEDURE mqc_matrixInverse_symmFull subroutine mqc_matrixInverse_symmFull(matrix,matrixInverse, & @@ -2330,6 +2331,45 @@ subroutine mqc_matrixInverse_symmFull(matrix,matrixInverse, & end subroutine mqc_matrixInverse_symmFull ! +! +!PROCEDURE MQC_leastSquaresFit + subroutine MQC_leastSquaresFit(x,y,slope,intercept,rSquared) +! +! This subroutine evaluates a 1D least squares fit for the data set x and +! y(x). The output of the routine is the slope, intercept, and R**2 value. +! +! +! H. P. Hratchian, 2025. +! + implicit none + real(kind=real64),dimension(:),intent(in)::x,y + real(kind=real64),intent(out)::slope,intercept,rSquared + integer(kind=int64)::n,i + real(kind=real64)::xMean,yMean + real(kind=real64)::SSxy,SSxx,SSyy,SSR +! +! Set n, the number of data points, and then do error trapping. +! + n = size(x) + if(n.ne.size(y)) & + call mqc_error('Error: x and y arrays must have the same size.') + if(n.lt.2) & + call mqc_error('Error: At least two points required for least-squares fitting.') +! +! Solve the linear least squares problem. +! + xMean = sum(x)/mqc_float(n) + yMean = sum(y)/mqc_float(n) + SSxy = sum((x-xMean)*(y-yMean)) + SSxx = sum((x-xMean)**2) + SSyy = sum((y-yMean)**2) + slope = SSxy/SSxx + intercept = yMean-slope*xMean + SSR = SSxx*slope**2 + rSquared = SSR/SSyy +! + return + end subroutine MQC_leastSquaresFit ! ! diff --git a/src/mqc_general_lapack.F03 b/src/mqc_general_lapack.F03 index cd0b34bb..24c59256 100644 --- a/src/mqc_general_lapack.F03 +++ b/src/mqc_general_lapack.F03 @@ -9,8 +9,8 @@ ! ** Lee M. Thompson, Xianghai Sheng, Andrew D. Mahler, Dave ** ! ** Mullally, and Hrant P. Hratchian ** ! ** ** -! ** Version 25.6.1 ** -! ** June 2, 2025 ** +! ** Version 25.6.2 ** +! ** June 16, 2025 ** ! ** ** ! ** ** ! ** Modules beloning to MQCPack: ** diff --git a/src/mqc_integrals.F03 b/src/mqc_integrals.F03 index 7b5d8e3d..cbaa0928 100644 --- a/src/mqc_integrals.F03 +++ b/src/mqc_integrals.F03 @@ -10,8 +10,8 @@ module MQC_Integrals ! ** Lee M. Thompson, Xianghai Sheng, Andrew D. Mahler, Dave ** ! ** Mullally, and Hrant P. Hratchian ** ! ** ** -! ** Version 25.6.1 ** -! ** June 2, 2025 ** +! ** Version 25.6.2 ** +! ** June 16, 2025 ** ! ** ** ! ** ** ! ** Modules beloning to MQCPack: ** diff --git a/src/mqc_interface.F03 b/src/mqc_interface.F03 index 35e435aa..c5e409ef 100644 --- a/src/mqc_interface.F03 +++ b/src/mqc_interface.F03 @@ -9,8 +9,8 @@ ! ** Lee M. Thompson, Xianghai Sheng, Andrew D. Mahler, Dave ** ! ** Mullally, and Hrant P. Hratchian ** ! ** ** -! ** Version 25.6.1 ** -! ** June 2, 2025 ** +! ** Version 25.6.2 ** +! ** June 16, 2025 ** ! ** ** ! ** ** ! ** Modules beloning to MQCPack: ** diff --git a/src/mqc_matwrapper.F03 b/src/mqc_matwrapper.F03 index 1ade769e..a581b5e4 100644 --- a/src/mqc_matwrapper.F03 +++ b/src/mqc_matwrapper.F03 @@ -1,4 +1,4 @@ -!hph#define UCMGAUOPEN +!hph #define UCMGAUOPEN Module MQC_MatWrapper ! ! *********************************************************************** @@ -11,8 +11,8 @@ Module MQC_MatWrapper ! ** Lee M. Thompson, Xianghai Sheng, Andrew D. Mahler, Dave ** ! ** Mullally, and Hrant P. Hratchian ** ! ** ** -! ** Version 25.6.1 ** -! ** June 2, 2025 ** +! ** Version 25.6.2 ** +! ** June 16, 2025 ** ! ** ** ! ** ** ! ** Modules beloning to MQCPack: ** diff --git a/src/mqc_molecule.F03 b/src/mqc_molecule.F03 index 47466a84..8aee00a4 100644 --- a/src/mqc_molecule.F03 +++ b/src/mqc_molecule.F03 @@ -31,8 +31,8 @@ Module MQC_Molecule ! ** Lee M. Thompson, Xianghai Sheng, Andrew D. Mahler, Dave ** ! ** Mullally, and Hrant P. Hratchian ** ! ** ** -! ** Version 25.6.1 ** -! ** June 2, 2025 ** +! ** Version 25.6.2 ** +! ** June 16, 2025 ** ! ** ** ! ** ** ! ** Modules beloning to MQCPack: **