Skip to content

Commit

Permalink
Merge pull request #54 from thompsonresearchgroup/master
Browse files Browse the repository at this point in the history
Expanded 2ERI object functionality. Added matrix symmetry types. Fock build efficiency.
  • Loading branch information
leethomo86 authored Jan 12, 2020
2 parents d64f5fd + 57f0f43 commit 5b537b9
Show file tree
Hide file tree
Showing 10 changed files with 11,393 additions and 4,436 deletions.
8 changes: 4 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ before_install:
- which automake
- autoconf --version
- automake --version
- gcc --version
# - gcc --version
# - g++ --version
- gfortran --version
- gfortran-8 --version
- which gfortran-8
# - gfortran --version
# - gfortran-8 --version
# - which gfortran-8

install:
- |
Expand Down
9 changes: 7 additions & 2 deletions examples/SCFenergy/OUTPUT/out_no_runGau
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,10 @@
MatFile test
-------------
Warning, SCFenergy gives incorrect energies for DFT wavefunctions
MQC ERROR: MQC_Matrix_Scalar_Put only has StorFull implemented.
Matrix%Storage = StorSymm
Finished reading file 'rhf_h2-sto3g.mat'
Matrix File: rhf_h2-sto3g.mat
UHF or ROHF
Electronic Energy: -0.1323442724E+00
Electronic/Nuclear Energy: -0.572516043E+00
Nuclear Energy: 0.1058354422E+00
Total Energy: -0.5990248730E+00
3,857 changes: 1,742 additions & 2,115 deletions examples/diishf/OUTPUT/out

Large diffs are not rendered by default.

225 changes: 225 additions & 0 deletions examples/fullci/OUTPUT/out
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,228 @@ Finished with tests designed to fail
-------------
MatFile test
-------------

Full Configuration Interaction Energy Calculator

L. M. Thompson 2016


nBasis = 2

nAlpha = 1

nBeta = 1

nElectrons = 2

Charge = 0

Multiplicity = 1

Wavefunction Type = U
Complex = F

Overlap matrix
Alpha Array
The matrix being printed is symmetric
1 2
1 1.000000
2 0.000108 1.000000
Beta Array
The matrix being printed is symmetric
1 2
1 1.000000
2 0.000108 1.000000

Core Hamiltonian matrix
Alpha Array
The matrix being printed is symmetric
1 2
1 -0.572417
2 -0.000160 -0.572417
Beta Array
The matrix being printed is symmetric
1 2
1 -0.572417
2 -0.000160 -0.572417

Orbital Energies
Alpha Array
1 -0.132344
2 -0.026262
Beta Array
1 -0.132344
2 -0.026262

Molecular orbital coefficients
Alpha Array
1 2
1 0.707069 0.707145
2 0.707069 -0.707145
Beta Array
1 2
1 0.707069 0.707145
2 0.707069 -0.707145

Density matrix
Alpha Array
The matrix being printed is symmetric
1 2
1 0.499946
2 0.499946 0.499946
Beta Array
The matrix being printed is symmetric
1 2
1 0.499946
2 0.499946 0.499946

SCF Density matrix
Alpha Array
The matrix being printed is symmetric
1 2
1 0.499946
2 0.499946 0.499946
Beta Array
The matrix being printed is symmetric
1 2
1 0.499946
2 0.499946 0.499946

Fock matrix
Alpha Array
The matrix being printed is symmetric
1 2
1 -0.079309
2 -0.053049 -0.079309
Beta Array
The matrix being printed is symmetric
1 2
1 -0.079309
2 -0.053049 -0.079309

AO 2ERIs
Regular 2ERIs
( 1, 1| 1, 1) = 0.77460594
( 1, 1| 1, 2) = 0.00002300
( 1, 1| 2, 1) = 0.00002300
( 1, 1| 2, 2) = 0.10583544
( 1, 2| 1, 1) = 0.00002300
( 1, 2| 1, 2) = 0.00000001
( 1, 2| 2, 1) = 0.00000001
( 1, 2| 2, 2) = 0.00002300
( 2, 1| 1, 1) = 0.00002300
( 2, 1| 1, 2) = 0.00000001
( 2, 1| 2, 1) = 0.00000001
( 2, 1| 2, 2) = 0.00002300
( 2, 2| 1, 1) = 0.10583544
( 2, 2| 1, 2) = 0.00002300
( 2, 2| 2, 1) = 0.00002300
( 2, 2| 2, 2) = 0.77460594
found UHF wavefunction
Nuclear Repulsion Energy (au) = 0.105835442184
Alpha Strings
1 10
2 1
Beta Strings
1 10
2 1
MO Basis Core Hamiltonian
Alpha Array
1 2
1 -0.572516 0.000000
2 0.000000 -0.572319
Beta Array
1 2
1 -0.572516 0.000000
2 0.000000 -0.572319
Doing O(N**5) integral transformation algorithm
Transformed MO 2ERIs (aa|aa)
( 1, 1| 1, 1) = 0.44017177
( 1, 1| 1, 2) = 0.00000000
( 1, 1| 2, 1) = 0.00000000
( 1, 1| 2, 2) = 0.44022069
( 1, 2| 1, 1) = 0.00000000
( 1, 2| 1, 2) = 0.33438525
( 1, 2| 2, 1) = 0.33438525
( 1, 2| 2, 2) = 0.00000000
( 2, 1| 1, 1) = 0.00000000
( 2, 1| 1, 2) = 0.33438525
( 2, 1| 2, 1) = 0.33438525
( 2, 1| 2, 2) = 0.00000000
( 2, 2| 1, 1) = 0.44022069
( 2, 2| 1, 2) = 0.00000000
( 2, 2| 2, 1) = 0.00000000
( 2, 2| 2, 2) = 0.44026964
Transformed MO 2ERIs (aa|bb)
( 1, 1| 1, 1) = 0.44017177
( 1, 1| 1, 2) = 0.00000000
( 1, 1| 2, 1) = 0.00000000
( 1, 1| 2, 2) = 0.44022069
( 1, 2| 1, 1) = 0.00000000
( 1, 2| 1, 2) = 0.33438525
( 1, 2| 2, 1) = 0.33438525
( 1, 2| 2, 2) = 0.00000000
( 2, 1| 1, 1) = 0.00000000
( 2, 1| 1, 2) = 0.33438525
( 2, 1| 2, 1) = 0.33438525
( 2, 1| 2, 2) = 0.00000000
( 2, 2| 1, 1) = 0.44022069
( 2, 2| 1, 2) = 0.00000000
( 2, 2| 2, 1) = 0.00000000
( 2, 2| 2, 2) = 0.44026964
Transformed MO 2ERIs (bb|aa)
( 1, 1| 1, 1) = 0.44017177
( 1, 1| 1, 2) = 0.00000000
( 1, 1| 2, 1) = 0.00000000
( 1, 1| 2, 2) = 0.44022069
( 1, 2| 1, 1) = 0.00000000
( 1, 2| 1, 2) = 0.33438525
( 1, 2| 2, 1) = 0.33438525
( 1, 2| 2, 2) = 0.00000000
( 2, 1| 1, 1) = 0.00000000
( 2, 1| 1, 2) = 0.33438525
( 2, 1| 2, 1) = 0.33438525
( 2, 1| 2, 2) = 0.00000000
( 2, 2| 1, 1) = 0.44022069
( 2, 2| 1, 2) = 0.00000000
( 2, 2| 2, 1) = 0.00000000
( 2, 2| 2, 2) = 0.44026964
Transformed MO 2ERIs (bb|bb)
( 1, 1| 1, 1) = 0.44017177
( 1, 1| 1, 2) = 0.00000000
( 1, 1| 2, 1) = 0.00000000
( 1, 1| 2, 2) = 0.44022069
( 1, 2| 1, 1) = 0.00000000
( 1, 2| 1, 2) = 0.33438525
( 1, 2| 2, 1) = 0.33438525
( 1, 2| 2, 2) = 0.00000000
( 2, 1| 1, 1) = 0.00000000
( 2, 1| 1, 2) = 0.33438525
( 2, 1| 2, 1) = 0.33438525
( 2, 1| 2, 2) = 0.00000000
( 2, 2| 1, 1) = 0.44022069
( 2, 2| 1, 2) = 0.00000000
( 2, 2| 2, 1) = 0.00000000
( 2, 2| 2, 2) = 0.44026964
CI Hamiltonian
1 2 3 4
1 -0.704367 0.000000 0.000000 0.334385
2 0.000000 -0.704614 0.334385 0.000000
3 0.000000 0.334385 -0.704614 0.000000
4 0.334385 0.000000 0.000000 -0.704860
CI Eigenvectors
1 2 3 4
1 -0.706846 0.000000 0.000000 0.707367
2 0.000000 -0.707107 -0.707107 0.000000
3 0.000000 0.707107 -0.707107 0.000000
4 0.707367 0.000000 0.000000 0.706846
CI Eigenvalues
1 -1.038999
2 -1.038999
3 -0.370229
4 -0.370229
Final Energy
1 -0.933164
2 -0.933164
3 -0.264393
4 -0.264393
22 changes: 18 additions & 4 deletions examples/hartreefock/OUTPUT/out
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,24 @@ Complex = F

Overlap matrix
Alpha Array
The matrix being printed is symmetric
1 2
1 1.000000
2 0.000108 1.000000
Beta Array
The matrix being printed is symmetric
1 2
1 1.000000
2 0.000108 1.000000

Core Hamiltonian matrix
Alpha Array
The matrix being printed is symmetric
1 2
1 -0.572417
2 -0.000160 -0.572417
Beta Array
The matrix being printed is symmetric
1 2
1 -0.572417
2 -0.000160 -0.572417
Expand All @@ -66,30 +70,36 @@ Complex = F

Density matrix
Alpha Array
The matrix being printed is symmetric
1 2
1 0.499946
2 0.499946 0.499946
Beta Array
The matrix being printed is symmetric
1 2
1 0.499946
2 0.499946 0.499946

SCF Density matrix
Alpha Array
The matrix being printed is symmetric
1 2
1 0.499946
2 0.499946 0.499946
Beta Array
The matrix being printed is symmetric
1 2
1 0.499946
2 0.499946 0.499946

Fock matrix
Alpha Array
The matrix being printed is symmetric
1 2
1 -0.079309
2 -0.053049 -0.079309
Beta Array
The matrix being printed is symmetric
1 2
1 -0.079309
2 -0.053049 -0.079309
Expand Down Expand Up @@ -194,21 +204,25 @@ Iteration: 1
Iteration: 2
G(P)
Alpha Array
The matrix being printed is symmetric
1 2
1 0.493108 -0.052889
1 0.493108
2 -0.052889 0.493108
Beta Array
The matrix being printed is symmetric
1 2
1 0.493108 -0.052889
1 0.493108
2 -0.052889 0.493108
Fock matrix
Alpha Array
The matrix being printed is symmetric
1 2
1 -0.079309 -0.053049
1 -0.079309
2 -0.053049 -0.079309
Beta Array
The matrix being printed is symmetric
1 2
1 -0.079309 -0.053049
1 -0.079309
2 -0.053049 -0.079309
Orthogonalized Fock matrix
Alpha Array
Expand Down
11 changes: 7 additions & 4 deletions src/mqc_FullWavefunction.F03
Original file line number Diff line number Diff line change
Expand Up @@ -2832,11 +2832,14 @@ Subroutine MQC_Copy_Array_To_Matrix( Alpha_Array, N1, N2, Alpha_Matrix, &
Else
R2D(1:((N2+1)*N2)/2,1:1)=>Alpha_Array%ArrR
Call MQC_Allocate_Matrix(N2,N2,Alpha_Matrix,'Real','StorSymm')
J=1
Do I=1,(N2+1)*N2/2
IJ = 0
Do J= 1,N2
Do I=1,J
IJ =IJ+1
! Alpha_Matrix%MatR(I,J) = R2D(I,J)
temp = R2D(I,J)
call Alpha_Matrix%put(temp,I,J)
temp = R2D(IJ,1)
call Alpha_Matrix%put(temp,I,J)
EndDo
EndDo
EndIf
EndIf
Expand Down
Loading

0 comments on commit 5b537b9

Please sign in to comment.