Getting started#
Tip
Install one language, then run the Tutorial — first corpus.
Install#
Pick one language. Pins match this tree (0.1.6). Core is readcon-core ^0.14 (pulled automatically for Rust).
Package |
Install |
Destination |
|---|---|---|
Rust |
|
this site · crates.io |
CLI |
|
|
Python |
|
|
C / C++ |
CMake FetchContent, Meson wrap, or |
|
Fortran |
|
|
Prebuilt C ABI |
|
CON parse/write outside the corpus API is readcon-core (pip install readcon / cargo add readcon-core).
Rust#
cargo add readcon-db
Python#
pip install readcon-db
python -c "import readcon_db"
C / C++ / Fortran#
Headers in include/ are shipped. cbindgen is not required. Full FetchContent / Meson / clib matrix: Install.
Smoke test#
From a checkout (fixture under resources/test/):
import tempfile
from pathlib import Path
import readcon_db
root = Path(tempfile.mkdtemp())
db = readcon_db.ConCorpus.open(str(root))
db.append_trajectory_path(1, "resources/test/tiny_cuh2.con")
keys = db.select(readcon_db.Select().require_symbol("Cu"))
print(len(keys), db.frame_hash(keys[0]))
use readcon_db::{ConCorpus, Select};
let db = ConCorpus::open("/tmp/readcon-db-smoke")?;
db.append_trajectory_path(1, "resources/test/tiny_cuh2.con")?;
let keys = db.select(&Select::new().require_symbol("Cu"))?;
println!("{} {:?}", keys.len(), db.frame_hash(keys[0])?);
Where to go next#
Goal |
Page |
Kind |
|---|---|---|
Learn open / ingest / select |
Tutorial |
|
Same tasks in C / Fortran |
How-to |
|
Many writers, shards |
How-to |
|
MPI, H5MD, ASE.db comparison |
How-to |
|
Why mmap / indexes |
Explanation |
|
Rust / C / Python / Fortran API |
Reference |
Scope#
Task |
Path |
|---|---|
Parse or write one |
|
Many frames, filter, hash |
|
Field meanings (energy, formula) |
|
Foreign XYZ / PDB / GRO |
core chemfiles path, then ingest CON |