Skip to content

tests: (double) finite difference static polarizability#223

Draft
berquist wants to merge 4 commits intomainfrom
findiff
Draft

tests: (double) finite difference static polarizability#223
berquist wants to merge 4 commits intomainfrom
findiff

Conversation

@berquist
Copy link
Owner

@berquist berquist commented Feb 1, 2026

Closes #181

https://github.com/maroba/findiff

Eventually it will be a runtime dependency, so that a (static) perturbation
can be done numerically and not just analytically.
    **** SCF Summaries ****
    Total Energy =                        -317.654569137503472
    Nuclear Repulsion Energy =             248.175936966105979
    One-electron Energy =                 -929.029398755747252
    Two-electron Energy =                  363.198892652137829
    [-2.45747929  1.7516888  -2.01564383]
    [-2.45055712  1.7498966  -2.01522139]
    [-2.45925283  1.75661295 -2.01578952]
    [-2.45707171  1.75153706 -2.00968794]
    FD polarizability 1
    [[27.23389041 -7.05107969  1.66201956]
     [-6.97762021 19.37304047 -0.57316094]
     [ 1.60353844 -0.5969904  23.43223982]]
    FD polarizability 2
    [[27.23389041 -7.05107969  1.66201956]
     [-6.97762021 19.37304047 -0.57316094]
     [ 1.60353844 -0.5969904  23.43223982]]
    Analytical polarizability
    [[27.31719954 -7.04241525  1.65887012]
     [-7.04241525 19.48068656 -0.62010082]
     [ 1.65887012 -0.62010082 23.46302403]]

Reference Q-Chem results are:

      20    -317.6545691370      1.88E-12 Convergence criterion met
    ---------------------------------------
    One-Electron    Energy =  -929.0293991645
    Total Coulomb   Energy =   404.5797863304
    Alpha Exchange  Energy =   -20.6904466050
    Beta  Exchange  Energy =   -20.6904466050
    DFT   Exchange  Energy =     0.0000000000
    DFT Correlation Energy =     0.0000000000
    Nuclear Repu.   Energy =   248.1759369070
    Nuclear Attr.   Energy = -1243.8031596459
    Kinetic         Energy =   314.7737604814
    [-0.96685375  0.68917099 -0.79299712]
    forward terms
    [-1.01847174  0.70246892 -0.79614456]
    [-0.95355583  0.65234596 -0.79181683]
    [-0.96996185  0.69035128 -0.83733666]
    backward terms
    [-0.91523576  0.67587307 -0.78984968]
    [-0.98015168  0.72595668 -0.79417741]
    [-0.96370631  0.68799071 -0.74865758]
    finite difference (forward)
    [[ 27.3150084   -7.03694576   1.66554929]
     [ -7.03694576  19.48692672  -0.62458098]
     [  1.64472993  -0.62458098  23.46342566]]
    finite difference (backward)
    [[ 27.3150084   -7.03694576   1.66554929]
     [ -7.03694576  19.46610736  -0.62458098]
     [  1.66554929  -0.62458098  23.46342566]]
    finite difference (central)
    [[ 27.3150084   -7.03694576   1.66554929]
     [ -7.03694576  19.47651704  -0.62458098]
     [  1.65513961  -0.62458098  23.46342566]]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add hardcoded finite difference for testing

1 participant