Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge changes from development repository #8

Merged
merged 57 commits into from
Jul 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
d2f327f
equations doc dfmcscf added
Apr 26, 2024
aa43ebb
Merge branch 'main' into mcscf
Apr 26, 2024
4d4d342
Merge branch 'main' into mcscf
May 2, 2024
815a073
changelog added, c and method name of matrix put ahead
May 2, 2024
5935620
dfmcscf documentation updated--index format
May 2, 2024
2426009
dfmcscf documentation updated--\pre, E sub/superscripts, \perm
May 6, 2024
31f217e
all /pre done and dfmcscf fixed
May 6, 2024
eaeb2eb
Merge branch 'main' into mcscf
May 6, 2024
0aa7695
Set development version
dnkats May 28, 2024
0f6fc20
Add molden export
dnkats Jun 7, 2024
d48bc1d
Remove normalization
dnkats Jun 7, 2024
8abc602
Update changelog
dnkats Jun 7, 2024
fcfa085
Merge pull request #201 from fkfest/molden
dnkats Jun 7, 2024
161df22
Add type-stable load routines
dnkats Jun 7, 2024
e24cf06
Replace SVector by BVector in BasisSet
dnkats Jun 8, 2024
62ae9f7
first (wrong) ccsdt q2 closed-shell implementation
thoschr Jun 10, 2024
2a8e0f8
CCSDT energy correct
thoschr Jun 11, 2024
14434a4
first (wrong) dc-ccsdt implementation. Have to change prefactors in Q2
thoschr Jun 12, 2024
eaa3085
Make DF-HF and DIIS type stable
dnkats Jun 13, 2024
2e445f3
Make df-uhf type stable
dnkats Jun 13, 2024
cbb245a
Make integral part and diis type stable
dnkats Jun 13, 2024
0cfd392
Make dfdump routines type stable
dnkats Jun 14, 2024
6afc7e4
delta format modified
Jun 15, 2024
35702af
Merge branch 'main' into mcscf
Jun 15, 2024
9ff287f
Make header of FDump type stable
dnkats Jun 17, 2024
17c9f5a
mcscf doc updated
Jun 21, 2024
c528a1c
CHANGELOG.md updated
Jun 21, 2024
aeb25d5
Merge pull request #185 from fkfest/mcscf
dnkats Jun 21, 2024
79ab4eb
Make FDump type stable as FDump{N} (with N=3 or 4)
dnkats Jun 23, 2024
c342886
Add documentation for qmtensors
dnkats Jun 23, 2024
e208270
Make read_header in FciDumps type stable
dnkats Jun 23, 2024
1ad2275
renamed algo files and added correct dc-ccsdt closed-shell algo
thoschr Jun 24, 2024
65075f7
forgot to add include statements in previous commit
thoschr Jun 24, 2024
b5bdeac
Merge branch 'main' into ccsdt
thoschr Jun 24, 2024
ccbf10e
Changelog entry
thoschr Jun 24, 2024
5d565e2
Added CCSDT and DC-CCSDT closed-shell tests
thoschr Jun 24, 2024
bb7cd31
Merge pull request #203 from fkfest/ccsdt
dnkats Jun 24, 2024
c580c07
Update MKL
dnkats Jun 24, 2024
7a1f08b
Merge pull request #204 from fkfest/update_mkl
dnkats Jun 24, 2024
c65bbb2
Switch to OutDict instead of NamedTuple
dnkats Jun 26, 2024
c2d55df
Add (key) syntax to ODDict to access descriptions
dnkats Jun 27, 2024
378a90d
Use Vector{Int} for spaces instead of a mixure with ranges
dnkats Jun 27, 2024
845cd02
Move dynamic import of spinscaling factors to a separate function
dnkats Jun 27, 2024
77a9854
Merge branch 'main' into prefix
dnkats Jun 27, 2024
dec1856
Improve type stability of closed-shell ccsd
dnkats Jun 28, 2024
bd76cf3
Make cc completely type stable
dnkats Jul 3, 2024
3c6d4f7
Add precompilation
dnkats Jul 3, 2024
cfbc917
Add snoopi scripts for profiling
dnkats Jul 4, 2024
379e7c4
Make dfcc type stable
dnkats Jul 5, 2024
7ae02ca
Move source files to folders
dnkats Jul 5, 2024
9c8d286
Allow custom-dot-product functions in diis
dnkats Jul 8, 2024
af6afeb
Fix triples function tuple
dnkats Jul 8, 2024
4d19123
Update Changelog
dnkats Jul 8, 2024
ec9757a
Merge pull request #205 from fkfest/stabletype
thoschr Jul 8, 2024
a087fc0
Release v0.13.0
dnkats Jul 9, 2024
3118171
Merge pull request #206 from fkfest/main
thoschr Jul 9, 2024
e34a259
Merge remote-tracking branch 'source/stable' into auto/from-devel-repo
actions-user Jul 9, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ docs/equations/*.log
docs/equations/*.out
docs/equations/*.toc
docs/src/release-notes.md
LocalPreferences.toml
27 changes: 27 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,32 @@
# Release notes

## Version [v0.13.0] - 2024.07.09

### Breaking

* `DIIS.perform` has been changed to `DIIS.perform!` in order to allow to read the vectors and residuals as `Vector{}`.
* The signature of `newmmap` function has changed (the type specification is now the last argument and defaults to `Float64`.
* The `FciDump` module has been renamed to `FciDumps`.
* The `FDump` type has been changed to `FDump{N}` with N=3 (for triangular storage of 2-electron integrals) or 4. The logical variable `triang` has been removed (there is a function `is_triang(::FDump)` now). Aliases `TFDump = FDump{3}` and `QFDump = FDump{4}` have been introduced.
* The `ECInfo` type now accepts only `FDump{3}`. The `FDump{4}` objects have to be transformed first (the transformation functions are not implemented yet).
* The triangular functions have been moved to a separate file `utensors.jl`, part of the `QMTensors` module. `uppertriangular` function has been renamed to `uppertriangular_index`.
* The driver functions and macros now return energies in an ordered descriptive dictionary `OutDict=ODDict{String,Float64}`. Use `last_energy` function to access the last energy (or `last` to access the whole entry including the key and the description).

### Changed

* Save the memory using in Hessian matrix calculation in dfmcscf function.
* `dfdump` stores the MO integrals internally in mmaped files.
* The header of the `FDump` is now stored in a type-stable structure `FDumpHeader`.

### Added

* Export of molden files (`@export_molden`). At the moment the orbital energies and occupations are not exported.
* Add dfmcscf part in documentation
* CCSDT and DC-CCSDT closed-shell implementations generated with Quantwo.
* `QMTensors.SpinMatrix` struct for one-electron matrices (e.g., MO coefficients)
* An ordered descriptive dictionary for energy outputs (`ODDict`) has been implemented. Each key-value entry can have a description.
* `DIIS.perform!` now accepts a tuple of functions to calculate cusomized dot-products (e.g., involving contravariants etc).

## Version [v0.12.0] - 2024.05.28

### Breaking
Expand Down
10 changes: 6 additions & 4 deletions 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.12.0"
version = "0.12.0+"

[deps]
AtomsBase = "a963bdd2-2df7-4f54-a1ee-49d51e6be12a"
Expand All @@ -13,6 +13,7 @@ LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
MKL = "33e6dc65-8f57-5167-99aa-e5a354878fb2"
Mmap = "a63ad114-7e13-5084-954f-fe012c677804"
NPZ = "15e1cf62-19b3-5cfa-8e77-841668bca605"
PrecompileTools = "aea7be01-6a6a-4083-8856-8a6e6704d82a"
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
TensorOperations = "6aa20fa7-93e2-5fca-9bc0-fbd0db3c71a2"
Expand All @@ -26,14 +27,15 @@ AtomsBase = "0.3.5 - 0.3"
DocStringExtensions = "0.9"
ITensors = "0.4.0 - 0.7"
IterativeSolvers = "0.9"
MKL = "0.6"
MKL = "0.6 - 0.7"
NPZ = "0.4"
TensorOperations = "3.2.5 - 4"
PrecompileTools = "1"
StaticArrays = "1.4"
TensorOperations = "3.2.5 - 4"
Unitful = "1"
UnitfulAtomic = "1"
libcint_jll = "5.1"
julia = "1.8.5"
libcint_jll = "5.1"

[extras]
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
Expand Down
Binary file modified docs/equations/equations.pdf
Binary file not shown.
271 changes: 263 additions & 8 deletions docs/equations/equations.tex

Large diffs are not rendered by default.

45 changes: 45 additions & 0 deletions docs/equations/references.bib
Original file line number Diff line number Diff line change
Expand Up @@ -185,3 +185,48 @@ @article{aroeiraFermi2022
issn = {1549-9618},
doi = {10.1021/acs.jctc.1c00719},
}

@article{kreplinMCSCF2020,
author = {Kreplin, David A. and Knowles, Peter J. and Werner, Hans-Joachim},
title = "{MCSCF optimization revisited. II. Combined first- and second-order orbital optimization for large molecules}",
journal = jcp,
volume = {152},
number = {7},
pages = {074102},
year = {2020},
month = {02},
doi = {10.1063/1.5142241},
urldate = {2020-02-21},
issn = {0021-9606},
doi = {10.1063/1.5142241},
}


@article{SCI1989,
author = {Meier, U. and Staemmler, V.},
date = {1989/03/01},
date-added = {2024-04-26 10:53:27 +0200},
date-modified = {2024-04-26 10:53:27 +0200},
doi = {10.1007/BF00532127},
id = {Meier1989},
isbn = {1432-2234},
journal = tcac,
number = {2},
pages = {95--111},
title = {An efficient first-order CASSCF method based on the renormalized Fock-operator technique},
volume = {76},
year = {1989},
}

@article{augmentedHessian1981,
title = {Comment on the use of the augmented matrix in MCSCF theory},
journal = cpl,
volume = {77},
number = {3},
pages = {634-635},
year = {1981},
issn = {0009-2614},
doi = {https://doi.org/10.1016/0009-2614(81)85223-2},
author = {David R. Yarkony},
abstract = {The augmented matrix (AM) approach to the solution of the system of linear equations occurring in second-order MCSCF theory is discussed. It is shown that the AM approach provides a damped solution to this system of equations which eliminates the appropriate number of negative eigenvalues of the hessian and that the intermediate normalization is appropriate for the eigenvector of the AM.}
}
5 changes: 4 additions & 1 deletion docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,13 @@ makedocs(
"mnpy.md",
"msystem.md",
"orbtools.md",
"qmtensors.md",
"tensortools.md",
"descdict.md",
"utils.md",
"interfaces.md",
"molpro.md"
"molpro.md",
"molden.md"
],
"release-notes.md",
],
Expand Down
21 changes: 21 additions & 0 deletions docs/src/descdict.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Ordered descriptive dictionary

```@docs
ElemCo.DescDict
```

## Exported types and functions

```@autodocs
Modules = [ElemCo.DescDict]
Private = false
Order = [:type, :macro, :function]
```

## Internal functions

```@autodocs
Modules = [ElemCo.DescDict]
Public = false
Order = [:type, :macro, :function]
```
15 changes: 11 additions & 4 deletions docs/src/dump.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,38 @@
# FCIDump files

```@meta
CurrentModule = ElemCo.FciDump
CurrentModule = ElemCo.FciDumps
```

```@docs
FciDump
FciDumps
```

The FCIDump file format is a simple text file format for storing molecular integrals. It is used by many quantum chemistry programs.

## Storage of molecular integrals

```@docs
FDump
```


## Exported functions

```@autodocs
Modules = [FciDump]
Modules = [FciDumps]
Private = false
Order = [:function]
```

## Internal functions

```@docs
FDumpHeader
```

```@autodocs
Modules = [FciDump]
Modules = [FciDumps]
Public = false
Order = [:function]
```
33 changes: 24 additions & 9 deletions docs/src/elemco.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,27 +18,42 @@ Various macros are defined and exported to simplify running calculations. The ma
| `EC::ECInfo` | A global information object containing options, molecular system description, integrals and orbital spaces information, see [`ElemCo.ECInfo`](@ref). |
| `geometry::String` | Molecular coordinates, either in the `xyz` format or the file containing the xyz coordinates, see [`ElemCo.MSystem`](@ref). |
| `basis::Dict` | Basis set information, see [`ElemCo.MSystem`](@ref) |
| `fcidump::String` | File containing the integrals in the FCIDUMP format, see [`ElemCo.FciDump`](@ref). |
| `fcidump::String` | File containing the integrals in the FCIDUMP format, see [`ElemCo.FciDumps`](@ref). |

The driver routines and macros return energies as `NamedTuple`. The last energy is always the total energy (can be accessed using `last(energies)`). The following table lists the keys and their meanings.
The driver routines and macros return energies as ordered descriptive dictionaries [`ElemCo.ODDict`](@ref). The last energy is always the total energy (can be accessed using `last_energy(energies)`). The following table lists the keys and their meanings.

----------------------
| Key | Meaning |
|:---:|:--------|
| `:HF` | Hartree-Fock energy |
| `:MP2` | MP2 energy |
| `:CCSD` | CCSD energy |
| `:DCSD` | DCSD energy |
| `:SING2D_DCSD` | singlet 2D-DCSD energy |
| `:TRIP2D_DCSD` | triplet 2D-DCSD energy |
| `E` | Total energy |
| `Ec` | Correlation energy |
| `HF` | Hartree-Fock energy |
| `MP2` | MP2 energy |
| `CCSD` | CCSD energy |
| `DCSD` | DCSD energy |
| `SING2D-DCSD` | singlet 2D-DCSD energy |
| `TRIP2D-DCSD` | triplet 2D-DCSD energy |
| etc. ||

One can print the keys of the returned `NamedTuple` to see all the available keys:
One can print the keys of the returned `ODDict` to see all the available keys:

```julia
julia> println(keys(energies))
```

or display the complete dictionary together with the descriptions as

```julia
julia> display(energies)
```

The values and the descriptions can be accessed using the keys as

```julia
julia> energies["E"] # Total energy
julia> energies("E") # Description of the total energy
```

## [Macros](@id list_of_macros)

```@autodocs
Expand Down
21 changes: 21 additions & 0 deletions docs/src/molden.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Molden Interface

```@docs
ElemCo.MoldenInterface
```

## Exported functions and types

```@autodocs
Modules = [ElemCo.MoldenInterface]
Private = false
Order = [:function, :type, :macro, :constant]
```

## Internal functions and types

```@autodocs
Modules = [ElemCo.MoldenInterface]
Public = false
Order = [:function, :type, :macro, :constant]
```
21 changes: 21 additions & 0 deletions docs/src/outputs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Outputs

```@docs
ElemCo.Outputs
```

## Exported functions

```@autodocs
Modules = [ElemCo.Outputs]
Private = false
Order = [:type, :macro, :function]
```

## Internal functions

```@autodocs
Modules = [ElemCo.Outputs]
Public = false
Order = [:type, :macro, :function]
```
21 changes: 21 additions & 0 deletions docs/src/qmtensors.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# QMTensors

```@docs
ElemCo.QMTensors
```

## Exported types and functions

```@autodocs
Modules = [ElemCo.QMTensors]
Private = false
Order = [:type, :macro, :function]
```

## Internal types and functions

```@autodocs
Modules = [ElemCo.QMTensors]
Public = false
Order = [:type, :macro, :function]
```
4 changes: 2 additions & 2 deletions docs/src/tensortools.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ ints2
```@docs
sqrtinvchol
invchol
rotate_eigenvectors_to_real!
rotate_eigenvectors_to_real
```

## Other exported functions
Expand All @@ -39,7 +39,7 @@ rotate_eigenvectors_to_real!
Modules = [TensorTools]
Private = false
Order = [:function]
Filter = t -> t ∉ [ElemCo.save!, ElemCo.load, ElemCo.mmap, ElemCo.newmmap, ElemCo.closemmap, ElemCo.ints1, ElemCo.ints2, ElemCo.sqrtinvchol, ElemCo.invchol, ElemCo.rotate_eigenvectors_to_real! ]
Filter = t -> t ∉ [ElemCo.save!, ElemCo.load, ElemCo.mmap, ElemCo.newmmap, ElemCo.closemmap, ElemCo.ints1, ElemCo.ints2, ElemCo.sqrtinvchol, ElemCo.invchol, ElemCo.rotate_eigenvectors_to_real ]
```

## Internal functions
Expand Down
2 changes: 1 addition & 1 deletion docs/src/utils.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Utils
```@autodocs
Modules = [Utils]
Private = false
Order = [:function]
Order = [:function, :type]
```

## Internal functions
Expand Down
2 changes: 2 additions & 0 deletions profile/LocalPreferences.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[ElemCo]
precompile_workload = false
Loading
Loading