package trexio

  1. Overview
  2. Docs
Binding for the TREXIO Input/Output library

Install

dune-project
 Dependency

Authors

Maintainers

Sources

v2.6.101.tar.gz
md5=2627a886294329263af81b0dcc1a0374
sha512=0f1c932d9ffbcdff6028742fea9158b70151f1ee1ad8f0c0b851e7cf6e1293b95607f2944c7e2dbfcda136bcf0b0ec63dbf0751ac49a2a11892ac888a0eecc5d

Description

TREXIO is a file format and library for wave functions and quantum-chemistry integrals.

Tags

Quantum chemistry Library

Added to opam-repository:

README

trexio_ocaml

trexio_ocaml is the OCaml binding for the TREXIO file format and C library for wave functions and quantum-chemistry integrals.

What this is

One OPAM record: trexio (the binding: C stubs over the TREXIO C library).

opam install trexio works out of the box: a system TREXIO visible to pkg-config (API >= 2.6.1) is used if present; otherwise the record builds the vendored external/trexio-<Ctag>.tar.gz statically, offline — into ./_c-prefix during build: and into the opam switch during install:.

Versioning

Binding version A.B.CNN = TREXIO release A.B.C + binding revision NN (e.g. 2.6.101 = TREXIO 2.6.1, revision 01). dune-project is the single source of truth; the .opam file must always state the same version.

Installation

opam install trexio            # from the OPAM repository
opam install . --with-test     # from a checkout

Local development

make bootstrap                 # vendored C library into ./_prefix (offline, static)
export PKG_CONFIG_PATH="$PWD/_prefix/lib/pkgconfig"   # for manual dune runs
make                           # build (committed generated sources)
make test                      # TEXT + HDF5 round-trips, byte + native
make install                   # into the current OPAM switch

Upgrading to a new TREXIO C release

  1. Bump the version in dune-project and trexio.opam.
  2. Replace external/trexio-<Ctag>.tar.gz and regenerate its .sha256.
  3. ./update.sh — fetches, asserts the version, regenerates trex.json + lib/, runs the test suite.

Full playbook: UPGRADING.md.

Prerequisites

  • build/test: gcc, pkg-config, dune >= 3.1, dune-configurator; HDF5 headers optional (without them the C library is TEXT-only and the tests print SKIP HDF5)
  • ./update.sh: additionally curl, tar, python3, network (only when _fetch/ is not cached)
  • make bootstrap: a C compiler + make (the tarball ships its own configure + libtool)

Layout

dune-project               # package/version definitions (source of truth)
trexio.opam
trex.json                  # generator input (committed; refreshed by ./update.sh)
src/                       # hand-written binding templates (code-gen markers)
lib/                       # generated + committed sources (+ dune-configurator setup)
read_json.py               # generator: trex.json + src/ -> lib/
update.sh                  # fetch + regenerate + test (only place that fetches)
setup.sh                   # C bootstrap (make bootstrap / opam build step)
external/                  # vendored TREXIO C tarball + .sha256
Makefile                   # dev convenience targets

Provenance

The binding previously lived in TREX-CoE/trexio under ocaml/trexio/ (removed in fa86b5e).

License

BSD-3-Clause (see LICENSE).

Dependencies (3)

  1. conf-pkg-config build
  2. dune-configurator build
  3. dune >= "3.1"

Dev Dependencies (1)

  1. odoc with-doc

Used by

None

Conflicts

None