gfnff 0.3.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 (191) hide show
  1. gfnff-0.3.0/.editorconfig +30 -0
  2. gfnff-0.3.0/.fprettify.rc +38 -0
  3. gfnff-0.3.0/.git-blame-ignore-revs +5 -0
  4. gfnff-0.3.0/.github/workflows/build-and-test.yml +94 -0
  5. gfnff-0.3.0/.github/workflows/docs.yml +69 -0
  6. gfnff-0.3.0/.github/workflows/wheels.yml +190 -0
  7. gfnff-0.3.0/.gitignore +37 -0
  8. gfnff-0.3.0/.gitmodules +3 -0
  9. gfnff-0.3.0/CMakeLists.txt +256 -0
  10. gfnff-0.3.0/LICENSE +165 -0
  11. gfnff-0.3.0/PKG-INFO +317 -0
  12. gfnff-0.3.0/README.md +123 -0
  13. gfnff-0.3.0/app/CMakeLists.txt +41 -0
  14. gfnff-0.3.0/app/main.F90 +267 -0
  15. gfnff-0.3.0/app/meson.build +8 -0
  16. gfnff-0.3.0/app/timer.f90 +407 -0
  17. gfnff-0.3.0/app/xyzreader.f90 +241 -0
  18. gfnff-0.3.0/assets/benchmark.png +0 -0
  19. gfnff-0.3.0/config/CMakeLists.txt +100 -0
  20. gfnff-0.3.0/config/config.cmake.in +43 -0
  21. gfnff-0.3.0/config/meson.build +106 -0
  22. gfnff-0.3.0/config/modules/Findtest-drive.cmake +38 -0
  23. gfnff-0.3.0/config/modules/gfnff-utils.cmake +138 -0
  24. gfnff-0.3.0/docs/Makefile +18 -0
  25. gfnff-0.3.0/docs/_static/.gitkeep +0 -0
  26. gfnff-0.3.0/docs/_templates/module_template.rst +31 -0
  27. gfnff-0.3.0/docs/conf.py +68 -0
  28. gfnff-0.3.0/docs/index.md +28 -0
  29. gfnff-0.3.0/docs/library.md +77 -0
  30. gfnff-0.3.0/docs/package_reference.rst +11 -0
  31. gfnff-0.3.0/docs/parametrisation.md +124 -0
  32. gfnff-0.3.0/docs/performance.md +33 -0
  33. gfnff-0.3.0/docs/python.md +193 -0
  34. gfnff-0.3.0/include/gfnff_interface_c.h +159 -0
  35. gfnff-0.3.0/include/param_alpb_acetone.fh +198 -0
  36. gfnff-0.3.0/include/param_alpb_acetonitrile.fh +198 -0
  37. gfnff-0.3.0/include/param_alpb_aniline.fh +198 -0
  38. gfnff-0.3.0/include/param_alpb_benzaldehyde.fh +198 -0
  39. gfnff-0.3.0/include/param_alpb_benzene.fh +198 -0
  40. gfnff-0.3.0/include/param_alpb_ch2cl2.fh +198 -0
  41. gfnff-0.3.0/include/param_alpb_chcl3.fh +198 -0
  42. gfnff-0.3.0/include/param_alpb_cs2.fh +198 -0
  43. gfnff-0.3.0/include/param_alpb_dioxane.fh +198 -0
  44. gfnff-0.3.0/include/param_alpb_dmf.fh +198 -0
  45. gfnff-0.3.0/include/param_alpb_dmso.fh +198 -0
  46. gfnff-0.3.0/include/param_alpb_ethanol.fh +199 -0
  47. gfnff-0.3.0/include/param_alpb_ether.fh +198 -0
  48. gfnff-0.3.0/include/param_alpb_ethylacetate.fh +198 -0
  49. gfnff-0.3.0/include/param_alpb_furane.fh +198 -0
  50. gfnff-0.3.0/include/param_alpb_hexadecane.fh +198 -0
  51. gfnff-0.3.0/include/param_alpb_hexane.fh +198 -0
  52. gfnff-0.3.0/include/param_alpb_methanol.fh +198 -0
  53. gfnff-0.3.0/include/param_alpb_nitromethane.fh +198 -0
  54. gfnff-0.3.0/include/param_alpb_octanol.fh +199 -0
  55. gfnff-0.3.0/include/param_alpb_phenol.fh +198 -0
  56. gfnff-0.3.0/include/param_alpb_thf.fh +198 -0
  57. gfnff-0.3.0/include/param_alpb_toluene.fh +198 -0
  58. gfnff-0.3.0/include/param_alpb_water.fh +198 -0
  59. gfnff-0.3.0/include/param_alpb_woctanol.fh +198 -0
  60. gfnff-0.3.0/include/param_gbsa_acetone.fh +132 -0
  61. gfnff-0.3.0/include/param_gbsa_acetonitrile.fh +132 -0
  62. gfnff-0.3.0/include/param_gbsa_benzene.fh +132 -0
  63. gfnff-0.3.0/include/param_gbsa_ch2cl2.fh +132 -0
  64. gfnff-0.3.0/include/param_gbsa_chcl3.fh +132 -0
  65. gfnff-0.3.0/include/param_gbsa_cs2.fh +132 -0
  66. gfnff-0.3.0/include/param_gbsa_dmf.fh +66 -0
  67. gfnff-0.3.0/include/param_gbsa_dmso.fh +132 -0
  68. gfnff-0.3.0/include/param_gbsa_ether.fh +132 -0
  69. gfnff-0.3.0/include/param_gbsa_h2o.fh +132 -0
  70. gfnff-0.3.0/include/param_gbsa_methanol.fh +132 -0
  71. gfnff-0.3.0/include/param_gbsa_nhexan.fh +66 -0
  72. gfnff-0.3.0/include/param_gbsa_thf.fh +132 -0
  73. gfnff-0.3.0/include/param_gbsa_toluene.fh +132 -0
  74. gfnff-0.3.0/meson.build +303 -0
  75. gfnff-0.3.0/meson_options.txt +59 -0
  76. gfnff-0.3.0/param/README.md +72 -0
  77. gfnff-0.3.0/param/gfnff-angewChem2020_2.toml +82 -0
  78. gfnff-0.3.0/pyproject.toml +83 -0
  79. gfnff-0.3.0/python/DESIGN.md +191 -0
  80. gfnff-0.3.0/python/gfnff/__init__.py +25 -0
  81. gfnff-0.3.0/python/gfnff/_lib.py +223 -0
  82. gfnff-0.3.0/python/gfnff/ase_calculator.py +350 -0
  83. gfnff-0.3.0/python/gfnff/calculator.py +505 -0
  84. gfnff-0.3.0/python/gfnff/cli.py +292 -0
  85. gfnff-0.3.0/python/tests/__init__.py +0 -0
  86. gfnff-0.3.0/python/tests/conftest.py +153 -0
  87. gfnff-0.3.0/python/tests/test_ase.py +476 -0
  88. gfnff-0.3.0/python/tests/test_lib.py +429 -0
  89. gfnff-0.3.0/recipe/meta.yaml +64 -0
  90. gfnff-0.3.0/src/.gitignore +1 -0
  91. gfnff-0.3.0/src/CMakeLists.txt +16 -0
  92. gfnff-0.3.0/src/api/CMakeLists.txt +13 -0
  93. gfnff-0.3.0/src/api/c_interface.f90 +727 -0
  94. gfnff-0.3.0/src/api/interface.f90 +824 -0
  95. gfnff-0.3.0/src/api/meson.build +9 -0
  96. gfnff-0.3.0/src/api/restart.f90 +145 -0
  97. gfnff-0.3.0/src/api/setup.f90 +206 -0
  98. gfnff-0.3.0/src/core/CMakeLists.txt +23 -0
  99. gfnff-0.3.0/src/core/bond_potential.f90 +135 -0
  100. gfnff-0.3.0/src/core/fragments.f90 +159 -0
  101. gfnff-0.3.0/src/core/geometry.f90 +814 -0
  102. gfnff-0.3.0/src/core/latticepoint.f90 +387 -0
  103. gfnff-0.3.0/src/core/math.f90 +890 -0
  104. gfnff-0.3.0/src/core/meson.build +19 -0
  105. gfnff-0.3.0/src/core/neighbor.f90 +780 -0
  106. gfnff-0.3.0/src/core/param.f90 +362 -0
  107. gfnff-0.3.0/src/core/param_io.F90 +509 -0
  108. gfnff-0.3.0/src/core/param_tables.f90 +526 -0
  109. gfnff-0.3.0/src/core/search.f90 +196 -0
  110. gfnff-0.3.0/src/core/strings.f90 +130 -0
  111. gfnff-0.3.0/src/core/timer.f90 +148 -0
  112. gfnff-0.3.0/src/core/types.f90 +724 -0
  113. gfnff-0.3.0/src/core/wsc.f90 +105 -0
  114. gfnff-0.3.0/src/data/CMakeLists.txt +12 -0
  115. gfnff-0.3.0/src/data/dftd3param.f90 +23572 -0
  116. gfnff-0.3.0/src/data/dftd4param.f90 +6633 -0
  117. gfnff-0.3.0/src/data/lebedev.f90 +5084 -0
  118. gfnff-0.3.0/src/data/meson.build +9 -0
  119. gfnff-0.3.0/src/engrad/CMakeLists.txt +16 -0
  120. gfnff-0.3.0/src/engrad/driver.f90 +571 -0
  121. gfnff-0.3.0/src/engrad/eg_bonded.f90 +918 -0
  122. gfnff-0.3.0/src/engrad/eg_es.f90 +817 -0
  123. gfnff-0.3.0/src/engrad/eg_hb.f90 +1558 -0
  124. gfnff-0.3.0/src/engrad/eg_rep.f90 +197 -0
  125. gfnff-0.3.0/src/engrad/eg_terms.f90 +138 -0
  126. gfnff-0.3.0/src/engrad/gdisp0.f90 +587 -0
  127. gfnff-0.3.0/src/engrad/meson.build +12 -0
  128. gfnff-0.3.0/src/hessian/CMakeLists.txt +20 -0
  129. gfnff-0.3.0/src/hessian/driver.f90 +411 -0
  130. gfnff-0.3.0/src/hessian/hess_analysis.f90 +240 -0
  131. gfnff-0.3.0/src/hessian/hess_bonded.f90 +622 -0
  132. gfnff-0.3.0/src/hessian/hess_cn.f90 +203 -0
  133. gfnff-0.3.0/src/hessian/hess_disp.f90 +240 -0
  134. gfnff-0.3.0/src/hessian/hess_es.f90 +209 -0
  135. gfnff-0.3.0/src/hessian/hess_hb.f90 +1044 -0
  136. gfnff-0.3.0/src/hessian/hess_pair.f90 +100 -0
  137. gfnff-0.3.0/src/hessian/hess_prim.f90 +530 -0
  138. gfnff-0.3.0/src/hessian/hess_rep.f90 +147 -0
  139. gfnff-0.3.0/src/hessian/hess_solv.f90 +677 -0
  140. gfnff-0.3.0/src/hessian/meson.build +16 -0
  141. gfnff-0.3.0/src/meson.build +23 -0
  142. gfnff-0.3.0/src/solvation/CMakeLists.txt +20 -0
  143. gfnff-0.3.0/src/solvation/alpb.f90 +93 -0
  144. gfnff-0.3.0/src/solvation/born.f90 +395 -0
  145. gfnff-0.3.0/src/solvation/gbsa.f90 +1278 -0
  146. gfnff-0.3.0/src/solvation/input.F90 +135 -0
  147. gfnff-0.3.0/src/solvation/kernel.f90 +774 -0
  148. gfnff-0.3.0/src/solvation/meson.build +16 -0
  149. gfnff-0.3.0/src/solvation/model.f90 +678 -0
  150. gfnff-0.3.0/src/solvation/sasa.f90 +202 -0
  151. gfnff-0.3.0/src/solvation/state.f90 +83 -0
  152. gfnff-0.3.0/src/solvation/type.f90 +130 -0
  153. gfnff-0.3.0/src/solvation/util.F90 +100 -0
  154. gfnff-0.3.0/src/solvation/vdwrad.f90 +173 -0
  155. gfnff-0.3.0/src/topo/CMakeLists.txt +20 -0
  156. gfnff-0.3.0/src/topo/bondmat.f90 +311 -0
  157. gfnff-0.3.0/src/topo/cn.f90 +685 -0
  158. gfnff-0.3.0/src/topo/eeq.f90 +177 -0
  159. gfnff-0.3.0/src/topo/hbset.f90 +768 -0
  160. gfnff-0.3.0/src/topo/ini.f90 +981 -0
  161. gfnff-0.3.0/src/topo/ini_phases.f90 +1932 -0
  162. gfnff-0.3.0/src/topo/meson.build +16 -0
  163. gfnff-0.3.0/src/topo/neighborlist.f90 +526 -0
  164. gfnff-0.3.0/src/topo/predicates.f90 +191 -0
  165. gfnff-0.3.0/src/topo/qm.f90 +332 -0
  166. gfnff-0.3.0/src/topo/rab.f90 +295 -0
  167. gfnff-0.3.0/src/topo/rings.f90 +487 -0
  168. gfnff-0.3.0/subprojects/toml-f.wrap +7 -0
  169. gfnff-0.3.0/test/CMakeLists.txt +116 -0
  170. gfnff-0.3.0/test/coffeine.f90 +59 -0
  171. gfnff-0.3.0/test/main.c +486 -0
  172. gfnff-0.3.0/test/main.cpp +183 -0
  173. gfnff-0.3.0/test/main.f90 +86 -0
  174. gfnff-0.3.0/test/meson.build +64 -0
  175. gfnff-0.3.0/test/sio2.f90 +43 -0
  176. gfnff-0.3.0/test/supermol.f90 +267 -0
  177. gfnff-0.3.0/test/test_gfnff.f90 +1005 -0
  178. gfnff-0.3.0/test/test_hessian.f90 +780 -0
  179. gfnff-0.3.0/test/test_param_io.f90 +323 -0
  180. gfnff-0.3.0/test/test_pbc_ini.f90 +224 -0
  181. gfnff-0.3.0/test/test_pbc_kernels.f90 +779 -0
  182. gfnff-0.3.0/test/test_pbc_sp.f90 +342 -0
  183. gfnff-0.3.0/test/test_solvation.f90 +515 -0
  184. gfnff-0.3.0/test/timer.f90 +407 -0
  185. gfnff-0.3.0/test/tools/README.md +74 -0
  186. gfnff-0.3.0/test/tools/checkbuild.py +90 -0
  187. gfnff-0.3.0/test/tools/gold/refdump.txt +527 -0
  188. gfnff-0.3.0/test/tools/mkindex.py +187 -0
  189. gfnff-0.3.0/test/tools/pdiff.py +81 -0
  190. gfnff-0.3.0/test/tools/refdump.f90 +409 -0
  191. gfnff-0.3.0/test/tools/verify.sh +122 -0
@@ -0,0 +1,30 @@
1
+ # This file is part of gfnff.
2
+ # SPDX-Identifier: LGPL-3.0-or-later
3
+ root = true
4
+
5
+ [*]
6
+ charset = utf-8
7
+ end_of_line = lf
8
+ insert_final_newline = true
9
+ trim_trailing_whitespace = true
10
+
11
+ [*.{f90,F90,fh}]
12
+ indent_style = space
13
+ indent_size = 2
14
+ max_line_length = 100
15
+
16
+ [*.{c,h,cpp,hpp}]
17
+ indent_style = space
18
+ indent_size = 2
19
+
20
+ [*.py]
21
+ indent_style = space
22
+ indent_size = 4
23
+ max_line_length = 88
24
+
25
+ [{meson.build,meson_options.txt,*.cmake,CMakeLists.txt}]
26
+ indent_style = space
27
+ indent_size = 2
28
+
29
+ [*.md]
30
+ trim_trailing_whitespace = false
@@ -0,0 +1,38 @@
1
+ # This file is part of gfnff.
2
+ # SPDX-Identifier: LGPL-3.0-or-later
3
+ #
4
+ # fprettify settings matching the style the sources already use:
5
+ # spaces around assignment and relational operators,
6
+ # none around arithmetic or logical ones (a*b+c, x.and.y),
7
+ # two-space indent, comments left alone.
8
+ #
9
+ # The sources carry !&< / !&> markers around blocks that must not be
10
+ # reformatted (parameter tables, OpenMP clause lists). fprettify honours them.
11
+ #
12
+ # fprettify -c .fprettify.rc src/**/*.f90
13
+ #
14
+ [fprettify]
15
+ indent = 2
16
+ line-length = 100
17
+
18
+ # do not reflow existing continuation lines; the physics expressions are
19
+ # broken by hand where the breaks carry meaning
20
+ strict-indent = false
21
+ enable-replacements = false
22
+ c-relations = false
23
+
24
+ whitespace-comma = false
25
+ whitespace-assignment = true
26
+ whitespace-decl = false
27
+ whitespace-relational = true
28
+ whitespace-logical = false
29
+ whitespace-plusminus = false
30
+ whitespace-multdiv = false
31
+ whitespace-print = true
32
+ whitespace-type = false
33
+ whitespace-intrinsics = true
34
+
35
+ # leave comment text and case alone; CLAUDE.md defines the comment styles and
36
+ # a case pass would churn every line for no gain
37
+ strip-comments = false
38
+ disable-indent-mod = false
@@ -0,0 +1,5 @@
1
+ # Revisions to ignore in git blame (formatting-only changes).
2
+ # git config blame.ignoreRevsFile .git-blame-ignore-revs
3
+
4
+ # Formatting only: run fprettify with the checked-in config
5
+ 00a7ca018d0d1873166429793522d671e7d110fd
@@ -0,0 +1,94 @@
1
+ name: Build and Test
2
+
3
+ on:
4
+ push:
5
+ pull_request:
6
+
7
+ jobs:
8
+ # ── CMake ────────────────────────────────────────────────────────────────────
9
+ cmake:
10
+ name: CMake (gcc-${{ matrix.compiler_version }}, ${{ matrix.build_type }})
11
+ runs-on: ubuntu-latest
12
+
13
+ strategy:
14
+ matrix:
15
+ compiler_version: [12, 13]
16
+ build_type: [Debug, RelWithDebInfo]
17
+
18
+ steps:
19
+ - name: Check out code
20
+ uses: actions/checkout@v5
21
+
22
+ - name: Install compilers and dependencies
23
+ run: |
24
+ sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
25
+ sudo apt-get update
26
+ sudo apt-get install -y \
27
+ gcc-${{ matrix.compiler_version }} \
28
+ g++-${{ matrix.compiler_version }} \
29
+ gfortran-${{ matrix.compiler_version }} \
30
+ libopenblas-dev
31
+
32
+ echo "CC=gcc-${{ matrix.compiler_version }}" >> $GITHUB_ENV
33
+ echo "CXX=g++-${{ matrix.compiler_version }}" >> $GITHUB_ENV
34
+ echo "FC=gfortran-${{ matrix.compiler_version }}" >> $GITHUB_ENV
35
+
36
+ - name: Configure with CMake
37
+ run: |
38
+ cmake -B build -S . \
39
+ -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
40
+ -DCMAKE_C_COMPILER=${{ env.CC }} \
41
+ -DCMAKE_CXX_COMPILER=${{ env.CXX }} \
42
+ -DCMAKE_Fortran_COMPILER=${{ env.FC }}
43
+
44
+ - name: Build
45
+ run: cmake --build build --config ${{ matrix.build_type }}
46
+
47
+ - name: Test
48
+ run: |
49
+ ctest --test-dir build \
50
+ --output-on-failure \
51
+ -R '^gfnff/'
52
+
53
+ # ── Meson ────────────────────────────────────────────────────────────────────
54
+ meson:
55
+ name: Meson (gcc-${{ matrix.compiler_version }}, ${{ matrix.build_type }})
56
+ runs-on: ubuntu-latest
57
+
58
+ strategy:
59
+ matrix:
60
+ compiler_version: [12, 13]
61
+ build_type: [debug, debugoptimized]
62
+
63
+ steps:
64
+ - name: Check out code
65
+ uses: actions/checkout@v5
66
+
67
+ - name: Install compilers and dependencies
68
+ run: |
69
+ sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
70
+ sudo apt-get update
71
+ sudo apt-get install -y \
72
+ gcc-${{ matrix.compiler_version }} \
73
+ g++-${{ matrix.compiler_version }} \
74
+ gfortran-${{ matrix.compiler_version }} \
75
+ libopenblas-dev
76
+ pip install meson ninja
77
+
78
+ # CC/CXX/FC are picked up from the environment by Meson
79
+ echo "CC=gcc-${{ matrix.compiler_version }}" >> $GITHUB_ENV
80
+ echo "CXX=g++-${{ matrix.compiler_version }}" >> $GITHUB_ENV
81
+ echo "FC=gfortran-${{ matrix.compiler_version }}" >> $GITHUB_ENV
82
+
83
+ - name: Configure with Meson
84
+ run: |
85
+ meson setup build \
86
+ --buildtype=${{ matrix.build_type }} \
87
+ --warnlevel=0 \
88
+ -Dtests=true
89
+
90
+ - name: Build
91
+ run: ninja -C build
92
+
93
+ - name: Test
94
+ run: meson test -C build --print-errorlogs
@@ -0,0 +1,69 @@
1
+ # This file is part of gfnff.
2
+ # SPDX-Identifier: LGPL-3.0-or-later
3
+ #
4
+ # Build the Sphinx documentation and deploy it to GitHub Pages.
5
+ # The repository's Pages source must be set to "GitHub Actions".
6
+ #
7
+ # autodoc imports the package, which loads the compiled library, so the
8
+ # package is built and installed first.
9
+
10
+ name: Build and Deploy Documentation
11
+
12
+ on:
13
+ push:
14
+ branches: [master]
15
+ workflow_dispatch:
16
+
17
+ permissions:
18
+ contents: read
19
+ pages: write
20
+ id-token: write
21
+
22
+ concurrency:
23
+ group: "pages"
24
+ cancel-in-progress: false
25
+
26
+ jobs:
27
+ build-docs:
28
+ runs-on: ubuntu-latest
29
+
30
+ steps:
31
+ - name: Checkout
32
+ uses: actions/checkout@v5
33
+
34
+ - name: Set up Python
35
+ uses: actions/setup-python@v5
36
+ with:
37
+ python-version: "3.12"
38
+
39
+ - name: Install compiler and BLAS/LAPACK
40
+ run: |
41
+ sudo apt-get update
42
+ sudo apt-get install -y gfortran libopenblas-dev
43
+
44
+ - name: Install package and documentation dependencies
45
+ run: |
46
+ python -m pip install --upgrade pip
47
+ pip install '.[docs]'
48
+
49
+ - name: Build documentation
50
+ # -W: a warning (broken link, failed import) fails the build
51
+ run: make -C docs html SPHINXOPTS="-W --keep-going"
52
+
53
+ - name: Upload artifact
54
+ uses: actions/upload-pages-artifact@v3
55
+ with:
56
+ path: docs/_build/html
57
+
58
+ deploy:
59
+ if: github.ref == 'refs/heads/master'
60
+ environment:
61
+ name: github-pages
62
+ url: ${{ steps.deployment.outputs.page_url }}
63
+ runs-on: ubuntu-latest
64
+ needs: build-docs
65
+
66
+ steps:
67
+ - name: Deploy to GitHub Pages
68
+ id: deployment
69
+ uses: actions/deploy-pages@v4
@@ -0,0 +1,190 @@
1
+ # This file is part of gfnff.
2
+ # SPDX-Identifier: LGPL-3.0-or-later
3
+ #
4
+ # Build binary wheels and an sdist for PyPI.
5
+ # Triggered on version tags (v*) or manually via workflow_dispatch.
6
+ #
7
+ # The cibuildwheel settings (interpreters, container setup, test command) live
8
+ # in pyproject.toml under [tool.cibuildwheel], so a local cibuildwheel run
9
+ # builds and tests exactly what this workflow does.
10
+ #
11
+ # Every wheel is installed into a clean environment and run against
12
+ # python/tests before anything is uploaded; a test failure blocks the release.
13
+ #
14
+ # The bindings are pure ctypes, so there is one py3-none wheel per platform.
15
+ #
16
+ # Platform coverage:
17
+ # Linux x86_64 : ubuntu-latest runner, manylinux_2_28
18
+ # Linux aarch64 : ubuntu-24.04-arm runner (native, no QEMU)
19
+ # macOS arm64 : macos-14 runner (Apple Silicon, Homebrew gfortran)
20
+ # Windows : not yet supported (requires mingw-w64 gfortran in CI)
21
+ #
22
+ # OpenMP note:
23
+ # find_package(OpenMP) in CMakeLists.txt is intentionally non-fatal.
24
+ # On macOS, Apple Clang (C/CXX) has no native OpenMP; Homebrew gfortran
25
+ # does. CMake detects OpenMP_Fortran_FOUND and enables it for Fortran only.
26
+ #
27
+ # Dependency bundling:
28
+ # Linux : auditwheel repair (run automatically by cibuildwheel) bundles
29
+ # libgfortran.so and libgomp.so into the wheel.
30
+ # macOS : delocate bundles Homebrew gfortran runtime dylibs.
31
+ #
32
+ # macOS runner pinned to macos-14:
33
+ # Homebrew compiles gcc dylibs against the host OS. On macOS 15 (macos-latest)
34
+ # the dylibs carry minOS=15.0, which delocate-wheel rejects for a 14.0 wheel.
35
+ # macos-14 produces dylibs with minOS=14.0, matching MACOSX_DEPLOYMENT_TARGET.
36
+ #
37
+ # Linux aarch64 runner:
38
+ # QEMU emulation on x86_64 is 10-20x slower than native. ubuntu-24.04-arm
39
+ # provides a native arm64 runner (free for public repos).
40
+
41
+ name: Build wheels
42
+
43
+ on:
44
+ push:
45
+ tags:
46
+ - "v*"
47
+ workflow_dispatch:
48
+
49
+ permissions:
50
+ contents: read
51
+
52
+ jobs:
53
+ build_wheels:
54
+ name: Build wheels on ${{ matrix.os }}
55
+ runs-on: ${{ matrix.os }}
56
+ strategy:
57
+ fail-fast: false
58
+ matrix:
59
+ include:
60
+ - os: ubuntu-latest
61
+ archs: x86_64
62
+ - os: ubuntu-24.04-arm
63
+ archs: aarch64
64
+ - os: macos-14
65
+ archs: arm64
66
+
67
+ steps:
68
+ - uses: actions/checkout@v5
69
+
70
+ - name: Install gfortran (macOS)
71
+ if: startsWith(matrix.os, 'macos')
72
+ run: |
73
+ brew install gcc
74
+ # Homebrew installs gfortran as gfortran-NN; find the highest version
75
+ # and symlink it to a plain 'gfortran' name for CMake to discover.
76
+ GFORTRANS=$(ls "$(brew --prefix)"/bin/gfortran-[0-9]* 2>/dev/null || true)
77
+ if [ -z "$GFORTRANS" ]; then
78
+ echo "No gfortran-* binary found after brew install gcc" >&2; exit 1
79
+ fi
80
+ GFORTRAN_BIN=$(printf '%s\n' $GFORTRANS | sort -t- -k2,2n | tail -n1)
81
+ echo "Using Fortran compiler: $GFORTRAN_BIN"
82
+ ln -sf "$GFORTRAN_BIN" "$(brew --prefix)/bin/gfortran"
83
+
84
+ - name: Build and test wheels
85
+ uses: pypa/cibuildwheel@v4.3.0
86
+ env:
87
+ CIBW_ARCHS: ${{ matrix.archs }}
88
+
89
+ - name: Upload wheel artifacts
90
+ uses: actions/upload-artifact@v5
91
+ with:
92
+ name: dist-wheels-${{ matrix.os }}
93
+ path: wheelhouse/*.whl
94
+ if-no-files-found: error
95
+
96
+ # ---------------------------------------------------------------------------
97
+ # Source distribution: built, then installed from the tarball and tested, so
98
+ # that `pip install --no-binary gfnff` is known to work before it is uploaded
99
+ # ---------------------------------------------------------------------------
100
+ build_sdist:
101
+ name: Build and test sdist
102
+ runs-on: ubuntu-latest
103
+
104
+ steps:
105
+ - uses: actions/checkout@v5
106
+
107
+ - name: Install compiler and BLAS/LAPACK
108
+ run: |
109
+ sudo apt-get update
110
+ sudo apt-get install -y gfortran libopenblas-dev
111
+
112
+ - name: Build sdist
113
+ run: pipx run build --sdist
114
+
115
+ - name: Install from sdist and test
116
+ run: |
117
+ python -m venv venv
118
+ venv/bin/pip install "$(ls dist/*.tar.gz)[test]"
119
+ # run the tests from a copy, away from the source tree, so that
120
+ # `import gfnff` resolves to the installed package
121
+ mkdir sdist-test
122
+ cp -r --parents python/tests param sdist-test/
123
+ cd sdist-test
124
+ ../venv/bin/python -c "from gfnff._lib import toml_available; assert toml_available()"
125
+ ../venv/bin/pytest python/tests
126
+
127
+ - name: Upload sdist artifact
128
+ uses: actions/upload-artifact@v5
129
+ with:
130
+ name: dist-sdist
131
+ path: dist/*.tar.gz
132
+ if-no-files-found: error
133
+
134
+ # ---------------------------------------------------------------------------
135
+ # Upload to TestPyPI on manual workflow_dispatch (any branch, no tag needed)
136
+ # ---------------------------------------------------------------------------
137
+ upload_testpypi:
138
+ name: Upload to TestPyPI
139
+ needs: [build_wheels, build_sdist]
140
+ runs-on: ubuntu-latest
141
+ if: github.event_name == 'workflow_dispatch'
142
+ environment:
143
+ name: testpypi
144
+ url: https://test.pypi.org/p/gfnff
145
+ permissions:
146
+ id-token: write
147
+
148
+ steps:
149
+ - uses: actions/download-artifact@v5
150
+ with:
151
+ pattern: dist-*
152
+ path: dist
153
+ merge-multiple: true
154
+
155
+ - uses: pypa/gh-action-pypi-publish@release/v1
156
+ with:
157
+ repository-url: https://test.pypi.org/legacy/
158
+ # a dry run may be repeated for the same version
159
+ skip-existing: true
160
+
161
+ # ---------------------------------------------------------------------------
162
+ # Collect all wheels and the sdist and upload to PyPI on tagged releases
163
+ # ---------------------------------------------------------------------------
164
+ upload_pypi:
165
+ name: Upload to PyPI
166
+ needs: [build_wheels, build_sdist]
167
+ runs-on: ubuntu-latest
168
+ if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
169
+ environment:
170
+ name: pypi
171
+ url: https://pypi.org/p/gfnff
172
+ permissions:
173
+ id-token: write # OIDC trusted publishing
174
+ contents: write # needed to create a GitHub Release
175
+
176
+ steps:
177
+ - uses: actions/download-artifact@v5
178
+ with:
179
+ pattern: dist-*
180
+ path: dist
181
+ merge-multiple: true
182
+
183
+ - uses: pypa/gh-action-pypi-publish@release/v1
184
+ with:
185
+ packages-dir: dist/
186
+
187
+ - name: Create GitHub Release
188
+ env:
189
+ GH_TOKEN: ${{ github.token }}
190
+ run: gh release create ${{ github.ref_name }} dist/* --generate-notes --repo ${{ github.repository }}
gfnff-0.3.0/.gitignore ADDED
@@ -0,0 +1,37 @@
1
+ *.o
2
+ *.mod
3
+ *.a
4
+ *.tgz
5
+ *.old
6
+ github_bin/
7
+ build_majestix
8
+ build_commands
9
+ _build*/
10
+ build*/
11
+ src/gfn0
12
+ bin/
13
+ testprog/gfn0
14
+ testprog/coord
15
+ ff/
16
+ */.wraplock
17
+ *.bak
18
+ .*/
19
+ !.git/
20
+ !.github/
21
+ gfnff_topo
22
+ gfnff_adjacency
23
+ __pycache__
24
+ python/gfnff/libgfnff*
25
+ *.egg-info/
26
+ dist/
27
+
28
+ # meson fetches toml-f on demand via subprojects/toml-f.wrap; unlike
29
+ # test-drive it is not a submodule, because only the meson build uses it
30
+ subprojects/toml-f/
31
+ subprojects/test-drive.wrap
32
+
33
+ # generated by test/tools/mkindex.py, kept local
34
+ project_index.md
35
+
36
+ # sphinx: autosummary stubs are regenerated on every build
37
+ docs/generated/
@@ -0,0 +1,3 @@
1
+ [submodule "subprojects/test-drive"]
2
+ path = subprojects/test-drive
3
+ url = https://github.com/fortran-lang/test-drive.git