Skip to content

Commit

Permalink
Update Readme!
Browse files Browse the repository at this point in the history
  • Loading branch information
srbhp committed Dec 18, 2023
1 parent 169e88f commit c6b80ec
Show file tree
Hide file tree
Showing 6 changed files with 2,559 additions and 2,505 deletions.
75 changes: 68 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,77 @@
<h1 align="center">
<a href="https://srbhp.github.io/nrgplusplus/">Documentation</a> </h1>

</h1>
# nrgplusplus

![Documentation](https://github.com/srbhp/nrgplusplus/actions/workflows/cmake.yml/badge.svg)

## ⚠ This is a work in progress repository

This is a modern C++ implementation of the
Numerical Renormalization Group (NRG) Method
to solve Quantum Impurity problems embeded in a Bath.
We tried to follow the convention of
[Bulla, 2008](https://doi.org/10.1103/RevModPhys.80.395).

## Documentation
https://srbhp.github.io/nrgplusplus/


## Quick Start Guide
### Quick Start Guide
https://srbhp.github.io/nrgplusplus/build.html




## Example : Single Impurity Anderson Impurity (SIAM)
(See : examples/entropySIAM/main.cpp)

Define the impurity Model wth onsite energy `eps` and Coulomb energy `U_int`.

```cpp
spinhalf impurity(eps, U_int);
```
The bath for the SIAM is also constructed in the same way.
```cpp
spinhalf bathModel(0, 0); // set parameters
```

Once we have created the bath and the impurity we can
construct a `nrgcore` object which will take care of
many things that we need to do for the `NRG iterations`.
This includes calculating static and dynamic quantities
of the Impurity.

```cpp
nrgcore<spinhalf, spinhalf> siam(impurity, bathModel);
siam.set_parameters(1024); // set max number of states to be kept
siam.add_bath_site({V, V}, 1.0); // This is consistentent with the RMP paper. V is the coupling og the impurity and first bath site.
siam.update_internal_state();
```
Next we iteratively add the bath sites in the same way.
```cpp
for (int in = 0; in < nMax; in++) {
double rescale = 1.0;
if (in > 0) {
rescale = std::sqrt(LAMBDA);
}
siam.add_bath_site({hopping(in, LAMBDA), hopping(in, LAMBDA)}, rescale);
siam.update_internal_state();
}
```



## Contributing

Pull requests are welcome. For major changes, please open an issue first
to discuss what you would like to change.

Please make sure to update tests as appropriate.


## Acknowledgment

During the development of this project I was employed by

- Prof. Jonas Fansson, Uppsala University and
- Prof. Frithjof Anders, Technical University Dortmund.
This project would have been not possible without their support.
4 changes: 2 additions & 2 deletions docs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ find_package(Sphinx REQUIRED)

# Find all the public headers
# get_target_property(NRGCore_PUBLIC_HEADER_DIR NRGCore INTERFACE_INCLUDE_DIRECTORIES)
file(GLOB_RECURSE rst_dependent_files ${CMAKE_CURRENT_SOURCE_DIR}/*rst )
file(GLOB_RECURSE rst_dependent_files ${CMAKE_CURRENT_SOURCE_DIR}/../nrgcore/*/*/*pp )

set(DOXYGEN_INPUT_DIR ${PROJECT_SOURCE_DIR}/nrgcore)
set(DOXYGEN_OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR}/doxygen)
set(DOXYGEN_INDEX_FILE ${DOXYGEN_OUTPUT_DIR}/xml/index.xml)
set(DOXYFILE_IN ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in)
set(DOXYFILE_OUT ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
set(DOXYFILE_OUT ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile.out)

# Replace variables inside @@ with the current values
configure_file(${DOXYFILE_IN} ${DOXYFILE_OUT} @ONLY)
Expand Down
Loading

0 comments on commit c6b80ec

Please sign in to comment.