diff --git a/.other_libs/build_fcns/configure.ac_FormCHK b/.other_libs/build_fcns/configure.ac_FormCHK index 304ba692..bc31c484 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.8.0], [hhratchian@ucmerced.edu]) +AC_INIT([MQC_Pack], [25.9.0], [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 98ce5241..78313dae 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.8.0], [hhratchian@ucmerced.edu]) +AC_INIT([MQC_Pack], [25.9.0], [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 94a2a4a6..1e5f71ef 100644 --- a/README.md +++ b/README.md @@ -16,8 +16,8 @@ ** ** ** The Merced Quantum Chemistry Package ** ** (MQCPack) ** - ** Version 25.8.0 ** - ** August 1, 2025 ** + ** Version 25.9.0 ** + ** September 10, 2025 ** ** ** ** ** ** Written By: ** diff --git a/releaseNotes.txt b/releaseNotes.txt index 08843560..70e713a6 100644 --- a/releaseNotes.txt +++ b/releaseNotes.txt @@ -8,6 +8,11 @@ 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. +September 10, 2025 +* MQCPack version set to 25.9.0. +* Added initial support for symmetric matrices stored in MQC variables to +be written in linear packed form to FAFs. + August 16, 2025 * MQCPack version set to 25.8.0. * Minor updates for printing logical arrays made to MQC_General. diff --git a/src/mqc_FullWavefunction.F03 b/src/mqc_FullWavefunction.F03 index 8a5016ce..4425e738 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.8.0 ** -! ** August 1, 2025 ** +! ** Version 25.9.0 ** +! ** September 10, 2025 ** ! ** ** ! ** ** ! ** Modules beloning to MQCPack: ** diff --git a/src/mqc_algebra.F03 b/src/mqc_algebra.F03 index 81fa7bc3..21c476c9 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.8.0 ** -! ** August 1, 2025 ** +! ** Version 25.9.0 ** +! ** September 10, 2025 ** ! ** ** ! ** ** ! ** Modules beloning to MQCPack: ** diff --git a/src/mqc_algebra2.F03 b/src/mqc_algebra2.F03 index dfbef967..05935e26 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.8.0 ** -! ** August 1, 2025 ** +! ** Version 25.9.0 ** +! ** September 10, 2025 ** ! ** ** ! ** ** ! ** Modules beloning to MQCPack: ** @@ -68,7 +68,8 @@ Module MQC_Algebra2 ! object as "INTEGER", "REAL", or "COMPLEX". type MQC_Variable integer(kind=int64),private::rank=-1 - character(len=64),private::dataType,storageFormat +!hph character(len=64),private::dataType,storageFormat + character(len=64),public::dataType,storageFormat integer(kind=int64),dimension(10),private::dimensions=0 real(kind=real64),dimension(:),allocatable::realArray complex(kind=real64),dimension(:),allocatable::complexArray diff --git a/src/mqc_binary.F03 b/src/mqc_binary.F03 index 43148a7d..a35aad42 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.8.0 ** -! ** August 1, 2025 ** +! ** Version 25.9.0 ** +! ** September 10, 2025 ** ! ** ** ! ** ** ! ** Modules beloning to MQCPack: ** diff --git a/src/mqc_datastructures.F03 b/src/mqc_datastructures.F03 index f4a6192e..68aad32d 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.8.0 ** -! ** August 1, 2025 ** +! ** Version 25.9.0 ** +! ** September 10, 2025 ** ! ** ** ! ** ** ! ** Modules beloning to MQCPack: ** diff --git a/src/mqc_est.F03 b/src/mqc_est.F03 index 6901fcc5..fc957c22 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.8.0 ** -! ** August 1, 2025 ** +! ** Version 25.9.0 ** +! ** September 10, 2025 ** ! ** ** ! ** ** ! ** Modules beloning to MQCPack: ** diff --git a/src/mqc_files.F03 b/src/mqc_files.F03 index 51beb748..0a10fba0 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.8.0 ** -! ** August 1, 2025 ** +! ** Version 25.9.0 ** +! ** September 10, 2025 ** ! ** ** ! ** ** ! ** Modules beloning to MQCPack: ** diff --git a/src/mqc_gaussian.F03 b/src/mqc_gaussian.F03 index 501fc135..a403d77e 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.8.0 ** -! ** August 1, 2025 ** +! ** Version 25.9.0 ** +! ** September 10, 2025 ** ! ** ** ! ** ** ! ** Modules beloning to MQCPack: ** @@ -1718,6 +1718,7 @@ subroutine MQC_Gaussian_Unformatted_Matrix_Write_Array2(fileinfo, & ! ! matrix... case(2) + if(my_storage.eq.'l') call mqc_error('Write_Array2: storage=l NYI.') Allocate(intVectorTmp(SIZE(mqcVariable,1)*SIZE(mqcVariable,2))) intMatrixTmp = mqcVariable intVectorTmp = RESHAPE(intMatrixTmp,[SIZE(intMatrixTmp)]) @@ -1744,14 +1745,24 @@ subroutine MQC_Gaussian_Unformatted_Matrix_Write_Array2(fileinfo, & ! ! matrix... case(2) - Allocate(realVectorTmp(SIZE(mqcVariable,1)*SIZE(mqcVariable,2))) - realMatrixTmp = mqcVariable - realVectorTmp = RESHAPE(realMatrixTmp,[SIZE(realMatrixTmp)]) - call wr_LRBuf(fileinfo%UnitNumber,TRIM(tmpLabel),IOne,LenBuf, & - SIZE(mqcVariable,1),SIZE(mqcVariable,2),0,0,0,.False., & - realVectorTmp) - DeAllocate(realMatrixTmp) - DeAllocate(realVectorTmp) + if(my_storage.eq.'l') then + realMatrixTmp = mqcVariable + realVectorTmp = mqc_matrixFull2Symm_real(realMatrixTmp,'u') + call wr_LRBuf(fileinfo%UnitNumber,TRIM(tmpLabel),IOne,LenBuf, & + -SIZE(mqcVariable,1),SIZE(mqcVariable,2),0,0,0,.False., & + realVectorTmp) + DeAllocate(realMatrixTmp) + DeAllocate(realVectorTmp) + else + Allocate(realVectorTmp(SIZE(mqcVariable,1)*SIZE(mqcVariable,2))) + realMatrixTmp = mqcVariable + realVectorTmp = RESHAPE(realMatrixTmp,[SIZE(realMatrixTmp)]) + call wr_LRBuf(fileinfo%UnitNumber,TRIM(tmpLabel),IOne,LenBuf, & + SIZE(mqcVariable,1),SIZE(mqcVariable,2),0,0,0,.False., & + realVectorTmp) + DeAllocate(realMatrixTmp) + DeAllocate(realVectorTmp) + endIf case default call mqc_error('Invalid mqcVariable rank sent to '// & 'MQC_Gaussian_Unformatted_Matrix_Write_Array2.') diff --git a/src/mqc_general.F03 b/src/mqc_general.F03 index 14c727fc..3d08cd5a 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.8.0 ** -! ** August 1, 2025 ** +! ** Version 25.9.0 ** +! ** September 10, 2025 ** ! ** ** ! ** ** ! ** Modules beloning to MQCPack: ** @@ -179,9 +179,9 @@ subroutine mqc_version(major,minor,revision,versionString) character(len=*),OPTIONAL,intent(out)::versionString ! if(PRESENT(major)) major = 25 - if(PRESENT(minor)) minor = 8 + if(PRESENT(minor)) minor = 9 if(PRESENT(revision)) revision = 0 - if(PRESENT(versionString)) versionString = '25.8.0' + if(PRESENT(versionString)) versionString = '25.9.0' ! return end subroutine mqc_version @@ -2316,6 +2316,123 @@ subroutine mqc_packedSymmetricSymmetricR4Tensor2Full_real(r4TensorSymSym, & return end subroutine mqc_packedSymmetricSymmetricR4Tensor2Full_real +! +!PROCEDURE mqc_FullMatrix2packedSymmetricMatrix_real + subroutine mqc_FullMatrix2packedSymmetricMatrix_real(matrixFull, & + matrixSymmetric,upperLower) +! +! This subroutine accepts a full matrix that is assumed to be symmetric and +! returns and packed symmetric form. Note that is +! initialized in this routine. Furthermore, must be +! allocated prior to calling this routine. +! +! Optional input dummy argument is a character string with 'U' +! or 'L' to denote whether is sent in an upper- or +! lower-symmetric column-wise storage format. If not sent, the default value +! for is 'U'. +! +! +! H. P. Hratchian, 2025. +! +! +! Variable Declarations. + implicit none + real(kind=real64),dimension(:,:),intent(in)::matrixFull + real(kind=real64),dimension(:),intent(out)::matrixSymmetric + integer(kind=int64)::i,j,k,nDim,nSymm + character(len=*),intent(in),optional::upperLower + character(len=1)::myUpperLower +! +! +! Error traps... +! + if(SIZE(matrixFull,1).ne.SIZE(matrixFull,2)) & + call mqc_error_i('mqc_packedSymmetricMatrix2FullMatrix_real: matrixFull array is NOT square!', & + 6,'nDim(1)',SIZE(matrixFull,1),'nDim(2)',SIZE(matrixFull,2)) + nDim = SIZE(matrixFull,1) + nSymm = (nDim*(nDim+1))/2 + if(nSymm.ne.SIZE(matrixSymmetric,1)) & + call mqc_error_i('mqc_packedSymmetricMatrix2FullMatrix_real: matrixSymmetric has wrong dimension!', & + 6,'nSymm',nSymm,'SIZE(matrixSymmetric)',SIZE(matrixSymmetric,1)) +! +! Set-up myUpperLower. +! + if(PRESENT(upperLower)) then + myUpperLower = TRIM(upperLower) + else + myUpperLower = 'U' + endIf +! +! Convert the full matrix into packed/linearized storage. +! + matrixSymmetric = mqc_float(0) + select case(myUpperLower) + case('u','U') + k = 0 + do i = 1,nDim + do j = 1,i + k = k+1 + matrixSymmetric(k) = (matrixFull(i,j)+matrixFull(j,i))/ & + mqc_float(2) + endDo + endDo + case('l','L') + k = 0 + do i = 1,nDim + do j = i,nDim + k = k+1 + matrixSymmetric(k) = (matrixFull(i,j)+matrixFull(j,i))/ & + mqc_float(2) + endDo + endDo + case default + call mqc_error('mqc_FullMatrix2packedSymmetricMatrix_real: Invalid upperLower.'// & + ' upperLower='//TRIM(upperLower)//'.') + end select +! + return + end subroutine mqc_FullMatrix2packedSymmetricMatrix_real + +! +!PROCEDURE mqc_matrixFull2Symm_real + function mqc_matrixFull2Symm_real(matrixFull,upperLower) result(matrixSymmetric) +! +! This function accepts a 2-dimensional input array of a symmetric matrix +! (input dummy argument ) and returns a linearized packed form. +! +! Optional input dummy argument is a character string with 'U' +! or 'L' to denote whether the linearized form should be written in an +! upper- or lower-symmetric column-wise storage format. If not sent, the +! default value for is 'U'. +! +! +! H. P. Hratchian, 2025. +! +! +! Variable Declarations. + implicit none + real(kind=real64),dimension(:,:),intent(in)::matrixFull + real(kind=real64),dimension(:),allocatable::matrixSymmetric + integer(kind=int64)::nDim,nSymm + character(len=*),intent(in),optional::upperLower + character(len=1)::myUpperLower +! +! Set-up myUpperLower and alloacte matrixSymmetric. +! + if(PRESENT(upperLower)) then + myUpperLower = TRIM(upperLower) + else + myUpperLower = 'U' + endIf + nDim = SIZE(matrixFull,1) + nSymm = (nDim*(nDim+1))/2 + allocate(matrixSymmetric(nSymm)) + call mqc_FullMatrix2packedSymmetricMatrix_real(matrixFull, & + matrixSymmetric,myUpperLower) +! + return + end Function mqc_matrixFull2Symm_real + ! !PROCEDURE mqc_matrixTrace function mqc_matrixTrace(matrix) result(trace) diff --git a/src/mqc_general_lapack.F03 b/src/mqc_general_lapack.F03 index 79476f21..28364887 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.8.0 ** -! ** August 1, 2025 ** +! ** Version 25.9.0 ** +! ** September 10, 2025 ** ! ** ** ! ** ** ! ** Modules beloning to MQCPack: ** diff --git a/src/mqc_integrals.F03 b/src/mqc_integrals.F03 index a1a458dc..6278cf35 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.8.0 ** -! ** August 1, 2025 ** +! ** Version 25.9.0 ** +! ** September 10, 2025 ** ! ** ** ! ** ** ! ** Modules beloning to MQCPack: ** diff --git a/src/mqc_interface.F03 b/src/mqc_interface.F03 index 322b7203..2173f9f7 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.8.0 ** -! ** August 1, 2025 ** +! ** Version 25.9.0 ** +! ** September 10, 2025 ** ! ** ** ! ** ** ! ** Modules beloning to MQCPack: ** diff --git a/src/mqc_matwrapper.F03 b/src/mqc_matwrapper.F03 index 6ed8b9d1..10e8249d 100644 --- a/src/mqc_matwrapper.F03 +++ b/src/mqc_matwrapper.F03 @@ -11,8 +11,8 @@ Module MQC_MatWrapper ! ** Lee M. Thompson, Xianghai Sheng, Andrew D. Mahler, Dave ** ! ** Mullally, and Hrant P. Hratchian ** ! ** ** -! ** Version 25.8.0 ** -! ** August 1, 2025 ** +! ** Version 25.9.0 ** +! ** September 10, 2025 ** ! ** ** ! ** ** ! ** Modules beloning to MQCPack: ** diff --git a/src/mqc_molecule.F03 b/src/mqc_molecule.F03 index d016ed1c..0e716151 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.8.0 ** -! ** August 1, 2025 ** +! ** Version 25.9.0 ** +! ** September 10, 2025 ** ! ** ** ! ** ** ! ** Modules beloning to MQCPack: **