readcon-db 0.2.3__tar.gz → 0.2.5__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 (210) hide show
  1. readcon_db-0.2.5/.github/workflows/ci.yml +75 -0
  2. {readcon_db-0.2.3 → readcon_db-0.2.5}/.github/workflows/ci_mpi.yml +1 -1
  3. {readcon_db-0.2.3 → readcon_db-0.2.5}/CHANGELOG.md +48 -0
  4. {readcon_db-0.2.3 → readcon_db-0.2.5}/CITATION.cff +2 -2
  5. {readcon_db-0.2.3 → readcon_db-0.2.5}/CMakeLists.txt +6 -5
  6. {readcon_db-0.2.3 → readcon_db-0.2.5}/Cargo.lock +60 -3
  7. {readcon_db-0.2.3 → readcon_db-0.2.5}/Cargo.toml +23 -2
  8. readcon_db-0.2.3/README.md → readcon_db-0.2.5/PKG-INFO +22 -2
  9. readcon_db-0.2.3/PKG-INFO → readcon_db-0.2.5/README.md +7 -16
  10. readcon_db-0.2.5/changelog.d/python-archive-reader.feature.md +1 -0
  11. readcon_db-0.2.5/changelog.d/python-readcon-dependency.feature.md +1 -0
  12. readcon_db-0.2.5/changelog.d/rkrdb-extend-trajectory-str.feature.md +1 -0
  13. readcon_db-0.2.5/changelog.d/v31-clock-units.bugfix.md +1 -0
  14. {readcon_db-0.2.3 → readcon_db-0.2.5}/docs/orgmode/explanation/architecture.org +1 -1
  15. {readcon_db-0.2.3 → readcon_db-0.2.5}/docs/orgmode/explanation/design.org +4 -0
  16. {readcon_db-0.2.3 → readcon_db-0.2.5}/docs/orgmode/howto/install.org +8 -3
  17. {readcon_db-0.2.3 → readcon_db-0.2.5}/docs/orgmode/howto/mpi.org +1 -1
  18. {readcon_db-0.2.3 → readcon_db-0.2.5}/docs/orgmode/howto/streaming.org +12 -0
  19. {readcon_db-0.2.3 → readcon_db-0.2.5}/docs/orgmode/reference/c.org +11 -4
  20. {readcon_db-0.2.3 → readcon_db-0.2.5}/docs/orgmode/reference/fortran.org +2 -2
  21. {readcon_db-0.2.3 → readcon_db-0.2.5}/docs/orgmode/reference/python.org +51 -0
  22. {readcon_db-0.2.3 → readcon_db-0.2.5}/docs/orgmode/reference/rust.org +4 -0
  23. {readcon_db-0.2.3 → readcon_db-0.2.5}/fortran/README.md +1 -1
  24. {readcon_db-0.2.3 → readcon_db-0.2.5}/fortran/ReadConDb/fpm.toml +1 -1
  25. {readcon_db-0.2.3 → readcon_db-0.2.5}/fortran/ReadConDb/src/readcon_db.f90 +26 -2
  26. {readcon_db-0.2.3 → readcon_db-0.2.5}/include/readcon-db-mpi.h +1 -1
  27. {readcon_db-0.2.3 → readcon_db-0.2.5}/include/readcon-db.h +27 -3
  28. {readcon_db-0.2.3 → readcon_db-0.2.5}/meson.build +8 -1
  29. readcon_db-0.2.5/meson_options.txt +8 -0
  30. {readcon_db-0.2.3 → readcon_db-0.2.5}/pixi.toml +1 -1
  31. {readcon_db-0.2.3 → readcon_db-0.2.5}/pyproject.toml +5 -1
  32. {readcon_db-0.2.3 → readcon_db-0.2.5}/python/pyproject.toml +5 -1
  33. readcon_db-0.2.5/python/tests/test_archive_reader.py +321 -0
  34. readcon_db-0.2.5/python/tests/test_extend_precision.py +79 -0
  35. readcon_db-0.2.5/python/tests/test_hash_con_text.py +24 -0
  36. readcon_db-0.2.5/python/tests/test_ingest_memory.py +273 -0
  37. readcon_db-0.2.5/resources/test/con_v4/README.md +56 -0
  38. readcon_db-0.2.5/resources/test/con_v4/tiny_cuh2_v4.con +17 -0
  39. readcon_db-0.2.5/resources/test/con_v4/tiny_cuh2_v4.convel +26 -0
  40. readcon_db-0.2.5/resources/test/highprec_a.con +15 -0
  41. readcon_db-0.2.5/resources/test/highprec_b.con +15 -0
  42. {readcon_db-0.2.3 → readcon_db-0.2.5}/scripts/check_version_lockstep.py +2 -2
  43. {readcon_db-0.2.3 → readcon_db-0.2.5}/scripts/meson_cargo_build.py +3 -2
  44. {readcon_db-0.2.3 → readcon_db-0.2.5}/scripts/package-clib.sh +3 -4
  45. {readcon_db-0.2.3 → readcon_db-0.2.5}/src/archive.rs +164 -158
  46. {readcon_db-0.2.3 → readcon_db-0.2.5}/src/canonical.rs +1 -1
  47. {readcon_db-0.2.3 → readcon_db-0.2.5}/src/catalog.rs +38 -24
  48. {readcon_db-0.2.3 → readcon_db-0.2.5}/src/cooked_soa.rs +5 -4
  49. {readcon_db-0.2.3 → readcon_db-0.2.5}/src/corpus.rs +435 -75
  50. {readcon_db-0.2.3 → readcon_db-0.2.5}/src/export_h5md.rs +2 -1
  51. {readcon_db-0.2.3 → readcon_db-0.2.5}/src/export_xyz.rs +4 -1
  52. {readcon_db-0.2.3 → readcon_db-0.2.5}/src/ffi.rs +350 -4
  53. {readcon_db-0.2.3 → readcon_db-0.2.5}/src/lib.rs +11 -2
  54. {readcon_db-0.2.3 → readcon_db-0.2.5}/src/mpi_ingest.rs +2 -0
  55. {readcon_db-0.2.3 → readcon_db-0.2.5}/src/python.rs +200 -13
  56. readcon_db-0.2.5/src/python_archive.rs +715 -0
  57. {readcon_db-0.2.3 → readcon_db-0.2.5}/src/units_canon.rs +374 -21
  58. readcon_db-0.2.5/tests/capi_symbols.rs +137 -0
  59. readcon_db-0.2.5/tests/cdylib_static_tls.rs +163 -0
  60. readcon_db-0.2.5/tests/cmake-project/main.c +104 -0
  61. readcon_db-0.2.5/tests/con_v4_fixtures.rs +64 -0
  62. readcon_db-0.2.5/tests/hash_file.rs +63 -0
  63. readcon_db-0.2.5/tests/meson-wrap/main.c +93 -0
  64. readcon_db-0.2.3/.github/workflows/ci.yml +0 -41
  65. readcon_db-0.2.3/meson_options.txt +0 -8
  66. readcon_db-0.2.3/python/tests/test_ingest_memory.py +0 -27
  67. readcon_db-0.2.3/tests/cmake-project/main.c +0 -28
  68. readcon_db-0.2.3/tests/meson-wrap/main.c +0 -17
  69. {readcon_db-0.2.3 → readcon_db-0.2.5}/.github/workflows/c_lib_tarball.yml +0 -0
  70. {readcon_db-0.2.3 → readcon_db-0.2.5}/.github/workflows/ci_cxx.yml +0 -0
  71. {readcon_db-0.2.3 → readcon_db-0.2.5}/.github/workflows/ci_docs.yml +0 -0
  72. {readcon_db-0.2.3 → readcon_db-0.2.5}/.github/workflows/ci_prek.yml +0 -0
  73. {readcon_db-0.2.3 → readcon_db-0.2.5}/.github/workflows/crates_publish.yml +0 -0
  74. {readcon_db-0.2.3 → readcon_db-0.2.5}/.github/workflows/cxx_tarball.yml +0 -0
  75. {readcon_db-0.2.3 → readcon_db-0.2.5}/.github/workflows/lint.yml +0 -0
  76. {readcon_db-0.2.3 → readcon_db-0.2.5}/.github/workflows/pages.yml +0 -0
  77. {readcon_db-0.2.3 → readcon_db-0.2.5}/.github/workflows/python-wheels.yml +0 -0
  78. {readcon_db-0.2.3 → readcon_db-0.2.5}/.gitignore +0 -0
  79. {readcon_db-0.2.3 → readcon_db-0.2.5}/CODE_OF_CONDUCT.md +0 -0
  80. {readcon_db-0.2.3 → readcon_db-0.2.5}/CONTRIBUTING.md +0 -0
  81. {readcon_db-0.2.3 → readcon_db-0.2.5}/LICENSE +0 -0
  82. {readcon_db-0.2.3 → readcon_db-0.2.5}/SECURITY.md +0 -0
  83. {readcon_db-0.2.3 → readcon_db-0.2.5}/assets/logo/BRAND.md +0 -0
  84. {readcon_db-0.2.3 → readcon_db-0.2.5}/assets/logo/readcon-db-logo-512.png +0 -0
  85. {readcon_db-0.2.3 → readcon_db-0.2.5}/assets/logo/readcon-db-logo-raster.jpg +0 -0
  86. {readcon_db-0.2.3 → readcon_db-0.2.5}/assets/logo/readcon-db-logo.svg +0 -0
  87. {readcon_db-0.2.3 → readcon_db-0.2.5}/assets/logo/readcon-db-wordmark.svg +0 -0
  88. {readcon_db-0.2.3 → readcon_db-0.2.5}/bench/gen_con.py +0 -0
  89. {readcon_db-0.2.3 → readcon_db-0.2.5}/bench/mpi_bench.sh +0 -0
  90. {readcon_db-0.2.3 → readcon_db-0.2.5}/bench/vary_con.py +0 -0
  91. {readcon_db-0.2.3 → readcon_db-0.2.5}/cmake/readcon-db-config-version.in.cmake +0 -0
  92. {readcon_db-0.2.3 → readcon_db-0.2.5}/cmake/readcon-db-config.in.cmake +0 -0
  93. {readcon_db-0.2.3 → readcon_db-0.2.5}/cmake/readcon-db.pc.in +0 -0
  94. {readcon_db-0.2.3 → readcon_db-0.2.5}/cmake/tempdir.cmake +0 -0
  95. {readcon_db-0.2.3 → readcon_db-0.2.5}/cog.toml +0 -0
  96. {readcon_db-0.2.3 → readcon_db-0.2.5}/docs/Makefile +0 -0
  97. {readcon_db-0.2.3 → readcon_db-0.2.5}/docs/_static/logo.svg +0 -0
  98. {readcon_db-0.2.3 → readcon_db-0.2.5}/docs/orgmode/changelog.org +0 -0
  99. {readcon_db-0.2.3 → readcon_db-0.2.5}/docs/orgmode/contributing/index.org +0 -0
  100. {readcon_db-0.2.3 → readcon_db-0.2.5}/docs/orgmode/cooked-soa.org +0 -0
  101. {readcon_db-0.2.3 → readcon_db-0.2.5}/docs/orgmode/explanation/faq.org +0 -0
  102. {readcon_db-0.2.3 → readcon_db-0.2.5}/docs/orgmode/explanation/overview.org +0 -0
  103. {readcon_db-0.2.3 → readcon_db-0.2.5}/docs/orgmode/howto/atom-order.org +0 -0
  104. {readcon_db-0.2.3 → readcon_db-0.2.5}/docs/orgmode/howto/campaign.org +0 -0
  105. {readcon_db-0.2.3 → readcon_db-0.2.5}/docs/orgmode/howto/howto.org +0 -0
  106. {readcon_db-0.2.3 → readcon_db-0.2.5}/docs/orgmode/howto/migration.org +0 -0
  107. {readcon_db-0.2.3 → readcon_db-0.2.5}/docs/orgmode/howto/topology.org +0 -0
  108. {readcon_db-0.2.3 → readcon_db-0.2.5}/docs/orgmode/howto/workflows.org +0 -0
  109. {readcon_db-0.2.3 → readcon_db-0.2.5}/docs/orgmode/index.org +0 -0
  110. {readcon_db-0.2.3 → readcon_db-0.2.5}/docs/orgmode/readme.org +0 -0
  111. {readcon_db-0.2.3 → readcon_db-0.2.5}/docs/orgmode/reference/citation.org +0 -0
  112. {readcon_db-0.2.3 → readcon_db-0.2.5}/docs/orgmode/reference/python-api.org +0 -0
  113. {readcon_db-0.2.3 → readcon_db-0.2.5}/docs/orgmode/tutorials/getting-started.org +0 -0
  114. {readcon_db-0.2.3 → readcon_db-0.2.5}/docs/orgmode/tutorials/tutorial-run.log +0 -0
  115. {readcon_db-0.2.3 → readcon_db-0.2.5}/docs/orgmode/tutorials/tutorial-run.sh +0 -0
  116. {readcon_db-0.2.3 → readcon_db-0.2.5}/docs/orgmode/tutorials/tutorial.org +0 -0
  117. {readcon_db-0.2.3 → readcon_db-0.2.5}/docs/requirements.txt +0 -0
  118. {readcon_db-0.2.3 → readcon_db-0.2.5}/docs/source/_static/custom.css +0 -0
  119. {readcon_db-0.2.3 → readcon_db-0.2.5}/docs/source/_static/favicon.svg +0 -0
  120. {readcon_db-0.2.3 → readcon_db-0.2.5}/docs/source/_static/logo-nav-dark.svg +0 -0
  121. {readcon_db-0.2.3 → readcon_db-0.2.5}/docs/source/_static/logo-nav-light.svg +0 -0
  122. {readcon_db-0.2.3 → readcon_db-0.2.5}/docs/source/_static/logo.svg +0 -0
  123. {readcon_db-0.2.3 → readcon_db-0.2.5}/docs/source/_static/mark.svg +0 -0
  124. {readcon_db-0.2.3 → readcon_db-0.2.5}/docs/source/_templates/partials/extra-foot.html +0 -0
  125. {readcon_db-0.2.3 → readcon_db-0.2.5}/docs/source/_templates/partials/extra-head.html +0 -0
  126. {readcon_db-0.2.3 → readcon_db-0.2.5}/docs/source/_templates/partials/site-foot.html +0 -0
  127. {readcon_db-0.2.3 → readcon_db-0.2.5}/docs/source/_templates/partials/webfonts.html +0 -0
  128. {readcon_db-0.2.3 → readcon_db-0.2.5}/docs/source/conf.py +0 -0
  129. {readcon_db-0.2.3 → readcon_db-0.2.5}/examples/bench_corpus_ops.rs +0 -0
  130. {readcon_db-0.2.3 → readcon_db-0.2.5}/examples/bench_vs_ase_prep.py +0 -0
  131. {readcon_db-0.2.3 → readcon_db-0.2.5}/examples/benchmarks/ase_db_bench.json +0 -0
  132. {readcon_db-0.2.3 → readcon_db-0.2.5}/examples/benchmarks/ase_fair_campaign_1.json +0 -0
  133. {readcon_db-0.2.3 → readcon_db-0.2.5}/examples/benchmarks/bench_ase_db.py +0 -0
  134. {readcon_db-0.2.3 → readcon_db-0.2.5}/examples/benchmarks/db_vs_ase_table.md +0 -0
  135. {readcon_db-0.2.3 → readcon_db-0.2.5}/examples/benchmarks/fair_campaign.py +0 -0
  136. {readcon_db-0.2.3 → readcon_db-0.2.5}/examples/benchmarks/fair_db_vs_ase_table.md +0 -0
  137. {readcon_db-0.2.3 → readcon_db-0.2.5}/examples/benchmarks/readcon_db_bench.json +0 -0
  138. {readcon_db-0.2.3 → readcon_db-0.2.5}/examples/benchmarks/results_merged.json +0 -0
  139. {readcon_db-0.2.3 → readcon_db-0.2.5}/examples/benchmarks/test_fair_select_parity.py +0 -0
  140. {readcon_db-0.2.3 → readcon_db-0.2.5}/examples/ingest_select.rs +0 -0
  141. {readcon_db-0.2.3 → readcon_db-0.2.5}/examples/mpi_bcast_frame.c +0 -0
  142. {readcon_db-0.2.3 → readcon_db-0.2.5}/examples/mpi_bcast_frame.f90 +0 -0
  143. {readcon_db-0.2.3 → readcon_db-0.2.5}/examples/mpi_bcast_frame.py +0 -0
  144. {readcon_db-0.2.3 → readcon_db-0.2.5}/examples/mpi_ingest_check.rs +0 -0
  145. {readcon_db-0.2.3 → readcon_db-0.2.5}/examples/mpi_read_check.rs +0 -0
  146. {readcon_db-0.2.3 → readcon_db-0.2.5}/examples/shard_gate.rs +0 -0
  147. {readcon_db-0.2.3 → readcon_db-0.2.5}/examples/workflows/metatrain_from_con.md +0 -0
  148. {readcon_db-0.2.3 → readcon_db-0.2.5}/examples/workflows/options.metatrain.snippet.yaml +0 -0
  149. {readcon_db-0.2.3 → readcon_db-0.2.5}/lychee.toml +0 -0
  150. {readcon_db-0.2.3 → readcon_db-0.2.5}/packaging/wrapdb/README.md +0 -0
  151. {readcon_db-0.2.3 → readcon_db-0.2.5}/packaging/wrapdb/readcon-db.wrap.in +0 -0
  152. {readcon_db-0.2.3 → readcon_db-0.2.5}/paper/cpc/freeze/ase_fair_campaign_1.json +0 -0
  153. {readcon_db-0.2.3 → readcon_db-0.2.5}/paper/cpc/freeze/fair_db_vs_ase_table.md +0 -0
  154. {readcon_db-0.2.3 → readcon_db-0.2.5}/paper/cpc/readme.org +0 -0
  155. {readcon_db-0.2.3 → readcon_db-0.2.5}/paper/cpc/scripts/gen_fair_table.py +0 -0
  156. {readcon_db-0.2.3 → readcon_db-0.2.5}/paper/cpc/src/appendix-fair-campaign.org +0 -0
  157. {readcon_db-0.2.3 → readcon_db-0.2.5}/paper/cpc/src/figures/generated/fair_campaign_table.tex +0 -0
  158. {readcon_db-0.2.3 → readcon_db-0.2.5}/pixi.lock +0 -0
  159. {readcon_db-0.2.3 → readcon_db-0.2.5}/pr-text.md +0 -0
  160. {readcon_db-0.2.3 → readcon_db-0.2.5}/prek.toml +0 -0
  161. {readcon_db-0.2.3 → readcon_db-0.2.5}/python/tests/test_atom_order.py +0 -0
  162. {readcon_db-0.2.3 → readcon_db-0.2.5}/python/tests/test_catalog_claims.py +0 -0
  163. {readcon_db-0.2.3 → readcon_db-0.2.5}/python/tests/test_export_h5md.py +0 -0
  164. {readcon_db-0.2.3 → readcon_db-0.2.5}/python/tests/test_stream_and_random.py +0 -0
  165. {readcon_db-0.2.3 → readcon_db-0.2.5}/python/tests/test_streaming_guide.py +0 -0
  166. {readcon_db-0.2.3 → readcon_db-0.2.5}/resources/test/eon36_lj_dimer.convel +0 -0
  167. {readcon_db-0.2.3 → readcon_db-0.2.5}/resources/test/sulfolene.con +0 -0
  168. {readcon_db-0.2.3 → readcon_db-0.2.5}/resources/test/tiny_cuh2.con +0 -0
  169. {readcon_db-0.2.3 → readcon_db-0.2.5}/resources/test/tiny_cuh2.convel +0 -0
  170. {readcon_db-0.2.3 → readcon_db-0.2.5}/resources/test/tiny_cuh2_forces.con +0 -0
  171. {readcon_db-0.2.3 → readcon_db-0.2.5}/resources/test/tiny_cuh2_vel_forces.con +0 -0
  172. {readcon_db-0.2.3 → readcon_db-0.2.5}/resources/test/tiny_multi_cuh2.con +0 -0
  173. {readcon_db-0.2.3 → readcon_db-0.2.5}/scripts/assemble-site.sh +0 -0
  174. {readcon_db-0.2.3 → readcon_db-0.2.5}/scripts/build-docs.sh +0 -0
  175. {readcon_db-0.2.3 → readcon_db-0.2.5}/scripts/check-clib-dist.sh +0 -0
  176. {readcon_db-0.2.3 → readcon_db-0.2.5}/scripts/check-cpc-freeze.sh +0 -0
  177. {readcon_db-0.2.3 → readcon_db-0.2.5}/scripts/check-cxx-dist.sh +0 -0
  178. {readcon_db-0.2.3 → readcon_db-0.2.5}/scripts/crate_version.py +0 -0
  179. {readcon_db-0.2.3 → readcon_db-0.2.5}/scripts/export-landing.sh +0 -0
  180. {readcon_db-0.2.3 → readcon_db-0.2.5}/scripts/package-cxx.sh +0 -0
  181. {readcon_db-0.2.3 → readcon_db-0.2.5}/scripts/release-prep.sh +0 -0
  182. {readcon_db-0.2.3 → readcon_db-0.2.5}/scripts/set-version.sh +0 -0
  183. {readcon_db-0.2.3 → readcon_db-0.2.5}/scripts/sync-version.py +0 -0
  184. {readcon_db-0.2.3 → readcon_db-0.2.5}/scripts/test_check_version_lockstep.py +0 -0
  185. {readcon_db-0.2.3 → readcon_db-0.2.5}/src/bin/readcon-db.rs +0 -0
  186. {readcon_db-0.2.3 → readcon_db-0.2.5}/src/error.rs +0 -0
  187. {readcon_db-0.2.3 → readcon_db-0.2.5}/src/frame_codec.rs +0 -0
  188. {readcon_db-0.2.3 → readcon_db-0.2.5}/src/frame_scalars.rs +0 -0
  189. {readcon_db-0.2.3 → readcon_db-0.2.5}/src/keys.rs +0 -0
  190. {readcon_db-0.2.3 → readcon_db-0.2.5}/src/mpi_read.rs +0 -0
  191. {readcon_db-0.2.3 → readcon_db-0.2.5}/src/mpi_wire.rs +0 -0
  192. {readcon_db-0.2.3 → readcon_db-0.2.5}/src/select.rs +0 -0
  193. {readcon_db-0.2.3 → readcon_db-0.2.5}/src/shard.rs +0 -0
  194. {readcon_db-0.2.3 → readcon_db-0.2.5}/src/topology.rs +0 -0
  195. {readcon_db-0.2.3 → readcon_db-0.2.5}/tests/atom_order.rs +0 -0
  196. {readcon_db-0.2.3 → readcon_db-0.2.5}/tests/canonical_dump.rs +0 -0
  197. {readcon_db-0.2.3 → readcon_db-0.2.5}/tests/catalog_claims.rs +0 -0
  198. {readcon_db-0.2.3 → readcon_db-0.2.5}/tests/claims_shard.rs +0 -0
  199. {readcon_db-0.2.3 → readcon_db-0.2.5}/tests/cli_refuse.rs +0 -0
  200. {readcon_db-0.2.3 → readcon_db-0.2.5}/tests/cmake-project/CMakeLists.txt +0 -0
  201. {readcon_db-0.2.3 → readcon_db-0.2.5}/tests/cooked_soa_authority.rs +0 -0
  202. {readcon_db-0.2.3 → readcon_db-0.2.5}/tests/meson-wrap/meson.build +0 -0
  203. {readcon_db-0.2.3 → readcon_db-0.2.5}/tests/mpi-c/ingest_smoke.c +0 -0
  204. {readcon_db-0.2.3 → readcon_db-0.2.5}/tests/topology_cli.rs +0 -0
  205. {readcon_db-0.2.3 → readcon_db-0.2.5}/website/assets/logo.svg +0 -0
  206. {readcon_db-0.2.3 → readcon_db-0.2.5}/website/assets/wordmark.svg +0 -0
  207. {readcon_db-0.2.3 → readcon_db-0.2.5}/website/css/site.css +0 -0
  208. {readcon_db-0.2.3 → readcon_db-0.2.5}/website/export.el +0 -0
  209. {readcon_db-0.2.3 → readcon_db-0.2.5}/website/index.html +0 -0
  210. {readcon_db-0.2.3 → readcon_db-0.2.5}/website/index.org +0 -0
@@ -0,0 +1,75 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main, "fix/**", "feat/**", "ci/**"]
6
+ pull_request:
7
+ workflow_dispatch:
8
+
9
+ concurrency:
10
+ group: ci-${{ github.ref }}
11
+ cancel-in-progress: true
12
+
13
+ permissions:
14
+ contents: read
15
+
16
+ env:
17
+ CARGO_TERM_COLOR: always
18
+
19
+ jobs:
20
+ test:
21
+ name: cargo test (${{ matrix.os }})
22
+ runs-on: ${{ matrix.os }}
23
+ strategy:
24
+ fail-fast: false
25
+ matrix:
26
+ os: [ubuntu-latest, macos-latest]
27
+ steps:
28
+ - uses: actions/checkout@v4
29
+ - uses: dtolnay/rust-toolchain@stable
30
+ with:
31
+ components: clippy
32
+ - name: Cache cargo
33
+ uses: Swatinem/rust-cache@v2
34
+ - name: Install Python headers
35
+ if: runner.os == 'Linux'
36
+ run: sudo apt-get update && sudo apt-get install -y python3-dev
37
+ - name: Test (locked)
38
+ run: cargo test --locked --all-targets
39
+ - name: Test with the C ABI (capi)
40
+ run: cargo test --locked --all-targets --features capi
41
+ - name: Clippy
42
+ run: cargo clippy --locked --all-targets
43
+ - name: Clippy with the C ABI (capi)
44
+ run: cargo clippy --locked --all-targets --features capi
45
+ - name: Docs
46
+ run: cargo doc --locked --no-deps
47
+ - name: Verify registry package
48
+ run: cargo package --locked
49
+
50
+ pytest:
51
+ name: pytest (ubuntu-latest)
52
+ runs-on: ubuntu-latest
53
+ steps:
54
+ - uses: actions/checkout@v4
55
+ - uses: dtolnay/rust-toolchain@stable
56
+ - name: Cache cargo
57
+ uses: Swatinem/rust-cache@v2
58
+ - uses: actions/setup-python@v5
59
+ with:
60
+ python-version: "3.12"
61
+ - name: Install test dependencies
62
+ run: |
63
+ python -m pip install --upgrade pip
64
+ python -m pip install maturin pytest numpy h5py MDAnalysis ase "readcon==0.23.2"
65
+ - name: Build the wheel
66
+ working-directory: python
67
+ run: maturin build --locked --release --features python --out ../dist
68
+ - name: Install the wheel
69
+ run: python -m pip install dist/readcon_db-*.whl
70
+ - name: Build the C ABI library for the real-archive comparison
71
+ run: cargo build --locked --release --features capi --lib
72
+ - name: Test
73
+ env:
74
+ READCON_DB_CAPI_LIB: ${{ github.workspace }}/target/release/libreadcon_db.so
75
+ run: python -m pytest python/tests -q -rfEs
@@ -106,7 +106,7 @@ jobs:
106
106
  - name: C wrapper on a split communicator
107
107
  run: |
108
108
  set -euo pipefail
109
- cargo build --features mpi --lib
109
+ cargo build --features mpi,capi --lib
110
110
  ${{ matrix.cc }} -Iinclude tests/mpi-c/ingest_smoke.c -Ltarget/debug -lreadcon_db -Wl,-rpath,$PWD/target/debug -o ingest_smoke
111
111
  for p in 1 2 3 4; do
112
112
  T=$(mktemp -d)
@@ -1,5 +1,53 @@
1
1
  # Changelog
2
2
 
3
+ ## v0.2.5 - 2026-11-28
4
+ #### Features
5
+ - (**python**) expose the observation archive writer - (791f832) - *HaoZeke*
6
+ - (**python**) read observation archives as readcon frames - (f5b0290) - *HaoZeke*
7
+ - append CON text onto a live trajectory - (8845e31) - *HaoZeke*
8
+ #### Bug Fixes
9
+ - (**corpus**) report a failed key scan instead of truncating it - (8d1becf) - *HaoZeke*
10
+ - (**python**) label a v3.1 clock and its velocities together - (3adeaca) - *HaoZeke*
11
+ #### Documentation
12
+ - (**python**) document reading observation archives - (ca678db) - *HaoZeke*
13
+ - date the citation release with the v0.2.4 tag - (da2940f) - *HaoZeke*
14
+ #### Tests
15
+ - (**python**) compare a written archive with the C ABI text path - (a132632) - *HaoZeke*
16
+ - (**python**) cover archive reads, writes and a real archive - (84dd0b9) - *HaoZeke*
17
+ - pin the claim expiry margin test to its clock - (b4afa8d) - *HaoZeke*
18
+ #### Build system
19
+ - (**python**) depend on readcon 0.23 - (84cef59) - *HaoZeke*
20
+ #### CI
21
+ - run the Python test suite against a built wheel - (3ce9432) - *HaoZeke*
22
+
23
+ ## v0.2.4 - 2026-11-25
24
+ #### Features
25
+ - expose hash_con_text to c, fortran and python - (6704042) - *HaoZeke*
26
+ #### Bug Fixes
27
+ - free a parsed frame in this library - (c6db980) - *HaoZeke*
28
+ - compile mimalloc with local-dynamic tls - (f9c24f9) - *HaoZeke*
29
+ - hash con text over the stored source span - (7d45827) - *HaoZeke*
30
+ - rescale frame units through the column arrays - (73de882) - *HaoZeke*
31
+ - keep source spans in extend_trajectory_str - (de86b9c) - *HaoZeke*
32
+ - compile the C ABI only with the capi feature - (05bf53f) - *HaoZeke*
33
+ #### Documentation
34
+ - say that a source build needs cmake outside windows - (b7a45bb) - *HaoZeke*
35
+ - record resume of six-decimal extend frames - (fbcc627) - *HaoZeke*
36
+ - say that the C ABI needs the capi feature - (2d1ce76) - *HaoZeke*
37
+ #### Tests
38
+ - reject static tls on the linux cdylibs - (344ae77) - *HaoZeke*
39
+ - record that con major-4 files are refused at ingest - (eb12d0b) - *HaoZeke*
40
+ - cover extend text identity and six-decimal resumes - (6daef42) - *HaoZeke*
41
+ - build each capi_symbols feature set in its own target dir - (c03b56d) - *HaoZeke*
42
+ - pin rkrdb_ exports to the capi feature - (7024018) - *HaoZeke*
43
+ #### Build system
44
+ - require readcon-core 0.23.2 - (98a127d) - *HaoZeke*
45
+ - always enable the capi feature for C ABI builds - (98df81b) - *HaoZeke*
46
+ #### Refactoring
47
+ - name FloatFormat::RoundTrip for in-memory frames - (11ac25f) - *HaoZeke*
48
+ #### Style
49
+ - taplo-format Cargo.toml - (c153759) - *HaoZeke*
50
+
3
51
  ## v0.2.3 - 2026-11-19
4
52
  #### Bug Fixes
5
53
  - join and split preserve catalog records and work claims across shards
@@ -10,9 +10,9 @@ authors:
10
10
  license: MIT
11
11
  repository-code: "https://github.com/lode-org/readcon-db"
12
12
  # [[[cog cog.outl(f'version: {VERSION}') ]]]
13
- version: 0.2.3
13
+ version: 0.2.5
14
14
  # [[[end]]]
15
- date-released: "2026-08-15"
15
+ date-released: "2026-11-28"
16
16
  keywords:
17
17
  - CON
18
18
  - LMDB
@@ -53,7 +53,7 @@ endif()
53
53
 
54
54
  option(BUILD_SHARED_LIBS "Use a shared library by default instead of a static one" ON)
55
55
  option(READCON_DB_INSTALL_BOTH_STATIC_SHARED "Install both shared and static libraries" ON)
56
- set(READCON_DB_CARGO_FEATURES "" CACHE STRING "Comma-free cargo features to enable (space-separated)")
56
+ set(READCON_DB_CARGO_FEATURES "" CACHE STRING "Extra cargo features to enable (space-separated). The capi feature is always enabled.")
57
57
 
58
58
  set(BIN_INSTALL_DIR "bin" CACHE PATH "Path relative to CMAKE_INSTALL_PREFIX where to install binaries/DLL")
59
59
  set(LIB_INSTALL_DIR "lib" CACHE PATH "Path relative to CMAKE_INSTALL_PREFIX where to install libraries")
@@ -147,10 +147,11 @@ endif()
147
147
 
148
148
  set(CARGO_TARGET_DIR ${CMAKE_CURRENT_BINARY_DIR}/cargo-target)
149
149
  set(CARGO_BUILD_ARG "${CARGO_BUILD_ARG};--target-dir=${CARGO_TARGET_DIR}")
150
- if (NOT "${READCON_DB_CARGO_FEATURES}" STREQUAL "")
151
- string(REPLACE " " "," _feats "${READCON_DB_CARGO_FEATURES}")
152
- set(CARGO_BUILD_ARG "${CARGO_BUILD_ARG};--features=${_feats}")
153
- endif()
150
+ # The C ABI (src/ffi.rs) is only compiled with the capi feature.
151
+ set(_cargo_features "capi ${READCON_DB_CARGO_FEATURES}")
152
+ string(STRIP "${_cargo_features}" _cargo_features)
153
+ string(REPLACE " " "," _feats "${_cargo_features}")
154
+ set(CARGO_BUILD_ARG "${CARGO_BUILD_ARG};--features=${_feats}")
154
155
 
155
156
  if ("${RUST_BUILD_TARGET}" STREQUAL "")
156
157
  if (CARGO_VERSION_RAW MATCHES "host: ([a-zA-Z0-9_\\-]*)\n")
@@ -122,6 +122,15 @@ dependencies = [
122
122
  "libloading",
123
123
  ]
124
124
 
125
+ [[package]]
126
+ name = "cmake"
127
+ version = "0.1.58"
128
+ source = "registry+https://github.com/rust-lang/crates.io-index"
129
+ checksum = "c0f78a02292a74a88ac736019ab962ece0bc380e3f977bf72e376c5d78ff0678"
130
+ dependencies = [
131
+ "cc",
132
+ ]
133
+
125
134
  [[package]]
126
135
  name = "conv"
127
136
  version = "0.3.3"
@@ -180,6 +189,12 @@ dependencies = [
180
189
  "typenum",
181
190
  ]
182
191
 
192
+ [[package]]
193
+ name = "cty"
194
+ version = "0.2.2"
195
+ source = "registry+https://github.com/rust-lang/crates.io-index"
196
+ checksum = "b365fabc795046672053e29c954733ec3b05e4be654ab130fe8f1f94d7051f35"
197
+
183
198
  [[package]]
184
199
  name = "custom_derive"
185
200
  version = "0.1.7"
@@ -267,6 +282,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
267
282
  checksum = "843fba2746e448b37e26a819579957415c8cef339bf08564fe8b7ddbd959573c"
268
283
  dependencies = [
269
284
  "crc32fast",
285
+ "libz-ng-sys",
270
286
  "miniz_oxide",
271
287
  ]
272
288
 
@@ -510,6 +526,26 @@ dependencies = [
510
526
  "windows-link",
511
527
  ]
512
528
 
529
+ [[package]]
530
+ name = "libmimalloc-sys"
531
+ version = "0.1.49"
532
+ source = "registry+https://github.com/rust-lang/crates.io-index"
533
+ checksum = "6a45a52f43e1c16f667ccfe4dd8c85b7f7c204fd5e3bf46c5b0db9a5c3c0b8e9"
534
+ dependencies = [
535
+ "cc",
536
+ "cty",
537
+ ]
538
+
539
+ [[package]]
540
+ name = "libz-ng-sys"
541
+ version = "1.1.33"
542
+ source = "registry+https://github.com/rust-lang/crates.io-index"
543
+ checksum = "922f69da893772fd14ea9118138d1111f89830a9753438ddf69987f24600cb63"
544
+ dependencies = [
545
+ "cmake",
546
+ "libc",
547
+ ]
548
+
513
549
  [[package]]
514
550
  name = "linux-raw-sys"
515
551
  version = "0.12.1"
@@ -558,6 +594,15 @@ dependencies = [
558
594
  "libc",
559
595
  ]
560
596
 
597
+ [[package]]
598
+ name = "mimalloc"
599
+ version = "0.1.52"
600
+ source = "registry+https://github.com/rust-lang/crates.io-index"
601
+ checksum = "2d4139bb28d14ad1facf21d5eb8825051b326e172d216b39f6d31df53cc97862"
602
+ dependencies = [
603
+ "libmimalloc-sys",
604
+ ]
605
+
561
606
  [[package]]
562
607
  name = "minimal-lexical"
563
608
  version = "0.2.1"
@@ -651,6 +696,15 @@ dependencies = [
651
696
  "autocfg",
652
697
  ]
653
698
 
699
+ [[package]]
700
+ name = "object"
701
+ version = "0.36.7"
702
+ source = "registry+https://github.com/rust-lang/crates.io-index"
703
+ checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87"
704
+ dependencies = [
705
+ "memchr",
706
+ ]
707
+
654
708
  [[package]]
655
709
  name = "once_cell"
656
710
  version = "1.21.4"
@@ -850,9 +904,9 @@ checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3"
850
904
 
851
905
  [[package]]
852
906
  name = "readcon-core"
853
- version = "0.21.0"
907
+ version = "0.23.2"
854
908
  source = "registry+https://github.com/rust-lang/crates.io-index"
855
- checksum = "08b9703489462ee25ce5ccc00bc357ec2a14c08a5ea2de6778ca612b64839060"
909
+ checksum = "87c32a8afef74ec96ed1a8e09e5f4ae56ae3cd982791d438a23b51eeeddce6c8"
856
910
  dependencies = [
857
911
  "dlpk",
858
912
  "fast-float2",
@@ -861,6 +915,7 @@ dependencies = [
861
915
  "libc",
862
916
  "memchr",
863
917
  "memmap2",
918
+ "mimalloc",
864
919
  "ndarray",
865
920
  "rustc-hash",
866
921
  "ryu",
@@ -869,11 +924,13 @@ dependencies = [
869
924
 
870
925
  [[package]]
871
926
  name = "readcon-db"
872
- version = "0.2.3"
927
+ version = "0.2.5"
873
928
  dependencies = [
874
929
  "heed",
875
930
  "libc",
931
+ "mimalloc",
876
932
  "mpi",
933
+ "object",
877
934
  "pyo3",
878
935
  "readcon-core",
879
936
  "serde",
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "readcon-db"
3
- version = "0.2.3"
3
+ version = "0.2.5"
4
4
  edition = "2021"
5
5
  description = "Mmap-backed CON frame corpus (Heed/LMDB), xxHash exact match, multi-language FFI"
6
6
  license = "MIT"
@@ -19,6 +19,9 @@ crate-type = ["lib", "cdylib", "staticlib"]
19
19
  [features]
20
20
  default = []
21
21
  python = ["dep:pyo3"]
22
+ # Compiles the C ABI (src/ffi.rs and the rkrdb_* exports in src/archive.rs
23
+ # and src/mpi_ingest.rs). Off by default so Rust consumers do not export
24
+ # unmangled rkrdb_* symbols. C, Fortran and cargo-c builds must enable it.
22
25
  capi = []
23
26
  # Parallel ingest over a caller-supplied communicator (rsmpi). Needs an MPI
24
27
  # implementation and libclang at build time. See src/mpi_ingest.rs.
@@ -27,7 +30,15 @@ mpi = ["dep:mpi"]
27
30
  [dependencies]
28
31
  heed = "0.21"
29
32
  # The pinned writer provides exact numeric CON and JSON round trips.
30
- readcon-core = "=0.21.0"
33
+ readcon-core = "=0.23.2"
34
+ # readcon-core installs mimalloc as the global allocator and has no
35
+ # feature to turn that off. The C objects default to initial-exec TLS,
36
+ # which sets DF_STATIC_TLS on this cdylib. Cargo unifies
37
+ # local_dynamic_tls onto that same mimalloc.
38
+ mimalloc = { version = "0.1.43", default-features = false, features = [
39
+ "extended",
40
+ "local_dynamic_tls",
41
+ ] }
31
42
  thiserror = "2"
32
43
  serde = { version = "1", features = ["derive"] }
33
44
  serde_json = "1"
@@ -41,10 +52,20 @@ mpi = { version = "0.8", optional = true, default-features = false }
41
52
  tempfile = "3"
42
53
  sha2 = "0.10"
43
54
  libc = "0.2"
55
+ object = { version = "0.36", default-features = false, features = [
56
+ "read_core",
57
+ "archive",
58
+ "elf",
59
+ "macho",
60
+ "pe",
61
+ "coff",
62
+ ] }
44
63
 
45
64
  [package.metadata.docs.rs]
46
65
  all-features = false
47
66
 
67
+ # cargo-c has no per-package default features: run
68
+ # `cargo cbuild --features capi` / `cargo cinstall --features capi`.
48
69
  [package.metadata.capi]
49
70
  min_version = "0.10.17"
50
71
 
@@ -1,3 +1,17 @@
1
+ Metadata-Version: 2.4
2
+ Name: readcon-db
3
+ Version: 0.2.5
4
+ Requires-Dist: readcon>=0.23,<0.24
5
+ Summary: Mmap CON corpus store (LMDB/Heed) with xxHash exact match
6
+ Home-Page: https://lode-org.github.io/readcon-db/
7
+ License: MIT
8
+ Requires-Python: >=3.10
9
+ Description-Content-Type: text/markdown
10
+ Project-URL: Documentation, https://lode-org.github.io/readcon-db/
11
+ Project-URL: Homepage, https://github.com/lode-org/readcon-db
12
+ Project-URL: Issues, https://github.com/lode-org/readcon-db/issues
13
+ Project-URL: Repository, https://github.com/lode-org/readcon-db
14
+
1
15
  # readcon-db
2
16
 
3
17
  **Mmap-backed CON/convel corpus store** (LMDB via [Heed](https://github.com/meilisearch/heed)), **non-SQL selection**, **xxHash3-128 exact match**, and **Rust / C / C++ / Python / Fortran** bindings.
@@ -26,11 +40,16 @@ Docs: <https://lode-org.github.io/readcon-db/> · crate: <https://crates.io/crat
26
40
 
27
41
  ## Quick start (from source)
28
42
 
43
+ Outside Windows a source build also needs CMake: readcon-core links
44
+ zlib-ng, which `libz-ng-sys` builds with CMake.
45
+
29
46
  ```bash
30
47
  git clone https://github.com/lode-org/readcon-db
31
48
  cd readcon-db
32
49
  cargo test --locked
33
- cargo build --release # libreadcon_db + CLI readcon-db
50
+ cargo test --locked --features capi
51
+ cargo build --release # CLI readcon-db; no C symbols
52
+ cargo build --release --features capi # libreadcon_db with the C ABI
34
53
  ```
35
54
 
36
55
  Optional LODE sibling checkout (edit core + db together): clone both under the same parent, then create **untracked** `.cargo/config.toml` in `readcon-db`:
@@ -73,7 +92,7 @@ let h = db.frame_hash(keys[0])?;
73
92
 
74
93
  Foreign trajectories: **`readcon.read_chemfiles("traj.xyz")` → frames → ingest into readcon-db** (chemfiles-enabled build), not `ase.io.read`.
75
94
 
76
- Python `append_trajectory_frames` commits 64 frames at a time. `get_frame` returns a `StoredFrame` (`atoms[i]` builds that atom only). Gzip and zstd files are read with `readcon.read_con`, then appended. Python `append_trajectory` and Rust `append_trajectory_path` read UTF-8 and do not decompress. `readcon-db` does not register an `ase.ioformats` entry point. Guide: [`docs/orgmode/howto/streaming.org`](docs/orgmode/howto/streaming.org). Upgrade from 0.2.0: [`docs/orgmode/howto/migration.org`](docs/orgmode/howto/migration.org).
95
+ Python `append_trajectory_frames` commits 64 frames at a time. `get_frame` returns a `StoredFrame` (`atoms[i]` builds that atom only). Gzip and zstd files are read with `readcon.read_con`, then appended. Python `append_trajectory` and Rust `append_trajectory_path` read UTF-8 and do not decompress. `readcon-db` does not register an `ase.ioformats` entry point. Python `ArchiveReader(path)` opens an observation archive (`observations.rdb`) read-only and returns each stored frame as a `readcon.ConFrame` with its energy and JSON metadata ([`docs/orgmode/reference/python.org`](docs/orgmode/reference/python.org#observation-archives)). Guide: [`docs/orgmode/howto/streaming.org`](docs/orgmode/howto/streaming.org). Upgrade from 0.2.0: [`docs/orgmode/howto/migration.org`](docs/orgmode/howto/migration.org).
77
96
 
78
97
  ## Design
79
98
 
@@ -123,3 +142,4 @@ Optional RCSO numerics in `frames_soa` (opt-in cook). Ingest and `migrate` do no
123
142
  non-authoritative: CON text in `frames` is the sole authority for hash,
124
143
  dedup, join/split, and reindex. User doc:
125
144
  [`docs/orgmode/cooked-soa.org`](docs/orgmode/cooked-soa.org).
145
+
@@ -1,16 +1,3 @@
1
- Metadata-Version: 2.4
2
- Name: readcon-db
3
- Version: 0.2.3
4
- Summary: Mmap CON corpus store (LMDB/Heed) with xxHash exact match
5
- Home-Page: https://lode-org.github.io/readcon-db/
6
- License: MIT
7
- Requires-Python: >=3.9
8
- Description-Content-Type: text/markdown
9
- Project-URL: Documentation, https://lode-org.github.io/readcon-db/
10
- Project-URL: Homepage, https://github.com/lode-org/readcon-db
11
- Project-URL: Issues, https://github.com/lode-org/readcon-db/issues
12
- Project-URL: Repository, https://github.com/lode-org/readcon-db
13
-
14
1
  # readcon-db
15
2
 
16
3
  **Mmap-backed CON/convel corpus store** (LMDB via [Heed](https://github.com/meilisearch/heed)), **non-SQL selection**, **xxHash3-128 exact match**, and **Rust / C / C++ / Python / Fortran** bindings.
@@ -39,11 +26,16 @@ Docs: <https://lode-org.github.io/readcon-db/> · crate: <https://crates.io/crat
39
26
 
40
27
  ## Quick start (from source)
41
28
 
29
+ Outside Windows a source build also needs CMake: readcon-core links
30
+ zlib-ng, which `libz-ng-sys` builds with CMake.
31
+
42
32
  ```bash
43
33
  git clone https://github.com/lode-org/readcon-db
44
34
  cd readcon-db
45
35
  cargo test --locked
46
- cargo build --release # libreadcon_db + CLI readcon-db
36
+ cargo test --locked --features capi
37
+ cargo build --release # CLI readcon-db; no C symbols
38
+ cargo build --release --features capi # libreadcon_db with the C ABI
47
39
  ```
48
40
 
49
41
  Optional LODE sibling checkout (edit core + db together): clone both under the same parent, then create **untracked** `.cargo/config.toml` in `readcon-db`:
@@ -86,7 +78,7 @@ let h = db.frame_hash(keys[0])?;
86
78
 
87
79
  Foreign trajectories: **`readcon.read_chemfiles("traj.xyz")` → frames → ingest into readcon-db** (chemfiles-enabled build), not `ase.io.read`.
88
80
 
89
- Python `append_trajectory_frames` commits 64 frames at a time. `get_frame` returns a `StoredFrame` (`atoms[i]` builds that atom only). Gzip and zstd files are read with `readcon.read_con`, then appended. Python `append_trajectory` and Rust `append_trajectory_path` read UTF-8 and do not decompress. `readcon-db` does not register an `ase.ioformats` entry point. Guide: [`docs/orgmode/howto/streaming.org`](docs/orgmode/howto/streaming.org). Upgrade from 0.2.0: [`docs/orgmode/howto/migration.org`](docs/orgmode/howto/migration.org).
81
+ Python `append_trajectory_frames` commits 64 frames at a time. `get_frame` returns a `StoredFrame` (`atoms[i]` builds that atom only). Gzip and zstd files are read with `readcon.read_con`, then appended. Python `append_trajectory` and Rust `append_trajectory_path` read UTF-8 and do not decompress. `readcon-db` does not register an `ase.ioformats` entry point. Python `ArchiveReader(path)` opens an observation archive (`observations.rdb`) read-only and returns each stored frame as a `readcon.ConFrame` with its energy and JSON metadata ([`docs/orgmode/reference/python.org`](docs/orgmode/reference/python.org#observation-archives)). Guide: [`docs/orgmode/howto/streaming.org`](docs/orgmode/howto/streaming.org). Upgrade from 0.2.0: [`docs/orgmode/howto/migration.org`](docs/orgmode/howto/migration.org).
90
82
 
91
83
  ## Design
92
84
 
@@ -136,4 +128,3 @@ Optional RCSO numerics in `frames_soa` (opt-in cook). Ingest and `migrate` do no
136
128
  non-authoritative: CON text in `frames` is the sole authority for hash,
137
129
  dedup, join/split, and reindex. User doc:
138
130
  [`docs/orgmode/cooked-soa.org`](docs/orgmode/cooked-soa.org).
139
-
@@ -0,0 +1 @@
1
+ Python `ArchiveReader` opens an observation archive or any corpus read-only and returns every stored frame, in `(traj_id, frame_idx)` order, as an `Observation` that holds the `readcon.ConFrame`, its CON text, energy, metadata and the permutation back to the writer's atom order. Python `ObservationArchive` is the archive writer. A missing path raises `FileNotFoundError` and a directory that is not a corpus raises `ArchiveError`.
@@ -0,0 +1 @@
1
+ The `readcon-db` Python package depends on `readcon>=0.23,<0.24`, the range of the pinned readcon-core, and so needs Python 3.10 or newer.
@@ -0,0 +1 @@
1
+ `rkrdb_extend_trajectory_str` and Python `extend_trajectory_str` append CON text after the live frame count. The new text is parsed before the write. A span that does not parse is not written, and earlier frames stay as stored.
@@ -0,0 +1 @@
1
+ Python ingest writes one `units.time` for a v3.1 frame's clock and velocities. A pre-3.1 clock stays in its own unit (or `fs`) and velocities are converted into that unit. A clock with no velocities still gets `units.time`. A v3.1 frame that already names `units.time` is unchanged.
@@ -66,7 +66,7 @@ See @@rst::doc:`/cooked-soa`@@.
66
66
  :PROPERTIES:
67
67
  :CUSTOM_ID: ingest-path
68
68
  :END:
69
- 1. Path / CON text: =ConFrameIterator::next_with_raw_span= when possible.
69
+ 1. Path / CON text: =ConFrameIterator::next_with_raw_span= for append and for extend of a file or string. In-memory frames and a units stamp use the round-trip writer. An older six-decimal row is left as stored.
70
70
  2. *In-memory* =append_trajectory_frames= / =extend_trajectory_frames= for chemfiles → corpus.
71
71
  3. Parse once for indexes (natoms, symbols, composition, energy, fmax, flags).
72
72
  4. Store blob; compute *xxHash3-128*; update secondary B-trees.
@@ -72,6 +72,10 @@ Formula encoding: sorted non-empty symbols, =Sym:count= joined by =|= (e.g. =Cu
72
72
  2. *In-memory frames* (=append_trajectory_frames= / =extend_trajectory_frames=) for chemfiles → =ConFrame= → corpus without a temp file. Python: =append_trajectory_str= / =append_trajectory_frames=. C: =rkrdb_append_trajectory_str= / =rkrdb_append_trajectory_frame= (=RKRConFrame*=).
73
73
  3. Directory ingest (=ingest_directory=).
74
74
 
75
+ =extend_trajectory_str= and =extend_trajectory_path= (no units stamp) store those same raw spans. Python =extend_trajectory= and C =rkrdb_extend_trajectory= are that path. A units stamp, and in-memory =extend_trajectory_frames=, write with readcon-core =FloatFormat::RoundTrip= because the original text is gone.
76
+
77
+ Stores already written at six decimal places are not migrated. Open and a later extend leave those rows byte for byte. A resume that hashes the original high-precision file misses and starts a new trajectory. A resume that hashes the stored six-decimal text hits the same trajectory when that text still parses. A mass near =1e-9= written at six decimals can become =0.000000=, which fails mass validation, so that stored spelling does not resume.
78
+
75
79
  ** Reindex
76
80
  :PROPERTIES:
77
81
  :CUSTOM_ID: reindex
@@ -35,10 +35,13 @@ Install [[https://pypi.org/project/readcon/][readcon]] (core) as well when you n
35
35
  git clone https://github.com/lode-org/readcon-db
36
36
  cd readcon-db
37
37
  cargo test --locked
38
- cargo build --release # libreadcon_db + CLI readcon-db
38
+ cargo test --locked --features capi
39
+ cargo build --release # CLI readcon-db; no C symbols
40
+ cargo build --release --features capi # libreadcon_db with the C ABI
39
41
  #+end_src
40
42
 
41
43
  =readcon-core= comes from crates.io (~{{{readcon-core-req}}}~).
44
+ A build from source, including =cargo install=, the Python sdist and the cxx tarball, needs CMake outside Windows: readcon-core links zlib-ng, which =libz-ng-sys= builds with CMake.
42
45
  Add an *untracked* =.cargo/config.toml= with the patch below to build against a local core tree.
43
46
 
44
47
  #+begin_src toml
@@ -57,6 +60,8 @@ maturin develop --release --features python --manifest-path python/pyproject.tom
57
60
  :PROPERTIES:
58
61
  :CUSTOM_ID: c-c-no-cbindgen
59
62
  :END:
63
+ The C ABI (=rkrdb_*=) is compiled only with the =capi= cargo feature, which is off by default so that Rust consumers do not export unmangled =rkrdb_*= symbols. The CMake and Meson builds, =scripts/package-clib.sh= and the clib tarball enable =capi= for you. A plain =cargo build --features capi=, or =cargo cbuild --features capi= with cargo-c, is needed when you drive cargo yourself. =READCON_DB_CARGO_FEATURES= (CMake) and =-Dcargo_features= (Meson) add features on top of =capi=.
64
+
60
65
  =include/readcon-db.h= is hand-written and shipped. Optional =include/readcon-db-mpi.h= takes the caller's =MPI_Comm= (not linked into the library). CMake FetchContent, Meson wrap, and =pkg-config= do *not* run cbindgen.
61
66
 
62
67
  CMake:
@@ -103,7 +108,7 @@ export READCON_DB_LIB="$PREFIX/lib/libreadcon_db.so"
103
108
  pkg-config --cflags --libs readcon-db
104
109
  #+end_src
105
110
 
106
- The cxx tarball still needs rustc/cargo. The clib tarball is the Fortran / C path that does not.
111
+ The cxx tarball still needs rustc/cargo, and CMake outside Windows. The clib tarball is the Fortran / C path that does not.
107
112
 
108
113
  ** Fortran
109
114
  :PROPERTIES:
@@ -117,7 +122,7 @@ fpm build --flag "$(pkg-config --cflags readcon-db)" \
117
122
  --link-flag "$(pkg-config --libs readcon-db) -ldl -lpthread -lm"
118
123
  #+end_src
119
124
 
120
- From a checkout (after a release build of the cdylib):
125
+ From a checkout (after =cargo build --release --features capi=):
121
126
 
122
127
  #+begin_src sh
123
128
  cd fortran/ReadConDb && fpm build --flag "-I../../include" \
@@ -4,7 +4,7 @@
4
4
  :PROPERTIES:
5
5
  :CUSTOM_ID: mpi-ingest-and-export
6
6
  :END:
7
- Build with =--features mpi= against one MPI implementation (=MPICC=mpicc.mpich= or =mpicc.openmpi=). The library never calls =MPI_Init= and only uses the communicator you pass.
7
+ Build with =--features mpi= against one MPI implementation (=MPICC=mpicc.mpich= or =mpicc.openmpi=). The library never calls =MPI_Init= and only uses the communicator you pass. The C and Fortran entry point =rkrdb_mpi_ingest_paths_f= also needs the =capi= feature (=--features mpi,capi=).
8
8
 
9
9
  ** Ingest
10
10
  :PROPERTIES:
@@ -34,8 +34,20 @@ Rust is =ConCorpus::open= and =ConCorpus::open_readonly=. The command line is =r
34
34
  :END:
35
35
  =append_trajectory_frames= commits 64 frames at a time. The first group is a new trajectory. Each later group extends it. A list returned by =read_con= is written from the frames the parser already stored, so the append does not build a Python atom for every site.
36
36
 
37
+ Each group of CON text from =readcon.write_con_string= is parsed by readcon-db and stored with readcon-core =FloatFormat::RoundTrip=, so every finite value reads back as the same binary64 and the stored spelling does not depend on the default writer of the installed =readcon= wheel. =ConCorpus.hash_con_text= of the stored text equals =frame_hash=.
38
+
37
39
  Rust =ConCorpus::append_trajectory_frames= still commits the slice you pass in one transaction. The grouping is the Python binding.
38
40
 
41
+ ** Extend a live trajectory
42
+ :PROPERTIES:
43
+ :CUSTOM_ID: extend-a-live-trajectory
44
+ :END:
45
+ Python =extend_trajectory=, C =rkrdb_extend_trajectory=, and Rust =extend_trajectory_str= / =extend_trajectory_path= append the file's own frame text. The content hash is the xxh3-128 of that text, so a later open of the same file finds the same generation.
46
+
47
+ To look a file up before a resume, hash it with Rust =ConCorpus::hash_con_text=, Python =ConCorpus.hash_con_text=, C =rkrdb_hash_con_text=, Fortran =db_hash_con_text=, or =readcon-db hash-file <file.con>=. All of them hash the first frame's source span as written, the same bytes the store hashed, and the result goes to =find_by_hash=.
48
+
49
+ A corpus written by an older extend stored those frames at six decimal places. Opening it does not rewrite the rows. Resuming from the original file misses those hashes and starts a new trajectory. Resuming from the stored six-decimal text hits when that text still parses. A mass near =1e-9= can round to =0.000000= and then fail to parse.
50
+
39
51
  ** Random access
40
52
  :PROPERTIES:
41
53
  :CUSTOM_ID: random-access
@@ -14,13 +14,13 @@ Header: [[https://github.com/lode-org/readcon-db/blob/main/include/readcon-db.h]
14
14
 
15
15
  #+begin_src C
16
16
  #define RKRDB_ABI_VERSION_MAJOR 1
17
- #define RKRDB_ABI_VERSION_MINOR 1
17
+ #define RKRDB_ABI_VERSION_MINOR 3
18
18
  #define RKRDB_ABI_LAYOUT_REVISION 1
19
19
 
20
20
  uint32_t rkrdb_abi_version_major(void);
21
21
  uint32_t rkrdb_abi_version_minor(void);
22
22
  uint32_t rkrdb_abi_layout_revision(void);
23
- const char *rkrdb_abi_stamp(void); /* "readcon-db/abi-1.1/layout-1" */
23
+ const char *rkrdb_abi_stamp(void); /* "readcon-db/abi-1.3/layout-1" */
24
24
  int rkrdb_abi_compatible(uint32_t major, uint32_t minor, uint32_t layout_revision);
25
25
  #+end_src
26
26
 
@@ -35,7 +35,7 @@ if (!rkrdb_abi_compatible(RKRDB_ABI_VERSION_MAJOR, RKRDB_ABI_VERSION_MINOR,
35
35
  }
36
36
  #+end_src
37
37
 
38
- The numbers live in =src/ffi.rs= and are repeated in =include/readcon-db.h=, which is hand-written. The =abi_header_carries_the_stamp= unit test fails when the two disagree. They do not follow the package version, and a release that changes no exported symbol leaves them where they are.
38
+ The numbers live in =src/ffi.rs= (compiled with the =capi= feature) and are repeated in =include/readcon-db.h=, which is hand-written. The =abi_header_carries_the_stamp= unit test fails when the two disagree. They do not follow the package version, and a release that changes no exported symbol leaves them where they are.
39
39
 
40
40
  - =RKRDB_ABI_VERSION_MAJOR=: increment for a change an old caller cannot survive: removing or renaming an exported function, changing a signature, or changing the meaning of an argument or status code. Reset the minor to 0.
41
41
  - =RKRDB_ABI_VERSION_MINOR=: increment for an additive change that leaves every old call valid, such as a new exported function or a new status code.
@@ -85,6 +85,9 @@ rkrdb_result_key(id, 0, &traj, &frame);
85
85
  uint8_t hash[16];
86
86
  rkrdb_frame_hash(id, traj, frame, hash);
87
87
  rkrdb_select_hash(id, hash);
88
+ /* text, len: a CON file read into memory */
89
+ rkrdb_hash_con_text(text, len, hash); /* first frame, as the corpus stores it */
90
+ rkrdb_select_hash(id, hash);
88
91
  rkrdb_close(id);
89
92
  rkrdb_open_readonly("/tmp/corpus", &id);
90
93
  rkrdb_close(id);
@@ -92,9 +95,13 @@ rkrdb_close(id);
92
95
 
93
96
  Status: =RKRDB_OK= (0), =RKRDB_ERR= (-1), =RKRDB_NOT_FOUND= (-2), =RKRDB_NULL= (-3).
94
97
 
98
+ =rkrdb_hash_con_text= hashes the first frame's source span in =len= bytes of CON text, the bytes =rkrdb_append_trajectory=, =rkrdb_append_trajectory_str= and =rkrdb_extend_trajectory= store for it. It is the hash =readcon-db hash-file= prints. It does not parse and rewrite the frame, so a high-precision file finds its stored frame. =rkrdb_xxh3_128= hashes whatever bytes it is given. Added in ABI 1.2.
99
+
100
+ =rkrdb_get_frame= returns a parsed frame allocated in =libreadcon_db=. Free that pointer with =rkrdb_free_frame=. A null pointer is a no-op. =free_rkr_frame= in =libreadcon_core= frees with that library's allocator, and each shared library has its own copy, so it is not the matching free. Added in ABI 1.3.
101
+
95
102
  =rkrdb_h5md_*= returns =RKRDB_NULL= for an invalid handle. A collect failure returns =RKRDB_ERR= and leaves the message in =rkrdb_last_error=. =rkrdb_set_units= returns that missing-=units.time= error for a v3.1 clock or velocities frame instead of assuming =fs=. v1, v2, and v3.0 clocks with no =units.time= still convert as =fs=. H5MD velocities follow D10 and are written as =Angstrom ps-1=. v1, v2, and v3.0 frames use =(amu*angstrom^2/eV)^0.5= whatever the time label says. v3.1 frames use =units.time= and fail when a velocities section has no =units.time=. =rkrdb_set_velocity_time_unit= (C++ =Corpus::set_velocity_time_unit=) overrides that rule for a file that breaks it. Pass =fs= when the file really stored Angstrom/fs. The simulation clock uses =units.time= when that key is present. A v3.1 frame with =time= or =timestep= and no =units.time= is an error, and the same override supplies that missing clock unit. A present =units.time= still scales the clock. v1, v2, and v3.0 clocks with no =units.time= are read as =fs=.
96
103
 
97
- Link =libreadcon_db= from =cargo build --release= (=cdylib= / =staticlib=), or unpack the prebuilt =readcon-db-clib-$VERSION-$target.tar.gz= Release asset and =pkg-config --libs readcon-db=. See @@rst::doc:`/howto/install`@@.
104
+ Link =libreadcon_db= from =cargo build --release --features capi= (=cdylib= / =staticlib=), or unpack the prebuilt =readcon-db-clib-$VERSION-$target.tar.gz= Release asset and =pkg-config --libs readcon-db=. Without =capi= the library exports no =rkrdb_*= symbols. See @@rst::doc:`/howto/install`@@.
98
105
 
99
106
  C++ RAII:
100
107
 
@@ -6,7 +6,7 @@
6
6
  :END:
7
7
  Module: =fortran/ReadConDb/src/readcon_db.f90= (=bind(C)= to =rkrdb_*=).
8
8
 
9
- Link =libreadcon_db= from a checkout (=cargo build --release=) or from the prebuilt =readcon-db-clib-$VERSION-$target.tar.gz= Release asset (no local cargo). See @@rst::doc:`/howto/install`@@ and =fortran/README.md=.
9
+ Link =libreadcon_db= from a checkout (=cargo build --release --features capi=) or from the prebuilt =readcon-db-clib-$VERSION-$target.tar.gz= Release asset (no local cargo). See @@rst::doc:`/howto/install`@@ and =fortran/README.md=.
10
10
 
11
11
  #+begin_src fortran
12
12
  use readcon_db
@@ -22,7 +22,7 @@ call db_extend_units(id, 1_c_int64_t, "more.con", &
22
22
  call db_select_basic(id, 1_c_int64_t, "Cu", 1, 100000, 0, status)
23
23
  #+end_src
24
24
 
25
- See helpers =db_open=, =db_append=, =db_select_basic=, =db_result_count=, =db_result_key=, =db_frame_hash=, =db_xxh3_128= in the module source. Point your build system at =include/= for the C header if needed and =target/release/= (or the clib prefix =lib/= + =PKG_CONFIG_PATH=). Campaign shard/drain/join is the CLI; a Fortran rank that owns one shard opens =root/shard_XXXX= with =db_open= (@@rst::doc:`/howto/campaign`@@).
25
+ See helpers =db_open=, =db_append=, =db_select_basic=, =db_result_count=, =db_result_key=, =db_frame_hash=, =db_xxh3_128=, =db_hash_con_text= in the module source. =db_get_frame= returns a frame allocated in =libreadcon_db=; free it with =db_free_frame=. =db_hash_con_text= hashes the first frame of CON text the way the corpus stored it, so it matches =db_frame_hash= for a file appended or extended from its path. Point your build system at =include/= for the C header if needed and =target/release/= (or the clib prefix =lib/= + =PKG_CONFIG_PATH=). Campaign shard/drain/join is the CLI; a Fortran rank that owns one shard opens =root/shard_XXXX= with =db_open= (@@rst::doc:`/howto/campaign`@@).
26
26
 
27
27
  ** MPI: pack on root, Bcast on the caller INTEGER communicator
28
28
  :PROPERTIES: