readcon-db 0.2.5__tar.gz → 0.3.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (211) hide show
  1. {readcon_db-0.2.5 → readcon_db-0.3.0}/.github/workflows/ci.yml +1 -1
  2. {readcon_db-0.2.5 → readcon_db-0.3.0}/CHANGELOG.md +10 -0
  3. {readcon_db-0.2.5 → readcon_db-0.3.0}/CITATION.cff +2 -2
  4. {readcon_db-0.2.5 → readcon_db-0.3.0}/Cargo.lock +9 -27
  5. {readcon_db-0.2.5 → readcon_db-0.3.0}/Cargo.toml +7 -10
  6. {readcon_db-0.2.5 → readcon_db-0.3.0}/PKG-INFO +11 -12
  7. {readcon_db-0.2.5 → readcon_db-0.3.0}/README.md +9 -10
  8. {readcon_db-0.2.5 → readcon_db-0.3.0}/changelog.d/python-readcon-dependency.feature.md +1 -1
  9. readcon_db-0.3.0/changelog.d/trajectory-metadata.feature.md +1 -0
  10. readcon_db-0.3.0/changelog.d/v31-clock-units.bugfix.md +1 -0
  11. {readcon_db-0.2.5 → readcon_db-0.3.0}/docs/orgmode/explanation/architecture.org +1 -1
  12. {readcon_db-0.2.5 → readcon_db-0.3.0}/docs/orgmode/explanation/design.org +1 -1
  13. {readcon_db-0.2.5 → readcon_db-0.3.0}/docs/orgmode/howto/campaign.org +1 -1
  14. {readcon_db-0.2.5 → readcon_db-0.3.0}/docs/orgmode/howto/workflows.org +1 -1
  15. {readcon_db-0.2.5 → readcon_db-0.3.0}/docs/orgmode/reference/c.org +5 -3
  16. {readcon_db-0.2.5 → readcon_db-0.3.0}/docs/orgmode/reference/python.org +2 -1
  17. {readcon_db-0.2.5 → readcon_db-0.3.0}/docs/orgmode/reference/rust.org +3 -1
  18. {readcon_db-0.2.5 → readcon_db-0.3.0}/fortran/ReadConDb/fpm.toml +1 -1
  19. {readcon_db-0.2.5 → readcon_db-0.3.0}/include/readcon-db.h +43 -11
  20. {readcon_db-0.2.5 → readcon_db-0.3.0}/pixi.toml +1 -1
  21. {readcon_db-0.2.5 → readcon_db-0.3.0}/pyproject.toml +2 -2
  22. {readcon_db-0.2.5 → readcon_db-0.3.0}/python/pyproject.toml +2 -2
  23. {readcon_db-0.2.5 → readcon_db-0.3.0}/python/tests/test_export_h5md.py +10 -6
  24. readcon_db-0.3.0/python/tests/test_ingest_memory.py +840 -0
  25. readcon_db-0.3.0/python/tests/test_trajectory_metadata.py +47 -0
  26. {readcon_db-0.2.5 → readcon_db-0.3.0}/resources/test/con_v4/README.md +3 -2
  27. {readcon_db-0.2.5 → readcon_db-0.3.0}/scripts/check_version_lockstep.py +1 -1
  28. {readcon_db-0.2.5 → readcon_db-0.3.0}/src/canonical.rs +1 -1
  29. {readcon_db-0.2.5 → readcon_db-0.3.0}/src/cooked_soa.rs +6 -7
  30. {readcon_db-0.2.5 → readcon_db-0.3.0}/src/corpus.rs +138 -37
  31. {readcon_db-0.2.5 → readcon_db-0.3.0}/src/export_h5md.rs +212 -113
  32. {readcon_db-0.2.5 → readcon_db-0.3.0}/src/export_xyz.rs +3 -5
  33. {readcon_db-0.2.5 → readcon_db-0.3.0}/src/ffi.rs +198 -46
  34. {readcon_db-0.2.5 → readcon_db-0.3.0}/src/lib.rs +0 -5
  35. {readcon_db-0.2.5 → readcon_db-0.3.0}/src/python.rs +162 -153
  36. {readcon_db-0.2.5 → readcon_db-0.3.0}/src/python_archive.rs +13 -0
  37. readcon_db-0.3.0/src/units_canon.rs +1019 -0
  38. readcon_db-0.3.0/tests/con_v4_fixtures.rs +108 -0
  39. readcon_db-0.2.5/changelog.d/v31-clock-units.bugfix.md +0 -1
  40. readcon_db-0.2.5/python/tests/test_ingest_memory.py +0 -273
  41. readcon_db-0.2.5/src/units_canon.rs +0 -821
  42. readcon_db-0.2.5/tests/con_v4_fixtures.rs +0 -64
  43. {readcon_db-0.2.5 → readcon_db-0.3.0}/.github/workflows/c_lib_tarball.yml +0 -0
  44. {readcon_db-0.2.5 → readcon_db-0.3.0}/.github/workflows/ci_cxx.yml +0 -0
  45. {readcon_db-0.2.5 → readcon_db-0.3.0}/.github/workflows/ci_docs.yml +0 -0
  46. {readcon_db-0.2.5 → readcon_db-0.3.0}/.github/workflows/ci_mpi.yml +0 -0
  47. {readcon_db-0.2.5 → readcon_db-0.3.0}/.github/workflows/ci_prek.yml +0 -0
  48. {readcon_db-0.2.5 → readcon_db-0.3.0}/.github/workflows/crates_publish.yml +0 -0
  49. {readcon_db-0.2.5 → readcon_db-0.3.0}/.github/workflows/cxx_tarball.yml +0 -0
  50. {readcon_db-0.2.5 → readcon_db-0.3.0}/.github/workflows/lint.yml +0 -0
  51. {readcon_db-0.2.5 → readcon_db-0.3.0}/.github/workflows/pages.yml +0 -0
  52. {readcon_db-0.2.5 → readcon_db-0.3.0}/.github/workflows/python-wheels.yml +0 -0
  53. {readcon_db-0.2.5 → readcon_db-0.3.0}/.gitignore +0 -0
  54. {readcon_db-0.2.5 → readcon_db-0.3.0}/CMakeLists.txt +0 -0
  55. {readcon_db-0.2.5 → readcon_db-0.3.0}/CODE_OF_CONDUCT.md +0 -0
  56. {readcon_db-0.2.5 → readcon_db-0.3.0}/CONTRIBUTING.md +0 -0
  57. {readcon_db-0.2.5 → readcon_db-0.3.0}/LICENSE +0 -0
  58. {readcon_db-0.2.5 → readcon_db-0.3.0}/SECURITY.md +0 -0
  59. {readcon_db-0.2.5 → readcon_db-0.3.0}/assets/logo/BRAND.md +0 -0
  60. {readcon_db-0.2.5 → readcon_db-0.3.0}/assets/logo/readcon-db-logo-512.png +0 -0
  61. {readcon_db-0.2.5 → readcon_db-0.3.0}/assets/logo/readcon-db-logo-raster.jpg +0 -0
  62. {readcon_db-0.2.5 → readcon_db-0.3.0}/assets/logo/readcon-db-logo.svg +0 -0
  63. {readcon_db-0.2.5 → readcon_db-0.3.0}/assets/logo/readcon-db-wordmark.svg +0 -0
  64. {readcon_db-0.2.5 → readcon_db-0.3.0}/bench/gen_con.py +0 -0
  65. {readcon_db-0.2.5 → readcon_db-0.3.0}/bench/mpi_bench.sh +0 -0
  66. {readcon_db-0.2.5 → readcon_db-0.3.0}/bench/vary_con.py +0 -0
  67. {readcon_db-0.2.5 → readcon_db-0.3.0}/changelog.d/python-archive-reader.feature.md +0 -0
  68. {readcon_db-0.2.5 → readcon_db-0.3.0}/changelog.d/rkrdb-extend-trajectory-str.feature.md +0 -0
  69. {readcon_db-0.2.5 → readcon_db-0.3.0}/cmake/readcon-db-config-version.in.cmake +0 -0
  70. {readcon_db-0.2.5 → readcon_db-0.3.0}/cmake/readcon-db-config.in.cmake +0 -0
  71. {readcon_db-0.2.5 → readcon_db-0.3.0}/cmake/readcon-db.pc.in +0 -0
  72. {readcon_db-0.2.5 → readcon_db-0.3.0}/cmake/tempdir.cmake +0 -0
  73. {readcon_db-0.2.5 → readcon_db-0.3.0}/cog.toml +0 -0
  74. {readcon_db-0.2.5 → readcon_db-0.3.0}/docs/Makefile +0 -0
  75. {readcon_db-0.2.5/website/assets → readcon_db-0.3.0/docs/_static}/logo.svg +0 -0
  76. {readcon_db-0.2.5 → readcon_db-0.3.0}/docs/orgmode/changelog.org +0 -0
  77. {readcon_db-0.2.5 → readcon_db-0.3.0}/docs/orgmode/contributing/index.org +0 -0
  78. {readcon_db-0.2.5 → readcon_db-0.3.0}/docs/orgmode/cooked-soa.org +0 -0
  79. {readcon_db-0.2.5 → readcon_db-0.3.0}/docs/orgmode/explanation/faq.org +0 -0
  80. {readcon_db-0.2.5 → readcon_db-0.3.0}/docs/orgmode/explanation/overview.org +0 -0
  81. {readcon_db-0.2.5 → readcon_db-0.3.0}/docs/orgmode/howto/atom-order.org +0 -0
  82. {readcon_db-0.2.5 → readcon_db-0.3.0}/docs/orgmode/howto/howto.org +0 -0
  83. {readcon_db-0.2.5 → readcon_db-0.3.0}/docs/orgmode/howto/install.org +0 -0
  84. {readcon_db-0.2.5 → readcon_db-0.3.0}/docs/orgmode/howto/migration.org +0 -0
  85. {readcon_db-0.2.5 → readcon_db-0.3.0}/docs/orgmode/howto/mpi.org +0 -0
  86. {readcon_db-0.2.5 → readcon_db-0.3.0}/docs/orgmode/howto/streaming.org +0 -0
  87. {readcon_db-0.2.5 → readcon_db-0.3.0}/docs/orgmode/howto/topology.org +0 -0
  88. {readcon_db-0.2.5 → readcon_db-0.3.0}/docs/orgmode/index.org +0 -0
  89. {readcon_db-0.2.5 → readcon_db-0.3.0}/docs/orgmode/readme.org +0 -0
  90. {readcon_db-0.2.5 → readcon_db-0.3.0}/docs/orgmode/reference/citation.org +0 -0
  91. {readcon_db-0.2.5 → readcon_db-0.3.0}/docs/orgmode/reference/fortran.org +0 -0
  92. {readcon_db-0.2.5 → readcon_db-0.3.0}/docs/orgmode/reference/python-api.org +0 -0
  93. {readcon_db-0.2.5 → readcon_db-0.3.0}/docs/orgmode/tutorials/getting-started.org +0 -0
  94. {readcon_db-0.2.5 → readcon_db-0.3.0}/docs/orgmode/tutorials/tutorial-run.log +0 -0
  95. {readcon_db-0.2.5 → readcon_db-0.3.0}/docs/orgmode/tutorials/tutorial-run.sh +0 -0
  96. {readcon_db-0.2.5 → readcon_db-0.3.0}/docs/orgmode/tutorials/tutorial.org +0 -0
  97. {readcon_db-0.2.5 → readcon_db-0.3.0}/docs/requirements.txt +0 -0
  98. {readcon_db-0.2.5 → readcon_db-0.3.0}/docs/source/_static/custom.css +0 -0
  99. {readcon_db-0.2.5 → readcon_db-0.3.0}/docs/source/_static/favicon.svg +0 -0
  100. {readcon_db-0.2.5 → readcon_db-0.3.0}/docs/source/_static/logo-nav-dark.svg +0 -0
  101. {readcon_db-0.2.5 → readcon_db-0.3.0}/docs/source/_static/logo-nav-light.svg +0 -0
  102. {readcon_db-0.2.5 → readcon_db-0.3.0}/docs/source/_static/logo.svg +0 -0
  103. {readcon_db-0.2.5 → readcon_db-0.3.0}/docs/source/_static/mark.svg +0 -0
  104. {readcon_db-0.2.5 → readcon_db-0.3.0}/docs/source/_templates/partials/extra-foot.html +0 -0
  105. {readcon_db-0.2.5 → readcon_db-0.3.0}/docs/source/_templates/partials/extra-head.html +0 -0
  106. {readcon_db-0.2.5 → readcon_db-0.3.0}/docs/source/_templates/partials/site-foot.html +0 -0
  107. {readcon_db-0.2.5 → readcon_db-0.3.0}/docs/source/_templates/partials/webfonts.html +0 -0
  108. {readcon_db-0.2.5 → readcon_db-0.3.0}/docs/source/conf.py +0 -0
  109. {readcon_db-0.2.5 → readcon_db-0.3.0}/examples/bench_corpus_ops.rs +0 -0
  110. {readcon_db-0.2.5 → readcon_db-0.3.0}/examples/bench_vs_ase_prep.py +0 -0
  111. {readcon_db-0.2.5 → readcon_db-0.3.0}/examples/benchmarks/ase_db_bench.json +0 -0
  112. {readcon_db-0.2.5 → readcon_db-0.3.0}/examples/benchmarks/ase_fair_campaign_1.json +0 -0
  113. {readcon_db-0.2.5 → readcon_db-0.3.0}/examples/benchmarks/bench_ase_db.py +0 -0
  114. {readcon_db-0.2.5 → readcon_db-0.3.0}/examples/benchmarks/db_vs_ase_table.md +0 -0
  115. {readcon_db-0.2.5 → readcon_db-0.3.0}/examples/benchmarks/fair_campaign.py +0 -0
  116. {readcon_db-0.2.5 → readcon_db-0.3.0}/examples/benchmarks/fair_db_vs_ase_table.md +0 -0
  117. {readcon_db-0.2.5 → readcon_db-0.3.0}/examples/benchmarks/readcon_db_bench.json +0 -0
  118. {readcon_db-0.2.5 → readcon_db-0.3.0}/examples/benchmarks/results_merged.json +0 -0
  119. {readcon_db-0.2.5 → readcon_db-0.3.0}/examples/benchmarks/test_fair_select_parity.py +0 -0
  120. {readcon_db-0.2.5 → readcon_db-0.3.0}/examples/ingest_select.rs +0 -0
  121. {readcon_db-0.2.5 → readcon_db-0.3.0}/examples/mpi_bcast_frame.c +0 -0
  122. {readcon_db-0.2.5 → readcon_db-0.3.0}/examples/mpi_bcast_frame.f90 +0 -0
  123. {readcon_db-0.2.5 → readcon_db-0.3.0}/examples/mpi_bcast_frame.py +0 -0
  124. {readcon_db-0.2.5 → readcon_db-0.3.0}/examples/mpi_ingest_check.rs +0 -0
  125. {readcon_db-0.2.5 → readcon_db-0.3.0}/examples/mpi_read_check.rs +0 -0
  126. {readcon_db-0.2.5 → readcon_db-0.3.0}/examples/shard_gate.rs +0 -0
  127. {readcon_db-0.2.5 → readcon_db-0.3.0}/examples/workflows/metatrain_from_con.md +0 -0
  128. {readcon_db-0.2.5 → readcon_db-0.3.0}/examples/workflows/options.metatrain.snippet.yaml +0 -0
  129. {readcon_db-0.2.5 → readcon_db-0.3.0}/fortran/README.md +0 -0
  130. {readcon_db-0.2.5 → readcon_db-0.3.0}/fortran/ReadConDb/src/readcon_db.f90 +0 -0
  131. {readcon_db-0.2.5 → readcon_db-0.3.0}/include/readcon-db-mpi.h +0 -0
  132. {readcon_db-0.2.5 → readcon_db-0.3.0}/lychee.toml +0 -0
  133. {readcon_db-0.2.5 → readcon_db-0.3.0}/meson.build +0 -0
  134. {readcon_db-0.2.5 → readcon_db-0.3.0}/meson_options.txt +0 -0
  135. {readcon_db-0.2.5 → readcon_db-0.3.0}/packaging/wrapdb/README.md +0 -0
  136. {readcon_db-0.2.5 → readcon_db-0.3.0}/packaging/wrapdb/readcon-db.wrap.in +0 -0
  137. {readcon_db-0.2.5 → readcon_db-0.3.0}/paper/cpc/freeze/ase_fair_campaign_1.json +0 -0
  138. {readcon_db-0.2.5 → readcon_db-0.3.0}/paper/cpc/freeze/fair_db_vs_ase_table.md +0 -0
  139. {readcon_db-0.2.5 → readcon_db-0.3.0}/paper/cpc/readme.org +0 -0
  140. {readcon_db-0.2.5 → readcon_db-0.3.0}/paper/cpc/scripts/gen_fair_table.py +0 -0
  141. {readcon_db-0.2.5 → readcon_db-0.3.0}/paper/cpc/src/appendix-fair-campaign.org +0 -0
  142. {readcon_db-0.2.5 → readcon_db-0.3.0}/paper/cpc/src/figures/generated/fair_campaign_table.tex +0 -0
  143. {readcon_db-0.2.5 → readcon_db-0.3.0}/pixi.lock +0 -0
  144. {readcon_db-0.2.5 → readcon_db-0.3.0}/pr-text.md +0 -0
  145. {readcon_db-0.2.5 → readcon_db-0.3.0}/prek.toml +0 -0
  146. {readcon_db-0.2.5 → readcon_db-0.3.0}/python/tests/test_archive_reader.py +0 -0
  147. {readcon_db-0.2.5 → readcon_db-0.3.0}/python/tests/test_atom_order.py +0 -0
  148. {readcon_db-0.2.5 → readcon_db-0.3.0}/python/tests/test_catalog_claims.py +0 -0
  149. {readcon_db-0.2.5 → readcon_db-0.3.0}/python/tests/test_extend_precision.py +0 -0
  150. {readcon_db-0.2.5 → readcon_db-0.3.0}/python/tests/test_hash_con_text.py +0 -0
  151. {readcon_db-0.2.5 → readcon_db-0.3.0}/python/tests/test_stream_and_random.py +0 -0
  152. {readcon_db-0.2.5 → readcon_db-0.3.0}/python/tests/test_streaming_guide.py +0 -0
  153. {readcon_db-0.2.5 → readcon_db-0.3.0}/resources/test/con_v4/tiny_cuh2_v4.con +0 -0
  154. {readcon_db-0.2.5 → readcon_db-0.3.0}/resources/test/con_v4/tiny_cuh2_v4.convel +0 -0
  155. {readcon_db-0.2.5 → readcon_db-0.3.0}/resources/test/eon36_lj_dimer.convel +0 -0
  156. {readcon_db-0.2.5 → readcon_db-0.3.0}/resources/test/highprec_a.con +0 -0
  157. {readcon_db-0.2.5 → readcon_db-0.3.0}/resources/test/highprec_b.con +0 -0
  158. {readcon_db-0.2.5 → readcon_db-0.3.0}/resources/test/sulfolene.con +0 -0
  159. {readcon_db-0.2.5 → readcon_db-0.3.0}/resources/test/tiny_cuh2.con +0 -0
  160. {readcon_db-0.2.5 → readcon_db-0.3.0}/resources/test/tiny_cuh2.convel +0 -0
  161. {readcon_db-0.2.5 → readcon_db-0.3.0}/resources/test/tiny_cuh2_forces.con +0 -0
  162. {readcon_db-0.2.5 → readcon_db-0.3.0}/resources/test/tiny_cuh2_vel_forces.con +0 -0
  163. {readcon_db-0.2.5 → readcon_db-0.3.0}/resources/test/tiny_multi_cuh2.con +0 -0
  164. {readcon_db-0.2.5 → readcon_db-0.3.0}/scripts/assemble-site.sh +0 -0
  165. {readcon_db-0.2.5 → readcon_db-0.3.0}/scripts/build-docs.sh +0 -0
  166. {readcon_db-0.2.5 → readcon_db-0.3.0}/scripts/check-clib-dist.sh +0 -0
  167. {readcon_db-0.2.5 → readcon_db-0.3.0}/scripts/check-cpc-freeze.sh +0 -0
  168. {readcon_db-0.2.5 → readcon_db-0.3.0}/scripts/check-cxx-dist.sh +0 -0
  169. {readcon_db-0.2.5 → readcon_db-0.3.0}/scripts/crate_version.py +0 -0
  170. {readcon_db-0.2.5 → readcon_db-0.3.0}/scripts/export-landing.sh +0 -0
  171. {readcon_db-0.2.5 → readcon_db-0.3.0}/scripts/meson_cargo_build.py +0 -0
  172. {readcon_db-0.2.5 → readcon_db-0.3.0}/scripts/package-clib.sh +0 -0
  173. {readcon_db-0.2.5 → readcon_db-0.3.0}/scripts/package-cxx.sh +0 -0
  174. {readcon_db-0.2.5 → readcon_db-0.3.0}/scripts/release-prep.sh +0 -0
  175. {readcon_db-0.2.5 → readcon_db-0.3.0}/scripts/set-version.sh +0 -0
  176. {readcon_db-0.2.5 → readcon_db-0.3.0}/scripts/sync-version.py +0 -0
  177. {readcon_db-0.2.5 → readcon_db-0.3.0}/scripts/test_check_version_lockstep.py +0 -0
  178. {readcon_db-0.2.5 → readcon_db-0.3.0}/src/archive.rs +0 -0
  179. {readcon_db-0.2.5 → readcon_db-0.3.0}/src/bin/readcon-db.rs +0 -0
  180. {readcon_db-0.2.5 → readcon_db-0.3.0}/src/catalog.rs +0 -0
  181. {readcon_db-0.2.5 → readcon_db-0.3.0}/src/error.rs +0 -0
  182. {readcon_db-0.2.5 → readcon_db-0.3.0}/src/frame_codec.rs +0 -0
  183. {readcon_db-0.2.5 → readcon_db-0.3.0}/src/frame_scalars.rs +0 -0
  184. {readcon_db-0.2.5 → readcon_db-0.3.0}/src/keys.rs +0 -0
  185. {readcon_db-0.2.5 → readcon_db-0.3.0}/src/mpi_ingest.rs +0 -0
  186. {readcon_db-0.2.5 → readcon_db-0.3.0}/src/mpi_read.rs +0 -0
  187. {readcon_db-0.2.5 → readcon_db-0.3.0}/src/mpi_wire.rs +0 -0
  188. {readcon_db-0.2.5 → readcon_db-0.3.0}/src/select.rs +0 -0
  189. {readcon_db-0.2.5 → readcon_db-0.3.0}/src/shard.rs +0 -0
  190. {readcon_db-0.2.5 → readcon_db-0.3.0}/src/topology.rs +0 -0
  191. {readcon_db-0.2.5 → readcon_db-0.3.0}/tests/atom_order.rs +0 -0
  192. {readcon_db-0.2.5 → readcon_db-0.3.0}/tests/canonical_dump.rs +0 -0
  193. {readcon_db-0.2.5 → readcon_db-0.3.0}/tests/capi_symbols.rs +0 -0
  194. {readcon_db-0.2.5 → readcon_db-0.3.0}/tests/catalog_claims.rs +0 -0
  195. {readcon_db-0.2.5 → readcon_db-0.3.0}/tests/cdylib_static_tls.rs +0 -0
  196. {readcon_db-0.2.5 → readcon_db-0.3.0}/tests/claims_shard.rs +0 -0
  197. {readcon_db-0.2.5 → readcon_db-0.3.0}/tests/cli_refuse.rs +0 -0
  198. {readcon_db-0.2.5 → readcon_db-0.3.0}/tests/cmake-project/CMakeLists.txt +0 -0
  199. {readcon_db-0.2.5 → readcon_db-0.3.0}/tests/cmake-project/main.c +0 -0
  200. {readcon_db-0.2.5 → readcon_db-0.3.0}/tests/cooked_soa_authority.rs +0 -0
  201. {readcon_db-0.2.5 → readcon_db-0.3.0}/tests/hash_file.rs +0 -0
  202. {readcon_db-0.2.5 → readcon_db-0.3.0}/tests/meson-wrap/main.c +0 -0
  203. {readcon_db-0.2.5 → readcon_db-0.3.0}/tests/meson-wrap/meson.build +0 -0
  204. {readcon_db-0.2.5 → readcon_db-0.3.0}/tests/mpi-c/ingest_smoke.c +0 -0
  205. {readcon_db-0.2.5 → readcon_db-0.3.0}/tests/topology_cli.rs +0 -0
  206. {readcon_db-0.2.5/docs/_static → readcon_db-0.3.0/website/assets}/logo.svg +0 -0
  207. {readcon_db-0.2.5 → readcon_db-0.3.0}/website/assets/wordmark.svg +0 -0
  208. {readcon_db-0.2.5 → readcon_db-0.3.0}/website/css/site.css +0 -0
  209. {readcon_db-0.2.5 → readcon_db-0.3.0}/website/export.el +0 -0
  210. {readcon_db-0.2.5 → readcon_db-0.3.0}/website/index.html +0 -0
  211. {readcon_db-0.2.5 → readcon_db-0.3.0}/website/index.org +0 -0
@@ -61,7 +61,7 @@ jobs:
61
61
  - name: Install test dependencies
62
62
  run: |
63
63
  python -m pip install --upgrade pip
64
- python -m pip install maturin pytest numpy h5py MDAnalysis ase "readcon==0.23.2"
64
+ python -m pip install maturin pytest numpy h5py MDAnalysis ase "readcon==0.25.0"
65
65
  - name: Build the wheel
66
66
  working-directory: python
67
67
  run: maturin build --locked --release --features python --out ../dist
@@ -1,5 +1,15 @@
1
1
  # Changelog
2
2
 
3
+ ## v0.3.0 - 2026-12-03
4
+ #### Build system
5
+ - require readcon-core 0.25.0
6
+ #### Bug Fixes
7
+ - store CON major 4 frames
8
+ - below major 4, the clock and the velocities use the natural time unit from `velocity_file_time_unit`; major 4 uses `units.time`
9
+ - a pre-3.1 clock keeps the caller's spec and is not scaled; a v3.1 clock is reconciled with or without velocities
10
+ #### Tests
11
+ - round-trip CON major 4 fixtures and keep a major 3 ingest
12
+
3
13
  ## v0.2.5 - 2026-11-28
4
14
  #### Features
5
15
  - (**python**) expose the observation archive writer - (791f832) - *HaoZeke*
@@ -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.5
13
+ version: 0.3.0
14
14
  # [[[end]]]
15
- date-released: "2026-11-28"
15
+ date-released: "2026-12-03"
16
16
  keywords:
17
17
  - CON
18
18
  - LMDB
@@ -189,12 +189,6 @@ dependencies = [
189
189
  "typenum",
190
190
  ]
191
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
-
198
192
  [[package]]
199
193
  name = "custom_derive"
200
194
  version = "0.1.7"
@@ -526,16 +520,6 @@ dependencies = [
526
520
  "windows-link",
527
521
  ]
528
522
 
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
523
  [[package]]
540
524
  name = "libz-ng-sys"
541
525
  version = "1.1.33"
@@ -595,13 +579,10 @@ dependencies = [
595
579
  ]
596
580
 
597
581
  [[package]]
598
- name = "mimalloc"
599
- version = "0.1.52"
582
+ name = "metrology"
583
+ version = "0.2.6"
600
584
  source = "registry+https://github.com/rust-lang/crates.io-index"
601
- checksum = "2d4139bb28d14ad1facf21d5eb8825051b326e172d216b39f6d31df53cc97862"
602
- dependencies = [
603
- "libmimalloc-sys",
604
- ]
585
+ checksum = "7964688f2711cfbc228d8a5b50096323533bf6fc7a0e736020bc4ce64f639757"
605
586
 
606
587
  [[package]]
607
588
  name = "minimal-lexical"
@@ -904,9 +885,9 @@ checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3"
904
885
 
905
886
  [[package]]
906
887
  name = "readcon-core"
907
- version = "0.23.2"
888
+ version = "0.25.0"
908
889
  source = "registry+https://github.com/rust-lang/crates.io-index"
909
- checksum = "87c32a8afef74ec96ed1a8e09e5f4ae56ae3cd982791d438a23b51eeeddce6c8"
890
+ checksum = "09293de1c6af54b01ff57b719ec8af476f7ee0de153fe452978fc787a67f466d"
910
891
  dependencies = [
911
892
  "dlpk",
912
893
  "fast-float2",
@@ -915,20 +896,21 @@ dependencies = [
915
896
  "libc",
916
897
  "memchr",
917
898
  "memmap2",
918
- "mimalloc",
899
+ "metrology",
919
900
  "ndarray",
920
901
  "rustc-hash",
921
902
  "ryu",
903
+ "serde",
922
904
  "serde_json",
905
+ "sha2",
923
906
  ]
924
907
 
925
908
  [[package]]
926
909
  name = "readcon-db"
927
- version = "0.2.5"
910
+ version = "0.3.0"
928
911
  dependencies = [
929
912
  "heed",
930
913
  "libc",
931
- "mimalloc",
932
914
  "mpi",
933
915
  "object",
934
916
  "pyo3",
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "readcon-db"
3
- version = "0.2.5"
3
+ version = "0.3.0"
4
4
  edition = "2021"
5
5
  description = "Mmap-backed CON frame corpus (Heed/LMDB), xxHash exact match, multi-language FFI"
6
6
  license = "MIT"
@@ -30,15 +30,12 @@ mpi = ["dep:mpi"]
30
30
  [dependencies]
31
31
  heed = "0.21"
32
32
  # The pinned writer provides exact numeric CON and JSON round trips.
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
- ] }
33
+ # readcon-core 0.24+ installs mimalloc only with `mimalloc-allocator`.
34
+ # A library must not enable that feature. This crate does not, and it
35
+ # does not register its own global allocator, so the process keeps the
36
+ # system allocator. A direct mimalloc dependency would link another copy
37
+ # without installing it.
38
+ readcon-core = "=0.25.0"
42
39
  thiserror = "2"
43
40
  serde = { version = "1", features = ["derive"] }
44
41
  serde_json = "1"
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: readcon-db
3
- Version: 0.2.5
4
- Requires-Dist: readcon>=0.23,<0.24
3
+ Version: 0.3.0
4
+ Requires-Dist: readcon>=0.25,<0.26
5
5
  Summary: Mmap CON corpus store (LMDB/Heed) with xxHash exact match
6
6
  Home-Page: https://lode-org.github.io/readcon-db/
7
7
  License: MIT
@@ -20,7 +20,7 @@ Part of the **readcon ecosystem** with [`readcon-core`](https://github.com/lode-
20
20
 
21
21
  | Crate / package | Role | Docs |
22
22
  |-----------------|------|------|
23
- | **[readcon-core](https://github.com/lode-org/readcon-core)** / **`readcon`** | CON interchange (parse/write/spec v2–v3). **XYZ/PDB/GRO → `ConFrame` via chemfiles** (`read_chemfiles*`), not ASE. Optional `to_ase` only for calculators. | Core README, `docs/orgmode/` |
23
+ | **[readcon-core](https://github.com/lode-org/readcon-core)** / **`readcon`** | CON interchange (parse/write/spec v2–v4). **XYZ/PDB/GRO → `ConFrame` via chemfiles** (`read_chemfiles*`), not ASE. Optional `to_ase` only for calculators. | Core README, `docs/orgmode/` |
24
24
  | **readcon-db** / **`readcon_db`** (this repo) | mmap CON corpus: indexes (natoms, symbols, **energy range**, **forces/velocities/energy flags**), multi-reader, dedup. Blobs are **CON text** decoded with readcon-core. | [docs](https://lode-org.github.io/readcon-db/docs/), [`docs/orgmode/explanation/design.org`](docs/orgmode/explanation/design.org) |
25
25
 
26
26
  ASE is not on the CON or XYZ read path. Optional `to_ase` is calculator hand-off only.
@@ -109,17 +109,16 @@ Python `append_trajectory_frames` commits 64 frames at a time. `get_frame` retur
109
109
  - **H5MD interchange** — `export_h5md` / `collect_h5md` writes one
110
110
  `[T][N][3]` trajectory (CON stays authority). Engine dest is Å / ps /
111
111
  kJ mol^{-1} Angstrom^{-1}; velocity dest is `Angstrom ps-1`.
112
- Velocities follow D10: v1, v2, and v3.0 frames use the natural unit
113
- `(amu*angstrom^2/eV)^0.5` whatever the time label says; v3.1 frames use
114
- `units.time` and fail when a velocities section has no `units.time`.
112
+ Velocities and the simulation clock use
113
+ `readcon_core::units::velocity_file_time_unit`. Below major 4 that unit
114
+ is the natural unit `(amu*angstrom^2/eV)^0.5`, whether or not
115
+ `units.time` is present. Major 4 uses `units.time`. A missing major-4
116
+ label is an error when the frame has a clock or velocities.
115
117
  `--velocity-time-unit`, Rust `H5mdCollectOpts`, the Python
116
118
  `velocity_time_unit` argument, and C `rkrdb_set_velocity_time_unit`
117
- override that rule for a file that breaks it.
118
- The simulation clock uses `units.time` when that key is present.
119
- A v3.1 frame with `time` or `timestep` and no `units.time` is an error.
120
- The same override supplies that missing clock unit.
121
- A present `units.time` still scales the clock.
122
- v1, v2, and v3.0 clocks with no `units.time` are read as `fs`.
119
+ are passed through to that function. They do not replace the unit it
120
+ assigns. Below major 4 they are ignored. At major 4 a different unit
121
+ is an error.
123
122
  - **Node-local drain/join** — `shard-ingest` then `drain` to a unique
124
123
  dest (`data.mdb` only, refuse overwrite), then `join-drained`.
125
124
  `compact-join` joins one sharded root (`open_existing`). Campaign
@@ -6,7 +6,7 @@ Part of the **readcon ecosystem** with [`readcon-core`](https://github.com/lode-
6
6
 
7
7
  | Crate / package | Role | Docs |
8
8
  |-----------------|------|------|
9
- | **[readcon-core](https://github.com/lode-org/readcon-core)** / **`readcon`** | CON interchange (parse/write/spec v2–v3). **XYZ/PDB/GRO → `ConFrame` via chemfiles** (`read_chemfiles*`), not ASE. Optional `to_ase` only for calculators. | Core README, `docs/orgmode/` |
9
+ | **[readcon-core](https://github.com/lode-org/readcon-core)** / **`readcon`** | CON interchange (parse/write/spec v2–v4). **XYZ/PDB/GRO → `ConFrame` via chemfiles** (`read_chemfiles*`), not ASE. Optional `to_ase` only for calculators. | Core README, `docs/orgmode/` |
10
10
  | **readcon-db** / **`readcon_db`** (this repo) | mmap CON corpus: indexes (natoms, symbols, **energy range**, **forces/velocities/energy flags**), multi-reader, dedup. Blobs are **CON text** decoded with readcon-core. | [docs](https://lode-org.github.io/readcon-db/docs/), [`docs/orgmode/explanation/design.org`](docs/orgmode/explanation/design.org) |
11
11
 
12
12
  ASE is not on the CON or XYZ read path. Optional `to_ase` is calculator hand-off only.
@@ -95,17 +95,16 @@ Python `append_trajectory_frames` commits 64 frames at a time. `get_frame` retur
95
95
  - **H5MD interchange** — `export_h5md` / `collect_h5md` writes one
96
96
  `[T][N][3]` trajectory (CON stays authority). Engine dest is Å / ps /
97
97
  kJ mol^{-1} Angstrom^{-1}; velocity dest is `Angstrom ps-1`.
98
- Velocities follow D10: v1, v2, and v3.0 frames use the natural unit
99
- `(amu*angstrom^2/eV)^0.5` whatever the time label says; v3.1 frames use
100
- `units.time` and fail when a velocities section has no `units.time`.
98
+ Velocities and the simulation clock use
99
+ `readcon_core::units::velocity_file_time_unit`. Below major 4 that unit
100
+ is the natural unit `(amu*angstrom^2/eV)^0.5`, whether or not
101
+ `units.time` is present. Major 4 uses `units.time`. A missing major-4
102
+ label is an error when the frame has a clock or velocities.
101
103
  `--velocity-time-unit`, Rust `H5mdCollectOpts`, the Python
102
104
  `velocity_time_unit` argument, and C `rkrdb_set_velocity_time_unit`
103
- override that rule for a file that breaks it.
104
- The simulation clock uses `units.time` when that key is present.
105
- A v3.1 frame with `time` or `timestep` and no `units.time` is an error.
106
- The same override supplies that missing clock unit.
107
- A present `units.time` still scales the clock.
108
- v1, v2, and v3.0 clocks with no `units.time` are read as `fs`.
105
+ are passed through to that function. They do not replace the unit it
106
+ assigns. Below major 4 they are ignored. At major 4 a different unit
107
+ is an error.
109
108
  - **Node-local drain/join** — `shard-ingest` then `drain` to a unique
110
109
  dest (`data.mdb` only, refuse overwrite), then `join-drained`.
111
110
  `compact-join` joins one sharded root (`open_existing`). Campaign
@@ -1 +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.
1
+ The `readcon-db` Python package depends on `readcon>=0.25,<0.26`, the range of the pinned readcon-core, and so needs Python 3.10 or newer.
@@ -0,0 +1 @@
1
+ A trajectory can carry one caller-defined JSON object that describes it as a whole, such as the summary of the run that wrote it. Rust `ConCorpus::set_trajectory_metadata` / `trajectory_metadata`, C `rkrdb_set_trajectory_metadata` / `rkrdb_trajectory_metadata` (C++ `Corpus::set_trajectory_metadata` / `trajectory_metadata`), Python `ConCorpus.set_trajectory_metadata` / `trajectory_metadata` and `ArchiveReader.trajectory_metadata`. Frames appended later keep it, and a stored record without it reads as before. The C ABI minor is 4.
@@ -0,0 +1 @@
1
+ Python ingest keeps a pre-3.1 clock on the caller's spec. The clock and the velocities stay in the natural unit `velocity_file_time_unit` assigns, including a `ps` or `fs` label and a clock with no velocities. A v3.1 clock moves into that unit on both `read_con` and a frame list. Major 4 keeps `units.time`.
@@ -49,7 +49,7 @@ Environment (Heed / LMDB)
49
49
 
50
50
  =TrajMeta= may record =topo_cutoff=, =topo_graph=, =topo_hops=, and =topo_method= after =annotate_topology=. Those fields have serde defaults so old JSON still loads. Ingest and extend preserve them.
51
51
 
52
- *H5MD interchange:* =collect_h5md= / =export_h5md= emit one =[T][N][3]= trajectory (position, optional force and velocity). CON text stays authority. Dest units are Å / ps / kJ mol^{-1} Å^{-1}; velocity dest is =Angstrom ps-1=. Velocities follow D10: v1, v2, and v3.0 use the natural unit whatever the time label says; v3.1 uses =units.time=. A v3.1 clock with no =units.time= is an error. v1, v2, and v3.0 clocks with no =units.time= are read as =fs=.
52
+ *H5MD interchange:* =collect_h5md= / =export_h5md= emit one =[T][N][3]= trajectory (position, optional force and velocity). CON text stays authority. Dest units are Å / ps / kJ mol^{-1} Å^{-1}; velocity dest is =Angstrom ps-1=. Below major 4 the clock and the velocities are the natural unit from =velocity_file_time_unit=, with or without =units.time=. Major 4 uses =units.time=. A missing major-4 label is an error when the frame has a clock or velocities.
53
53
 
54
54
  *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`@@.
55
55
 
@@ -205,7 +205,7 @@ Assign trajectory IDs so ~traj_id % n_shards == shard_id~ (CLI =shard-ingest= ad
205
205
  :PROPERTIES:
206
206
  :CUSTOM_ID: h5md-interchange
207
207
  :END:
208
- =collect_h5md= / =export_h5md= emit one cooked =[T][N][3]= trajectory (position, optional force and velocity). CON text stays the corpus authority. Dest units are Å / ps / kJ mol^{-1} Å^{-1} / Å ps^{-1} (=Angstrom ps-1= for MDA 2.10). Velocities follow D10: v1, v2, and v3.0 use =(amu*angstrom^2/eV)^0.5= whatever the time label says; v3.1 uses =units.time= and fails when velocities have no =units.time=. An explicit velocity time override exists for a file that breaks that rule. The same override supplies the clock unit when a v3.1 frame has =time= or =timestep= and no =units.time=. v1, v2, and v3.0 clocks with no =units.time= are read as =fs=. Node-local ingest then =drain_to= + =join-drained= is the campaign write path (see above).
208
+ =collect_h5md= / =export_h5md= emit one cooked =[T][N][3]= trajectory (position, optional force and velocity). CON text stays the corpus authority. Dest units are Å / ps / kJ mol^{-1} Å^{-1} / Å ps^{-1} (=Angstrom ps-1= for MDA 2.10). Below major 4 the clock and the velocities are the natural unit =(amu*angstrom^2/eV)^0.5= from =velocity_file_time_unit=, with or without =units.time=. Major 4 uses =units.time=. A missing major-4 label is an error when the frame has a clock or velocities. An override is passed through to that function and does not replace the unit it assigns. Node-local ingest then =drain_to= + =join-drained= is the campaign write path (see above).
209
209
 
210
210
  ** LMDB model decision (HPC)
211
211
  :PROPERTIES:
@@ -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 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=.
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. Below major 4 a time-label change does not rescale the clock or the velocities; append/extend stamp incoming values. CON line-2 =units= is the authority for length and energy. The clock and the velocities follow =velocity_file_time_unit=: below major 4 that is the natural unit =(amu*angstrom^2/eV)^0.5=, with or without =units.time=, and major 4 uses =units.time=. A missing major-4 label is an error when the frame has a clock or velocities. =--velocity-time-unit= is passed through and does not replace that unit.
118
118
 
119
119
  ** C / Fortran writers
120
120
  :PROPERTIES:
@@ -54,7 +54,7 @@ db.export_h5md(traj_id=1, path="traj.h5")
54
54
 
55
55
  Dest must not exist (=File= ="x"=). A write failure removes the dest.
56
56
 
57
- Time on the file is dest =ps=: CON =header.time()=, or =i * timestep=, else the frame index. 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=. Optional force and velocity groups are dest =kJ mol-1 Angstrom-1= and =Angstrom ps-1=. Velocities follow D10: v1, v2, and v3.0 use =(amu*angstrom^2/eV)^0.5= whatever the label says; v3.1 uses =units.time= and fails if that key is missing. =readcon-db compact-join= is the single-root join (=open_existing=).
57
+ Time on the file is dest =ps=: CON =header.time()=, or =i * timestep=, else the frame index. Below major 4 the clock and the velocities are the natural unit =(amu*angstrom^2/eV)^0.5= from =velocity_file_time_unit=, with or without =units.time=. Major 4 uses =units.time=. A missing major-4 label is an error when the frame has a clock or velocities. =velocity_time_unit= is passed through and does not replace that unit. Optional force and velocity groups are dest =kJ mol-1 Angstrom-1= and =Angstrom ps-1=. =readcon-db compact-join= is the single-root join (=open_existing=).
58
58
 
59
59
  ** CON-native (default)
60
60
  :PROPERTIES:
@@ -20,7 +20,7 @@ Header: [[https://github.com/lode-org/readcon-db/blob/main/include/readcon-db.h]
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.3/layout-1" */
23
+ const char *rkrdb_abi_stamp(void); /* "readcon-db/abi-1.4/layout-1" */
24
24
  int rkrdb_abi_compatible(uint32_t major, uint32_t minor, uint32_t layout_revision);
25
25
  #+end_src
26
26
 
@@ -64,7 +64,7 @@ rkrdb_h5md_positions(id, 1, xyz, 4096, &nf, &na);
64
64
  double edges[64], frc[4096], vel[4096];
65
65
  rkrdb_h5md_edges(id, 1, edges, 64);
66
66
  rkrdb_h5md_forces(id, 1, frc, 4096);
67
- rkrdb_set_velocity_time_unit(id, "fs"); /* NULL clears; D10 override */
67
+ rkrdb_set_velocity_time_unit(id, "fs"); /* NULL clears; passed to velocity_file_time_unit */
68
68
  rkrdb_h5md_velocities(id, 1, vel, 4096);
69
69
  int32_t z[256]; uint32_t nz = 0;
70
70
  rkrdb_h5md_species(id, 1, z, 256, &nz);
@@ -99,7 +99,9 @@ Status: =RKRDB_OK= (0), =RKRDB_ERR= (-1), =RKRDB_NOT_FOUND= (-2), =RKRDB_NULL= (
99
99
 
100
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
101
 
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=.
102
+ =rkrdb_set_trajectory_metadata(id, traj, json)= replaces the caller-defined JSON object of one trajectory, such as the summary of the run that wrote it; frames appended later keep it. =rkrdb_trajectory_metadata(id, traj, buf, len, &out_len)= copies it back NUL-terminated and reports its length in =out_len= also when =buf= is too small (=RKRDB_ERR=), so a caller can size the buffer. Both return =RKRDB_NOT_FOUND= for a trajectory that does not exist, and the getter also when none was set. C++ =Corpus::set_trajectory_metadata= / =trajectory_metadata= (empty string when none). Added in ABI 1.4.
103
+
104
+ =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= leaves a major below 4 clock in the natural unit when the time label changes. Major 4 scales the clock and the velocities by =units.time=, and a missing label is an error when the frame has a clock or velocities. H5MD velocities are written as =Angstrom ps-1=. Below major 4 the clock and the velocities are =(amu*angstrom^2/eV)^0.5= from =velocity_file_time_unit=, with or without =units.time=. Major 4 uses =units.time=. =rkrdb_set_velocity_time_unit= (C++ =Corpus::set_velocity_time_unit=) is passed through and does not replace that unit.
103
105
 
104
106
  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`@@.
105
107
 
@@ -76,6 +76,7 @@ with ArchiveReader("out/obs-archive") as archive: # or ".../observations.rdb"
76
76
  | =archive.get(t, f=0)=, =trajectory(t)= | one =Observation=, or every frame of one trajectory |
77
77
  | =archive.frame(t, f=0)=, =text(t, f=0)= | the =readcon.ConFrame=, or the stored CON text |
78
78
  | =refresh()= | takes the key list again and returns the new count |
79
+ | =archive.trajectory_metadata(t)= | the metadata dict the writer set on trajectory =t=, or =None= |
79
80
  | =close()=, =closed= | closes the LMDB environment, and whether it is closed |
80
81
 
81
82
  An =Observation= has =traj_id=, =frame_idx=, =key=, =index= (its position in key order), =text=, =frame=, =natoms=, =energy= and =metadata= (the JSON metadata line), and =caller_order=.
@@ -124,7 +125,7 @@ db.export_h5md(traj_id=1, path="traj.h5")
124
125
 
125
126
  Dest must not exist. =File= ="x"=; a write failure removes the dest.
126
127
 
127
- The file has =/h5md= version =[1,1]= with =author=/=creator=, =particles/all/position/value= of shape =[T][N][3]=, =position/step= and =position/time= of shape =[T]=, =box/edges/value= of shape =[T][3][3]=, integer-Z =species=, optional =particles/all/velocity= =[T][N][3]= (dest =Angstrom ps-1=), and unit attributes for one engine system (like metatomic model vs engine): length =Angstrom=, time =ps=, force =kJ mol-1 Angstrom-1=, velocity =Angstrom ps-1=. H5MD velocities follow D10. 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 the export fails when velocities have no =units.time=. ~export_h5md(traj_id, path, velocity_time_unit=None)~ overrides that rule for a file that breaks it. Pass =fs= when a pre-v3.1 file really stored Angstrom/fs, or the natural unit when a v3.1 file mislabeled that unit as =fs=. CON =units.length= / =units.energy= and the clock =units.time= convert through =unit_conversion_factor= (SI). Time is CON =header.time()=, or =i * timestep=, else the frame index, all in =ps=. A v3.1 frame with =time= or =timestep= and no =units.time= is an error. =velocity_time_unit= 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=. =unit_conversion_factor(from, to)= and =canonicalize_unit(expr)= are on the Python module. Callers write aliases (=A=, =ev=, =femtosecond=); ~append_trajectory(..., units={...})~, ~extend_trajectory(..., units={...})~, ~ingest_directory(..., units={...})~, and =set_units(traj_id, {...})= store canonical names (=angstrom=, =eV=, =fs=) in CON metadata. =append= / =extend= stamp the incoming numbers; =set_units= converts stored numbers so the new label is honest. A v3.1 clock or velocities frame with no =units.time= is an error, not a silent =fs=; v1, v2, and v3.0 clocks with no =units.time= still convert as =fs=. =get_units(traj_id, frame_idx)= returns the stored units JSON as a string. Mixed-force trajectories write a full =[T][N][3]= force dataset (zeros on frames without forces). Mixed-velocity trajectories write a full =[T][N][3]= velocity dataset the same way. Box =boundary= follows CON =pbc= (periodic when absent). =author=/=creator=/=boundary= attrs are fixed-length ASCII. Physical =unit= attrs are short H5MD strings (MDAnalysis 2.10 indexes them as dict keys).
128
+ The file has =/h5md= version =[1,1]= with =author=/=creator=, =particles/all/position/value= of shape =[T][N][3]=, =position/step= and =position/time= of shape =[T]=, =box/edges/value= of shape =[T][3][3]=, integer-Z =species=, optional =particles/all/velocity= =[T][N][3]= (dest =Angstrom ps-1=), and unit attributes for one engine system (like metatomic model vs engine): length =Angstrom=, time =ps=, force =kJ mol-1 Angstrom-1=, velocity =Angstrom ps-1=. Below major 4 the clock and the velocities are the natural unit =(amu*angstrom^2/eV)^0.5= from =velocity_file_time_unit=, with or without =units.time=. Major 4 uses =units.time=. A missing major-4 label is an error when the frame has a clock or velocities. ~export_h5md(traj_id, path, velocity_time_unit=None)~ passes that override through and does not replace the assigned unit. CON =units.length= / =units.energy= convert through =unit_conversion_factor= (SI). Time is CON =header.time()=, or =i * timestep=, else the frame index, all in =ps=. =unit_conversion_factor(from, to)= and =canonicalize_unit(expr)= are on the Python module. Callers write aliases (=A=, =ev=, =femtosecond=); ~append_trajectory(..., units={...})~, ~extend_trajectory(..., units={...})~, ~ingest_directory(..., units={...})~, and =set_units(traj_id, {...})= store canonical names (=angstrom=, =eV=, =fs=) in CON metadata. =append= / =extend= stamp the incoming numbers; =set_units= converts stored numbers so the new label is honest. Below major 4 =set_units= does not rescale the clock or the velocities when the time label changes. Major 4 scales both by =units.time=. =get_units(traj_id, frame_idx)= returns the stored units JSON as a string. =set_trajectory_metadata(traj_id, {...})= stores one JSON object that describes a trajectory as a whole (a run summary, say) and =trajectory_metadata(traj_id)= returns it, or =None=; frames appended later keep it, and an unknown trajectory raises =KeyError=. Mixed-force trajectories write a full =[T][N][3]= force dataset (zeros on frames without forces). Mixed-velocity trajectories write a full =[T][N][3]= velocity dataset the same way. Box =boundary= follows CON =pbc= (periodic when absent). =author=/=creator=/=boundary= attrs are fixed-length ASCII. Physical =unit= attrs are short H5MD strings (MDAnalysis 2.10 indexes them as dict keys).
128
129
 
129
130
  Standalone: =examples/mpi_bcast_frame.py=.
130
131
 
@@ -100,7 +100,9 @@ join_drained_roots(&[dest_a, dest_b], joined)?;
100
100
 
101
101
  =ConCorpus::hash_con_text= and =readcon-db hash-file <file.con>= hash the first frame's source span, the bytes =append_trajectory_str= and =extend_trajectory_str= store and hash. The text is not parsed and written back first, so a high-precision file gives the stored hash and =find_by_hash= finds its trajectory.
102
102
 
103
- =set_trajectory_units= converts stored numbers. A v3.1 clock or velocities frame with no =units.time= is an error, not a silent =fs=; v1, v2, and v3.0 clocks with no =units.time= still convert as =fs=. =append_trajectory_path_units= and =extend_trajectory_path_units= stamp incoming frames. 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 =collect_h5md= fails when velocities have no =units.time=. =H5mdCollectOpts.velocity_time_unit= overrides that rule for a file that breaks it. The clock (=time=, =timestep=, H5MD time) 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=.
103
+ =set_trajectory_units= converts stored numbers. Below major 4 a time-label change does not rescale the clock or the velocities. Major 4 scales both by =units.time=, and a missing label is an error when the frame has a clock or velocities. =append_trajectory_path_units= and =extend_trajectory_path_units= stamp incoming frames. H5MD velocities are written as =Angstrom ps-1=. The clock and the velocities use =velocity_file_time_unit=: below major 4 that is =(amu*angstrom^2/eV)^0.5=, with or without =units.time=, and major 4 uses =units.time=. =H5mdCollectOpts.velocity_time_unit= is passed through and does not replace that unit.
104
+
105
+ =set_trajectory_metadata(traj_id, json!({...}))= stores one JSON object that describes a trajectory as a whole (=TrajMeta.metadata=), for example the summary of the run that produced it. Appends keep it. =trajectory_metadata(traj_id)= returns it, =None= when none was set, and =Error::MissingFrame= for =(traj_id, 0)= when the trajectory does not exist. A stored =TrajMeta= without the field reads as before.
104
106
 
105
107
  ** Cooked SoA (RCSO)
106
108
  :PROPERTIES:
@@ -1,6 +1,6 @@
1
1
  name = "ReadConDb"
2
2
  # [[[cog cog.outl(f'version = "{VERSION}"') ]]]
3
- version = "0.2.5"
3
+ version = "0.3.0"
4
4
  # [[[end]]]
5
5
  license = "MIT"
6
6
  [build]
@@ -18,7 +18,7 @@ extern "C" {
18
18
  /** Breaking-change major for the public C ABI. */
19
19
  #define RKRDB_ABI_VERSION_MAJOR 1
20
20
  /** Additive-change minor for the public C ABI. */
21
- #define RKRDB_ABI_VERSION_MINOR 3
21
+ #define RKRDB_ABI_VERSION_MINOR 4
22
22
  /** Layout revision for exported records and the handle contract. */
23
23
  #define RKRDB_ABI_LAYOUT_REVISION 1
24
24
 
@@ -28,7 +28,7 @@ uint32_t rkrdb_abi_version_major(void);
28
28
  uint32_t rkrdb_abi_version_minor(void);
29
29
  /** Layout revision of the loaded library. */
30
30
  uint32_t rkrdb_abi_layout_revision(void);
31
- /** Stable human-readable ABI stamp, e.g. "readcon-db/abi-1.3/layout-1". Static; do not free. */
31
+ /** Stable human-readable ABI stamp, e.g. "readcon-db/abi-1.4/layout-1". Static; do not free. */
32
32
  const char *rkrdb_abi_stamp(void);
33
33
  /**
34
34
  * Nonzero when the loaded library serves a caller built against the given
@@ -84,14 +84,27 @@ int rkrdb_extend_trajectory_units(size_t id, uint64_t traj_id, const char *path,
84
84
  const char *units_json, uint32_t *out_n_frames);
85
85
  /**
86
86
  * Convert stored numbers and rewrite CON units. `units_json` required.
87
- * A v3.1 frame with a clock or velocities and no units.time returns
88
- * RKRDB_ERR. The missing time unit is not read as fs. The message is
89
- * left in rkrdb_last_error. v1, v2, and v3.0 clocks with no units.time
90
- * still convert as fs.
87
+ * Below major 4 a time-label change does not rescale the clock or the
88
+ * velocities. Major 4 scales both by units.time, and a missing units.time
89
+ * returns RKRDB_ERR when the frame has a clock or velocities. The message
90
+ * is left in rkrdb_last_error.
91
91
  */
92
92
  int rkrdb_set_units(size_t id, uint64_t traj_id, const char *units_json, uint32_t *out_n_frames);
93
93
  /** Frame units JSON into `buf` (NUL-terminated). */
94
94
  int rkrdb_frame_units(size_t id, uint64_t traj_id, uint32_t frame_idx, char *buf, size_t buflen);
95
+ /**
96
+ * Replace the caller-defined metadata of a trajectory with a JSON object.
97
+ * RKRDB_NOT_FOUND when the trajectory does not exist. ABI 1.4.
98
+ */
99
+ int rkrdb_set_trajectory_metadata(size_t id, uint64_t traj_id, const char *metadata_json);
100
+ /**
101
+ * Trajectory metadata JSON into `buf` (NUL-terminated). `out_len` (may be
102
+ * NULL) receives the length without the NUL, also when `buf` is too small
103
+ * (RKRDB_ERR). RKRDB_NOT_FOUND when the trajectory does not exist or has
104
+ * none. ABI 1.4.
105
+ */
106
+ int rkrdb_trajectory_metadata(size_t id, uint64_t traj_id, char *buf, size_t buflen,
107
+ size_t *out_len);
95
108
  int rkrdb_select_basic(size_t id, int64_t traj_id, const char *symbol, uint32_t natoms_min,
96
109
  uint32_t natoms_max, uint32_t limit);
97
110
  int rkrdb_select_hash(size_t id, const uint8_t *hash16);
@@ -160,9 +173,9 @@ int rkrdb_h5md_edges(size_t id, uint64_t traj_id, double *out, size_t cap);
160
173
  int rkrdb_h5md_forces(size_t id, uint64_t traj_id, double *out, size_t cap);
161
174
  int rkrdb_h5md_velocities(size_t id, uint64_t traj_id, double *out, size_t cap);
162
175
  /**
163
- * Override the D10 velocity time unit for later `rkrdb_h5md_*` calls.
164
- * The same unit is the clock when a v3.1 frame has time or timestep and
165
- * no units.time. A present units.time still scales the clock.
176
+ * Pass a time unit through to velocity_file_time_unit for later
177
+ * `rkrdb_h5md_*` calls. Below major 4 the core ignores it. At major 4 a
178
+ * value that differs from units.time returns RKRDB_ERR.
166
179
  * `unit == NULL` clears the override. A non-NULL unit must be a time
167
180
  * expression (`fs`, or `(amu*angstrom^2/eV)^0.5`).
168
181
  */
@@ -298,6 +311,25 @@ public:
298
311
  throw std::runtime_error("frame_units failed");
299
312
  }
300
313
 
314
+ void set_trajectory_metadata(uint64_t traj_id, const char *metadata_json) {
315
+ int st = rkrdb_set_trajectory_metadata(id_, traj_id, metadata_json);
316
+ if (st != RKRDB_OK)
317
+ throw_status(id_, st, "set_trajectory_metadata failed");
318
+ }
319
+
320
+ /** Empty string when the trajectory carries no metadata. */
321
+ std::string trajectory_metadata(uint64_t traj_id) {
322
+ size_t len = 0;
323
+ int st = rkrdb_trajectory_metadata(id_, traj_id, nullptr, 0, &len);
324
+ if (st == RKRDB_NOT_FOUND) return std::string();
325
+ std::string out(len + 1, '\0');
326
+ st = rkrdb_trajectory_metadata(id_, traj_id, &out[0], out.size(), &len);
327
+ if (st != RKRDB_OK)
328
+ throw_status(id_, st, "trajectory_metadata failed");
329
+ out.resize(len);
330
+ return out;
331
+ }
332
+
301
333
  int select_basic(int64_t traj_id, const char *symbol, uint32_t nmin, uint32_t nmax,
302
334
  uint32_t limit) {
303
335
  return rkrdb_select_basic(id_, traj_id, symbol, nmin, nmax, limit);
@@ -449,8 +481,8 @@ public:
449
481
  return true;
450
482
  }
451
483
 
452
- /// D10 override. Also the clock unit when a v3.1 frame has no units.time.
453
- /// `unit == nullptr` clears it.
484
+ /// Passed through to velocity_file_time_unit. Does not replace the unit
485
+ /// it assigns. `unit == nullptr` clears it.
454
486
  void set_velocity_time_unit(const char *unit) {
455
487
  int st = rkrdb_set_velocity_time_unit(id_, unit);
456
488
  if (st != RKRDB_OK)
@@ -1,7 +1,7 @@
1
1
  [workspace]
2
2
  name = "readcon-db"
3
3
  # [[[cog cog.outl(f'version = "{VERSION}"') ]]]
4
- version = "0.2.5"
4
+ version = "0.3.0"
5
5
  # [[[end]]]
6
6
  description = "Mmap-backed CON frame corpus (Heed/LMDB), xxHash exact match, multi-language FFI"
7
7
  channels = ["conda-forge"]
@@ -6,11 +6,11 @@ build-backend = "maturin"
6
6
  name = "readcon-db"
7
7
  dynamic = ["version"]
8
8
  description = "Mmap CON corpus store (LMDB/Heed) with xxHash exact match"
9
- # readcon 0.23 needs Python 3.10.
9
+ # readcon 0.25 needs Python 3.10.
10
10
  requires-python = ">=3.10"
11
11
  # ArchiveReader and append_trajectory_frames work on readcon objects. The
12
12
  # range follows the readcon-core pin in Cargo.toml.
13
- dependencies = ["readcon>=0.23,<0.24"]
13
+ dependencies = ["readcon>=0.25,<0.26"]
14
14
  license = { text = "MIT" }
15
15
  readme = { file = "README.md", content-type = "text/markdown" }
16
16
 
@@ -6,11 +6,11 @@ build-backend = "maturin"
6
6
  name = "readcon-db"
7
7
  dynamic = ["version"]
8
8
  description = "Mmap CON corpus store (LMDB/Heed) with xxHash exact match"
9
- # readcon 0.23 needs Python 3.10.
9
+ # readcon 0.25 needs Python 3.10.
10
10
  requires-python = ">=3.10"
11
11
  # ArchiveReader and append_trajectory_frames work on readcon objects. The
12
12
  # range follows the readcon-core pin in Cargo.toml.
13
- dependencies = ["readcon>=0.23,<0.24"]
13
+ dependencies = ["readcon>=0.25,<0.26"]
14
14
  license = { text = "MIT" }
15
15
  readme = { file = "../README.md", content-type = "text/markdown" }
16
16
 
@@ -10,6 +10,10 @@ FIXTURE = Path(__file__).resolve().parents[2] / "resources" / "test"
10
10
  NATURAL_TIME = "(amu*angstrom^2/eV)^0.5"
11
11
 
12
12
 
13
+ def natural_ps(t: float) -> float:
14
+ return t * unit_conversion_factor(NATURAL_TIME, "ps")
15
+
16
+
13
17
  def natural_angstrom_per_ps(v_natural: float) -> float:
14
18
  """D10: natural-unit velocity to Angstrom/ps."""
15
19
  return v_natural / unit_conversion_factor(NATURAL_TIME, "ps")
@@ -460,7 +464,7 @@ def test_export_h5md_i_times_timestep(tmp_path):
460
464
  with h5py.File(out, "r") as f:
461
465
  t = f["particles/all/position/time"][:]
462
466
  assert abs(float(t[0]) - 0.0) < 1e-12
463
- assert abs(float(t[1]) - 0.01) < 1e-12
467
+ assert abs(float(t[1]) - natural_ps(10.0)) < 1e-9
464
468
 
465
469
 
466
470
  def test_export_h5md_writes_header_time(tmp_path):
@@ -479,9 +483,9 @@ def test_export_h5md_writes_header_time(tmp_path):
479
483
  with h5py.File(out, "r") as f:
480
484
  t = f["particles/all/position/time"][:]
481
485
  assert t.shape == (1,)
482
- assert abs(float(t[0]) - 0.0125) < 1e-12
486
+ assert abs(float(t[0]) - natural_ps(12.5)) < 1e-9
483
487
  et = f["particles/all/box/edges/time"][:]
484
- assert abs(float(et[0]) - 0.0125) < 1e-12
488
+ assert abs(float(et[0]) - natural_ps(12.5)) < 1e-9
485
489
  assert f["particles/all/box/edges/value"].shape[0] == 1
486
490
 
487
491
 
@@ -538,8 +542,8 @@ def test_export_h5md_set_units_keeps_dest_time(tmp_path):
538
542
  with h5py.File(before, "r") as a, h5py.File(after, "r") as b:
539
543
  ta = float(a["particles/all/position/time"][0])
540
544
  tb = float(b["particles/all/position/time"][0])
541
- assert abs(ta - 0.0125) < 1e-12
542
- assert abs(tb - 0.0125) < 1e-12
545
+ assert abs(ta - natural_ps(12.5)) < 1e-9
546
+ assert abs(tb - natural_ps(12.5)) < 1e-9
543
547
  assert _as_str(b["particles/all/position/time"].attrs["unit"]) == "ps"
544
548
 
545
549
 
@@ -550,7 +554,7 @@ def test_export_h5md_velocity_time_unit_override_fs(tmp_path):
550
554
  db.export_h5md(1, str(out), velocity_time_unit="fs")
551
555
  with h5py.File(out, "r") as f:
552
556
  v = float(f["particles/all/velocity/value"][0, 0, 0])
553
- assert abs(v - 1.234) < 1e-9
557
+ assert abs(v - natural_angstrom_per_ps(0.001234)) < 1e-6
554
558
 
555
559
 
556
560
  def test_eon36_convel_mdanalysis_velocity_unit_and_ke(tmp_path):