readcon-db 0.2.0__tar.gz → 0.2.1__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 (186) hide show
  1. readcon_db-0.2.1/.github/workflows/lint.yml +47 -0
  2. {readcon_db-0.2.0 → readcon_db-0.2.1}/CHANGELOG.md +7 -0
  3. {readcon_db-0.2.0 → readcon_db-0.2.1}/CITATION.cff +3 -1
  4. {readcon_db-0.2.0 → readcon_db-0.2.1}/Cargo.lock +1 -1
  5. {readcon_db-0.2.0 → readcon_db-0.2.1}/Cargo.toml +1 -1
  6. {readcon_db-0.2.0 → readcon_db-0.2.1}/PKG-INFO +8 -1
  7. {readcon_db-0.2.0 → readcon_db-0.2.1}/README.md +7 -0
  8. {readcon_db-0.2.0 → readcon_db-0.2.1}/docs/orgmode/contributing/index.org +2 -2
  9. {readcon_db-0.2.0 → readcon_db-0.2.1}/docs/orgmode/cooked-soa.org +14 -10
  10. {readcon_db-0.2.0 → readcon_db-0.2.1}/docs/orgmode/explanation/architecture.org +4 -1
  11. {readcon_db-0.2.0 → readcon_db-0.2.1}/docs/orgmode/howto/campaign.org +1 -1
  12. {readcon_db-0.2.0 → readcon_db-0.2.1}/docs/orgmode/howto/howto.org +22 -13
  13. {readcon_db-0.2.0 → readcon_db-0.2.1}/docs/orgmode/howto/install.org +7 -5
  14. readcon_db-0.2.1/docs/orgmode/howto/migration.org +38 -0
  15. readcon_db-0.2.1/docs/orgmode/howto/streaming.org +149 -0
  16. {readcon_db-0.2.0 → readcon_db-0.2.1}/docs/orgmode/index.org +11 -5
  17. {readcon_db-0.2.0 → readcon_db-0.2.1}/docs/orgmode/reference/c.org +4 -2
  18. {readcon_db-0.2.0 → readcon_db-0.2.1}/docs/orgmode/reference/fortran.org +3 -1
  19. readcon_db-0.2.1/docs/orgmode/reference/python-api.org +14 -0
  20. {readcon_db-0.2.0 → readcon_db-0.2.1}/docs/orgmode/reference/python.org +9 -2
  21. {readcon_db-0.2.0 → readcon_db-0.2.1}/docs/orgmode/reference/rust.org +5 -3
  22. {readcon_db-0.2.0 → readcon_db-0.2.1}/docs/orgmode/tutorials/getting-started.org +8 -5
  23. readcon_db-0.2.1/docs/orgmode/tutorials/tutorial-run.log +40 -0
  24. readcon_db-0.2.1/docs/orgmode/tutorials/tutorial-run.sh +48 -0
  25. readcon_db-0.2.1/docs/orgmode/tutorials/tutorial.org +168 -0
  26. {readcon_db-0.2.0 → readcon_db-0.2.1}/docs/source/conf.py +32 -3
  27. {readcon_db-0.2.0 → readcon_db-0.2.1}/fortran/README.md +2 -1
  28. {readcon_db-0.2.0 → readcon_db-0.2.1}/fortran/ReadConDb/fpm.toml +3 -1
  29. {readcon_db-0.2.0 → readcon_db-0.2.1}/include/readcon-db.h +61 -18
  30. {readcon_db-0.2.0 → readcon_db-0.2.1}/meson.build +1 -1
  31. {readcon_db-0.2.0 → readcon_db-0.2.1}/pixi.toml +3 -1
  32. {readcon_db-0.2.0 → readcon_db-0.2.1}/pyproject.toml +1 -1
  33. {readcon_db-0.2.0 → readcon_db-0.2.1}/python/pyproject.toml +1 -1
  34. readcon_db-0.2.1/python/tests/test_stream_and_random.py +69 -0
  35. readcon_db-0.2.1/python/tests/test_streaming_guide.py +31 -0
  36. readcon_db-0.2.1/scripts/build-docs.sh +79 -0
  37. {readcon_db-0.2.0 → readcon_db-0.2.1}/scripts/check-cxx-dist.sh +1 -0
  38. readcon_db-0.2.1/scripts/check_version_lockstep.py +207 -0
  39. readcon_db-0.2.1/scripts/crate_version.py +29 -0
  40. {readcon_db-0.2.0 → readcon_db-0.2.1}/scripts/package-cxx.sh +1 -1
  41. {readcon_db-0.2.0 → readcon_db-0.2.1}/scripts/release-prep.sh +1 -1
  42. readcon_db-0.2.1/scripts/set-version.sh +14 -0
  43. readcon_db-0.2.1/scripts/sync-version.py +41 -0
  44. readcon_db-0.2.1/scripts/test_check_version_lockstep.py +90 -0
  45. {readcon_db-0.2.0 → readcon_db-0.2.1}/src/cooked_soa.rs +6 -0
  46. {readcon_db-0.2.0 → readcon_db-0.2.1}/src/corpus.rs +444 -121
  47. {readcon_db-0.2.0 → readcon_db-0.2.1}/src/error.rs +11 -0
  48. {readcon_db-0.2.0 → readcon_db-0.2.1}/src/export_h5md.rs +67 -2
  49. {readcon_db-0.2.0 → readcon_db-0.2.1}/src/export_xyz.rs +1 -0
  50. {readcon_db-0.2.0 → readcon_db-0.2.1}/src/ffi.rs +140 -20
  51. {readcon_db-0.2.0 → readcon_db-0.2.1}/src/keys.rs +8 -0
  52. {readcon_db-0.2.0 → readcon_db-0.2.1}/src/lib.rs +6 -0
  53. {readcon_db-0.2.0 → readcon_db-0.2.1}/src/mpi_ingest.rs +441 -137
  54. readcon_db-0.2.1/src/mpi_wire.rs +257 -0
  55. {readcon_db-0.2.0 → readcon_db-0.2.1}/src/python.rs +210 -20
  56. {readcon_db-0.2.0 → readcon_db-0.2.1}/src/select.rs +59 -0
  57. {readcon_db-0.2.0 → readcon_db-0.2.1}/src/shard.rs +13 -0
  58. {readcon_db-0.2.0 → readcon_db-0.2.1}/src/topology.rs +20 -0
  59. {readcon_db-0.2.0 → readcon_db-0.2.1}/src/units_canon.rs +172 -0
  60. readcon_db-0.2.0/.github/workflows/lint.yml +0 -24
  61. readcon_db-0.2.0/docs/orgmode/tutorials/tutorial.org +0 -82
  62. readcon_db-0.2.0/scripts/build-docs.sh +0 -43
  63. readcon_db-0.2.0/scripts/check_version_lockstep.sh +0 -43
  64. readcon_db-0.2.0/scripts/set-version.sh +0 -18
  65. readcon_db-0.2.0/tests/ci_gates.rs +0 -24
  66. {readcon_db-0.2.0 → readcon_db-0.2.1}/.github/workflows/c_lib_tarball.yml +0 -0
  67. {readcon_db-0.2.0 → readcon_db-0.2.1}/.github/workflows/ci.yml +0 -0
  68. {readcon_db-0.2.0 → readcon_db-0.2.1}/.github/workflows/ci_cxx.yml +0 -0
  69. {readcon_db-0.2.0 → readcon_db-0.2.1}/.github/workflows/ci_docs.yml +0 -0
  70. {readcon_db-0.2.0 → readcon_db-0.2.1}/.github/workflows/ci_mpi.yml +0 -0
  71. {readcon_db-0.2.0 → readcon_db-0.2.1}/.github/workflows/ci_prek.yml +0 -0
  72. {readcon_db-0.2.0 → readcon_db-0.2.1}/.github/workflows/crates_publish.yml +0 -0
  73. {readcon_db-0.2.0 → readcon_db-0.2.1}/.github/workflows/cxx_tarball.yml +0 -0
  74. {readcon_db-0.2.0 → readcon_db-0.2.1}/.github/workflows/pages.yml +0 -0
  75. {readcon_db-0.2.0 → readcon_db-0.2.1}/.github/workflows/python-wheels.yml +0 -0
  76. {readcon_db-0.2.0 → readcon_db-0.2.1}/.gitignore +0 -0
  77. {readcon_db-0.2.0 → readcon_db-0.2.1}/CMakeLists.txt +0 -0
  78. {readcon_db-0.2.0 → readcon_db-0.2.1}/CODE_OF_CONDUCT.md +0 -0
  79. {readcon_db-0.2.0 → readcon_db-0.2.1}/CONTRIBUTING.md +0 -0
  80. {readcon_db-0.2.0 → readcon_db-0.2.1}/LICENSE +0 -0
  81. {readcon_db-0.2.0 → readcon_db-0.2.1}/SECURITY.md +0 -0
  82. {readcon_db-0.2.0 → readcon_db-0.2.1}/assets/logo/BRAND.md +0 -0
  83. {readcon_db-0.2.0 → readcon_db-0.2.1}/assets/logo/readcon-db-logo-512.png +0 -0
  84. {readcon_db-0.2.0 → readcon_db-0.2.1}/assets/logo/readcon-db-logo-raster.jpg +0 -0
  85. {readcon_db-0.2.0 → readcon_db-0.2.1}/assets/logo/readcon-db-logo.svg +0 -0
  86. {readcon_db-0.2.0 → readcon_db-0.2.1}/assets/logo/readcon-db-wordmark.svg +0 -0
  87. {readcon_db-0.2.0 → readcon_db-0.2.1}/bench/gen_con.py +0 -0
  88. {readcon_db-0.2.0 → readcon_db-0.2.1}/bench/mpi_bench.sh +0 -0
  89. {readcon_db-0.2.0 → readcon_db-0.2.1}/bench/vary_con.py +0 -0
  90. {readcon_db-0.2.0 → readcon_db-0.2.1}/cmake/readcon-db-config-version.in.cmake +0 -0
  91. {readcon_db-0.2.0 → readcon_db-0.2.1}/cmake/readcon-db-config.in.cmake +0 -0
  92. {readcon_db-0.2.0 → readcon_db-0.2.1}/cmake/readcon-db.pc.in +0 -0
  93. {readcon_db-0.2.0 → readcon_db-0.2.1}/cmake/tempdir.cmake +0 -0
  94. {readcon_db-0.2.0 → readcon_db-0.2.1}/cog.toml +0 -0
  95. {readcon_db-0.2.0 → readcon_db-0.2.1}/docs/Makefile +0 -0
  96. {readcon_db-0.2.0 → readcon_db-0.2.1}/docs/_static/logo.svg +0 -0
  97. {readcon_db-0.2.0 → readcon_db-0.2.1}/docs/orgmode/changelog.org +0 -0
  98. {readcon_db-0.2.0 → readcon_db-0.2.1}/docs/orgmode/explanation/design.org +0 -0
  99. {readcon_db-0.2.0 → readcon_db-0.2.1}/docs/orgmode/explanation/faq.org +0 -0
  100. {readcon_db-0.2.0 → readcon_db-0.2.1}/docs/orgmode/explanation/overview.org +0 -0
  101. {readcon_db-0.2.0 → readcon_db-0.2.1}/docs/orgmode/howto/mpi.org +0 -0
  102. {readcon_db-0.2.0 → readcon_db-0.2.1}/docs/orgmode/howto/topology.org +0 -0
  103. {readcon_db-0.2.0 → readcon_db-0.2.1}/docs/orgmode/howto/workflows.org +0 -0
  104. {readcon_db-0.2.0 → readcon_db-0.2.1}/docs/orgmode/readme.org +0 -0
  105. {readcon_db-0.2.0 → readcon_db-0.2.1}/docs/orgmode/reference/citation.org +0 -0
  106. {readcon_db-0.2.0 → readcon_db-0.2.1}/docs/requirements.txt +0 -0
  107. {readcon_db-0.2.0 → readcon_db-0.2.1}/docs/source/_static/custom.css +0 -0
  108. {readcon_db-0.2.0 → readcon_db-0.2.1}/docs/source/_static/favicon.svg +0 -0
  109. {readcon_db-0.2.0 → readcon_db-0.2.1}/docs/source/_static/logo-nav-dark.svg +0 -0
  110. {readcon_db-0.2.0 → readcon_db-0.2.1}/docs/source/_static/logo-nav-light.svg +0 -0
  111. {readcon_db-0.2.0 → readcon_db-0.2.1}/docs/source/_static/logo.svg +0 -0
  112. {readcon_db-0.2.0 → readcon_db-0.2.1}/docs/source/_static/mark.svg +0 -0
  113. {readcon_db-0.2.0 → readcon_db-0.2.1}/docs/source/_templates/partials/extra-foot.html +0 -0
  114. {readcon_db-0.2.0 → readcon_db-0.2.1}/docs/source/_templates/partials/extra-head.html +0 -0
  115. {readcon_db-0.2.0 → readcon_db-0.2.1}/docs/source/_templates/partials/site-foot.html +0 -0
  116. {readcon_db-0.2.0 → readcon_db-0.2.1}/docs/source/_templates/partials/webfonts.html +0 -0
  117. {readcon_db-0.2.0 → readcon_db-0.2.1}/examples/bench_corpus_ops.rs +0 -0
  118. {readcon_db-0.2.0 → readcon_db-0.2.1}/examples/bench_vs_ase_prep.py +0 -0
  119. {readcon_db-0.2.0 → readcon_db-0.2.1}/examples/benchmarks/ase_db_bench.json +0 -0
  120. {readcon_db-0.2.0 → readcon_db-0.2.1}/examples/benchmarks/ase_fair_campaign_1.json +0 -0
  121. {readcon_db-0.2.0 → readcon_db-0.2.1}/examples/benchmarks/bench_ase_db.py +0 -0
  122. {readcon_db-0.2.0 → readcon_db-0.2.1}/examples/benchmarks/db_vs_ase_table.md +0 -0
  123. {readcon_db-0.2.0 → readcon_db-0.2.1}/examples/benchmarks/fair_campaign.py +0 -0
  124. {readcon_db-0.2.0 → readcon_db-0.2.1}/examples/benchmarks/fair_db_vs_ase_table.md +0 -0
  125. {readcon_db-0.2.0 → readcon_db-0.2.1}/examples/benchmarks/readcon_db_bench.json +0 -0
  126. {readcon_db-0.2.0 → readcon_db-0.2.1}/examples/benchmarks/results_merged.json +0 -0
  127. {readcon_db-0.2.0 → readcon_db-0.2.1}/examples/benchmarks/test_fair_select_parity.py +0 -0
  128. {readcon_db-0.2.0 → readcon_db-0.2.1}/examples/ingest_select.rs +0 -0
  129. {readcon_db-0.2.0 → readcon_db-0.2.1}/examples/mpi_bcast_frame.c +0 -0
  130. {readcon_db-0.2.0 → readcon_db-0.2.1}/examples/mpi_bcast_frame.f90 +0 -0
  131. {readcon_db-0.2.0 → readcon_db-0.2.1}/examples/mpi_bcast_frame.py +0 -0
  132. {readcon_db-0.2.0 → readcon_db-0.2.1}/examples/mpi_ingest_check.rs +0 -0
  133. {readcon_db-0.2.0 → readcon_db-0.2.1}/examples/mpi_read_check.rs +0 -0
  134. {readcon_db-0.2.0 → readcon_db-0.2.1}/examples/shard_gate.rs +0 -0
  135. {readcon_db-0.2.0 → readcon_db-0.2.1}/examples/workflows/metatrain_from_con.md +0 -0
  136. {readcon_db-0.2.0 → readcon_db-0.2.1}/examples/workflows/options.metatrain.snippet.yaml +0 -0
  137. {readcon_db-0.2.0 → readcon_db-0.2.1}/fortran/ReadConDb/src/readcon_db.f90 +0 -0
  138. {readcon_db-0.2.0 → readcon_db-0.2.1}/include/readcon-db-mpi.h +0 -0
  139. {readcon_db-0.2.0 → readcon_db-0.2.1}/lychee.toml +0 -0
  140. {readcon_db-0.2.0 → readcon_db-0.2.1}/meson_options.txt +0 -0
  141. {readcon_db-0.2.0 → readcon_db-0.2.1}/packaging/wrapdb/README.md +0 -0
  142. {readcon_db-0.2.0 → readcon_db-0.2.1}/packaging/wrapdb/readcon-db.wrap.in +0 -0
  143. {readcon_db-0.2.0 → readcon_db-0.2.1}/paper/cpc/freeze/ase_fair_campaign_1.json +0 -0
  144. {readcon_db-0.2.0 → readcon_db-0.2.1}/paper/cpc/freeze/fair_db_vs_ase_table.md +0 -0
  145. {readcon_db-0.2.0 → readcon_db-0.2.1}/paper/cpc/readme.org +0 -0
  146. {readcon_db-0.2.0 → readcon_db-0.2.1}/paper/cpc/scripts/gen_fair_table.py +0 -0
  147. {readcon_db-0.2.0 → readcon_db-0.2.1}/paper/cpc/src/appendix-fair-campaign.org +0 -0
  148. {readcon_db-0.2.0 → readcon_db-0.2.1}/paper/cpc/src/figures/generated/fair_campaign_table.tex +0 -0
  149. {readcon_db-0.2.0 → readcon_db-0.2.1}/pixi.lock +0 -0
  150. {readcon_db-0.2.0 → readcon_db-0.2.1}/pr-text.md +0 -0
  151. {readcon_db-0.2.0 → readcon_db-0.2.1}/prek.toml +0 -0
  152. {readcon_db-0.2.0 → readcon_db-0.2.1}/python/tests/test_export_h5md.py +0 -0
  153. {readcon_db-0.2.0 → readcon_db-0.2.1}/python/tests/test_ingest_memory.py +0 -0
  154. {readcon_db-0.2.0 → readcon_db-0.2.1}/resources/test/eon36_lj_dimer.convel +0 -0
  155. {readcon_db-0.2.0 → readcon_db-0.2.1}/resources/test/sulfolene.con +0 -0
  156. {readcon_db-0.2.0 → readcon_db-0.2.1}/resources/test/tiny_cuh2.con +0 -0
  157. {readcon_db-0.2.0 → readcon_db-0.2.1}/resources/test/tiny_cuh2.convel +0 -0
  158. {readcon_db-0.2.0 → readcon_db-0.2.1}/resources/test/tiny_cuh2_forces.con +0 -0
  159. {readcon_db-0.2.0 → readcon_db-0.2.1}/resources/test/tiny_cuh2_vel_forces.con +0 -0
  160. {readcon_db-0.2.0 → readcon_db-0.2.1}/resources/test/tiny_multi_cuh2.con +0 -0
  161. {readcon_db-0.2.0 → readcon_db-0.2.1}/scripts/assemble-site.sh +0 -0
  162. {readcon_db-0.2.0 → readcon_db-0.2.1}/scripts/check-clib-dist.sh +0 -0
  163. {readcon_db-0.2.0 → readcon_db-0.2.1}/scripts/check-cpc-freeze.sh +0 -0
  164. {readcon_db-0.2.0 → readcon_db-0.2.1}/scripts/export-landing.sh +0 -0
  165. {readcon_db-0.2.0 → readcon_db-0.2.1}/scripts/meson_cargo_build.py +0 -0
  166. {readcon_db-0.2.0 → readcon_db-0.2.1}/scripts/package-clib.sh +0 -0
  167. {readcon_db-0.2.0 → readcon_db-0.2.1}/src/archive.rs +0 -0
  168. {readcon_db-0.2.0 → readcon_db-0.2.1}/src/bin/readcon-db.rs +0 -0
  169. {readcon_db-0.2.0 → readcon_db-0.2.1}/src/frame_codec.rs +0 -0
  170. {readcon_db-0.2.0 → readcon_db-0.2.1}/src/frame_scalars.rs +0 -0
  171. {readcon_db-0.2.0 → readcon_db-0.2.1}/src/mpi_read.rs +0 -0
  172. {readcon_db-0.2.0 → readcon_db-0.2.1}/tests/canonical_dump.rs +0 -0
  173. {readcon_db-0.2.0 → readcon_db-0.2.1}/tests/cli_refuse.rs +0 -0
  174. {readcon_db-0.2.0 → readcon_db-0.2.1}/tests/cmake-project/CMakeLists.txt +0 -0
  175. {readcon_db-0.2.0 → readcon_db-0.2.1}/tests/cmake-project/main.c +0 -0
  176. {readcon_db-0.2.0 → readcon_db-0.2.1}/tests/cooked_soa_authority.rs +0 -0
  177. {readcon_db-0.2.0 → readcon_db-0.2.1}/tests/meson-wrap/main.c +0 -0
  178. {readcon_db-0.2.0 → readcon_db-0.2.1}/tests/meson-wrap/meson.build +0 -0
  179. {readcon_db-0.2.0 → readcon_db-0.2.1}/tests/mpi-c/ingest_smoke.c +0 -0
  180. {readcon_db-0.2.0 → readcon_db-0.2.1}/tests/topology_cli.rs +0 -0
  181. {readcon_db-0.2.0 → readcon_db-0.2.1}/website/assets/logo.svg +0 -0
  182. {readcon_db-0.2.0 → readcon_db-0.2.1}/website/assets/wordmark.svg +0 -0
  183. {readcon_db-0.2.0 → readcon_db-0.2.1}/website/css/site.css +0 -0
  184. {readcon_db-0.2.0 → readcon_db-0.2.1}/website/export.el +0 -0
  185. {readcon_db-0.2.0 → readcon_db-0.2.1}/website/index.html +0 -0
  186. {readcon_db-0.2.0 → readcon_db-0.2.1}/website/index.org +0 -0
@@ -0,0 +1,47 @@
1
+ name: Lint
2
+
3
+ on:
4
+ push:
5
+ branches: [main, "fix/**", "feat/**", "ci/**"]
6
+ pull_request:
7
+ branches: [main]
8
+ workflow_dispatch:
9
+ jobs:
10
+ lint:
11
+ runs-on: ubuntu-latest
12
+
13
+ steps:
14
+ - uses: actions/checkout@v6
15
+ with:
16
+ fetch-depth: 0
17
+
18
+ - name: Conventional commits check
19
+ uses: cocogitto/cocogitto-action@v3
20
+ with:
21
+ check-latest-tag-only: true
22
+
23
+ # large-file-auditor is omitted: this clone already has historical
24
+ # target/debug blobs above 1M. Rewriting shared history is a separate job.
25
+
26
+ version:
27
+ runs-on: ubuntu-latest
28
+
29
+ steps:
30
+ - uses: actions/checkout@v6
31
+
32
+ - uses: actions/setup-python@v6
33
+ with:
34
+ python-version: '3.12'
35
+
36
+ - run: python -m pip install cogapp==3.6.0 meson==1.12.1
37
+
38
+ - name: Every version copy matches Cargo.toml
39
+ run: python scripts/check_version_lockstep.py
40
+
41
+ - name: Drift the sync misses still fails the check
42
+ run: python scripts/test_check_version_lockstep.py
43
+
44
+ - name: The sync leaves the tree unchanged
45
+ run: |
46
+ python scripts/sync-version.py
47
+ git diff --exit-code
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## v0.2.1 - 2026-11-11
4
+ #### Bug Fixes
5
+ - stream corpus append and parse one stored frame - (623ff00) - *HaoZeke*
6
+ #### Documentation
7
+ - document streaming append and publish the API reference - (16baa43) - *HaoZeke*
8
+ - rebuild the tutorial on recorded output and fix stale install, C, and link defects (#26) - (9cf3abf) - *HaoZeke*
9
+
3
10
  ## v0.2.0 - 2026-10-15
4
11
  #### Features
5
12
  - (**frames**) store CON text as a tagged zstd frame - (838df21) - *HaoZeke*
@@ -9,7 +9,9 @@ authors:
9
9
  orcid: "https://orcid.org/0000-0002-2393-8056"
10
10
  license: MIT
11
11
  repository-code: "https://github.com/lode-org/readcon-db"
12
- version: 0.2.0
12
+ # [[[cog cog.outl(f'version: {VERSION}') ]]]
13
+ version: 0.2.1
14
+ # [[[end]]]
13
15
  date-released: "2026-08-15"
14
16
  keywords:
15
17
  - CON
@@ -868,7 +868,7 @@ dependencies = [
868
868
 
869
869
  [[package]]
870
870
  name = "readcon-db"
871
- version = "0.2.0"
871
+ version = "0.2.1"
872
872
  dependencies = [
873
873
  "heed",
874
874
  "libc",
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "readcon-db"
3
- version = "0.2.0"
3
+ version = "0.2.1"
4
4
  edition = "2021"
5
5
  description = "Mmap-backed CON frame corpus (Heed/LMDB), xxHash exact match, multi-language FFI"
6
6
  license = "MIT"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: readcon-db
3
- Version: 0.2.0
3
+ Version: 0.2.1
4
4
  Summary: Mmap CON corpus store (LMDB/Heed) with xxHash exact match
5
5
  Home-Page: https://lode-org.github.io/readcon-db/
6
6
  License: MIT
@@ -86,6 +86,8 @@ let h = db.frame_hash(keys[0])?;
86
86
 
87
87
  Foreign trajectories: **`readcon.read_chemfiles("traj.xyz")` → frames → ingest into readcon-db** (chemfiles-enabled build), not `ase.io.read`.
88
88
 
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).
90
+
89
91
  ## Design
90
92
 
91
93
  - **No SQL engine** — explicit indexes + in-process intersection, with **ASE.db-competitive screening fields** (mass, volume, PBC, reserved metadata, charge/magmom; see [design matrix](docs/orgmode/explanation/design.org)).
@@ -119,6 +121,11 @@ Foreign trajectories: **`readcon.read_chemfiles("traj.xyz")` → frames → inge
119
121
 
120
122
  Full ABI table, logo, Sphinx docs, and site: see `docs/`, `website/`, `assets/logo/`, `CHANGELOG.md`. Fortran module notes: `fortran/README.md`, `fortran/ReadConDb/`.
121
123
 
124
+ ## Questions and bug reports
125
+
126
+ Ask questions and report bugs on the [GitHub issue tracker](https://github.com/lode-org/readcon-db/issues).
127
+ Report a security problem by email instead, as [`SECURITY.md`](SECURITY.md) describes.
128
+
122
129
  ## License
123
130
 
124
131
  MIT
@@ -73,6 +73,8 @@ let h = db.frame_hash(keys[0])?;
73
73
 
74
74
  Foreign trajectories: **`readcon.read_chemfiles("traj.xyz")` → frames → ingest into readcon-db** (chemfiles-enabled build), not `ase.io.read`.
75
75
 
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).
77
+
76
78
  ## Design
77
79
 
78
80
  - **No SQL engine** — explicit indexes + in-process intersection, with **ASE.db-competitive screening fields** (mass, volume, PBC, reserved metadata, charge/magmom; see [design matrix](docs/orgmode/explanation/design.org)).
@@ -106,6 +108,11 @@ Foreign trajectories: **`readcon.read_chemfiles("traj.xyz")` → frames → inge
106
108
 
107
109
  Full ABI table, logo, Sphinx docs, and site: see `docs/`, `website/`, `assets/logo/`, `CHANGELOG.md`. Fortran module notes: `fortran/README.md`, `fortran/ReadConDb/`.
108
110
 
111
+ ## Questions and bug reports
112
+
113
+ Ask questions and report bugs on the [GitHub issue tracker](https://github.com/lode-org/readcon-db/issues).
114
+ Report a security problem by email instead, as [`SECURITY.md`](SECURITY.md) describes.
115
+
109
116
  ## License
110
117
 
111
118
  MIT
@@ -39,8 +39,8 @@ pixi lock
39
39
  | Prek | =ci_prek.yml= | push, PR | =prek run -a= |
40
40
  | Documentation | =ci_docs.yml= | push, PR | Locked Sphinx HTML (=pixi.lock=) + assembled site + lychee |
41
41
  | Pages | =pages.yml= | push to main | Deploy site + locked Sphinx docs |
42
- | Lint | =lint.yml= | PR | Conventional commits + large-file audit |
43
- | Version lockstep | =scripts/check_version_lockstep.sh= | =cargo test= | Cargo, Python, meson, pixi, Fortran, CITATION, Sphinx, core pin |
42
+ | Lint | =lint.yml= | PR | Conventional commits; version copies match Cargo.toml |
43
+ | Version lockstep | =scripts/check_version_lockstep.py= | =lint.yml=, =set-version.sh= | Each copy parsed and compared with Cargo.toml; readcon-core pin |
44
44
  | C/C++ dist | =ci_cxx.yml= | push, PR | CMake/Meson/pkg-config without cbindgen; clib fixture gate |
45
45
  | crates.io | =crates_publish.yml= | =v*= tag | =cargo publish --locked= |
46
46
  | Python wheels | =python-wheels.yml= | =v*= tag, PR | maturin matrix → PyPI |
@@ -1,13 +1,17 @@
1
- #+title: Cooked SoA tier (RCSO / frames_soa)
2
- #+options: toc:2
1
+ #+OPTIONS: toc:nil num:nil
3
2
 
4
- * Contract
3
+ * Cooked structure-of-arrays (SoA) tier (=RCSO= / =frames_soa=)
4
+ :PROPERTIES:
5
+ :CUSTOM_ID: cooked-soa
6
+ :END:
7
+
8
+ ** Contract
5
9
 
6
10
  RCSO is *non-authoritative*. CON text in =frames= is the sole authority
7
11
  for hash, dedup, join/split, =reindex=, and CON export. Cooked numerics
8
12
  in =frames_soa= are derived POD only; they never replace the text tier.
9
13
 
10
- * Summary
14
+ ** Summary
11
15
 
12
16
  =readcon-db= stores two tiers per frame key:
13
17
 
@@ -18,11 +22,11 @@ in =frames_soa= are derived POD only; they never replace the text tier.
18
22
 
19
23
  *Default ingest does not cook.* Call =cook_frame= / =recook_all= / CLI =cook-frame= / =recook-all= (or =append_trajectory_path_cook(..., true)= in Rust) to populate RCSO. =delete_cooked_soa= drops only the cooked tier; CON text and indexes stay.
20
24
 
21
- * Why CON text is still required
25
+ ** Why the =.con= text is still required
22
26
 
23
27
  RCSO is *not* fully equivalent to CON: it omits element symbols, masses, cell/angles, constraints, JSON metadata, and exact on-disk bytes. Those are required for xxHash3 dedup, symbol/formula indexes, =reindex=, join/split, and CON export. Do *not* omit =frames= when cooked exists.
24
28
 
25
- * Numeric hot path
29
+ ** Numeric hot path
26
30
 
27
31
  =get_positions= / =get_forces= / =get_velocities= (Rust, Python, C
28
32
  =rkrdb_get_positions= / =rkrdb_get_forces= / =rkrdb_get_velocities=, CLI
@@ -31,7 +35,7 @@ Missing or corrupt cooked falls back to parsing CON text. Authority APIs
31
35
  (=frame_hash=, =find_by_hash=, =get_frame_text=, =reindex=, shard join)
32
36
  never read =frames_soa=.
33
37
 
34
- * Language surfaces
38
+ ** Language surfaces
35
39
 
36
40
  | Surface | Cook / delete / has-valid | Positions / forces / velocities |
37
41
  |---------+---------------------------+--------------------------------|
@@ -41,7 +45,7 @@ never read =frames_soa=.
41
45
  | Fortran | =db_cook_frame=, =db_delete_cooked=, =db_has_valid_cooked=, =db_recook_all= | =db_get_positions=, =db_get_forces=, =db_get_velocities= |
42
46
  | CLI | =cook-frame=, =delete-cooked=, =recook-all= | =positions= |
43
47
 
44
- * See also
48
+ ** See also
45
49
 
46
- - Internal design notes: =docs/orgmode/explanation/design.org= (engineer-facing; mirrors this contract)
47
- - Architecture Sphinx page (synced summary from this org)
50
+ - Internal design notes: @@rst::doc:`/explanation/design`@@ (engineer-facing; mirrors this contract)
51
+ - Architecture summary: @@rst::doc:`/explanation/architecture`@@
@@ -49,7 +49,10 @@ Environment (Heed / LMDB)
49
49
 
50
50
  *Drain/join:* node-local =shard-ingest=, =drain_to= compact-snapshots =data.mdb= (refuse overwrite), then =join-drained=. =compact-join= is the single-root join (=open_existing=). Ops: @@rst::doc:`/howto/campaign`@@.
51
51
 
52
- *Cooked SoA tier:* optional RCSO in =frames_soa= accelerates =get_positions= / =get_forces= / =get_velocities= without CON parse when valid. RCSO is non-authoritative: CON text in =frames= remains sole authority for hash/dedup/join/reindex. RCSO is not fully equivalent (no symbols/metadata/exact bytes). See =docs/orgmode/cooked-soa.org=.
52
+ *Cooked SoA tier:* optional =RCSO= in =frames_soa= accelerates =get_positions= / =get_forces= / =get_velocities= without a =.con= parse when valid.
53
+ =RCSO= is non-authoritative: the =.con= text in =frames= remains sole authority for hash/dedup/join/reindex.
54
+ =RCSO= is not fully equivalent (no symbols/metadata/exact bytes).
55
+ See @@rst::doc:`/cooked-soa`@@.
53
56
 
54
57
  =FrameKey= is 12 bytes: =traj_id= (BE u64) + =frame_idx= (BE u32) so lexicographic order matches numeric order.
55
58
 
@@ -114,7 +114,7 @@ ConCorpus("/lustre/orion/proj/campaign_single", readonly=True).export_h5md(1, "t
114
114
  :PROPERTIES:
115
115
  :CUSTOM_ID: units
116
116
  :END:
117
- Stamp units on ingest (=--units= JSON, or C =rkrdb_append_trajectory_units= / Fortran =db_append_units=). Aliases canonicalize (=A= -> =angstrom=). =set_units= converts stored numbers; append/extend stamp incoming values. CON line-2 =units= is the authority for length, energy, and the clock. A v3.1 frame with =time= or =timestep= and no =units.time= is an error. =--velocity-time-unit= supplies that missing clock unit and overrides the D10 velocity rule for a file that breaks it. A present =units.time= still scales the clock. v1, v2, and v3.0 clocks with no =units.time= are read as =fs=. H5MD velocities follow D10: v1, v2, and v3.0 use the natural unit =(amu*angstrom^2/eV)^0.5= whatever the time label says; v3.1 uses =units.time= and fails when velocities have no =units.time=.
117
+ Stamp units on ingest (=--units= JSON, or C =rkrdb_append_trajectory_units= / Fortran =db_append_units=). Aliases canonicalize (=A= -> =angstrom=). =set_units= converts stored numbers and refuses a v3.1 clock or velocities frame with no =units.time= instead of assuming =fs=; append/extend stamp incoming values. CON line-2 =units= is the authority for length, energy, and the clock. A v3.1 frame with =time= or =timestep= and no =units.time= is an error. =--velocity-time-unit= supplies that missing clock unit and overrides the D10 velocity rule for a file that breaks it. A present =units.time= still scales the clock. v1, v2, and v3.0 clocks with no =units.time= are read as =fs=. H5MD velocities follow D10: v1, v2, and v3.0 use the natural unit =(amu*angstrom^2/eV)^0.5= whatever the time label says; v3.1 uses =units.time= and fails when velocities have no =units.time=.
118
118
 
119
119
  ** C / Fortran writers
120
120
  :PROPERTIES:
@@ -44,17 +44,17 @@ Exact match: =Select::new().exact_hash(h.to_bytes())=.
44
44
  :CUSTOM_ID: python
45
45
  :END:
46
46
  #+begin_src python
47
- import readcon_db
48
-
49
- db = readcon_db.ConCorpus.open("/tmp/corpus")
50
- db.append_trajectory_path(1, "run.con")
51
- sel = readcon_db.Select().require_symbol("Cu")
52
- keys = db.select(sel)
53
- h = db.frame_hash(keys[0])
54
- text = db.get_frame_text(keys[0])
47
+ from readcon_db import ConCorpus
48
+
49
+ db = ConCorpus("/tmp/corpus")
50
+ db.append_trajectory(1, "run.con")
51
+ keys = db.select(symbol="Cu")
52
+ traj_id, frame_idx = keys[0]
53
+ h = db.frame_hash(traj_id, frame_idx)
54
+ text = db.get_frame_text(traj_id, frame_idx)
55
55
  #+end_src
56
56
 
57
- =maturin develop --features python= from a checkout. Module name is =readcon_db=.
57
+ =maturin develop --features python= from a checkout. Module name is =readcon_db=. Streaming append, =StoredFrame=, and compressed files: @@rst::doc:`/howto/streaming`@@. The 0.2.1 changes: @@rst::doc:`/howto/migration`@@.
58
58
 
59
59
  ** C / C++
60
60
  :PROPERTIES:
@@ -63,12 +63,21 @@ text = db.get_frame_text(keys[0])
63
63
  #+begin_src C
64
64
  #include "readcon-db.h"
65
65
 
66
- RkrdbCorpus *db = rkrdb_open("/tmp/corpus");
67
- rkrdb_append_trajectory_path(db, 1, "run.con");
68
- /* Select via rkrdb_select_* / rkrdb_select_meta; see api_c */
69
- rkrdb_close(db);
66
+ size_t id;
67
+ uint32_t n_frames;
68
+ rkrdb_open("/tmp/corpus", &id);
69
+ rkrdb_append_trajectory(id, 1, "run.con", &n_frames);
70
+ /* traj_id -1 matches every trajectory; limit 0 means no limit */
71
+ rkrdb_select_basic(id, -1, "Cu", 0, UINT32_MAX, 0);
72
+ for (int i = 0; i < rkrdb_result_count(id); i++) {
73
+ uint64_t traj;
74
+ uint32_t frame;
75
+ rkrdb_result_key(id, i, &traj, &frame);
76
+ }
77
+ rkrdb_close(id);
70
78
  #+end_src
71
79
 
80
+ Each call returns =RKRDB_OK= on success, and =rkrdb_last_error= copies the message of the last failure into a caller buffer.
72
81
  C++ RAII: =readcon_db::Corpus=. MPI pack/bcast takes the *caller* communicator (=readcon-db-mpi.h=). The library does not call =MPI_Init=. Details: @@rst::doc:`/reference/c`@@.
73
82
 
74
83
  ** Fortran
@@ -14,7 +14,7 @@ cargo add readcon-db
14
14
  cargo install readcon-db --locked
15
15
  #+end_src
16
16
 
17
- Requires [[https://crates.io/crates/readcon-core][readcon-core]] *^0.14* (pulled automatically).
17
+ Pulls in [[https://crates.io/crates/readcon-core][readcon-core]] at the version requirement ~{{{readcon-core-req}}}~ from =Cargo.toml=.
18
18
 
19
19
  ** Python (PyPI)
20
20
  :PROPERTIES:
@@ -38,7 +38,8 @@ cargo test --locked
38
38
  cargo build --release # libreadcon_db + CLI readcon-db
39
39
  #+end_src
40
40
 
41
- =readcon-core= comes from crates.io (=^0.14=). To develop against a local core tree, add an *untracked* =.cargo/config.toml=:
41
+ =readcon-core= comes from crates.io (~{{{readcon-core-req}}}~).
42
+ Add an *untracked* =.cargo/config.toml= with the patch below to build against a local core tree.
42
43
 
43
44
  #+begin_src toml
44
45
  [patch.crates-io]
@@ -64,7 +65,7 @@ CMake:
64
65
  include(FetchContent)
65
66
  FetchContent_Declare(
66
67
  readcon-db
67
- URL https://github.com/lode-org/readcon-db/releases/download/v0.1.8/readcon-db-cxx-0.1.8.tar.gz
68
+ URL https://github.com/lode-org/readcon-db/releases/download/v{{{readcon-db-version}}}/readcon-db-cxx-{{{readcon-db-version}}}.tar.gz
68
69
  URL_HASH SHA256=<sha256 from the .sha256 sidecar on the GitHub Release>
69
70
  )
70
71
  FetchContent_MakeAvailable(readcon-db)
@@ -91,7 +92,7 @@ A process that uses both C APIs must link the *shared* objects (=libreadcon_db.s
91
92
  Unpack =readcon-db-clib-$VERSION-$target.tar.gz= from the GitHub Release, then =export READCON_DB_LIB= / =PKG_CONFIG_PATH=. Attach assets to an already-published tag with Actions → *C ABI library tarball* → ~tag=vX.Y.Z~.
92
93
 
93
94
  #+begin_src sh
94
- VER=0.1.8
95
+ VER={{{readcon-db-version}}}
95
96
  TARGET=x86_64-unknown-linux-gnu
96
97
  curl -fsSL -O "https://github.com/lode-org/readcon-db/releases/download/v${VER}/readcon-db-clib-${VER}-${TARGET}.tar.gz"
97
98
  tar -xzf "readcon-db-clib-${VER}-${TARGET}.tar.gz"
@@ -137,7 +138,8 @@ Campaign shard/drain/join is the =readcon-db= CLI (in =bin/= of the clib tarball
137
138
  pixi r -e docs docbld
138
139
  #+end_src
139
140
 
140
- =pixi.lock= pins Sphinx, Furo, and MyST to the same set Pages publishes. Refresh with =pixi lock= after editing =pixi.toml= =[feature.docs]=.
141
+ =pixi.lock= pins Sphinx, Shibuya, and Markedly Structured Text (MyST) to the same set Pages publishes.
142
+ Refresh with =pixi lock= after editing =pixi.toml= =[feature.docs]=.
141
143
 
142
144
  ** Static marketing page
143
145
  :PROPERTIES:
@@ -0,0 +1,38 @@
1
+ #+OPTIONS: toc:nil num:nil
2
+
3
+ * Migrating to 0.2.1
4
+ :PROPERTIES:
5
+ :CUSTOM_ID: migrating-to-0-2-1
6
+ :END:
7
+
8
+ 0.2.1 keeps the same corpus files as 0.2.0. Two Python calls behave differently. Rust =get_frame= still returns a =readcon_core::ConFrame=. Rust =append_trajectory_frames= still commits the slice you pass in one transaction.
9
+
10
+ ** =get_frame= returns a =StoredFrame=
11
+ :PROPERTIES:
12
+ :CUSTOM_ID: get-frame-returns-a-storedframe
13
+ :END:
14
+ In 0.2.0, Python =get_frame= parsed the stored text with =readcon.read_con_string= and returned a =readcon.ConFrame=. Reading =atoms= on that object built a Python atom for every site.
15
+
16
+ In 0.2.1 it returns a =StoredFrame=:
17
+
18
+ | Still works | =frame.xyz=, =frame.atoms[i].symbol=, =frame.atoms[i].x= / =y= / =z=, =frame.cell=, =frame.angles=, =len(frame)= |
19
+ | Changed | =type(frame)= is =StoredFrame=, not =ConFrame=. There is no =to_ase=, no metadata dict, and no velocity or force attributes on =StoredAtom=. |
20
+
21
+ =atoms[i]= builds that one atom. Use =get_frame_text= when you need the text, and =readcon.read_con_string= when you need a =ConFrame=:
22
+
23
+ #+begin_src python
24
+ text = db.get_frame_text(traj_id, frame_idx)
25
+ frame = readcon.read_con_string(text)[0]
26
+ #+end_src
27
+
28
+ Positions, forces, and velocities are also still on =get_positions=, =get_forces=, and =get_velocities=.
29
+
30
+ ** Append commits 64 frames at a time
31
+ :PROPERTIES:
32
+ :CUSTOM_ID: append-commits-64-frames-at-a-time
33
+ :END:
34
+ In 0.2.0, Python =append_trajectory_frames= turned the whole trajectory into one CON string, then prepared and committed every frame in one transaction. The string and the prepared rows were resident together, and walking a =read_con= result built a Python frame for every index.
35
+
36
+ In 0.2.1 the same call commits groups of 64 frames. The first group creates the trajectory. Each later group extends it. The return value is still the number of frames in the trajectory after the last commit. A =read_con= list is serialized from the parser's stored frames, so those Python frames are not built.
37
+
38
+ Python =append_trajectory= and Rust =append_trajectory_path= are unchanged: they read the path as UTF-8 and do not decompress gzip or zstd. Compressed files go through =readcon.read_con=, then =append_trajectory_frames=. The guide is @@rst::doc:`/howto/streaming`@@.
@@ -0,0 +1,149 @@
1
+ #+OPTIONS: toc:nil num:nil
2
+
3
+ * Streaming append and random reads
4
+ :PROPERTIES:
5
+ :CUSTOM_ID: streaming-append-and-random-reads
6
+ :END:
7
+
8
+ #+BEGIN_EXPORT rst
9
+ .. note::
10
+
11
+ Upgrading from 0.2.0: :doc:`/howto/migration`.
12
+ #+END_EXPORT
13
+
14
+ =readcon-db= stores CON text. =readcon= (the =readcon-core= Python package) parses and writes that text. ASE is a different store. This page is the path from a trajectory file to one stored frame.
15
+
16
+ ** Create a corpus
17
+ :PROPERTIES:
18
+ :CUSTOM_ID: create-a-corpus
19
+ :END:
20
+ A corpus is a directory. Creating =ConCorpus= creates it. The directory holds =data.mdb= and =lock.mdb=. One process writes. Many processes may open the same directory with =readonly=True=.
21
+
22
+ #+begin_src python
23
+ from readcon_db import ConCorpus
24
+
25
+ db = ConCorpus("/tmp/corpus")
26
+ ro = ConCorpus("/tmp/corpus", readonly=True)
27
+ #+end_src
28
+
29
+ Rust is =ConCorpus::open= and =ConCorpus::open_readonly=. The command line is =readcon-db ingest=.
30
+
31
+ ** Stream an append
32
+ :PROPERTIES:
33
+ :CUSTOM_ID: stream-an-append
34
+ :END:
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
+
37
+ Rust =ConCorpus::append_trajectory_frames= still commits the slice you pass in one transaction. The grouping is the Python binding.
38
+
39
+ ** Random access
40
+ :PROPERTIES:
41
+ :CUSTOM_ID: random-access
42
+ :END:
43
+ =get_frame(traj_id, frame_idx)= returns a =StoredFrame=.
44
+
45
+ | Attribute | Contents |
46
+ |-----------+----------|
47
+ | =xyz= | one =(x, y, z)= row per atom |
48
+ | =atoms= | a =StoredAtoms= list |
49
+ | =atoms[i]= | one =StoredAtom= with =symbol=, =x=, =y=, =z= |
50
+ | =cell= | three box lengths |
51
+ | =angles= | three box angles, in degrees |
52
+ | =len(frame)= | the atom count |
53
+
54
+ Indexing =atoms= builds that atom and no others. =get_frame_text= returns the CON text. =readcon.read_con_string= on that text returns a =readcon.ConFrame= when you need the full object.
55
+
56
+ ** Compressed inputs
57
+ :PROPERTIES:
58
+ :CUSTOM_ID: compressed-inputs
59
+ :END:
60
+ Python =append_trajectory= and Rust =append_trajectory_path= read the file as UTF-8. They do not decompress gzip or zstd. Read the compressed file with =readcon.read_con=, which selects gzip or zstd from the extension, then append the frames:
61
+
62
+ #+begin_src python
63
+ frames = readcon.read_con("traj.con.gz") # or traj.con.zst
64
+ db.append_trajectory_frames(1, frames, source="traj.con.gz")
65
+ #+end_src
66
+
67
+ A =.con.zst= file requires a =readcon= build with the =zstd= feature. Plain =.con= files can go straight to =append_trajectory= (Python) or =append_trajectory_path= (Rust).
68
+
69
+ ** readcon-core
70
+ :PROPERTIES:
71
+ :CUSTOM_ID: readcon-core
72
+ :END:
73
+ =readcon-core= is the CON parser and writer. The corpus stores the text that parser produces and decodes a hit with the same library. Foreign formats (XYZ, PDB, GRO) enter through =readcon.read_chemfiles= on a chemfiles build, then =append_trajectory_frames=. They do not enter through ASE.
74
+
75
+ ** ASE
76
+ :PROPERTIES:
77
+ :CUSTOM_ID: ase
78
+ :END:
79
+ =readcon-db= does not register an =ase.ioformats= entry point, and neither does =readcon=. ASE reads a CON file with its built-in =eon= format:
80
+
81
+ #+begin_src python
82
+ import ase.io
83
+ ase.io.read("traj.con", format="eon")
84
+ #+end_src
85
+
86
+ That call does not open a corpus and does not use =readcon=. =ase.db= and =ase.io.Trajectory= are the stores a benchmark compares against. They are not how this corpus stores frames.
87
+
88
+ A calculator that needs an =ase.Atoms= object can be built from a =StoredFrame=. =readcon.ConFrame.to_ase= applies to a frame parsed by =readcon=, including one recovered with =read_con_string(db.get_frame_text(...))=.
89
+
90
+ ** Example
91
+ :PROPERTIES:
92
+ :CUSTOM_ID: example
93
+ :END:
94
+ This block is executed by =python/tests/test_streaming_guide.py=.
95
+
96
+ #+begin_src python
97
+ # runnable
98
+ import gzip
99
+ import importlib.metadata as metadata
100
+ from pathlib import Path
101
+
102
+ import readcon
103
+ from readcon_db import ConCorpus
104
+
105
+ root = Path("guide")
106
+ root.mkdir()
107
+ sites = [readcon.Atom("Cu", float(i), 0.0, 1.0, atom_id=i) for i in range(4)]
108
+ frame = readcon.ConFrame((12.0, 12.0, 12.0), (90.0, 90.0, 90.0), sites)
109
+ plain = root / "traj.con"
110
+ readcon.write_con(str(plain), [frame] * 70)
111
+ gz = root / "traj.con.gz"
112
+ gz.write_bytes(gzip.compress(plain.read_bytes()))
113
+
114
+ db = ConCorpus(str(root / "db"))
115
+ rejected = False
116
+ try:
117
+ db.append_trajectory(1, str(gz))
118
+ except RuntimeError:
119
+ rejected = True
120
+ assert rejected
121
+
122
+ loaded = readcon.read_con(str(gz))
123
+ n = db.append_trajectory_frames(1, loaded, source=gz.name)
124
+ assert n == 70
125
+ got = db.get_frame(1, 64)
126
+ assert type(got).__name__ == "StoredFrame"
127
+ assert type(got.atoms).__name__ == "StoredAtoms"
128
+ assert got.atoms[0].symbol == "Cu"
129
+ assert got.atoms[-1].x == 3.0
130
+ assert tuple(got.cell) == (12.0, 12.0, 12.0)
131
+ text = db.get_frame_text(1, 0)
132
+ full = readcon.read_con_string(text)[0]
133
+ assert full.atoms[0].symbol == got.atoms[0].symbol
134
+
135
+ from ase import Atoms
136
+
137
+ atoms = Atoms(
138
+ symbols=[atom.symbol for atom in got.atoms],
139
+ positions=got.xyz,
140
+ cell=list(got.cell),
141
+ pbc=True,
142
+ )
143
+ assert len(atoms) == len(got)
144
+
145
+ eps = metadata.entry_points()
146
+ group = eps.select(group="ase.ioformats") if hasattr(eps, "select") else eps.get("ase.ioformats", [])
147
+ registered = [ep for ep in group if "readcon_db" in ep.value]
148
+ assert registered == []
149
+ #+end_src
@@ -20,9 +20,11 @@
20
20
 
21
21
  * readcon-db
22
22
 
23
- Rare-event codes already checkpoint on CON. This crate keeps thousands of
24
- those frames in one mmap tree: ingest CON text, filter without loading every
25
- atom, decode a hit with [[https://lode-org.github.io/readcon-core/][readcon-core]].
23
+ Rare-event codes already checkpoint frames in the plain-text structure format (CON).
24
+ This crate keeps thousands of those frames in one memory-mapped tree: ingest CON text, filter without loading every atom, decode a hit with [[https://lode-org.github.io/readcon-core/][readcon-core]].
25
+
26
+ Ask questions and report bugs on the [[https://github.com/lode-org/readcon-db/issues][GitHub issue tracker]].
27
+ Report a security problem by email instead, as =SECURITY.md= in the repository describes.
26
28
 
27
29
  #+BEGIN_EXPORT rst
28
30
  :doc:`/tutorials/getting-started` · :doc:`/tutorials/tutorial` · :doc:`/howto/howto` · :doc:`/explanation/architecture` ·
@@ -44,11 +46,11 @@ atom, decode a hit with [[https://lode-org.github.io/readcon-core/][readcon-core
44
46
  .. grid:: 1 1 2 2
45
47
  :gutter: 2
46
48
 
47
- .. grid-item-card:: Tutorial: first corpus
49
+ .. grid-item-card:: Tutorial: Your first corpus
48
50
  :link: tutorials/tutorial
49
51
  :link-type: doc
50
52
 
51
- Open a directory, ingest a fixture, select copper, print the hash.
53
+ Ingest three files, filter them by element and energy, and find a repeated trajectory.
52
54
 
53
55
  .. grid-item-card:: How-to by language
54
56
  :link: howto/howto
@@ -83,6 +85,8 @@ Site map
83
85
  :caption: How-to guides
84
86
 
85
87
  howto/howto
88
+ howto/streaming
89
+ howto/migration
86
90
  howto/topology
87
91
  howto/install
88
92
  howto/campaign
@@ -97,6 +101,7 @@ Site map
97
101
  explanation/overview
98
102
  explanation/architecture
99
103
  explanation/design
104
+ cooked-soa
100
105
 
101
106
  .. toctree::
102
107
  :maxdepth: 1
@@ -105,6 +110,7 @@ Site map
105
110
  reference/rust
106
111
  reference/c
107
112
  reference/python
113
+ reference/python-api
108
114
  reference/fortran
109
115
  reference/citation
110
116
 
@@ -92,7 +92,7 @@ rkrdb_close(id);
92
92
 
93
93
  Status: =RKRDB_OK= (0), =RKRDB_ERR= (-1), =RKRDB_NOT_FOUND= (-2), =RKRDB_NULL= (-3).
94
94
 
95
- 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=.
95
+ =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
96
 
97
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`@@.
98
98
 
@@ -167,4 +167,6 @@ C++ =readcon_db::Corpus::pack_frame= (~buf == NULL~ size query) / =pack_frames=
167
167
  :PROPERTIES:
168
168
  :CUSTOM_ID: cooked-soa-rcso
169
169
  :END:
170
- See =docs/orgmode/cooked-soa.org=. Tier is opt-in; CON text remains authority. Bindings expose cook / delete / has-valid / positions / forces / velocities.
170
+ See @@rst::doc:`/cooked-soa`@@.
171
+ Tier is opt-in; the =.con= text remains authority.
172
+ Bindings expose cook / delete / has-valid / positions / forces / velocities.
@@ -52,4 +52,6 @@ H5MD interchange and caller units: =db_append_units=, =db_set_units=, =db_h5md_t
52
52
  :PROPERTIES:
53
53
  :CUSTOM_ID: cooked-soa-rcso
54
54
  :END:
55
- See =docs/orgmode/cooked-soa.org=. Tier is opt-in; CON text remains authority. Fortran exposes cook / delete / has-valid / =db_get_positions= / =db_get_forces= / =db_get_velocities=.
55
+ See @@rst::doc:`/cooked-soa`@@.
56
+ Tier is opt-in; the =.con= text remains authority.
57
+ Fortran exposes cook / delete / has-valid / =db_get_positions= / =db_get_forces= / =db_get_velocities=.
@@ -0,0 +1,14 @@
1
+ #+OPTIONS: toc:nil num:nil
2
+
3
+ * Generated Python API
4
+ :PROPERTIES:
5
+ :CUSTOM_ID: generated-python-api
6
+ :END:
7
+
8
+ This page is generated from the docstrings on =readcon_db=. The narrative guide is @@rst::doc:`/howto/streaming`@@.
9
+
10
+ #+BEGIN_EXPORT rst
11
+ .. automodule:: readcon_db
12
+ :members:
13
+ :undoc-members:
14
+ #+END_EXPORT