Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
160 commits
Select commit Hold shift + click to select a range
d030186
Add function to get exact spectral function
obackhouse Apr 15, 2025
d5a21eb
Adjust example params
obackhouse Apr 16, 2025
bd0d61d
Remove unused block
obackhouse Apr 16, 2025
cec73fd
Refactoring expressions
obackhouse Apr 22, 2025
8a594e5
Starting on solvers
obackhouse Apr 24, 2025
7a5c075
More solver progress
obackhouse Apr 25, 2025
6314699
Most stuff refactored
obackhouse Apr 26, 2025
5815532
Dynamic solver refactor
obackhouse Apr 28, 2025
5b8aaa9
More static solver refactors
obackhouse Apr 28, 2025
05cfdbd
Fixes
obackhouse Apr 28, 2025
c7a8344
Refactored most solvers
obackhouse Apr 28, 2025
809aec2
Starting to refactor tests and fix left/right
obackhouse Apr 29, 2025
848d593
Exact solver now working as intended
obackhouse May 1, 2025
88f9bef
Component-wise exact and davidson
obackhouse May 1, 2025
19660dc
Remove old block solvers
obackhouse May 1, 2025
ff6b595
Fix MBLSE auxiliary rotation
obackhouse May 1, 2025
0800deb
Change eig_biorth to eig_lr
obackhouse May 1, 2025
5405839
MBLSE tests
obackhouse May 1, 2025
8abc65b
Non-Hermitian MBLSE fix
obackhouse May 1, 2025
81e7c02
Move einsum to util
obackhouse May 1, 2025
7a3f050
Trying to fix componentwise
obackhouse May 2, 2025
9e24a80
Trying to fix componentwise MBLGF
obackhouse May 6, 2025
d941059
Componentwise MBLGF not working
obackhouse May 6, 2025
0a3ab49
Core solvers finally working
obackhouse May 14, 2025
667bb95
FCI fixes
obackhouse May 15, 2025
3674e5e
From expression, more tests
obackhouse May 16, 2025
898c0d3
More tests and fixes
obackhouse May 19, 2025
caff99d
Change default Aufbau method to global
obackhouse May 19, 2025
713b3c0
Basic density relaxation test
obackhouse May 20, 2025
0f8e300
Switch to ruff
obackhouse May 20, 2025
7c3e6c4
ruff
obackhouse May 20, 2025
99856d1
Type checking
obackhouse May 20, 2025
d55d20a
ADC(2)
obackhouse May 20, 2025
abc4786
Proper handling for non-hermitian non-orthogonal cases
obackhouse May 27, 2025
334167d
Formatting
obackhouse May 27, 2025
5c7dc08
Remove old matvec to moment code
obackhouse May 29, 2025
60adba3
Add TDA-GW
obackhouse Jun 2, 2025
6c79e78
linting
obackhouse Jun 2, 2025
d245812
Add ExpressionCollection
obackhouse Jun 2, 2025
15e2073
Rich printing
obackhouse Jun 6, 2025
72b3d34
Handle non-identity overlaps
obackhouse Jun 6, 2025
9f459ba
Add set_options
obackhouse Jun 6, 2025
4d3d28f
Complete dynamic solver interfaces
obackhouse Jun 6, 2025
3facc96
Fix dynamic solvers
obackhouse Jun 6, 2025
092a0a6
Time orderings for dynamic solvers
obackhouse Jun 6, 2025
bc90a27
Printing for static solvers
obackhouse Jun 7, 2025
cae7859
Progress bars for static solvers
obackhouse Jun 7, 2025
0bc5dde
Printing for MBL solvers
obackhouse Jun 7, 2025
0ec3b00
More printing
obackhouse Jun 8, 2025
f4bd2a2
linting
obackhouse Jun 8, 2025
3b8e76e
Update summary
obackhouse Jun 8, 2025
80f6f9f
Dynamic tests
obackhouse Jun 9, 2025
4b882cd
Start on backend
obackhouse Jun 8, 2025
fdc1c70
Fixes, overlap handling for result combination
obackhouse Jun 10, 2025
0c1f442
More tests
obackhouse Jun 11, 2025
a2710cf
Rename state vector to excitation vector
obackhouse Jun 10, 2025
35edee6
Add some examples
obackhouse Jun 11, 2025
f7efa6e
linting
obackhouse Jun 11, 2025
7adb593
Run examples in CI
obackhouse Jun 11, 2025
eba1714
Bump version to 1.0.0
obackhouse Jun 11, 2025
8a5861b
Remove dynamic version
obackhouse Jun 11, 2025
00b640e
Specify paths for mypy
obackhouse Jun 11, 2025
8ef68c6
Fix mypy error on 3.11 and 3.12
obackhouse Jun 11, 2025
5906999
Relax some thresholds
obackhouse Jun 14, 2025
97b223d
Fix initialisation
obackhouse Jun 14, 2025
b39545a
More error for hermitian
obackhouse Jun 14, 2025
8998236
Add matplotlib to dev deps
obackhouse Jul 17, 2025
aeea008
Add __hash__ functions
obackhouse Jul 17, 2025
9c904b0
Drop h2-ccpvdz tests
obackhouse Jul 17, 2025
92d3b96
Reduce matrix_power threshold
obackhouse Jul 17, 2025
55855d3
Too far
obackhouse Jul 17, 2025
114a9bf
Still too far
obackhouse Jul 17, 2025
ef190c1
Better conditioned water geometry
obackhouse Jul 17, 2025
2f03dbf
Move Lehmann and Spectral to dyson.representations submodule
obackhouse Jul 17, 2025
90c52e1
Add dynamic representation
obackhouse Jul 17, 2025
72eb124
Adds dynamic class for grid-dependent functions
obackhouse Jul 18, 2025
9376043
Use enum for time ordering
obackhouse Jul 18, 2025
2f1b81d
Better enum descriptions
obackhouse Jul 18, 2025
8663057
Linting
obackhouse Jul 18, 2025
24f519f
Disable some tests that are dodgy
obackhouse Jul 18, 2025
ccf54a1
Update dyson/util/misc.py
obackhouse Jul 18, 2025
1fb8388
Lazy array typing
obackhouse Jul 18, 2025
5c0df07
Linting
obackhouse Jul 18, 2025
3aadf50
Copilot doesn't check mypy
obackhouse Jul 18, 2025
c686ab1
Fix example
obackhouse Jul 18, 2025
82bf559
Fix example
obackhouse Jul 18, 2025
e0b4768
Linting
obackhouse Jul 18, 2025
c154ddb
Merge pull request #12 from BoothGroup/refactor_dynamic
obackhouse Jul 18, 2025
d67b48a
Separate hermitian flags for upfolded and downfolded quantities in ex…
obackhouse Jul 18, 2025
214f8e1
Linting
obackhouse Jul 18, 2025
7e618c8
Fix GW upfolded hermiticity
obackhouse Jul 18, 2025
beb9ffc
Fix bug in hermitian MBLSE
obackhouse Jul 18, 2025
352c1c4
Tight tol for auxiliary shift
obackhouse Jul 18, 2025
4a6c044
Try tighter CCSD convergence
obackhouse Jul 19, 2025
61eb90e
More module level docstrings
obackhouse Jul 19, 2025
94f4cc9
Add sphinx doc build
obackhouse Jul 19, 2025
2f2864c
Update description
obackhouse Jul 19, 2025
9e9991d
Do docs on mac since its faster
obackhouse Jul 19, 2025
4754656
Make git track empty docs dirs
obackhouse Jul 19, 2025
bd3421e
Fix intersphinx for pyscf
obackhouse Jul 19, 2025
5f54364
Fix sphinx-mdinclude
obackhouse Jul 19, 2025
08e91d5
Fix toctree
obackhouse Jul 19, 2025
49d6818
Use sphinx-napoleon
obackhouse Jul 19, 2025
0ffc743
Use workflow for docs
obackhouse Jul 19, 2025
63d4bb9
Fix docs folder
obackhouse Jul 19, 2025
7ebeb9a
Fix documentation path syntax
obackhouse Jul 19, 2025
23e365a
Use dev deps for docs
obackhouse Jul 19, 2025
db58138
Add autosummary trees
obackhouse Jul 19, 2025
9f5b9a3
Adjust spacing
obackhouse Jul 19, 2025
bc56f9b
Remove indices and tables
obackhouse Jul 19, 2025
2e16275
Linting
obackhouse Jul 19, 2025
8612ad8
Try manual file
obackhouse Jul 19, 2025
a7d1366
Fix autosummary
obackhouse Jul 19, 2025
ec1c397
Fix toctree paths for submodules
obackhouse Jul 20, 2025
315a092
Try hard line breaks
obackhouse Jul 20, 2025
ffcd036
Don't double up the API reference
obackhouse Jul 20, 2025
c619b1f
Try removing indents in reST
obackhouse Jul 20, 2025
063e8fd
Try to fix MD tables
obackhouse Jul 20, 2025
610da60
Syntax fixes
obackhouse Jul 20, 2025
e2bc9aa
Trying to fix class docs
obackhouse Jul 20, 2025
1cc2267
No markdown tables then
obackhouse Jul 20, 2025
35c2d5d
Try to make sphinx work with ExpressionCollection objects
obackhouse Jul 20, 2025
2463776
Fix line too long
obackhouse Jul 20, 2025
feec0d4
Try a different way to add ExpressionCollection objects to autosummary
obackhouse Jul 20, 2025
5c1694a
Try autoattribute?
obackhouse Jul 20, 2025
2e0768c
Refactor ExpressionCollection to use subclasses instead of instances
obackhouse Jul 20, 2025
4d3cdc7
Fix typing for ExpressionCollection
obackhouse Jul 20, 2025
6bf5425
Fix ExpressionCollection.__contains__
obackhouse Jul 20, 2025
968d3b9
Fix __contains__ typing
obackhouse Jul 20, 2025
5ef8b6a
Fix bullet points
obackhouse Jul 20, 2025
ee279f5
More details for representation docs
obackhouse Jul 20, 2025
ddac6a5
Use bmatrix
obackhouse Jul 20, 2025
56080ec
Don't hide pyscf path
obackhouse Jul 20, 2025
dfbd27e
Documentation tests
obackhouse Jul 20, 2025
d14e50b
Fix matrix transpose
obackhouse Jul 20, 2025
3287b01
Fix some cross references
obackhouse Jul 20, 2025
1030642
Order methods by source and skip inherited members
obackhouse Jul 20, 2025
e55dc75
Add some plotting utilities
obackhouse Jul 21, 2025
49e28b3
Fix return type
obackhouse Jul 21, 2025
f01d5b4
Caching and scipy bypass
obackhouse Jul 22, 2025
66045d7
Linting
obackhouse Jul 22, 2025
4c35317
More stable test case
obackhouse Jul 22, 2025
23bec5e
Add Hamiltonian expression
obackhouse Jul 23, 2025
1aeab8d
Add some citations for solvers and expressions
obackhouse Jul 23, 2025
be60b40
Drop LiH because its CC solution is not good
obackhouse Jul 23, 2025
c7c0702
Run tests on single thread
obackhouse Jul 23, 2025
feff1c3
Add MLSE solver
obackhouse Jul 23, 2025
38f0678
Fix description
obackhouse Jul 23, 2025
6a3285f
Fixes for IP-EOM-CC ordering
obackhouse Jul 26, 2025
55d66da
Fixes for non-hermitian linear algebra
obackhouse Aug 3, 2025
8f4096c
linting
obackhouse Aug 3, 2025
de30980
docs fixes
obackhouse Aug 3, 2025
31ce882
update reference style in docs
obackhouse Aug 3, 2025
d72397e
Fix cross reference
obackhouse Aug 3, 2025
7db6efc
Export submodule
obackhouse Aug 4, 2025
569c01c
Remove debug print statement
obackhouse Aug 4, 2025
d69892c
Move bra/ket self-energy projection to function
obackhouse Aug 4, 2025
5ceca58
Fix casting issue for DIIS
obackhouse Aug 4, 2025
c0a5777
Stop grids from subclassing array, it's going to cause issues
obackhouse Aug 11, 2025
acc43ff
Fix examples
obackhouse Aug 11, 2025
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
21 changes: 13 additions & 8 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
build:
Expand All @@ -15,9 +14,10 @@ jobs:
fail-fast: false
matrix:
include:
- {python-version: "3.8", os: ubuntu-latest, documentation: True}
- {python-version: "3.9", os: ubuntu-latest, documentation: False}
- {python-version: "3.10", os: ubuntu-latest, documentation: False}
- {python-version: "3.10", os: ubuntu-latest}
- {python-version: "3.11", os: ubuntu-latest}
- {python-version: "3.12", os: ubuntu-latest}
- {python-version: "3.12", os: macos-latest}

steps:
- uses: actions/checkout@v2
Expand All @@ -34,12 +34,17 @@ jobs:
python -m pip install .[dev]
- name: Linting
run: |
python -m black dyson/ --diff --check --verbose
python -m isort dyson/ --diff --check-only --verbose
ruff check
ruff format --check
mypy dyson/ tests/
- name: Run unit tests
run: |
python -m pip install pytest pytest-cov
pytest --cov dyson/
OMP_NUM_THREADS=1 pytest
- name: Run examples
env:
MPLBACKEND: Agg
run: |
find examples -name "*.py" -print0 | xargs -0 -n1 python
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Documentation

on:
push:
branches: [refactor]

jobs:
pages:
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
permissions:
pages: write
id-token: write
steps:
- id: deployment
uses: sphinx-notes/pages@v3
with:
documentation_path: docs/source
pyproject_extras: dev
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# dyson: Dyson equation solvers for electron propagator methods
# `dyson`: Dyson equation solvers for Green's function methods

The `dyson` package implements various Dyson equation solvers, with a focus on those avoiding explicitly grid-resolved numerical procedures such as Fourier transforms and analytical continutation.
[![CI](https://github.com/BoothGroup/dyson/workflows/CI/badge.svg)](https://github.com/BoothGroup/dyson/actions?query=workflow%3ACI+branch%3Amaster)

The `dyson` package implements various Dyson equation solvers, including novel approaches that avoiding explicitly grid-resolved numerical procedures such as Fourier transforms and analytical continuation.
These include the moment-resolved block Lanczos methods for moments of the Green's function or self-energy.

### Installation:
## Installation

From source:

Expand All @@ -12,6 +14,6 @@ git clone https://github.com/BoothGroup/dyson
pip install .
```

### Usage
## Usage

Examples are available in the `examples` directory.
20 changes: 20 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = source
BUILDDIR = build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
35 changes: 35 additions & 0 deletions docs/make.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
@ECHO OFF

pushd %~dp0

REM Command file for Sphinx documentation

if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=source
set BUILDDIR=build

%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.https://www.sphinx-doc.org/
exit /b 1
)

if "%1" == "" goto help

%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end

:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%

:end
popd
File renamed without changes.
Empty file.
64 changes: 64 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
"""Configuration file for the Sphinx documentation builder.

For the full list of built-in configuration values, see the documentation:
https://www.sphinx-doc.org/en/master/usage/configuration.html
"""


# Project information

project = "dyson"
copyright = "2025, Booth Group, King's College London"
author = "Oliver J. Backhouse, Basil Ibrahim, Marcus K. Allen, George H. Booth"


# General configuration

extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.autosummary",
"sphinx.ext.coverage",
"sphinx.ext.doctest",
"sphinx.ext.intersphinx",
"sphinx.ext.napoleon",
"sphinx.ext.viewcode",
"sphinx_mdinclude",
]

templates_path = ["_templates"]
exclude_patterns = []


# Options for HTML output

html_theme = "sphinx_book_theme"
html_static_path = ["_static"]
default_role = "autolink"


# Options for autosummary

autosummary_generate = True
autodoc_default_options = {
"members": True,
"undoc-members": True,
"inherited-members": False,
"show-inheritance": True,
"member-order": "bysource",
}


# Options for intersphinx

intersphinx_mapping = {
"python": ("https://docs.python.org/3/", None),
"numpy": ("https://numpy.org/doc/stable/", None),
"scipy": ("https://docs.scipy.org/doc/scipy/", None),
"pyscf": ("https://pyscf.org/", None),
"rich": ("https://rich.readthedocs.io/en/stable/", None),
}


# Options for napoleon

napoleon_google_docstring = True
4 changes: 4 additions & 0 deletions docs/source/dyson.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
dyson
=====

.. automodule:: dyson
17 changes: 17 additions & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
.. dyson documentation master file, created by
sphinx-quickstart on Sat Jul 19 19:21:09 2025.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.

.. mdinclude:: ../../README.md

.. toctree::
:maxdepth: 2
:caption: Contents:

.. toctree::
:maxdepth: 1
:hidden:
:caption: API Reference

dyson
Loading
Loading