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

FT cleanup #296

Merged
merged 89 commits into from
May 17, 2024
Merged
Show file tree
Hide file tree
Changes from 80 commits
Commits
Show all changes
89 commits
Select commit Hold shift + click to select a range
5445b13
empty files
linusjoonho Aug 28, 2023
682cd3e
renaming empty to __init__.py
linusjoonho Aug 28, 2023
2410922
adding ft_afqmc mpi test script
linusjoonho Aug 29, 2023
4bb5405
creating estimators
linusjoonho Aug 29, 2023
a67b759
copying over relevant files for ft-afqmc
linusjoonho Aug 29, 2023
2fa3762
add test without using mpi. qmc/tests/test_ft_integration.py
jiangtong1000 Aug 29, 2023
98c4982
revise; 32 to 1 walker reference. thermal folder is legacy free
jiangtong1000 Aug 30, 2023
8919abf
removing hubbard-related routines in ft-afqmc
linusjoonho Aug 30, 2023
2c17e28
remove thermal.qmc.options
jiangtong1000 Aug 30, 2023
3810288
recover code in legacy that was mistakely modified
jiangtong1000 Aug 30, 2023
3bccf5e
remove thermal.qmc.options
jiangtong1000 Aug 30, 2023
46dd6e9
Removed thermal/walkers/thermal.py since it duplicates thermal/walker…
shufay Aug 30, 2023
7006a8a
test_thermal_walkers.py
linusjoonho Aug 30, 2023
0b18036
Merge branch 'ft_cleanup' of github.com:JoonhoLee-Group/ipie into ft_…
linusjoonho Aug 30, 2023
78eaa7e
Update hamiltonian/ueg.py and systems/ueg.py unit tests.
shufay Aug 30, 2023
0443bbf
add a ft qmc example for generic system: tests/example_generic.py
jiangtong1000 Aug 30, 2023
bda0cb3
removing rest files of Hubbard in thermal code
jiangtong1000 Aug 31, 2023
389d481
clean up walker handler, remove qmc.calc file
jiangtong1000 Aug 31, 2023
6146d6a
thermal walker test update
linusjoonho Aug 31, 2023
1b692e0
add generic reference json
jiangtong1000 Aug 31, 2023
3fe8a61
updating thermal walker cleanup
linusjoonho Sep 1, 2023
c68f886
Merge branch 'ft_cleanup' of github.com:JoonhoLee-Group/ipie into ft_…
linusjoonho Sep 1, 2023
4c1e2c6
cleanup ThermalAFQMC class for only Generic case, by inheriting ZT AF…
jiangtong1000 Sep 1, 2023
5054bbd
Add UEG calculation as example. Fixed trial energy calculation for
shufay Sep 8, 2023
f39f066
Removed system-dependence in thermal/trial/. Renamed `system` ->
shufay Sep 9, 2023
ffa0ca3
Removed system-dependence in thermal/trial/. Renamed `system` ->
shufay Sep 9, 2023
a2c2281
Readd `system` argument for compatibility.
shufay Sep 9, 2023
e5ff45c
Merge branch 'ft_cleanup' of https://github.com/JoonhoLee-Group/ipie …
shufay Sep 9, 2023
64356f1
Remove system-dependency in thermal/estimators.
shufay Sep 9, 2023
f36f21f
Misspelling
shufay Sep 9, 2023
8a7ab90
updates to walkers
shufay Oct 2, 2023
8658e8f
add ueg_kernel
shufay Oct 2, 2023
b5f7a94
changes to thermal walker cleaning up
Oct 2, 2023
c840484
Clean `thermal/propagator` to reflect the structure of 0T code. Test
shufay Oct 18, 2023
381fab0
Test for thermal/propagation matches legacy if we provide the same ra…
shufay Dec 13, 2023
b940a8c
Remove `system` dependence from `estimators/`, propagating through te…
shufay Dec 21, 2023
405b847
Updated Thermal AFQMC driver. Added thermal estimators. Added tests.
shufay Jan 3, 2024
e8f67ad
UEG energies agree with legacy in `propagators/tests` Added pytests.
shufay Jan 3, 2024
108fb7d
Except KeyError
shufay Jan 4, 2024
0ffdd6f
Reshape legacy Hamiltonian `chol_vecs` for backwards compatibility.
shufay Jan 4, 2024
3b64917
Add flags for debugging in legacy code. Correct for backwards
shufay Jan 4, 2024
01f60e0
Updated Thermal AFQMC--tests agree with legacy for both UEG and Generic
shufay Jan 4, 2024
96076c7
Comment out for backwards compatibility.
shufay Jan 4, 2024
de50531
Fix propagation bug in legacy. Add tests. Buffer sizing for MPI
shufay Feb 2, 2024
6c83d86
Fixed buffer sizing for FT-AFQMC and MPI, specifically for the `comb`…
shufay Feb 25, 2024
54d4acd
remove `ueg` in `ipie/systems` and ft tests in `ipie/qmc/tests`
shufay Mar 4, 2024
e262624
remove `ueg` from `ipie/hamiltonians`
shufay Mar 4, 2024
87077d8
remove `ueg` from `ipie/hamiltonians`
shufay Mar 4, 2024
518d1cf
remove FT reference data from `ipie/qmc/tests/reference_data`
shufay Mar 4, 2024
cb6435b
remove `ueg` in `ipie/systems`
shufay Mar 5, 2024
2c2bb32
undo minor 0T change
shufay Mar 5, 2024
bfedef8
Remove `ueg_kernel` compilation in `thermal/estimators`
shufay Mar 5, 2024
51e8ae3
Update tests and restore `system` dependence in this branch.
shufay Mar 8, 2024
13e0978
Moved `ipie.thermal` to `ipie.addons.thermal`
shufay Mar 8, 2024
c3790c5
Merge branch 'develop' of https://github.com/JoonhoLee-Group/ipie int…
shufay Mar 9, 2024
b34884b
fix merge error
shufay Mar 9, 2024
682dd7f
Added `calc.py` with `build_thermal_afqmc_driver` and example.
shufay Mar 11, 2024
1518800
Add thermal AFQMC example and analysis code.
shufay Mar 12, 2024
21d6876
Fix `pylint` errors
shufay Mar 12, 2024
5816762
Restore `ipie/estimators` to `develop`
shufay Mar 12, 2024
81171a4
Remove 0T tests.
shufay Mar 13, 2024
b5e32e1
Add FT MPI integration test reference files.
shufay Mar 13, 2024
11db442
Edit example to be less computationally expensive.
shufay Mar 13, 2024
598b023
Fix `pylint` error and update tests.
shufay Mar 13, 2024
3ad8b76
Update example
shufay Mar 13, 2024
c374986
Add `__init__.py` file for `pytest`.
shufay Mar 13, 2024
63a0d3c
Remove `ueg_kernels` import. Use legacy's `update_weight` in
shufay Mar 16, 2024
7994a1f
Try adding cythonized `ueg_kernels` to `thermal/utils`
shufay Mar 16, 2024
1274022
Skip `pytest` if `cython` modules are not built.
shufay Mar 16, 2024
db599e5
Remove `ueg_kernels` import in `utils/ueg.py`
shufay Mar 16, 2024
39abb9b
Skip `pytest` for tests that invoke `fock_ueg` imports.
shufay Mar 17, 2024
1ee949d
Skip `pytest` for tests that invoke `fock_ueg` imports
shufay Mar 17, 2024
335b04e
Add tests. Fix `pylint` warnings.
shufay Mar 17, 2024
2dadcbe
Fix `pylint` `dangerous-default-value` in setting default argument
shufay Mar 17, 2024
3a78d3b
Add reference data.
shufay Mar 18, 2024
3a96c30
Add tests and edit verbosity.
shufay Mar 18, 2024
80ff261
Rename `nstack` to `stack_size` and `stack_length` to `nstack`.
shufay Mar 22, 2024
c4e93ba
Fixed imaginary time trace by using the entire GF in `print_cut`
shufay Apr 4, 2024
0db1190
Merge branch 'develop' of https://github.com/JoonhoLee-Group/ipie int…
shufay Apr 4, 2024
3b8b70f
Fix example.
shufay Apr 4, 2024
de780e6
Define `ThermalQMCOpts` and `ThermalPopController`. Replaced input
shufay Apr 8, 2024
e576ce1
Bugfix in legacy.
shufay Apr 8, 2024
c478bcd
Skip test without cython build.
shufay Apr 8, 2024
366c499
Add license
shufay Apr 8, 2024
061d8f1
Addressing PR #296 comments
shufay Apr 10, 2024
a88f3ac
Bugfixes and addressing https://github.com/JoonhoLee-Group/ipie/pull/…
shufay Apr 10, 2024
afb86f7
Add `cplx` kwarg to `ipie.trial_wavefunction.SingleDet`
shufay Apr 11, 2024
63ea0e6
Fix `pylint` errors.
shufay Apr 11, 2024
20d10a9
Remove `cplx` kwarg in `ipie.trial_wavefunction.SingleDet`
shufay May 17, 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
87 changes: 87 additions & 0 deletions examples/16-ft_afqmc/run_afqmc.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
import json
import numpy

from ueg import UEG
from ipie.config import MPI
from ipie.addons.thermal.qmc.calc import build_thermal_afqmc_driver
from ipie.analysis.extraction import extract_observable
from ipie.analysis.autocorr import reblock_by_autocorr

comm = MPI.COMM_WORLD

verbose = False if (comm.rank != 0) else True

# 1. Generate UEG integrals.
ueg_opts = {
"nup": 1,
"ndown": 1,
"rs": 3,
"ecut": 0.5,
"thermal": True,
"write_integrals": True
}

ueg = UEG(ueg_opts, verbose=verbose)

if comm.rank == 0:
ueg.build(verbose=verbose)

comm.barrier()

# 2. Build thermal AFQMC driver.
options = {
'trial': {
'name': 'one_body',
},

'walkers': {
'lowrank': False,
},

'qmc': {
'mu': 0.133579,
'beta': 10.,
'timestep': 0.5,
'nwalkers': 12 // comm.size,
'stack_size': 10,
'seed': 7,
'nblocks': 20,
},
}

afqmc = build_thermal_afqmc_driver(
comm,
nelec=ueg.nelec,
hamiltonian_file='ueg_integrals.h5',
seed=7,
options=options,
verbosity=verbose
)

if verbose:
print(f'\nThermal AFQMC options: \n{json.dumps(options, indent=4)}\n')
print(afqmc.params) # Inspect the qmc options.

# 3. Run thermal AFQMC calculation.
afqmc.run(verbose=verbose)
afqmc.finalise()
afqmc.estimators.compute_estimators(afqmc.hamiltonian, afqmc.trial, afqmc.walkers)

if comm.rank == 0:
energy_data = extract_observable(afqmc.estimators.filename, "energy")
number_data = extract_observable(afqmc.estimators.filename, "nav")

print(f'filename: {afqmc.estimators.filename}')
print(f'\nenergy_data: \n{energy_data}\n')
print(f'number_data: \n{number_data}\n')

y = energy_data["ETotal"]
y = y[1:] # Discard first 1 block.
df = reblock_by_autocorr(y, verbose=verbose)
print(df)
print()

y = number_data["Nav"]
y = y[1:] # Discard first 1 block.
df = reblock_by_autocorr(y, verbose=verbose)
print(df)
Loading
Loading