This directory provides a Python interface to existing STORMM C++ code. It does not reimplement STORMM.
cpp/stormm_pybridge.h: documented C ABI declarations consumed by Pythonctypescpp/stormm_pybridge.cpp: C++ implementations that marshal Python-compatible arguments into native STORMM objectsstormm/dynamics.py: thin Python wrappers and convenience classesexamples/dynamics_end_to_end.py: runnable example that exercises all wrapped object types
From the repository root:
cmake -S . -B build -DSTORMM_ENABLE_CUDA=OFF -DSTORMM_ENABLE_PYTHON=ON
cmake --build build --target stormm_pybridge -j4This produces build/libstormm_pybridge.* and the Python module loads it with ctypes.
Set PYTHONPATH to this repository's python/ directory:
PYTHONPATH=python python3 -c "from stormm import dynamics; print(dynamics.state_variable_names()[:5])"PYTHONPATH=python python3 python/examples/dynamics_end_to_end.pyThe demo creates, from Python:
AtomGraphPhaseSpaceAtomGraphSynthesisPhaseSpaceSynthesis
Then it runs STORMM dynamics(...) and reads results back into Python.