{"id":16506727,"url":"https://github.com/garrison/vmc","last_synced_at":"2026-06-11T10:31:36.074Z","repository":{"id":66985280,"uuid":"2669531","full_name":"garrison/vmc","owner":"garrison","description":null,"archived":false,"fork":false,"pushed_at":"2014-05-14T22:20:10.000Z","size":2546,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-02-20T06:50:53.771Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/garrison.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-10-29T05:26:08.000Z","updated_at":"2016-01-18T18:36:13.000Z","dependencies_parsed_at":"2023-02-20T16:01:33.379Z","dependency_job_id":null,"html_url":"https://github.com/garrison/vmc","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/garrison/vmc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/garrison%2Fvmc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/garrison%2Fvmc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/garrison%2Fvmc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/garrison%2Fvmc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/garrison","download_url":"https://codeload.github.com/garrison/vmc/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/garrison%2Fvmc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34195112,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-11T02:00:06.485Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-10-11T15:21:37.470Z","updated_at":"2026-06-11T10:31:36.055Z","avatar_url":"https://github.com/garrison.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"vmc\n===\n\nPerforms variational Monte Carlo (VMC) calcuations on lattice systems\nthat are of interest to the authors of this code.\n\nThis package is made up of two distinct components:\n\n* ``vmc-core`` is the heart of the Monte Carlo calculation, and is\n  written in C++ for speed\n\n* ``pyvmc`` is a higher-level package that allows setting up,\n  controlling, and analysis of calculations.  It is written in python\n  for ease-of-programming/use and flexibility, and communicates with\n  the C++ code by using `Cython \u003chttp://cython.org/\u003e`_.\n\nCompiling ``vmc-core``\n----------------------\n\n`premake4 \u003chttp://industriousone.com/premake\u003e`_ is required for the\nbuild.\n\nRequires `boost \u003chttp://www.boost.org/\u003e`_ \u003e= 1.55 (headers only) and\n`eigen3 \u003chttp://eigen.tuxfamily.org/\u003e`_.\n\nTo compile and run (using e.g. ``clang++``)::\n\n    $ cd vmc-core\n    $ premake4 --os=linux gmake \u0026\u0026 CXX=clang++ INCLUDES=\"-I/path/to/eigen3/include -I/path/to/boost/include\" make\n\nRun ``premake4 --help`` for a list of options.  Note that it is possible\nfor premake to hook into a different build system instead of using\n``make``.\n\nThe code should compile on recent versions of ``g++``, ``clang++``,\nand possibly even ``icc``.  We are only targeting compilers that\nsupport C++11.\n\nA sample build script, which compiles both ``vmc-core`` and ``pyvmc``,\nis located at ``./do-build.example``.\n\n``vmc-core`` API documentation\n------------------------------\n\nIf `doxygen \u003chttp://www.doxygen.org/\u003e`_ is installed, ``vmc-core`` API\ndocumentation can be generated by running::\n\n    $ cd vmc-core/\n    $ mkdir -p docs/\n    $ doxygen\n\nAfterwards, HTML documentation will exist at\nvmc-core/docs/generated/html/index.html\n\nIf PDF output is desired, change directory to\nvmc-core/docs/generated/latex/ and run ``make``.\n\n``vmc-core`` tests\n------------------\n\nWe use assertions liberally within ``vmc-core``.  There are some\ntests/assertions that slow the code significantly if enabled.  To run\nwith these tests, compile with the flag ``-DVMC_CAREFUL`` by running::\n\n    $ make config=careful\n\nBe sure to pass all the appropriate environment variables, given above,\nto ``make``.\n\nThere are also some standalone unit tests, built upon the\n``googletest`` framework.  To build and run these tests::\n\n    $ cd unittests/\n    $ premake4 --os=linux gmake \u0026\u0026 INCLUDES=\"-I/path/to/eigen3/include -I/path/to/boost/include\" make \u0026\u0026 ./vmc-core-tests\n\nEventually we should also write a fuzz test for ``CeperleyMatrix``.\n\n``pyvmc``\n---------\n\nDocumentation on performing a simple calculation using ``pyvmc`` is\ncoming soon.\n\nCompiling ``pyvmc``\n-------------------\n\nFirst make sure a recent ``python`` is installed, along with\n``virtualenv``.  (The primary author of this code has been using\nPython 3.3 lately, but the code should still work on Python 2.7.)  The\nfollowing uses ``clang++`` for both compiling (``CC``) and linking\n(``CXX``), and assumes certain (typical) directories for ``boost`` and\n``eigen``.\n\nThe ``pip`` command below compiles all the python dependencies given in\n``requirements.txt``.  Some of these have their own dependencies, which\nmust be installed.\n\n::\n\n    $ virtualenv venv\n    $ source venv/bin/activate\n    $ pip install -r requirements.txt\n    $ CC=clang++ CXX=clang++ python setup.py build_ext -I/usr/include/boost:/usr/include/eigen3 -Lvmc-core --inplace\n\nSometimes you must pass the option ``--force`` to the ``build_ext``\ncommand, since changes to ``vmc-core`` C++ header files are not\nconsidered when determining which ``.pyx`` files to recompile.  In fact,\nif one accelerates compilation using\n`ccache \u003chttp://ccache.samba.org/\u003e`_, then there is little penalty from\nusing ``--force`` all the time, and the compilation is guaranteed to be\ncorrect.\n\n``LD_LIBRARY_PATH``\n-------------------\n\nAfter having followed the instructions above, things will have compiled\nbut the operating system will not know where to look for the\n``vmc-core`` library when python needs to load it.  It can either be\ncopied or symlinked to e.g. ``/usr/local/lib``, or the environment\nvariables can be set so that the library path is searched.  For instance,\nin the ``bash`` shell on Linux::\n\n    $ export LD_LIBRARY_PATH=/path/to/vmc/vmc-core\n\nOn Mac OS X, this variable is called ``DYLD_LIBRARY_PATH`` instead.\n\nIt is recommended to construct two scripts, one for building and one for\nexecuting python, to cut down on the effort needed to build and run\nthings.  Otherwise, the environment variables and commands can get out of\nhand.\n\n``pyvmc`` tests\n---------------\n\n``py.test`` is used to perform unit tests of ``pyvmc``::\n\n    $ PYTHONPATH=. py.test pyvmc\n\nThere are also Monte Carlo tests that use both ``pyvmc`` and\n``vmc-core`` to perform calculations and compare to previous (or known)\nquantities.  These are located in ``pyvmc/mc_tests/`` and can be executed\nby running::\n\n    $ python pyvmc/mc_tests/__init__.py\n\nCaveats\n-------\n\nOnly wavefunctions whose (slave) particles obey Pauli exclusion are\ncurrently supported (i.e. fermions and hard-core bosons).\n\nOnly wavefunctions with a definite particle number are supported.\n\nAlso, only wavefunctions that have a definite :math:`S_z` are supported.\nOtherwise, it is not entirely accurate to think of spin-up and spin-down\nparticles as separate species (as the code does), since annihilation\noperators anticommute even if the spins of the two operators are\ndifferent.\n\nAnother way of phrasing the above two requirements is that moves and\noperators must consist only of SiteHop's.\n\nWays in which things are currently in flux\n------------------------------------------\n\nAt the moment the following things are broken:\n\n* Renyi stuff uses only single particle moves, even on wavefunctions\n  where that doesn't work well.\n\n* Projected Fermi sea does not yet use multi-particle moves so does not\n  work at half filling.\n\n* Non-Bravais lattices have never been tested.\n\n* Cylindrical boundary conditions have not yet been fully tested.\n\nResearch based on results of this code\n--------------------------------------\n\n* “Non-Fermi-liquid d-wave metal phase of strongly interacting\n  electrons,” Hong-Chen Jiang, Matthew S. Block, Ryan V. Mishmash,\n  James R. Garrison, D. N. Sheng, Olexei I. Motrunich and Matthew P. A.\n  Fisher, Nature 493, 39-44 (2013)\n  [`arXiv:1207.6608 \u003chttp://arxiv.org/abs/1207.6608\u003e`_].  (used for\n  Renyi entropy calculations)\n\n* “Theory of a competitive spin liquid state for |κ-(BEDT-TTF)2Cu2(CN)3|\n  and |EtMe3Sb[Pd(dmit)2]2|,” Ryan V. Mishmash, James R. Garrison,\n  Samuel Bieri and Cenke Xu\n  [`arXiv:1307.0829 \u003chttp://arxiv.org/abs/1307.0829\u003e`_].  (used for\n  roughly half of the VMC calculations)\n\n.. |κ-(BEDT-TTF)2Cu2(CN)3| replace:: κ-(BEDT-TTF)\\ :sub:`2`\\ Cu\\ :sub:`2`\\ (CN)\\ :sub:`3`\n.. |EtMe3Sb[Pd(dmit)2]2| replace:: EtMe\\ :sub:`3`\\ Sb[Pd(dmit)\\ :sub:`2`\\ ]\\ :sub:`2`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgarrison%2Fvmc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgarrison%2Fvmc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgarrison%2Fvmc/lists"}