Abstract
In modern computational research, while data is increasingly expected to be FAIR (Findable, Accessible, Interoperable, and Reusable), the workflows used to generate that data often remain undocumented and difficult to reproduce. This paper introduces Sim2Ls ("simtools"), a framework and Python library that transforms "black box" research scripts into structured, FAIR workflows. By leveraging Jupyter notebooks and YAML metadata, Sim2Ls enable automatic input validation, result caching, and the creation of queryable simulation databases, significantly reducing redundant compute time and improving scientific transparency.
Introduction
The "reproducibility crisis" in science is particularly acute in computational fields. Even when research data is shared, the complex series of scripts and manual steps used to produce it are frequently messy or inaccessible. Furthermore, researchers often waste significant energy re-running simulations that have already been performed elsewhere due to a lack of centralized, queryable results. Sim2Ls address these challenges by providing a standardized method to package, execute, and share computational workflows.
The Sim2L Framework
The core of the Sim2L framework is a Python library designed to handle the "plumbing" of simulation execution. It integrates several existing technologies to ensure that every simulation run is well-defined and its results are preserved.
The workflow begins with a user query or input. The library performs input validation against predefined ranges and types. Crucially, it includes a "Cache check" step: if a simulation with identical parameters has been run previously, the system returns the cached result instantly. This not only speeds up research but also reduces the carbon footprint of high-performance computing (HPC).
Technical Pillars
The Sim2L framework rests on four key technical pillars:
- Jupyter Notebooks as Containers: Workflows are developed in interactive Jupyter environments, ensuring readability and interactivity.
- YAML Metadata: Developers use YAML to explicitly declare inputs and outputs, including data types, physical units, and allowed ranges.
- The Sim2L Library: This library uses PaperMill for parameterization and Pint for automatic unit conversion, ensuring that inputs like "0.5 nm" are correctly translated for the simulation engine.
- Automatic Caching and Indexing: Successful runs are indexed in a "ResultsDB," creating a growing community resource of simulation data.
Key Insights: Sustainability and Validation
A major innovation of the Sim2L approach is the shift from broad, general-purpose codes to "narrowly defined" tools. A Sim2L designed for a specific task—such as calculating a material's melting point—is inherently more reusable. By enforcing strict input validation, the framework acts as a gatekeeper, preventing the waste of HPC resources on unphysical or "garbage" simulations. Furthermore, the global cache serves as an environmental tool, promoting the reuse of existing data over redundant computation.
Applications and Results
The framework's utility is demonstrated through two primary applications:
- Melting Point Workflows: Using LAMMPS molecular dynamics, a Sim2L calculated the melting points of 29 metals. This allowed for benchmarking various interatomic models against experimental data, with the framework providing clear indicators of simulation success.
- P-N Junction Diode App: This semiconductor simulation tool wraps the PADRE solver in a graphical interface. It allows users to manipulate variables like doping concentration and view real-time updates to band diagrams, abstracting the underlying complexity for educational or research use.
Limitations and Future Work
While the Sim2L library is open-source, its most powerful features—global caching and indexing—are currently integrated with the nanoHUB platform. Future development aims to mature the ResultsDB API to better support machine learning researchers. Additionally, the authors acknowledge that adopting this framework requires a cultural shift among developers away from "quick-and-dirty" scripting toward structured, metadata-driven development.
Summary updated