jqmc 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (245) hide show
  1. jqmc-0.1.0/.devcontainer/Dockerfile +34 -0
  2. jqmc-0.1.0/.devcontainer/devcontainer.json +23 -0
  3. jqmc-0.1.0/.github/CODEOWNERS +3 -0
  4. jqmc-0.1.0/.github/workflows/jqmc-deploy-gh-pages.yml +55 -0
  5. jqmc-0.1.0/.github/workflows/jqmc-deploy-test.yml +38 -0
  6. jqmc-0.1.0/.github/workflows/jqmc-deploy.yml +110 -0
  7. jqmc-0.1.0/.github/workflows/jqmc-run-full-pytest.yml +98 -0
  8. jqmc-0.1.0/.github/workflows/jqmc-run-short-pytest.yml +71 -0
  9. jqmc-0.1.0/.gitignore +166 -0
  10. jqmc-0.1.0/.pre-commit-config.yaml +16 -0
  11. jqmc-0.1.0/.vscode/settings.json +16 -0
  12. jqmc-0.1.0/CONTRIBUTING.md +80 -0
  13. jqmc-0.1.0/LICENSE +28 -0
  14. jqmc-0.1.0/PKG-INFO +233 -0
  15. jqmc-0.1.0/README.md +193 -0
  16. jqmc-0.1.0/__init__.py +0 -0
  17. jqmc-0.1.0/benchmarks/benchmark_atomic_orbitals.py +245 -0
  18. jqmc-0.1.0/benchmarks/benchmark_gfmc_tmove_components.py +266 -0
  19. jqmc-0.1.0/benchmarks/benchmark_jastrow.py +240 -0
  20. jqmc-0.1.0/benchmarks/benchmark_kinetic_energy.py +195 -0
  21. jqmc-0.1.0/benchmarks/benchmark_local_energy.py +92 -0
  22. jqmc-0.1.0/benchmarks/benchmark_projection_n_hotspots.py +216 -0
  23. jqmc-0.1.0/benchmarks/benchmark_ratio_determinant.py +192 -0
  24. jqmc-0.1.0/benchmarks/benchmark_ratio_jastrow.py +186 -0
  25. jqmc-0.1.0/benchmarks/water_ccecp_ccpvqz.h5 +0 -0
  26. jqmc-0.1.0/doc/Makefile +31 -0
  27. jqmc-0.1.0/doc/README.md +20 -0
  28. jqmc-0.1.0/doc/UML.pu +186 -0
  29. jqmc-0.1.0/doc/_static/logo_yoko2.jpg +0 -0
  30. jqmc-0.1.0/doc/api_reference_cli.md +127 -0
  31. jqmc-0.1.0/doc/api_reference_cli_tool.md +169 -0
  32. jqmc-0.1.0/doc/changelog.md +74 -0
  33. jqmc-0.1.0/doc/citation.md +42 -0
  34. jqmc-0.1.0/doc/conf.py +301 -0
  35. jqmc-0.1.0/doc/examples.md +12 -0
  36. jqmc-0.1.0/doc/index.md +44 -0
  37. jqmc-0.1.0/doc/install.md +5 -0
  38. jqmc-0.1.0/doc/notes/ao.md +384 -0
  39. jqmc-0.1.0/doc/notes/jax.md +11 -0
  40. jqmc-0.1.0/doc/notes/lrdmc.md +29 -0
  41. jqmc-0.1.0/doc/notes/paulinet_rbf_plot.py +57 -0
  42. jqmc-0.1.0/doc/notes/technical_notes.md +13 -0
  43. jqmc-0.1.0/doc/notes/trexio.md +83 -0
  44. jqmc-0.1.0/doc/notes/vmc.md +132 -0
  45. jqmc-0.1.0/doc/notes/wavefunction.md +567 -0
  46. jqmc-0.1.0/doc/overview.md +13 -0
  47. jqmc-0.1.0/doc/reference.md +27 -0
  48. jqmc-0.1.0/doc/workflows.key +0 -0
  49. jqmc-0.1.0/examples/README.md +49 -0
  50. jqmc-0.1.0/examples/example01/01DFT/01pyscf-forge/run_pyscf.py +27 -0
  51. jqmc-0.1.0/examples/example01/01DFT/02cp2k/basis.cp2k +62 -0
  52. jqmc-0.1.0/examples/example01/01DFT/02cp2k/ecp.cp2k +20 -0
  53. jqmc-0.1.0/examples/example01/01DFT/02cp2k/water.xyz +5 -0
  54. jqmc-0.1.0/examples/example01/01DFT/02cp2k/water_ccecp_ccpvtz.inp +104 -0
  55. jqmc-0.1.0/examples/example01/03vmc_JSD/vmc.jpg +0 -0
  56. jqmc-0.1.0/examples/example01/03vmc_JSD/vmc.toml +25 -0
  57. jqmc-0.1.0/examples/example01/04mcmc_JSD/mcmc.toml +16 -0
  58. jqmc-0.1.0/examples/example01/05lrdmc_JSD/lrdmc.toml +19 -0
  59. jqmc-0.1.0/examples/example01/05lrdmc_JSD/lrdmc_ext.jpg +0 -0
  60. jqmc-0.1.0/examples/example01/README.md +548 -0
  61. jqmc-0.1.0/examples/example02/01water_jqmc/hamiltonian_data.chk +0 -0
  62. jqmc-0.1.0/examples/example02/01water_jqmc/lrdmc.toml +19 -0
  63. jqmc-0.1.0/examples/example02/01water_jqmc/vmc.toml +15 -0
  64. jqmc-0.1.0/examples/example02/02water_dimer_jqmc/hamiltonian_data.chk +0 -0
  65. jqmc-0.1.0/examples/example02/02water_dimer_jqmc/lrdmc.toml +19 -0
  66. jqmc-0.1.0/examples/example02/02water_dimer_jqmc/vmc.toml +15 -0
  67. jqmc-0.1.0/examples/example02/03benzene_jqmc/hamiltonian_data.chk +0 -0
  68. jqmc-0.1.0/examples/example02/03benzene_jqmc/lrdmc.toml +19 -0
  69. jqmc-0.1.0/examples/example02/03benzene_jqmc/vmc.toml +15 -0
  70. jqmc-0.1.0/examples/example02/04benzene_dimer_jqmc/lrdmc.toml +19 -0
  71. jqmc-0.1.0/examples/example02/04benzene_dimer_jqmc/vmc.toml +15 -0
  72. jqmc-0.1.0/examples/example02/README.md +44 -0
  73. jqmc-0.1.0/examples/example02/jqmc_LRDMC_vectorization_benchmark.jpg +0 -0
  74. jqmc-0.1.0/examples/example02/jqmc_MCMC_vectorization_benchmark.jpg +0 -0
  75. jqmc-0.1.0/examples/example02/plot_summary.ipynb +478 -0
  76. jqmc-0.1.0/examples/example03/README.md +15 -0
  77. jqmc-0.1.0/examples/example03/jqmc_validation_water_methane.jpg +0 -0
  78. jqmc-0.1.0/examples/example03/plot_summary.ipynb +1181 -0
  79. jqmc-0.1.0/examples/example04/Ar_pGTOs_RHF/run_pyscf.py +25 -0
  80. jqmc-0.1.0/examples/example04/Ar_pGTOs_RHF/vmc.toml +17 -0
  81. jqmc-0.1.0/examples/example04/Ar_sGTOs_RHF/run_pyscf.py +25 -0
  82. jqmc-0.1.0/examples/example04/Ar_sGTOs_RHF/vmc.toml +17 -0
  83. jqmc-0.1.0/examples/example04/N_pGTOs_ROHF/run_pyscf.py +25 -0
  84. jqmc-0.1.0/examples/example04/N_pGTOs_ROHF/vmc.toml +17 -0
  85. jqmc-0.1.0/examples/example04/N_pGTOs_UHF/run_pyscf.py +25 -0
  86. jqmc-0.1.0/examples/example04/N_pGTOs_UHF/vmc.toml +17 -0
  87. jqmc-0.1.0/examples/example04/N_sGTOs_ROHF/run_pyscf.py +25 -0
  88. jqmc-0.1.0/examples/example04/N_sGTOs_ROHF/vmc.toml +17 -0
  89. jqmc-0.1.0/examples/example04/N_sGTOs_UHF/run_pyscf.py +25 -0
  90. jqmc-0.1.0/examples/example04/N_sGTOs_UHF/vmc.toml +17 -0
  91. jqmc-0.1.0/examples/example04/O2_pGTOs_ROHF/run_pyscf.py +26 -0
  92. jqmc-0.1.0/examples/example04/O2_pGTOs_ROHF/vmc.toml +17 -0
  93. jqmc-0.1.0/examples/example04/O2_pGTOs_UHF/run_pyscf.py +26 -0
  94. jqmc-0.1.0/examples/example04/O2_pGTOs_UHF/vmc.toml +17 -0
  95. jqmc-0.1.0/examples/example04/O2_sGTOs_ROHF/run_pyscf.py +26 -0
  96. jqmc-0.1.0/examples/example04/O2_sGTOs_ROHF/vmc.toml +17 -0
  97. jqmc-0.1.0/examples/example04/O2_sGTOs_UHF/run_pyscf.py +26 -0
  98. jqmc-0.1.0/examples/example04/O2_sGTOs_UHF/vmc.toml +17 -0
  99. jqmc-0.1.0/examples/example04/README.md +105 -0
  100. jqmc-0.1.0/examples/example04/water_pGTOs_RHF/run_pyscf.py +27 -0
  101. jqmc-0.1.0/examples/example04/water_pGTOs_RHF/vmc.toml +17 -0
  102. jqmc-0.1.0/examples/example04/water_sGTOs_RHF/run_pyscf.py +27 -0
  103. jqmc-0.1.0/examples/example04/water_sGTOs_RHF/vmc.toml +17 -0
  104. jqmc-0.1.0/examples/example05/H2/H2_PES_mcmc.jpg +0 -0
  105. jqmc-0.1.0/examples/example05/H2/R_0.74/01trialWF_DFT/run_pyscf.py +28 -0
  106. jqmc-0.1.0/examples/example05/H2/R_0.74/03vmcopt_JSD/vmcopt.toml +24 -0
  107. jqmc-0.1.0/examples/example05/H2/R_0.74/04vmc_JSD/vmc.toml +18 -0
  108. jqmc-0.1.0/examples/example05/H2/R_0.74/05lrdmc_JSD/lrdmc.toml +20 -0
  109. jqmc-0.1.0/examples/example05/H2/R_0.74/07vmcopt_JAGP/vmcopt.toml +24 -0
  110. jqmc-0.1.0/examples/example05/H2/R_0.74/08vmc_JAGP/vmc.toml +18 -0
  111. jqmc-0.1.0/examples/example05/H2/R_0.74/09lrdmc_JAGP/lrdmc.toml +20 -0
  112. jqmc-0.1.0/examples/example05/H2/plot.ipynb +1318 -0
  113. jqmc-0.1.0/examples/example05/README.md +474 -0
  114. jqmc-0.1.0/examples/example06/03_S22_water_dimer/03vmc_JSD/vmc_JSD.jpg +0 -0
  115. jqmc-0.1.0/examples/example06/03_S22_water_dimer/07vmc_JAGP/vmc_JAGP.jpg +0 -0
  116. jqmc-0.1.0/examples/example06/README.md +499 -0
  117. jqmc-0.1.0/examples/example07/README.md +72 -0
  118. jqmc-0.1.0/examples/example07/jqmc_tau_nbra_comparison_benzene_on_gpu_leonardo.jpg +0 -0
  119. jqmc-0.1.0/examples/example07/jqmc_tau_nbra_comparison_benzene_on_gpu_miyabi.jpg +0 -0
  120. jqmc-0.1.0/examples/example07/jqmc_weak_scaling_benzene_on_gpu.jpg +0 -0
  121. jqmc-0.1.0/examples/example07/plot_summary.ipynb +596 -0
  122. jqmc-0.1.0/examples/example07/template/hamiltonian_data.chk +0 -0
  123. jqmc-0.1.0/examples/example07/template/lrdmc.toml +19 -0
  124. jqmc-0.1.0/examples/example07/template/lrdmc_tau.toml +18 -0
  125. jqmc-0.1.0/examples/example07/template/vmc.toml +15 -0
  126. jqmc-0.1.0/examples/example08/how_to_use_modules.ipynb +1687 -0
  127. jqmc-0.1.0/examples/example09/01DFT/run_pyscf.py +27 -0
  128. jqmc-0.1.0/examples/example09/03vmc_JNNSD/vmc.jpg +0 -0
  129. jqmc-0.1.0/examples/example09/03vmc_JNNSD/vmc.toml +26 -0
  130. jqmc-0.1.0/examples/example09/04mcmc_JNNSD/mcmc.toml +17 -0
  131. jqmc-0.1.0/examples/example09/README.md +209 -0
  132. jqmc-0.1.0/examples/example10/README.md +83 -0
  133. jqmc-0.1.0/examples/example10/run_jqmc.py +198 -0
  134. jqmc-0.1.0/examples/example10/run_pyscf.py +27 -0
  135. jqmc-0.1.0/examples/example11/README.md +83 -0
  136. jqmc-0.1.0/examples/example11/run_jqmc_mpi.py +218 -0
  137. jqmc-0.1.0/examples/example11/run_pyscf.py +27 -0
  138. jqmc-0.1.0/examples/sync_examples.py +72 -0
  139. jqmc-0.1.0/jqmc/__init__.py +0 -0
  140. jqmc-0.1.0/jqmc/_version.py +34 -0
  141. jqmc-0.1.0/jqmc/atomic_orbital.py +2744 -0
  142. jqmc-0.1.0/jqmc/coulomb_potential.py +2473 -0
  143. jqmc-0.1.0/jqmc/determinant.py +1872 -0
  144. jqmc-0.1.0/jqmc/diff_mask.py +115 -0
  145. jqmc-0.1.0/jqmc/function_collections.py +133 -0
  146. jqmc-0.1.0/jqmc/hamiltonians.py +483 -0
  147. jqmc-0.1.0/jqmc/header_footer.py +81 -0
  148. jqmc-0.1.0/jqmc/jastrow_factor.py +3482 -0
  149. jqmc-0.1.0/jqmc/jqmc_cli.py +688 -0
  150. jqmc-0.1.0/jqmc/jqmc_gfmc.py +6093 -0
  151. jqmc-0.1.0/jqmc/jqmc_mcmc.py +3595 -0
  152. jqmc-0.1.0/jqmc/jqmc_miscs.py +163 -0
  153. jqmc-0.1.0/jqmc/jqmc_tool.py +1182 -0
  154. jqmc-0.1.0/jqmc/jqmc_utility.py +820 -0
  155. jqmc-0.1.0/jqmc/molecular_orbital.py +387 -0
  156. jqmc-0.1.0/jqmc/obsolete/lrdmc_serial.py +1047 -0
  157. jqmc-0.1.0/jqmc/obsolete/lrdmc_vectorized.py +1072 -0
  158. jqmc-0.1.0/jqmc/obsolete/lrdmc_vectorized_fixed_projection_time.py +1220 -0
  159. jqmc-0.1.0/jqmc/obsolete/qmc_kernel.py +7027 -0
  160. jqmc-0.1.0/jqmc/obsolete/vmc_serial.py +1472 -0
  161. jqmc-0.1.0/jqmc/obsolete/vmc_vectorized.py +1976 -0
  162. jqmc-0.1.0/jqmc/setting.py +72 -0
  163. jqmc-0.1.0/jqmc/structure.py +464 -0
  164. jqmc-0.1.0/jqmc/swct.py +252 -0
  165. jqmc-0.1.0/jqmc/trexio_wrapper.py +785 -0
  166. jqmc-0.1.0/jqmc/wavefunction.py +1215 -0
  167. jqmc-0.1.0/jqmc.egg-info/PKG-INFO +233 -0
  168. jqmc-0.1.0/jqmc.egg-info/SOURCES.txt +244 -0
  169. jqmc-0.1.0/jqmc.egg-info/dependency_links.txt +1 -0
  170. jqmc-0.1.0/jqmc.egg-info/entry_points.txt +3 -0
  171. jqmc-0.1.0/jqmc.egg-info/requires.txt +19 -0
  172. jqmc-0.1.0/jqmc.egg-info/top_level.txt +1 -0
  173. jqmc-0.1.0/logo/logo_tate.jpg +0 -0
  174. jqmc-0.1.0/logo/logo_yoko1.jpg +0 -0
  175. jqmc-0.1.0/logo/logo_yoko2.jpg +0 -0
  176. jqmc-0.1.0/prototypes/basis_set.py +1099 -0
  177. jqmc-0.1.0/prototypes/benchmark_jax_code_AOs.py +126 -0
  178. jqmc-0.1.0/prototypes/benchmark_jax_code_GTOs.py +96 -0
  179. jqmc-0.1.0/prototypes/benchmark_jax_code_MOs.py +83 -0
  180. jqmc-0.1.0/prototypes/benchmark_jax_code_comput_G_eq.py +118 -0
  181. jqmc-0.1.0/prototypes/benchmark_jax_code_coulomb.py +105 -0
  182. jqmc-0.1.0/prototypes/benchmark_jax_code_discretized_kinetic_part.py +261 -0
  183. jqmc-0.1.0/prototypes/benchmark_jax_code_geminal.py +155 -0
  184. jqmc-0.1.0/prototypes/benchmark_jax_code_kinetic_energy.py +66 -0
  185. jqmc-0.1.0/prototypes/benchmark_jax_code_local_energy.py +66 -0
  186. jqmc-0.1.0/prototypes/benchmark_jax_code_max_min.py +67 -0
  187. jqmc-0.1.0/prototypes/block_diagonal_matrix.py +66 -0
  188. jqmc-0.1.0/prototypes/check_tensor_board.py +7 -0
  189. jqmc-0.1.0/prototypes/ecp.py +722 -0
  190. jqmc-0.1.0/prototypes/hamiltonian_data.chk +0 -0
  191. jqmc-0.1.0/prototypes/hamiltonian_data_water.chk +0 -0
  192. jqmc-0.1.0/prototypes/jax_vmap.py +35 -0
  193. jqmc-0.1.0/prototypes/pseudo_jax_code_1.py +100 -0
  194. jqmc-0.1.0/prototypes/pseudo_jax_code_2.py +275 -0
  195. jqmc-0.1.0/prototypes/vmc_vmap.py +225 -0
  196. jqmc-0.1.0/prototypes/water_ccpvtz_trexio.hdf5 +0 -0
  197. jqmc-0.1.0/pyproject.toml +23 -0
  198. jqmc-0.1.0/setup.cfg +53 -0
  199. jqmc-0.1.0/setup.py +6 -0
  200. jqmc-0.1.0/tests/__init__.py +0 -0
  201. jqmc-0.1.0/tests/check_jastrow_from_hamiltonian.py +174 -0
  202. jqmc-0.1.0/tests/conftest.py +39 -0
  203. jqmc-0.1.0/tests/test_AOs.py +1111 -0
  204. jqmc-0.1.0/tests/test_MOs.py +688 -0
  205. jqmc-0.1.0/tests/test_comparison_with_turborvb_AE.py +248 -0
  206. jqmc-0.1.0/tests/test_comparison_with_turborvb_ECP.py +877 -0
  207. jqmc-0.1.0/tests/test_determinant.py +1066 -0
  208. jqmc-0.1.0/tests/test_ecps.py +824 -0
  209. jqmc-0.1.0/tests/test_hamiltonian.py +199 -0
  210. jqmc-0.1.0/tests/test_jastrow.py +1402 -0
  211. jqmc-0.1.0/tests/test_jqmc_command_lines.py +303 -0
  212. jqmc-0.1.0/tests/test_jqmc_gfmc_bra.py +348 -0
  213. jqmc-0.1.0/tests/test_jqmc_gfmc_tau.py +312 -0
  214. jqmc-0.1.0/tests/test_jqmc_mcmc.py +433 -0
  215. jqmc-0.1.0/tests/test_jqmc_tool.py +272 -0
  216. jqmc-0.1.0/tests/test_lrdmc_force.py +228 -0
  217. jqmc-0.1.0/tests/test_structure.py +147 -0
  218. jqmc-0.1.0/tests/test_swct.py +113 -0
  219. jqmc-0.1.0/tests/test_trexio.py +84 -0
  220. jqmc-0.1.0/tests/test_vmc_force.py +225 -0
  221. jqmc-0.1.0/tests/test_wave_function.py +482 -0
  222. jqmc-0.1.0/tests/trexio_example_files/Cl2_ecp_ccpvtz_cart.h5 +0 -0
  223. jqmc-0.1.0/tests/trexio_example_files/CuBr_ecp_ccpvtz_cart.h5 +0 -0
  224. jqmc-0.1.0/tests/trexio_example_files/H2_ae_ccpvdz_cart.h5 +0 -0
  225. jqmc-0.1.0/tests/trexio_example_files/H2_ae_ccpvqz.h5 +0 -0
  226. jqmc-0.1.0/tests/trexio_example_files/H2_ae_ccpvtz_cart.h5 +0 -0
  227. jqmc-0.1.0/tests/trexio_example_files/H2_ecp_ccpvdz_cart.h5 +0 -0
  228. jqmc-0.1.0/tests/trexio_example_files/H2_ecp_ccpvtz.h5 +0 -0
  229. jqmc-0.1.0/tests/trexio_example_files/H2_ecp_ccpvtz_cart.h5 +0 -0
  230. jqmc-0.1.0/tests/trexio_example_files/H_ecp_ccpvdz_cart.h5 +0 -0
  231. jqmc-0.1.0/tests/trexio_example_files/H_ecp_ccpvqz.h5 +0 -0
  232. jqmc-0.1.0/tests/trexio_example_files/N2_ecp_ccpvtz_cart.h5 +0 -0
  233. jqmc-0.1.0/tests/trexio_example_files/Ti2_ecp_ccpvtz_cart.h5 +0 -0
  234. jqmc-0.1.0/tests/trexio_example_files/jastrow_data_w_1b_2b_1b3b_ae.pkl +0 -0
  235. jqmc-0.1.0/tests/trexio_example_files/jastrow_data_w_2b_1b3b_w_ecp.pkl +0 -0
  236. jqmc-0.1.0/tests/trexio_example_files/jastrow_data_w_2b_3b_w_ecp.pkl +0 -0
  237. jqmc-0.1.0/tests/trexio_example_files/read_jastrow_factor_from_turbo_wf.py +214 -0
  238. jqmc-0.1.0/tests/trexio_example_files/run_pyscf.py +63 -0
  239. jqmc-0.1.0/tests/trexio_example_files/turborvb_WF_w_1b_2b_1b3b_ae.txt +130 -0
  240. jqmc-0.1.0/tests/trexio_example_files/turborvb_WF_w_2b_1b3b_w_ecp.txt +908 -0
  241. jqmc-0.1.0/tests/trexio_example_files/turborvb_WF_w_2b_3b_w_ecp.txt +908 -0
  242. jqmc-0.1.0/tests/trexio_example_files/water_ccecp_ccpvqz.h5 +0 -0
  243. jqmc-0.1.0/tools/_read_from_turbo_wf_and_ecp.py +255 -0
  244. jqmc-0.1.0/tools/read_Jastrow_factor_from_turbo_wf.py +169 -0
  245. jqmc-0.1.0/tools/write_Jastrow_factor_to_jqmc_wf.py +80 -0
@@ -0,0 +1,34 @@
1
+ # base image
2
+ FROM ubuntu:22.04
3
+
4
+ # installing fundamental packages
5
+ RUN apt-get update && apt-get install -y \
6
+ vim \
7
+ build-essential \
8
+ cmake \
9
+ gfortran \
10
+ python3 \
11
+ python3-pip \
12
+ python3-venv \
13
+ mpich \
14
+ git \
15
+ && apt-get clean \
16
+ && rm -rf /var/lib/apt/lists/*
17
+
18
+ # Python setting
19
+ RUN python3 -m pip install --upgrade pip
20
+
21
+ # setting a user
22
+ ARG USERNAME=kosuke
23
+ ARG USER_UID=1000
24
+ ARG USER_GID=$USER_UID
25
+
26
+ # creating the user
27
+ RUN groupadd --gid $USER_GID $USERNAME \
28
+ && useradd --uid $USER_UID --gid $USER_GID -m $USERNAME
29
+
30
+ # switch to the created user
31
+ USER $USERNAME
32
+
33
+ # ADD a path for local pip installations
34
+ RUN echo "export PATH=$PATH:/home/$USERNAME/.local/bin" >> ~/.bashrc
@@ -0,0 +1,23 @@
1
+ {
2
+ "name": "Python MPI Environment",
3
+ "dockerFile": "Dockerfile",
4
+ "context": ".",
5
+ "customizations": {
6
+ "vscode": {
7
+ "settings": {
8
+ "terminal.integrated.defaultProfile.linux": "bash",
9
+ "editor.formatOnSave": true
10
+ },
11
+ "extensions": [
12
+ "ms-python.python",
13
+ "ms-vscode.cpptools",
14
+ "twxs.cmake"
15
+ ]
16
+ }
17
+ },
18
+ "forwardPorts": [
19
+ 8888
20
+ ],
21
+ "remoteUser": "kosuke",
22
+ "postCreateCommand": "pip install -e ."
23
+ }
@@ -0,0 +1,3 @@
1
+ # These owners are the default owners for everything in
2
+ # the repo. Unless a later match takes precedence,
3
+ * @kousuke-nakano
@@ -0,0 +1,55 @@
1
+ name: publish jqmc gh-pages
2
+
3
+ on:
4
+ push:
5
+ branches: [rc-gh-pages]
6
+
7
+ permissions:
8
+ contents: write
9
+
10
+ jobs:
11
+ docs:
12
+ runs-on: ubuntu-latest
13
+ defaults:
14
+ run:
15
+ shell: bash -l {0}
16
+
17
+ steps:
18
+ - name: Install gfortran and gcc
19
+ run: |
20
+ sudo apt-get update
21
+ sudo apt-get install gfortran
22
+
23
+ - name: Install OpenBLAS and LAPACK
24
+ run: sudo apt-get install libopenblas-dev liblapack-dev
25
+
26
+ - name: Install OpenMPI
27
+ run: sudo apt-get install openmpi-bin libopenmpi-dev
28
+
29
+ - uses: actions/checkout@v4
30
+
31
+ - uses: conda-incubator/setup-miniconda@v2
32
+ with:
33
+ auto-update-conda: true
34
+ channels: conda-forge
35
+ channel-priority: strict
36
+ python-version: 3.11
37
+ activate-environment: rc-gh-pages
38
+
39
+ - name: Install dependencies
40
+ shell: bash -l {0}
41
+ run: |
42
+ conda install -y -c conda-forge sphinx-book-theme linkify-it-py myst-parser sphinxcontrib-bibtex ipython pip
43
+ python -m pip install -e .
44
+
45
+ - name: Build
46
+ shell: bash -l {0}
47
+ run: |
48
+ make -C doc html
49
+
50
+ - name: Deploy docs at develop branch
51
+ if: ${{ github.ref == 'refs/heads/rc-gh-pages' }}
52
+ uses: peaceiris/actions-gh-pages@v3
53
+ with:
54
+ github_token: ${{ secrets.GITHUB_TOKEN }}
55
+ publish_dir: ./docs_build
@@ -0,0 +1,38 @@
1
+ name: Publish jQMC distributions to test-PyPI
2
+ on:
3
+ push:
4
+ branches: [ "rc" ]
5
+
6
+ jobs:
7
+ deploy-test-pypi:
8
+ if: github.repository == 'kousuke-nakano/jQMC'
9
+
10
+ runs-on: ubuntu-latest
11
+
12
+ permissions:
13
+ contents: read
14
+ id-token: write
15
+
16
+ steps:
17
+ - uses: actions/checkout@v3
18
+ with:
19
+ fetch-depth: 0
20
+
21
+ - name: Set up Python 3.11
22
+ uses: actions/setup-python@v3
23
+ with:
24
+ python-version: '3.11'
25
+
26
+ - name: Install pypa/build
27
+ run: |
28
+ python -m pip install --upgrade pip
29
+ python -m pip install setuptools setuptools_scm wheel
30
+ python setup.py sdist bdist_wheel
31
+
32
+ - name: Publish distribution to Test PyPI
33
+ uses: pypa/gh-action-pypi-publish@release/v1
34
+ with:
35
+ user: __token__
36
+ password: ${{ secrets.TEST_PYPI_JQMC_TOKEN }}
37
+ repository-url: https://test.pypi.org/legacy/
38
+ verbose: true
@@ -0,0 +1,110 @@
1
+ name: Publish jQMC distributions to PyPI
2
+
3
+ # Trigger only when tags that start with "v" are pushed (e.g., v0.1.0)
4
+ on:
5
+ push:
6
+ tags:
7
+ - 'v*'
8
+
9
+ jobs:
10
+ # validate tag
11
+ validate_tag:
12
+ # Run only if this repository is rc
13
+ if: startsWith(github.ref, 'refs/tags/v') && github.repository == 'kousuke-nakano/jQMC'
14
+ runs-on: ubuntu-latest
15
+ steps:
16
+ # Check out the repository
17
+ - uses: actions/checkout@v4
18
+ with:
19
+ fetch-depth: 0
20
+
21
+ # Set up Python to run the validator
22
+ - name: Set up Python
23
+ uses: actions/setup-python@v5
24
+ with:
25
+ python-version: '3.11'
26
+
27
+ # Install dependencies for version validation
28
+ - name: Install validator deps
29
+ run: python -m pip install --upgrade pip packaging
30
+
31
+ - name: tag must be on rc
32
+ shell: bash
33
+ run: |
34
+ git fetch origin rc
35
+ if git merge-base --is-ancestor "$GITHUB_SHA" origin/rc; then
36
+ echo "Tag is on rc."
37
+ else
38
+ echo "Tag is not on rc."
39
+ exit 1
40
+ fi
41
+
42
+ # Extract TAG and strip the leading "v" for PEP 440 validation
43
+ - name: Extract TAG and VERSION
44
+ shell: bash
45
+ run: |
46
+ TAG="${GITHUB_REF_NAME:-$(git describe --tags --abbrev=0 || true)}"
47
+ if [ -z "$TAG" ]; then
48
+ echo "This run is not on a tag. Aborting."
49
+ exit 1
50
+ fi
51
+ if [[ ! "$TAG" =~ ^v[^.] ]]; then
52
+ echo "Tag must start with 'v' and not 'v.' (got: $TAG)"
53
+ exit 1
54
+ fi
55
+ echo "TAG=$TAG" >> $GITHUB_ENV
56
+ echo "VERSION=${TAG#v}" >> $GITHUB_ENV
57
+
58
+ # Validate against PEP 440 and enforce canonical form (e.g., v1.0rc1 not v1.0RC1)
59
+ - name: Validate tag against PEP 440 (canonical)
60
+ run: |
61
+ python - <<'PY'
62
+ import os, sys
63
+ from packaging.version import Version, InvalidVersion
64
+
65
+ tag = os.environ["TAG"]
66
+ ver = os.environ["VERSION"]
67
+
68
+ try:
69
+ parsed = Version(ver)
70
+ except InvalidVersion as e:
71
+ print(f"Invalid PEP 440 version in tag '{tag}': {e}")
72
+ sys.exit(1)
73
+
74
+ canonical = 'v' + parsed.public
75
+ if tag != canonical:
76
+ print(f"Tag '{tag}' is valid but not canonical. Expected '{canonical}'.")
77
+ sys.exit(1)
78
+
79
+ print(f"Tag '{tag}' OK (PEP 440 canonical).")
80
+ PY
81
+
82
+ # deploy
83
+ deploy-pypi:
84
+ # Run only if this repository is rc
85
+ needs: validate_tag
86
+ if: startsWith(github.ref, 'refs/tags/v') && github.repository == 'kousuke-nakano/jQMC'
87
+ runs-on: ubuntu-latest
88
+ steps:
89
+ - uses: actions/checkout@v3
90
+ with:
91
+ fetch-depth: 0
92
+
93
+ - name: Set up Python 3.11
94
+ uses: actions/setup-python@v3
95
+ with:
96
+ python-version: '3.11'
97
+
98
+ - name: Install pypa/build
99
+ run: |
100
+ python -m pip install --upgrade pip
101
+ python -m pip install setuptools setuptools_scm wheel
102
+ python setup.py sdist bdist_wheel
103
+
104
+ - name: Publish distribution to PyPI
105
+ if: startsWith(github.ref, 'refs/tags/v')
106
+ uses: pypa/gh-action-pypi-publish@release/v1
107
+ with:
108
+ user: __token__
109
+ password: ${{ secrets.PYPI_JQMC_TOKEN }}
110
+ verbose: true
@@ -0,0 +1,98 @@
1
+ # A full test of jqmc.
2
+
3
+ name: jqmc full test
4
+
5
+ on:
6
+ push:
7
+ branches: [ "main", "rc" ]
8
+ paths-ignore:
9
+ - '.gitignore'
10
+ - '.github/**'
11
+ - 'doc/**'
12
+ - 'examples/**'
13
+ - 'README.md'
14
+ - '.pre-commit-config.yaml'
15
+ pull_request:
16
+ branches: [ "main", "rc" ]
17
+
18
+ jobs:
19
+ run:
20
+ runs-on: ubuntu-latest
21
+ strategy:
22
+ fail-fast: false
23
+ matrix:
24
+ python-version: ["3.10", "3.11", "3.12"]
25
+
26
+ steps:
27
+ - name: Install gfortran and gcc
28
+ run: |
29
+ sudo apt-get update
30
+ sudo apt-get install gfortran
31
+
32
+ - name: Install OpenBLAS and LAPACK
33
+ run: sudo apt-get install libopenblas-dev liblapack-dev
34
+
35
+ - name: Install OpenMPI
36
+ run: sudo apt-get install openmpi-bin libopenmpi-dev
37
+
38
+ - uses: actions/checkout@v3
39
+
40
+ - name: Set up Python ${{ matrix.python-version }}
41
+ uses: actions/setup-python@v3
42
+ with:
43
+ python-version: ${{ matrix.python-version }}
44
+
45
+ - name: Install jqmc
46
+ run: |
47
+ python -m pip install flake8 pytest pytest-cov
48
+ python -m pip install .
49
+
50
+ #- name: Lint jqmc with flake8
51
+ # run: |
52
+ # # stop the build if there are Python syntax errors or undefined names
53
+ # flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
54
+ # # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
55
+ # flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
56
+
57
+ - name: Test jqmc (pytest) with @jit decorator (intra-software comparisons)
58
+ run: |
59
+ pytest -s -v tests/test_trexio.py --cov=jqmc --cov-branch --no-cov-on-fail
60
+ pytest -s -v tests/test_structure.py --cov-branch --no-cov-on-fail --cov-append
61
+ pytest -s -v tests/test_AOs.py --cov=jqmc --cov-branch --no-cov-on-fail --cov-append
62
+ pytest -s -v tests/test_MOs.py --cov=jqmc --cov-branch --no-cov-on-fail --cov-append
63
+ pytest -s -v tests/test_determinant.py --cov=jqmc --cov-branch --no-cov-on-fail --cov-append
64
+ pytest -s -v tests/test_jastrow.py --cov=jqmc --cov-branch --no-cov-on-fail --cov-append
65
+ pytest -s -v tests/test_wave_function.py --cov=jqmc --cov-branch --no-cov-on-fail --cov-append
66
+ pytest -s -v tests/test_ecps.py --cov=jqmc --cov-branch --no-cov-on-fail --cov-append
67
+ pytest -s -v tests/test_swct.py --cov=jqmc --cov-branch --no-cov-on-fail --cov-append
68
+ pytest -s -v tests/test_vmc_force.py --cov=jqmc --cov-branch --no-cov-on-fail --cov-append
69
+ pytest -s -v tests/test_lrdmc_force.py --cov=jqmc --cov-branch --no-cov-on-fail --cov-append
70
+
71
+ - name: Test jqmc (pytest) with @jit decorator (inter-software comparisons)
72
+ run: |
73
+ pytest -s -v tests/test_comparison_with_turborvb_ECP.py --cov=jqmc --cov-branch --no-cov-on-fail --cov-append
74
+ pytest -s -v tests/test_comparison_with_turborvb_AE.py --cov=jqmc --cov-branch --no-cov-on-fail --cov-append
75
+
76
+ - name: Test jqmc (pytest) QMC kernels without MPI
77
+ run: |
78
+ pytest -s -v tests/test_jqmc_command_lines.py --cov=jqmc --cov-branch --no-cov-on-fail --cov-append
79
+ pytest -s -v tests/test_jqmc_mcmc.py --cov=jqmc --cov-branch --no-cov-on-fail --cov-append
80
+ pytest -s -v tests/test_jqmc_gfmc_tau.py --cov=jqmc --cov-branch --no-cov-on-fail --cov-append
81
+ pytest -s -v tests/test_jqmc_gfmc_bra.py --cov=jqmc --cov-branch --no-cov-on-fail --cov-append
82
+
83
+ #- name: Test jqmc (pytest) QMC kernels with MPI (2 cores)
84
+ # run: |
85
+ # mpirun -np 2 pytest -s -v tests/test_jqmc_mcmc.py
86
+ # mpirun -np 2 pytest -s -v tests/test_jqmc_gfmc_tau.py
87
+ # mpirun -np 2 pytest -s -v tests/test_jqmc_gfmc_bra.py
88
+
89
+ - name: Combine Codecov xml files
90
+ run: |
91
+ coverage xml -o coverage.xml
92
+
93
+ - name: Upload coverage reports to Codecov
94
+ if: matrix.python-version == '3.12'
95
+ uses: codecov/codecov-action@v5
96
+ with:
97
+ files: coverage.xml
98
+ token: ${{ secrets.CODECOV_TOKEN }}
@@ -0,0 +1,71 @@
1
+ # A short test jqmc.
2
+
3
+ name: jqmc short test
4
+
5
+ on:
6
+ push:
7
+ branches: [ "devel*" ]
8
+ paths-ignore:
9
+ - '.gitignore'
10
+ - '.github/**'
11
+ - 'doc/**'
12
+ - 'examples/**'
13
+ - 'README.md'
14
+ - '.pre-commit-config.yaml'
15
+
16
+ jobs:
17
+ run:
18
+ runs-on: ubuntu-latest
19
+ strategy:
20
+ fail-fast: false
21
+ matrix:
22
+ python-version: ["3.10", "3.11", "3.12"]
23
+
24
+ steps:
25
+ - name: Install gfortran and gcc
26
+ run: |
27
+ sudo apt-get update
28
+ sudo apt-get install gfortran
29
+
30
+ - name: Install OpenBLAS and LAPACK
31
+ run: sudo apt-get install libopenblas-dev liblapack-dev
32
+
33
+ - name: Install OpenMPI
34
+ run: sudo apt-get install openmpi-bin libopenmpi-dev
35
+
36
+ - uses: actions/checkout@v3
37
+
38
+ - name: Set up Python ${{ matrix.python-version }}
39
+ uses: actions/setup-python@v3
40
+ with:
41
+ python-version: ${{ matrix.python-version }}
42
+
43
+ - name: Install jqmc
44
+ run: |
45
+ python -m pip install flake8 pytest pytest-cov
46
+ python -m pip install .
47
+
48
+ #- name: Lint jqmc with flake8
49
+ # run: |
50
+ # # stop the build if there are Python syntax errors or undefined names
51
+ # flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
52
+ # # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
53
+ # flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
54
+
55
+ - name: Test jqmc (pytest) with @jit decorator (intra-software comparisons)
56
+ run: |
57
+ pytest -s -v tests/test_trexio.py
58
+ pytest -s -v tests/test_structure.py
59
+ pytest -s -v tests/test_AOs.py
60
+ pytest -s -v tests/test_MOs.py
61
+ pytest -s -v tests/test_determinant.py
62
+ pytest -s -v tests/test_jastrow.py
63
+ pytest -s -v tests/test_wave_function.py
64
+ pytest -s -v tests/test_ecps.py
65
+ pytest -s -v tests/test_swct.py
66
+ pytest -s -v tests/test_vmc_force.py
67
+
68
+ - name: Test jqmc (pytest) with @jit decorator (inter-software comparisons)
69
+ run: |
70
+ pytest -s -v tests/test_comparison_with_turborvb_ECP.py
71
+ pytest -s -v tests/test_comparison_with_turborvb_AE.py
jqmc-0.1.0/.gitignore ADDED
@@ -0,0 +1,166 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+
29
+ # PyInstaller
30
+ # Usually these files are written by a python script from a template
31
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
32
+ *.manifest
33
+ *.spec
34
+
35
+ # Installer logs
36
+ pip-log.txt
37
+ pip-delete-this-directory.txt
38
+
39
+ # Unit test / coverage reports
40
+ htmlcov/
41
+ .tox/
42
+ .nox/
43
+ .coverage
44
+ .coverage.*
45
+ .cache
46
+ nosetests.xml
47
+ coverage.xml
48
+ *.cover
49
+ *.py,cover
50
+ .hypothesis/
51
+ .pytest_cache/
52
+ cover/
53
+
54
+ # Translations
55
+ *.mo
56
+ *.pot
57
+
58
+ # Django stuff:
59
+ *.log
60
+ local_settings.py
61
+ db.sqlite3
62
+ db.sqlite3-journal
63
+
64
+ # Flask stuff:
65
+ instance/
66
+ .webassets-cache
67
+
68
+ # Scrapy stuff:
69
+ .scrapy
70
+
71
+ # Sphinx documentation
72
+ docs/_build/
73
+
74
+ # PyBuilder
75
+ .pybuilder/
76
+ target/
77
+
78
+ # Jupyter Notebook
79
+ .ipynb_checkpoints
80
+
81
+ # IPython
82
+ profile_default/
83
+ ipython_config.py
84
+
85
+ # pyenv
86
+ # For a library or package, you might want to ignore these files since the code is
87
+ # intended to run in multiple environments; otherwise, check them in:
88
+ # .python-version
89
+
90
+ # pipenv
91
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
93
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
94
+ # install all needed dependencies.
95
+ #Pipfile.lock
96
+
97
+ # poetry
98
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
99
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
100
+ # commonly ignored for libraries.
101
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
102
+ #poetry.lock
103
+
104
+ # pdm
105
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
106
+ #pdm.lock
107
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
108
+ # in version control.
109
+ # https://pdm.fming.dev/#use-with-ide
110
+ .pdm.toml
111
+
112
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
113
+ __pypackages__/
114
+
115
+ # Celery stuff
116
+ celerybeat-schedule
117
+ celerybeat.pid
118
+
119
+ # SageMath parsed files
120
+ *.sage.py
121
+
122
+ # Environments
123
+ .env
124
+ .venv
125
+ env/
126
+ venv/
127
+ ENV/
128
+ env.bak/
129
+ venv.bak/
130
+
131
+ # Spyder project settings
132
+ .spyderproject
133
+ .spyproject
134
+
135
+ # Rope project settings
136
+ .ropeproject
137
+
138
+ # mkdocs documentation
139
+ /site
140
+
141
+ # mypy
142
+ .mypy_cache/
143
+ .dmypy.json
144
+ dmypy.json
145
+
146
+ # Pyre type checker
147
+ .pyre/
148
+
149
+ # pytype static type analyzer
150
+ .pytype/
151
+
152
+ # Cython debug symbols
153
+ cython_debug/
154
+
155
+ # PyCharm
156
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
157
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
158
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
159
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
160
+ #.idea/
161
+
162
+ # mac
163
+ .DS_Store
164
+
165
+ # jqmc
166
+ _version.py
@@ -0,0 +1,16 @@
1
+ # See https://pre-commit.com for more informatio
2
+ # See https://pre-commit.com/hooks.html for more hooks
3
+ repos:
4
+ - repo: https://github.com/pre-commit/pre-commit-hooks
5
+ rev: v6.0.0
6
+ hooks:
7
+ - id: trailing-whitespace
8
+ - id: end-of-file-fixer
9
+ - id: check-added-large-files
10
+
11
+ - repo: https://github.com/astral-sh/ruff-pre-commit
12
+ rev: v0.14.14
13
+ hooks:
14
+ #- id: ruff
15
+ # args: [ "--fix", "--show-fixes" ]
16
+ - id: ruff-format
@@ -0,0 +1,16 @@
1
+ {
2
+ "[python]": {
3
+ "editor.defaultFormatter": "charliermarsh.ruff",
4
+ "editor.codeActionsOnSave": {
5
+ "source.organizeImports": "explicit"
6
+ }
7
+ },
8
+ "ruff.lineLength": 128,
9
+ "ruff.lint.ignore": [
10
+ "I001",
11
+ "B008",
12
+ "E501",
13
+ "E741"
14
+ ],
15
+ "editor.formatOnSave": true,
16
+ }