VOLT
Open Source Ecosystem

CoreToolkit

Core C++ library powering VOLT's atomistic simulation analysis. Provides math primitives, spatial data structures, neighbor search, simulation cell handling, and the plugin build system.

TL;DR — CoreToolkit is the C++23 static library every VOLT plugin links against. Build with CMake + Conan 2.

Overview

The Foundational Algorithms rely on CoreToolkit.

LanguageC++23
Build systemCMake ≥ 3.20 + Conan 2
Package typeStatic library (libcoretoolkit.a)
LicenseMIT
LinksGitHub

Modules

Seven modules under the include/volt/ namespace:

volt/math

Linear algebra and geometry primitives.

HeaderDescription
vector2.h / vector3.h / vector4.h2D, 3D, and 4D vector types
point2.h / point3.h2D and 3D point types
matrix3.h / matrix4.h3×3 and 4×4 matrix types
quaternion.hQuaternion for rotation representation
rotation.h / scaling.hRotation and scaling transformations
affine_transformation.hGeneral affine transformation
affine_decomposition.hDecomposition of affine transforms
symmetric_tensor.hSymmetric tensor (e.g. strain tensors)
box3.h3D axis-aligned bounding box
plane.hPlane representation
ray.hRay for geometric queries
lin_alg.hLinear algebra utilities

volt/core

Data model for atomistic simulations.

HeaderDescription
simulation_cell.hSimulation cell (box vectors, periodicity)
frame_adapter.hAdapter for reading simulation frames
lammps_parser.hHigh-performance LAMMPS dump parser
particle_property.hPer-particle property storage
property_base.hType-erased property base class
analysis_result.hStandard result type for analysis plugins
volt.hPrecompiled header (std lib + spdlog + boost::dynamic_bitset + math/lin_alg.h + common constants and forward declarations) for the library and all plugins

volt/analysis

Spatial query algorithms used by analysis plugins.

HeaderDescription
cutoff_neighbor_finder.hDistance-cutoff neighbor search (cell-list based)
nearest_neighbor_finder.hk-nearest neighbor search (KD-tree based)

volt/structures

Higher-level crystallographic data structures.

HeaderDescription
cluster.hCluster representation for defect analysis
crystal_structure_types.hCrystal structure type enumerations (FCC, HCP, BCC, diamond, etc.) consumed by volt/plugin/option_binding.h

volt/utilities

General-purpose infrastructure.

HeaderDescription
memory_pool.hThread-safe arena-style memory pool
bounded_priority_queue.hFixed-capacity priority queue for k-NN search
json_utils.hJSON serialization helpers (nlohmann/json), including parquet output
parquet_atom_writer.hStreams per-atom output to a _atoms.parquet file in the canonical AtomisticExporter format (used by volt/plugin/output_serializer.h)

volt/cli

CLI scaffolding for plugin executables.

HeaderDescription
common.hArgument parsing, I/O paths, and JSON output helpers shared by all plugin binaries

volt/plugin

The plugin-authoring API. These headers wrap plugin-executable boilerplate so an algorithm only implements its compute() step.

HeaderDescription
plugin_main.hpluginMain() driver and the VOLT_PLUGIN_MAIN macro: parses CLI args, loads the LAMMPS frame (and optional --reference frame), sets OneTBB thread limits via --threads, then invokes the plugin's run function
plugin_entry.hVOLT_SERVICE_PLUGIN macro that wires a service type's compute() method to pluginMain, binding UI arguments and selecting the 2- or 3-argument compute() overload
option_binding.hBinds plugin.json UI arguments to service setters (opt(...), applyAll, optionsMeta), including lattice-type options resolved against crystal_structure_types.h
output_serializer.hserializePluginOutput() writes the summary {outputBase}{suffix}.parquet and, when a bucket resolver is supplied, a separate {outputBase}_atoms.parquet
particle_id_mapper.hBuilds current↔reference particle index mappings from atom IDs (for reference-frame analyses such as displacement)

Dependencies

Managed via Conan 2:

DependencyVersionPurpose
Boost1.88.0Header-only utilities
oneTBB2021.12.0Parallel algorithms & concurrency
spdlog1.14.1Structured logging
nlohmann_json3.11.3JSON I/O

Three more libraries are vendored under dependencies/: MWM_CSP and Geogram are compiled as static libraries, fast_float is header-only (installed as headers):

LibraryPurpose
MWM_CSPMinimum-weight matching for centrosymmetry parameter calculation
GeogramDelaunay tessellation (PSM subset)
fast_floatHeader-only fast string-to-float parser

Build Flags

GCC/Clang Release builds apply these flags, propagated to all consumers via PUBLIC:

-O3 -mtune=generic -fno-math-errno -fno-trapping-math -ffp-contract=fast

CPU-specific tuning is opt-in: -DVOLT_ENABLE_NATIVE_OPTIMIZATIONS=ON (default OFF) swaps -mtune=generic for -march=native.

Avoids -ffast-math globally to preserve strict IEEE compliance on geometry-critical code paths.

CI / GitHub Actions

CoreToolkit exposes a reusable workflow at .github/workflows/build-plugin-binary.yml that any plugin repository can call to:

  1. Build the plugin against a fresh CoreToolkit checkout across a matrix of ubuntu-latest (linux/x86_64), macos-latest (darwin/arm64), and windows-latest (windows/x86_64). CoreToolkit and any dependency_repos are exported to Conan first.
  2. Bundle the install tree (bin/, lib/, scripts/, share/) together with plugin.json into a Zstandard-compressed .tar.zst archive plus a .sha256 checksum (via .github/scripts/build_plugin_bundle.py). Library-only plugins with no executable entrypoint are skipped.
  3. Publish a GitHub Release tagged v<version> with the bundles attached (softprops/action-gh-release). On tag pushes, a separate job also publishes the bundles to the Registry via vpm publish.

Bundle file naming follows:

<key>-<version>-<os>-<arch>.tar.zst
<key>-<version>-<os>-<arch>.tar.zst.sha256

where <key> and <version> come from the plugin's plugin.json modifier node, and <os>-<arch> is one of linux-x86_64, darwin-arm64, or windows-x86_64.

On this page