Skip to content

Commit

Permalink
Merge remote-tracking branch 'source/stable' into auto/from-devel-repo
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Jul 12, 2024
2 parents 7eb4aa5 + ea69599 commit 0e3bfda
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 4 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Release notes

## Version [v0.13.1] - 2024.07.11

### Added

* Store MP2 amplitudes in `cc_amplitudes_` files in `@cc mp2` calculations.

### Fixed

* Fix `maxit=0` case for `cc` calculations.

## Version [v0.13.0] - 2024.07.09

### Breaking
Expand Down
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "ElemCo"
uuid = "094d408e-8508-40f4-9646-a254980d91ac"
authors = ["Daniel Kats <d.kats@fkf.mpg.de> and contributors"]
version = "0.13.0"
version = "0.13.1"

[deps]
AtomsBase = "a963bdd2-2df7-4f54-a1ee-49d51e6be12a"
Expand Down
2 changes: 1 addition & 1 deletion src/ElemCo.jl
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export last_energy
# from DescDict
export ODDict

const __VERSION__ = "0.13.0"
const __VERSION__ = "0.13.1"

"""
__init__()
Expand Down
4 changes: 2 additions & 2 deletions src/cc/cc.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2087,7 +2087,7 @@ function cc_iterations!(Amps1, Amps2, Amps3, EC::ECInfo, method::ECMethod, dots=
NormT2::Float64 = 0.0
NormT3::Float64 = 0.0
do_sing = (method.exclevel[1] == :full)
Eh = OutDict()
Eh = OutDict("E"=>0.0, "ESS"=>0.0, "EOS"=>0.0, "EO"=>0.0)
En1 = 0.0
Eias = 0.0
converged = false
Expand Down Expand Up @@ -2219,7 +2219,7 @@ function calc_ccsdt(EC::ECInfo, useT3=false, cc3=false)
NormT2 = 0.0
NormT3 = 0.0
R1 = Float64[]
Eh = OutDict()
Eh = OutDict("E"=>0.0, "ESS"=>0.0, "EOS"=>0.0, "EO"=>0.0)
t0 = time_ns()
for it in 1:EC.options.cc.maxit
t1 = time_ns()
Expand Down
22 changes: 22 additions & 0 deletions src/cc/ccdriver.jl
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ function ccdriver(EC::ECInfo, method; fcidump="", occa="-", occb="-")
end

if ecmethod.theory == "MP"
save_last_amplitudes(EC, ecmethod)
# do nothing
elseif ecmethod.theory == "DMRG"
energies = eval_dmrg_groundstate(EC, energies)
Expand Down Expand Up @@ -111,6 +112,27 @@ function dfccdriver(EC::ECInfo, method)
return energies
end

function save_last_amplitudes(EC::ECInfo, method::ECMethod)
if is_unrestricted(method) || has_prefix(method, "R")
if method.exclevel[1] != :none
T1a = read_starting_guess4amplitudes(EC, Val(1), )
T1b = read_starting_guess4amplitudes(EC, Val(1), )
try2save_singles!(EC, T1a, T1b)
end
T2a = read_starting_guess4amplitudes(EC, Val(2), , )
T2b = read_starting_guess4amplitudes(EC, Val(2), , )
T2ab = read_starting_guess4amplitudes(EC, Val(2), , )
try2save_doubles!(EC, T2a, T2b, T2ab)
else
if method.exclevel[1] != :none
T1 = read_starting_guess4amplitudes(EC, Val(1))
try2save_singles!(EC, T1)
end
T2 = read_starting_guess4amplitudes(EC, Val(2))
try2save_doubles!(EC, T2)
end
end

"""
check_occs(EC::ECInfo, occa, occb)
Expand Down

0 comments on commit 0e3bfda

Please sign in to comment.