Open franappi11 opened 10 months ago
Hi! Thanks for your interest, and it is by no means obvious how to do this.
You can currently run the legacy hubbard code by doing (for example)
/path/to/ipie/bin/ipie --legacy input.json
where input.json is an appropriately formed json input file. Here is an example input file:
{
"system": {
"name": "Hubbard",
"nx": 4,
"ny": 4,
"nup": 7,
"ndown": 7,
"U": 4
},
"qmc": {
"dt": 0.005,
"nwalkers": 50,
"blocks": 1000,
"nsteps": 10,
"pop_control_freq": 5
},
"trial": {
"name": "UHF"
},
"propagator": {
"hubbard_stratonovich": "discrete"
},
"estimators": {}
}
There are two options for trial ("free_electron" and "UHF") (nx and ny are the dimensions of the square 2D lattice, and U is the hubbard U parameter.
Note one must do
BUILD_LEGACY_IPIE=TRUE; pip install -e.
in order to enable the legacy ipie features (which, in a somewhat entangled way depend on cythonized modules). This is all very convoluted but as of today legacy features are not supported (in the sense we won't typically actively develop them) until they are resurrected into mainline ipie.
I think the write_xml_input you're referring to is https://github.com/JoonhoLee-Group/ipie/blob/develop/ipie/legacy/examples/hubbard/02-write_integrals/write_ints.py. This script was written in order to write the integrals in a format that could be read by QMCPACK (afqmctools is a package contained within afqmctools). Apologies for this having zero documentation but I would lagely ignore this script.
On the topic of resurrecting the Hubbard model, if you're eager then it would be a fantastic contribution. The steps would be roughly as follows:
As a first step I would target resurrecting the standard Hubbard model with single determinant trial wavefunctions (RHF/UHF not GHF) and the discrete propagator.
These are the main steps I think but there will likely be lots of little details. All the unit tests should copy over and pass as well as any integration tests.
I will say, the easiest way to do this would likely to first build it up like https://github.com/JoonhoLee-Group/ipie/blob/develop/examples/08-custom_walker/run_afqmc.py (with the propagator also modified, but the walkers unmodified). I also forgot to add a point 4. above which would be the energy estimator.
@fdmalone thank you for your answers! I tried to follow the steps you described in your first answer, but I am getting the following error: "ModuleNotFoundError: No module named 'ipie.legacy.estimators.ueg_kernels'". About resurrecting the Hubbard model, I would like to contribute but I have just started a new job and I am pretty busy ( and I am also not the most skilled developer). Anyways, I would consider it as a side project, in the near future, in case I will contact you for more details!
Okay, after playing with setup.py file I think it is working now!
Hi ipie developers, I am trying to run the legacy example Hubbard model. What are the necessary steps to "resurrect" the code? It seems like the system name "Hubbard" in the input file has no correspondence and it looks the function write_xml_input, in the write integrals file, does not exist. Do you have any idea/guide on how to make possible to run the Hubbard model? Sorry for the vague question and thank you for your help!