forked from nmayhall-vt/FermiCG
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'nmayhall-vt:main' into bst-tucker
- Loading branch information
Showing
32 changed files
with
17,966 additions
and
24 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
7,761 changes: 7,761 additions & 0 deletions
7,761
examples/tetracene_dimer/Cact12_pseudo_can.molden
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
using ClusterMeanField | ||
using RDM | ||
using QCBase | ||
using InCoreIntegrals | ||
using PyCall | ||
using ActiveSpaceSolvers | ||
using LinearAlgebra | ||
using Printf | ||
using NPZ | ||
using JLD2 | ||
|
||
h0 = npzread("./integrals_h0_12.npy") | ||
h1 = npzread("./integrals_h1_12.npy") | ||
h2 = npzread("./integrals_h2_12.npy") | ||
|
||
ints = InCoreInts(h0, h1, h2) | ||
|
||
|
||
|
||
na = 6 | ||
nb = 6 | ||
|
||
clusters = [[1,2,3,4,5,6],[7,8,9,10,11,12]] | ||
init_fspace = [(3,3),(3,3)] | ||
|
||
|
||
rdm1 = RDM1(n_orb(ints)) | ||
|
||
# define clusters | ||
clusters = [MOCluster(i,collect(clusters[i])) for i = 1:length(clusters)] | ||
display(clusters) | ||
ansatze = [FCIAnsatz(6, 3, 3),FCIAnsatz(6, 3, 3)] | ||
@time e_cmf, U, d1 = ClusterMeanField.cmf_oo_newton(ints, clusters, init_fspace,ansatze,rdm1, maxiter_oo = 400, | ||
tol_oo=1e-8, | ||
tol_d1=1e-9, | ||
tol_ci=1e-11, | ||
verbose=4, | ||
zero_intra_rots = true, | ||
sequential=true) | ||
|
||
ints = orbital_rotation(ints, U) | ||
|
||
@save "data_cmf_TD_12.jld2" clusters init_fspace ints d1 e_cmf U |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,170 @@ | ||
IDX001:DIM4096:001|002|003|004|005|006| | ||
IDX002:DIM4096:007|008|009|010|011|012| | ||
Solve OO-CMF with newton | ||
|
||
------------------------------------------ | ||
CMF CI Iter: 1 | ||
------------------------------------------ | ||
Overwritten attributes conv_tol_residual of <class 'pyscf.fci.direct_spin1.FCISolver'> | ||
FCIAnsatz:: #Orbs = 6 #α = 3 #β = 3 Dimension: 400 | ||
FCIAnsatz:: #Orbs = 6 #α = 3 #β = 3 Dimension: 400 | ||
MOCluster 1 E = -7.24940798 | ||
MOCluster 2 E = -7.20140412 | ||
CMF-CI Curr: Elec -11.48741462 Total -1377.27916386 | ||
CMF-CI Energy: -1377.27916386 | Change: RDM: 4.8e+00 Energy -1.4e+03 | ||
|
||
|
||
------------------------------------------ | ||
CMF CI Iter: 2 | ||
------------------------------------------ | ||
FCIAnsatz:: #Orbs = 6 #α = 3 #β = 3 Dimension: 400 | ||
FCIAnsatz:: #Orbs = 6 #α = 3 #β = 3 Dimension: 400 | ||
MOCluster 1 E = -7.20682657 | ||
MOCluster 2 E = -7.20656910 | ||
CMF-CI Curr: Elec -11.53062786 Total -1377.32237709 | ||
CMF-CI Energy: -1377.32237709 | Change: RDM: 7.0e-01 Energy -4.3e-02 | ||
|
||
|
||
------------------------------------------ | ||
CMF CI Iter: 3 | ||
------------------------------------------ | ||
FCIAnsatz:: #Orbs = 6 #α = 3 #β = 3 Dimension: 400 | ||
FCIAnsatz:: #Orbs = 6 #α = 3 #β = 3 Dimension: 400 | ||
MOCluster 1 E = -7.20650046 | ||
MOCluster 2 E = -7.20658890 | ||
CMF-CI Curr: Elec -11.53062855 Total -1377.32237778 | ||
CMF-CI Energy: -1377.32237778 | Change: RDM: 2.8e-03 Energy -6.9e-07 | ||
|
||
|
||
------------------------------------------ | ||
CMF CI Iter: 4 | ||
------------------------------------------ | ||
FCIAnsatz:: #Orbs = 6 #α = 3 #β = 3 Dimension: 400 | ||
FCIAnsatz:: #Orbs = 6 #α = 3 #β = 3 Dimension: 400 | ||
MOCluster 1 E = -7.20649911 | ||
MOCluster 2 E = -7.20658898 | ||
CMF-CI Curr: Elec -11.53062855 Total -1377.32237778 | ||
CMF-CI Energy: -1377.32237778 | Change: RDM: 1.2e-05 Energy -1.2e-11 | ||
|
||
|
||
------------------------------------------ | ||
CMF CI Iter: 5 | ||
------------------------------------------ | ||
FCIAnsatz:: #Orbs = 6 #α = 3 #β = 3 Dimension: 400 | ||
FCIAnsatz:: #Orbs = 6 #α = 3 #β = 3 Dimension: 400 | ||
MOCluster 1 E = -7.20649910 | ||
MOCluster 2 E = -7.20658898 | ||
CMF-CI Curr: Elec -11.53062855 Total -1377.32237778 | ||
CMF-CI Energy: -1377.32237778 | Change: RDM: 5.3e-08 Energy 0.0e+00 | ||
|
||
|
||
------------------------------------------ | ||
CMF CI Iter: 6 | ||
------------------------------------------ | ||
FCIAnsatz:: #Orbs = 6 #α = 3 #β = 3 Dimension: 400 | ||
FCIAnsatz:: #Orbs = 6 #α = 3 #β = 3 Dimension: 400 | ||
MOCluster 1 E = -7.20649910 | ||
MOCluster 2 E = -7.20658898 | ||
CMF-CI Curr: Elec -11.53062855 Total -1377.32237778 | ||
CMF-CI Energy: -1377.32237778 | Change: RDM: 2.7e-10 Energy 0.0e+00 | ||
|
||
*CMF-CI: Elec -11.53062855 Total -1377.32237778 | ||
Energy per Iteration: | ||
Elec: -11.48741462 Total: -1377.27916386 | ||
Elec: -11.53062786 Total: -1377.32237709 | ||
Elec: -11.53062855 Total: -1377.32237778 | ||
Elec: -11.53062855 Total: -1377.32237778 | ||
Elec: -11.53062855 Total: -1377.32237778 | ||
Elec: -11.53062855 Total: -1377.32237778 | ||
Step: 1 E: -1377.322377780242 G: 1.65e-02 step_size: 1.66e-02 | ||
|
||
------------------------------------------ | ||
CMF CI Iter: 1 | ||
------------------------------------------ | ||
FCIAnsatz:: #Orbs = 6 #α = 3 #β = 3 Dimension: 400 | ||
FCIAnsatz:: #Orbs = 6 #α = 3 #β = 3 Dimension: 400 | ||
MOCluster 1 E = -7.20670775 | ||
MOCluster 2 E = -7.20679617 | ||
CMF-CI Curr: Elec -11.53075365 Total -1377.32250289 | ||
CMF-CI Energy: -1377.32250289 | Change: RDM: 4.0e-02 Energy -1.4e+03 | ||
|
||
|
||
------------------------------------------ | ||
CMF CI Iter: 2 | ||
------------------------------------------ | ||
FCIAnsatz:: #Orbs = 6 #α = 3 #β = 3 Dimension: 400 | ||
FCIAnsatz:: #Orbs = 6 #α = 3 #β = 3 Dimension: 400 | ||
MOCluster 1 E = -7.20670654 | ||
MOCluster 2 E = -7.20679622 | ||
CMF-CI Curr: Elec -11.53075365 Total -1377.32250289 | ||
CMF-CI Energy: -1377.32250289 | Change: RDM: 1.6e-05 Energy -2.4e-11 | ||
|
||
|
||
------------------------------------------ | ||
CMF CI Iter: 3 | ||
------------------------------------------ | ||
FCIAnsatz:: #Orbs = 6 #α = 3 #β = 3 Dimension: 400 | ||
FCIAnsatz:: #Orbs = 6 #α = 3 #β = 3 Dimension: 400 | ||
MOCluster 1 E = -7.20670654 | ||
MOCluster 2 E = -7.20679622 | ||
CMF-CI Curr: Elec -11.53075365 Total -1377.32250289 | ||
CMF-CI Energy: -1377.32250289 | Change: RDM: 1.1e-07 Energy 0.0e+00 | ||
|
||
|
||
------------------------------------------ | ||
CMF CI Iter: 4 | ||
------------------------------------------ | ||
FCIAnsatz:: #Orbs = 6 #α = 3 #β = 3 Dimension: 400 | ||
FCIAnsatz:: #Orbs = 6 #α = 3 #β = 3 Dimension: 400 | ||
MOCluster 1 E = -7.20670654 | ||
MOCluster 2 E = -7.20679622 | ||
CMF-CI Curr: Elec -11.53075365 Total -1377.32250289 | ||
CMF-CI Energy: -1377.32250289 | Change: RDM: 7.5e-10 Energy 0.0e+00 | ||
|
||
*CMF-CI: Elec -11.53075365 Total -1377.32250289 | ||
Energy per Iteration: | ||
Elec: -11.53075365 Total: -1377.32250289 | ||
Elec: -11.53075365 Total: -1377.32250289 | ||
Elec: -11.53075365 Total: -1377.32250289 | ||
Elec: -11.53075365 Total: -1377.32250289 | ||
Step: 2 E: -1377.322502887952 G: 1.84e-06 step_size: 3.77e-06 | ||
|
||
------------------------------------------ | ||
CMF CI Iter: 1 | ||
------------------------------------------ | ||
FCIAnsatz:: #Orbs = 6 #α = 3 #β = 3 Dimension: 400 | ||
FCIAnsatz:: #Orbs = 6 #α = 3 #β = 3 Dimension: 400 | ||
MOCluster 1 E = -7.20670656 | ||
MOCluster 2 E = -7.20679623 | ||
CMF-CI Curr: Elec -11.53075365 Total -1377.32250289 | ||
CMF-CI Energy: -1377.32250289 | Change: RDM: 4.7e-06 Energy -1.4e+03 | ||
|
||
|
||
------------------------------------------ | ||
CMF CI Iter: 2 | ||
------------------------------------------ | ||
FCIAnsatz:: #Orbs = 6 #α = 3 #β = 3 Dimension: 400 | ||
FCIAnsatz:: #Orbs = 6 #α = 3 #β = 3 Dimension: 400 | ||
MOCluster 1 E = -7.20670655 | ||
MOCluster 2 E = -7.20679623 | ||
CMF-CI Curr: Elec -11.53075365 Total -1377.32250289 | ||
CMF-CI Energy: -1377.32250289 | Change: RDM: 2.6e-09 Energy 2.3e-13 | ||
|
||
|
||
------------------------------------------ | ||
CMF CI Iter: 3 | ||
------------------------------------------ | ||
FCIAnsatz:: #Orbs = 6 #α = 3 #β = 3 Dimension: 400 | ||
FCIAnsatz:: #Orbs = 6 #α = 3 #β = 3 Dimension: 400 | ||
MOCluster 1 E = -7.20670655 | ||
MOCluster 2 E = -7.20679623 | ||
CMF-CI Curr: Elec -11.53075365 Total -1377.32250289 | ||
CMF-CI Energy: -1377.32250289 | Change: RDM: 1.9e-11 Energy -2.3e-13 | ||
|
||
*CMF-CI: Elec -11.53075365 Total -1377.32250289 | ||
Energy per Iteration: | ||
Elec: -11.53075365 Total: -1377.32250289 | ||
Elec: -11.53075365 Total: -1377.32250289 | ||
Elec: -11.53075365 Total: -1377.32250289 | ||
Step: 3 E: -1377.322502887954 G: 6.49e-10 | ||
64.409905 seconds (131.48 M allocations: 7.043 GiB, 4.77% gc time, 94.36% compilation time: 0% of which was recompilation) |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
e_ci, v = FermiCG.ci_solve(ci_vector, cluster_ops, clustered_ham); | ||
@save "data_ci.jld2" v e_ci | ||
|
||
#v = BSTstate(v,R=2) | ||
|
||
v1 = BSTstate(v,R=1) | ||
v2 = BSTstate(v,R=1) | ||
FermiCG.set_vector!(v2, FermiCG.get_vector(v)[:,8]) | ||
σ1 = FermiCG.build_compressed_1st_order_state(v1, cluster_ops, clustered_ham, | ||
nbody=4, | ||
thresh=1e-7, | ||
compress_twice=false) | ||
|
||
σ2 = FermiCG.build_compressed_1st_order_state(v2, cluster_ops, clustered_ham, | ||
nbody=4, | ||
thresh=1e-7, | ||
compress_twice=false) | ||
|
||
e_ci, v = FermiCG.ci_solve(v1, cluster_ops, clustered_ham); | ||
e_ci, v = FermiCG.ci_solve(v2, cluster_ops, clustered_ham); | ||
display(FermiCG.nonorth_overlap(σ1,v1)) | ||
display(FermiCG.nonorth_overlap(σ2,v2)) | ||
|
||
#σ = FermiCG.compress(σ, thresh=1e-2) | ||
# | ||
#FermiCG.zero!(σ) | ||
#FermiCG.nonorth_add!(v, σ) | ||
# | ||
#e_ci, v = FermiCG.ci_solve(v, cluster_ops, clustered_ham); | ||
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
|
||
using QCBase | ||
using Printf | ||
using FermiCG | ||
using NPZ | ||
using InCoreIntegrals | ||
using RDM | ||
using JLD2 | ||
|
||
if false | ||
@load "data_cmf_TD_12.jld2" | ||
M = 100 | ||
#@load "cmf_op_TD_with_ops.jld2" | ||
display(clusters) | ||
display(init_fspace) | ||
ref_fspace = FockConfig(init_fspace) | ||
ecore = ints.h0 | ||
|
||
cluster_bases = FermiCG.compute_cluster_eigenbasis_spin(ints, clusters, d1, [5,5], ref_fspace, max_roots=M, verbose=1); | ||
|
||
clustered_ham = FermiCG.extract_ClusteredTerms(ints, clusters) | ||
cluster_ops = FermiCG.compute_cluster_ops(cluster_bases, ints); | ||
|
||
FermiCG.add_cmf_operators!(cluster_ops, cluster_bases, ints, d1.a, d1.b); | ||
@save "cmf_op_TD_with_ops.jld2" clusters init_fspace ints cluster_bases cluster_ops clustered_ham | ||
nroots = 8 | ||
|
||
vcmf = BSTstate(clusters,FermiCG.FockConfig(init_fspace), cluster_bases, R=1); | ||
end | ||
|
||
σ = FermiCG.build_compressed_1st_order_state(vcmf, cluster_ops, clustered_ham, | ||
nbody=4, | ||
thresh=1e-3) | ||
σ = FermiCG.compress(σ, thresh=1e-3) | ||
v2 = BSTstate(σ,R=3) | ||
FermiCG.eye!(v2) | ||
e_ci, v2 = FermiCG.ci_solve(v2, cluster_ops, clustered_ham); | ||
|
||
σ = FermiCG.build_compressed_1st_order_state(v2, cluster_ops, clustered_ham, | ||
nbody=4, | ||
thresh=1e-3) | ||
σ = FermiCG.compress(σ, thresh=1e-4) | ||
FermiCG.zero!(σ) | ||
FermiCG.nonorth_add!(v2, σ) | ||
e_ci, v2 = FermiCG.ci_solve(v2, cluster_ops, clustered_ham); | ||
|
||
σ = FermiCG.build_compressed_1st_order_state(v2, cluster_ops, clustered_ham, | ||
nbody=4, | ||
thresh=1e-3) | ||
σ = FermiCG.compress(σ, thresh=1e-2) | ||
FermiCG.zero!(σ) | ||
FermiCG.nonorth_add!(v2, σ) | ||
e_ci, v2 = FermiCG.ci_solve(v2, cluster_ops, clustered_ham); | ||
|
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
60 | ||
|
||
C 3.86480 -1.02720 1.27180 | ||
C 3.60170 -0.34020 0.07040 | ||
C 2.93000 -1.06360 2.30730 | ||
C 4.54410 -0.28950 -0.97720 | ||
C 2.32170 0.33090 -0.09430 | ||
C 3.20030 -1.73210 3.54060 | ||
C 1.65210 -0.39240 2.14450 | ||
C 4.27330 0.38740 -2.16700 | ||
C 2.05960 1.01870 -1.29550 | ||
C 1.37970 0.28170 0.95340 | ||
C 2.27260 -1.73270 4.55160 | ||
C 0.71620 -0.41900 3.22490 | ||
C 2.99590 1.05910 -2.32920 | ||
C 5.20900 0.41800 -3.24760 | ||
C 1.01870 -1.06880 4.39470 | ||
C 2.72630 1.73410 -3.55840 | ||
C 4.90670 1.07300 -4.41500 | ||
C 3.65410 1.73950 -4.56900 | ||
C -3.86650 1.01870 -1.29550 | ||
C -2.93020 1.05910 -2.32920 | ||
C -3.60440 0.33090 -0.09430 | ||
C -3.19980 1.73410 -3.55840 | ||
C -1.65280 0.38740 -2.16700 | ||
C -2.32430 -0.34020 0.07040 | ||
C -4.54630 0.28170 0.95340 | ||
C -2.27200 1.73950 -4.56900 | ||
C -0.71710 0.41800 -3.24760 | ||
C -1.38200 -0.28950 -0.97720 | ||
C -2.06130 -1.02720 1.27180 | ||
C -4.27400 -0.39240 2.14450 | ||
C -1.01930 1.07300 -4.41500 | ||
C -2.99610 -1.06360 2.30730 | ||
C -5.20980 -0.41900 3.22490 | ||
C -2.72580 -1.73210 3.54060 | ||
C -4.90730 -1.06880 4.39470 | ||
C -3.65350 -1.73270 4.55160 | ||
H 4.82300 -1.53290 1.39770 | ||
H 5.49910 -0.80290 -0.85660 | ||
H 4.15900 -2.23700 3.66390 | ||
H 1.10180 1.52560 -1.42170 | ||
H 0.42460 0.79440 0.83100 | ||
H 2.50000 -2.24040 5.48840 | ||
H -0.23700 0.09640 3.10140 | ||
H 6.16210 -0.09790 -3.12730 | ||
H 0.29870 -1.07700 5.21470 | ||
H 1.76850 2.24120 -3.67870 | ||
H 5.62580 1.08320 -5.23570 | ||
H 3.42730 2.25190 -5.50340 | ||
H -4.82430 1.52560 -1.42170 | ||
H -4.15760 2.24120 -3.67870 | ||
H -5.50150 0.79440 0.83100 | ||
H -2.49880 2.25190 -5.50340 | ||
H 0.23610 -0.09790 -3.12730 | ||
H -0.42700 -0.80290 -0.85660 | ||
H -1.10300 -1.53290 1.39770 | ||
H -0.30030 1.08320 -5.23570 | ||
H -6.16310 0.09640 3.10140 | ||
H -1.76710 -2.23700 3.66390 | ||
H -5.62740 -1.07700 5.21470 | ||
H -3.42610 -2.24040 5.48840 |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Oops, something went wrong.