Getting started¶
Tip
Install here, then take the Tutorial — your first CON checkpoint (One Good Tutorial). Conversion from XYZ/PDB/GRO is a separate path: Convert other formats into CON.
Install¶
Pick one language. Version pins match this tree (0.14.1).
Python — CON I/O¶
pip install 'readcon==0.14.1'
Python — CON I/O plus format conversion¶
pip install 'readcon-chemfiles==0.14.1'
# do not also install lean readcon in the same venv
Rust — CON I/O¶
cargo add readcon-core
Rust — with conversion¶
cargo add readcon-core --features chemfiles
Campaign store (readcon-db)¶
Separate package; CON text stays authoritative.
cargo add readcon-db
# or: pip install readcon-db
Julia¶
From a checkout of this repository:
julia --project=julia/ReadCon -e 'using Pkg; Pkg.instantiate()'
Language API notes: Language bindings.
Fortran / C / C++¶
Headers in include/ are shipped. cbindgen is not required.
CMake FetchContent / find_package(readcon-core), Meson
dependency('readcon-core'), or pkg-config --libs readcon-core
after a prefix install. The cxx tarball on the GitHub Release is
readcon-core-cxx-$VERSION.tar.gz.
include(FetchContent)
FetchContent_Declare(
readcon-core
URL https://github.com/lode-org/readcon-core/releases/download/v0.14.1/readcon-core-cxx-0.14.1.tar.gz
URL_HASH SHA256=<sha256 from the .sha256 sidecar on the GitHub Release>
)
FetchContent_MakeAvailable(readcon-core)
target_link_libraries(app PRIVATE readcon-core::shared)
readcon_dep = dependency('readcon-core')
From a git checkout:
cmake -S . -B build -DCMAKE_INSTALL_PREFIX=$PWD/prefix
cmake --build build && cmake --install build
export PKG_CONFIG_PATH=$PWD/prefix/lib/pkgconfig
pkg-config --cflags --libs readcon-core
#+end_src
Smoke test¶
From the repository root (fixtures live under resources/test/):
import readcon
frame = readcon.read_first_frame("resources/test/tiny_cuh2.con")
print(frame.cell, len(frame))
use readcon_core::iterators::read_first_frame;
let frame = read_first_frame(std::path::Path::new("resources/test/tiny_cuh2.con"))?;
println!("{:?} {}", frame.header.boxl, frame.atom_data.len());
Where to go next¶
Documentation follows Diátaxis. Use one quadrant at a time.
Scope (map of the stack)¶
Library layout: Library architecture.