{"id":38553194,"url":"https://github.com/sissaschool/turborvb","last_synced_at":"2026-01-17T07:38:19.734Z","repository":{"id":154103778,"uuid":"596989513","full_name":"sissaschool/turborvb","owner":"sissaschool","description":"Quantum Monte Carlo package, TurboRVB","archived":false,"fork":false,"pushed_at":"2025-10-22T00:38:38.000Z","size":23884,"stargazers_count":31,"open_issues_count":17,"forks_count":8,"subscribers_count":5,"default_branch":"devel","last_synced_at":"2025-10-22T02:42:16.502Z","etag":null,"topics":["ab-initio-simulations","electronic-structure","quantum-monte-carlo","turborvb"],"latest_commit_sha":null,"homepage":"https://turborvb.sissa.it","language":"Fortran","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sissaschool.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"License","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-02-03T11:31:11.000Z","updated_at":"2025-10-22T00:38:49.000Z","dependencies_parsed_at":"2025-10-22T02:39:34.551Z","dependency_job_id":null,"html_url":"https://github.com/sissaschool/turborvb","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/sissaschool/turborvb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sissaschool%2Fturborvb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sissaschool%2Fturborvb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sissaschool%2Fturborvb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sissaschool%2Fturborvb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sissaschool","download_url":"https://codeload.github.com/sissaschool/turborvb/tar.gz/refs/heads/devel","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sissaschool%2Fturborvb/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28504356,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T06:57:29.758Z","status":"ssl_error","status_checked_at":"2026-01-17T06:56:03.931Z","response_time":85,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ab-initio-simulations","electronic-structure","quantum-monte-carlo","turborvb"],"created_at":"2026-01-17T07:38:19.040Z","updated_at":"2026-01-17T07:38:19.721Z","avatar_url":"https://github.com/sissaschool.png","language":"Fortran","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"logo/turborvb_logo.png\" width=\"70%\"\u003e\n\n# SISSA Quantum Monte Carlo package\n\n[TurboRVB](https://turborvb.sissa.it) is an open-source computational package for **ab initio Quantum Monte Carlo (QMC) simulations** of both molecular and bulk electronic systems. The code was initially launched by **Sandro Sorella** and **Michele Casula** in SISSA and has been continuously developed by many contributors for over 20 years. The code implements two types of well established QMC algorithms: Variational Monte Carlo (VMC), and Diffusion Monte Carlo in its robust and efficient lattice regularized variant (LRDMC).\n\nTurboRVB is distinguishable from other QMC codes in the following features:\n\n- The code employs a resonating valence bond (RVB)-type wave function, such as the Jastrow Geminal/Jastrow Pfaffian. This wave function includes the correlation effect beyond the Jastrow-Slater wave function, which is commonly used in other QMC codes.\n\n- Implemented state-of-art optimization algorithms, such as the stochastic reconfiguration and the linear method, realize a stable optimization of the amplitude and nodal surface of many-body wave functions at the variational quantum Monte Carlo level.\n\n- The code implements the so-called lattice regularized diffusion Monte Carlo method, which provides a numerically stable diffusion quantum Monte Carlo calculation.\n\n- The implementation of an adjoint algorithmic differentiation allows us to differentiate many-body wave functions efficiently and to perform structural optimizations and calculate molecular dynamics, thanks to an efficient and accurate evaluation of ionic forces.\n\n- The possibility of performing different flavors of molecular dynamics, from classical to path integral, seamlessly integrated in the package, with original integration algorithms.\n\n# Developers\n\n- Kosuke Nakano (NIMS/Japan), kousuke_1123_at_icloud.com\n- Otto Kohulák (CNRS/France), pravod_at_gmail.com\n- Michele Casula (CNRS/France), michele.casula_at_gmail.com\n\n# Installation guide\n\n## CMake build\n\nTurboRVB can be compiled with `CMake` build system providing convenient way to compile TurboRVB package assuming minimum version of `CMake` is 3.20.0 and compilers and math libraries (BLAS and LAPACK) are loaded on the system. One can run the cmake build by executing:\n\n`cmake -S . -B build`\n\nOption `-S` specifies path to the source directory (root directory of the repository) and option `-B` specifies build directory. This will execute the \"configure\" state of the compilation. It is recomended to run out-of-the-source compilation all the time. `CMake` will find the best suitable compilers and libraries on the system. At the end of the run a summary with compilation details will be shown such as:\n\n```\n ######################### SUMMARY #########################\n\n   C compiler:         NVHPC (nvc ver. 22.5.0)\n   Fortran compiler:   NVHPC (nvfortran ver. 22.5.0)\n\n   BLAS used:\n   /opt/addman/spack/var/spack/environments/nvidia-openmpi/.spack-env/view/lib/libblas.so\n\n   Compiling QMC code:          ON\n   Compiling DFT code:          ON\n   Compiling tools:             ON\n\n   Compiling serial version:    ON\n   Compiling parallel version:  ON\n   Compiling GPU:               OFF\n\n   Optimizations:               ON\n   LTO optimizations:           OFF\n\n   Base preprocessor flags are set to:\n     ::  _SIMD\n     ::  __FFTW\n     ::  __PORT\n     ::  __USE_INTERNAL_FFTW\n\n   Parallel specific preprocessor flags are set to:\n     ::  PARALLEL\n     ::  __SCALAPACK\n\n   Base Fortran flags:\n\n   Agressive flags:         -O3  (55 files)\n   Non-agressive flags:     -O1/-O0  (184 files)\n\n ######################### xxxxxxx #########################\n```\n\nOne can, however, change compilers, adjust parameters or add flags by `CMake` options. Informations about these option can be found in the `CMake` [documentation](https://cmake.org/documentation/). The most important are:\n\n`-DCMAKE_C_COMPILER=` (STRING) T C compiler to be used (e.g. `gcc`, `/opt/intel/bin/icc`, ...)\n\n`-DCMAKE_Fortran_COMPILER=` (STRING) This specifies Fortran compiler to be used\n\n`-DCMAKE_INSTALL_PREFIX=` (STRING) Install prefix for `make install`\n\nBesides `CMake` native options there are other options specific to TurboRVB build, all starting with `EXT_` prefix:\n\n`-DEXT_SERIAL=` (BOOL, default = ON) Build serial code\n\n`-DEXT_PARALLEL=` (BOOL, default = ON) Build parallel code\n\n`-DEXT_QMC=` (BOOL, default = ON) Build QMC code\n\n`-DEXT_DFT=` (BOOL, default = ON) Build DFT code\n\n`-DEXT_TOOLS=` (BOOL, default = ON) Build TurboRVB tools\n\n`-DEXT_GPU=` (BOOL, default = ON) Build GPU accelerated code\n\n`-DEXT_OPT=` (BOOL, default = ON) Turn on optimizations\n\n`-DEXT_LTO=` (BOOL, default = OFF) Turn on link time optimizations. Beware, this can make compilation very long (even hours), also sometimes creates instable code. But can provide some extra optimizations.\n\n`-DEXT_SPEEDTEST=` (BOOL, default = OFF) Enable speed test targets\n\n`-DEXT_DEBUG=` (BOOL, default = OFF) Turn on debug build\n\n`-DEXT_TIME=` (BOOL, default = OFF) Turn on internal timer\n\n`-DEXT_BLAS_LIB=` (STRING, default = \"\") Specify BLAS library, path to BLAS library that should be used\n\n`-DEXT_LAPACK_LIB=` (STRING, default = \"\") Specify LAPACK library, path to LAPACK library that should be used\n\n`-DEXT_OTHER_LIB=` (LIST of STRINGs, default = \"\") Other libraries that should be linked.\n\n`-DEXT_FLAGS=` (LIST of STRINGs, default = \"\") Add preprocessor flags\n\n`-DEXT_BLKL_FLAGS=` (LIST of STRINGs, default = \"\") Black list preprocessor flags (these will not be used)\n\n`-DEXT_AGRS=` (LIST of STRINGs, default = \"\") Add compiler option for agressive optimization\n\n`-DEXT_BLKL_AGRS=` (LIST of STRINGs, default = \"\") Black list compiler flags for aggresive optimization (these will not be used)\n\n`-DEXT_GPUTYPE=` (STRING, default = \"\") Specify gpu type if necessary (compute capability, only for Nvidia GPUs, e.g. cc75, cc80 ...)\n\nHere we provide an example `CMake` command. Let's say we would like to compile only parallel version of TurboRVB without build in DFT code. We would like to use our own OpenBLAS library, turning off internal `_SIMD` but adding flags `_NVTX`, `_DUNREL` and internal timers. There are multiple compilers installed on our system we would like to use nvidia one. The `CMake` command then should look like:\n\n```\ncmake -S. -Bbuild                                   \\\n          -DCMAKE_C_COMPILER=nvc                    \\\n          -DCMAKE_Fortran_COMPILER=nvfortran        \\\n          -DEXT_TIME=ON                             \\\n          -DEXT_DFT=OFF                             \\\n          -DEXT_SERIAL=OFF                          \\\n          -DEXT_BLAS_LIB=/opt/lib/libopenblas.a     \\\n          -DEXT_LAPACK_LIB=/opt/lib/libopenblas.a   \\\n          -DEXT_BLKL_FLAGS=_SIMD                    \\\n          -DEXT_FLAGS=\"_NVTX;_DUNREL\"\n```\n\nThese setting can be changed even after the cmake command was executed. The easiest way to do so is via TUI interface called `ccmake`. One only has to specify build directory:\n\n`ccmake build`\n\nNext we need to compile the code. We recomend to use some implementation of `Make` as a generator. We can report `Ninja` does not work in this case. One can invoke compilation by:\n\n`cmake --build build`\n\nor manually by executing make:\n\n`cd build \u0026\u0026 make VERBOSE=1`\n\nIt is important to note, the parallel make does not work. Successfull compilation can checked by executing `ctest` inside the build directory. If all of the tests pass, one can safely use TurboRVB package.\n\nBy addition one can run `make speed_tests` evaluating speed of TurboRVB package on her/his machine.\n\n## Preprocessor Macros\n\nThis project uses preprocessor macros for configuration. Here are descriptions of each macro and when they should be defined:\n\n- `_CUBLAS`: Define this macro if you plan to use the cuBLAS library for linear algebra operations. Macro `_OFFLOAD` has to be set on as well.\n- `_OFFLOAD`: Define this macro if you want to use OpenMP for offloading computations to another processing unit such as a GPU.\n- `_SIMD`: This macro forces the compiler to use more SIMD (Single Instruction, Multiple Data) instructions for parallel computing. Be cautious with this option as it may not always lead to increased performance and can make the code more complex.\n- `__FFTW`: Define this macro to enable the use of the FFTW library for Fast Fourier Transform computations.\n- `__PORT`: This macro should be defined when compiling with the Nvidia (Portland Group) Fortran compiler.\n- `__AMD`: This macro should be defined when compiling with the AMD compiler collection.\n- `__SCALAPACK`: Define this macro to enable the use of the ScaLAPACK library for linear algebra operations on distributed memory systems. Macro `PARALLEL` has to be set to on as well.\n- `__USE_INTERNAL_FFTW`: This macro is used to switch to the internal FFTW library included with the project. If this macro is defined, the project will ignore system-installed FFTW libraries and use the included one instead.\n- `PARALLEL`: Define this macro to enable compilation of the project's MPI parallelized code. MPI (Message Passing Interface) is a standardized and portable message-passing system designed to function efficiently on a wide variety of parallel computing architectures.\n- `RISC`: This macro should be defined when compiling with the IBM XL compiler.\n\n## Notes \u0026 known compilation issues\n\n1) If present, intel `ifort` compiler with `MKL` should be preferred to gnu `gfortran` compiler with `BLAS` and `LAPACK`, because it has been tested more and yields consistently more reliable and faster binaries.\n\n2) There is an issue with the BLAS `gfortran` with `Mac`, in particular in zaxpy for the complex case. (see also Quantum Espresso documentation)\n\n3) There is an issue with some version of BLAS provided by Accelerate Framework library. If test zdotc will not pas try to add -DEXT_FLAGS=\"_FIXBUG_ZDOTC\", it should fix the problem.\n\n# Running a docker container\n\nBefore you start, make sure Docker is installed and set up on your machine.\n\nYou can run TurboRVB from a Docker container by pulling the following Docker image:\n\n`docker pull addman151/turborvb:latest`\n\nThe Docker container has all the required executables in its `PATH`. You can run them directly, just ensure the working directory is properly mounted and environment variables are set as needed.\n\nIn the commands below:\n\n- The `-i` flag starts the container in interactive mode.\n- The `-e` flag sets an environment variable inside the container. Here `OMP_NUM_THREADS=4` specifies the number of threads that OpenMP should use.\n- The `-v` flag mounts the current directory (as returned by `$(pwd)`) to `/app` inside the container. This allows the container to read and write files from your current directory.\n- The `-w` flag sets the working directory inside the Docker container. Here, it's set to `/app`.\n\nNote: Ensure that the `datasvmc.input` and `prep.input` files are present in your current directory before running the commands.\n\nHere are a few example commands to run TurboRVB:\n\n```\ndocker run -i -e OMP_NUM_THREADS=4 -v \"$(pwd):/app\" -w /app addman151/turborvb:latest turborvb-serial.x \u003c datasvmc.input\ndocker run -i -e OMP_NUM_THREADS=4 -v \"$(pwd):/app\" -w /app addman151/turborvb:latest mpirun -np 2 --oversubscribe turborvb-mpi.x \u003c datasvmc.input\ndocker run -i -e OMP_NUM_THREADS=4 -v \"$(pwd):/app\" -w /app addman151/turborvb:latest prep-serial.x \u003c prep.input\ndocker run -i -e OMP_NUM_THREADS=4 -v \"$(pwd):/app\" -w /app addman151/turborvb:latest mpirun -np 2 --oversubscribe prep-mpi.x \u003c prep.input\n```\n\n# Environmental variable\n\nIn order to run correctly all the tools, you should put in your path the `turborvb/bin` directory of `TurboRVB`;  e.g. by using bash shell you should edit the file `.bashrc` in your home directory and you should add the line:\n\n# Tests of compilation\n\nWe recommend you should run `jobcheck_serial.sh` in `test` directory every time you compile `TurboRVB` on your machine. If you compile `TurboRVB` with the modern `CMake`, you can do a more comprehensive test with the `ctest` command (See the CMake section).\n\n# Manual for users\n\nUser Manual is provided in another project. Visit the [turbotutorials repository](https://github.com/kousuke-nakano/turbotutorials).\n\n# Tutorials for users\n\nTutorials are provided in another project. Visit the [turbotutorials repository](https://github.com/kousuke-nakano/turbotutorials).\n\n# Reference(s)\n\nWhen you publish a paper using `TurboRVB`, please cite the following paper:\n\nK. Nakano et al., \"TurboRVB: A many-body toolkit for ab initio electronic simulations by quantum Monte Carlo\" [**J. Chem. Phys.** 152, 204121 (2020)](https://aip.scitation.org/doi/10.1063/5.0005037).\n\n# Manuals for developers\n\n`TurboRVB` developer manual is automatically generated using [ford](https://forddocs.readthedocs.io/en/latest/index.html). To generate the developer manual, you should install `ford` according to the instruction written in the [website](https://forddocs.readthedocs.io/en/latest/index.html), go to `devel_tools/` directory, and make the document by the command `ford ford_config.md`. All developers should follow the rules written in `devel_tools/rules.md`\n\n# License\n\nAll the material included in this distribution is free software;\nyou can redistribute it and/or modify it under the terms of the GNU\nGeneral Public License as published by the Free Software Foundation;\neither version 3 of the License, or (at your option) any later version.\n\nThese programs are distributed in the hope that they will be useful, but\nWITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY\nor FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License\nfor more details.\n\nYou should have received a copy of the GNU General Public License along\nwith this program; if not, write to the Free Software Foundation, Inc.,\n675 Mass Ave, Cambridge, MA 02139, USA.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsissaschool%2Fturborvb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsissaschool%2Fturborvb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsissaschool%2Fturborvb/lists"}