10 unstable releases (3 breaking)
|Feb 12, 2021
|Feb 12, 2021
|Dec 19, 2020
|Dec 15, 2020
|Dec 6, 2020
#766 in Science
75 downloads per month
Used in 4 crates
Velvet is a classical atomistic simulation engine with a focus on user-friendliness and extensibility. This project is largely a learning exercise, but as development continues I hope to accomplish the following goals:
- Extensibility via user-defined plugin modules
- Optimized single CPU performace with multithreading and SIMD support
- Implement a wide variety of interatomic potentials
- Molecular dynamics, Monte Carlo, and energy minimization routines
- Visualization tools to analyze simulation results
- Support importing and exporting data in popular external formats
To build Velvet you will need to have Rust's compiler and package manager installed on your machine. Instructions for most platforms can be found here.
- rustc - Compiler for the Rust programming language
- Cargo - Package manager for the Rust programming language
Velvet has optional support to write HDF5 formatted results. If this is your preferred format, you will need a local installation of
libhdf5. The library can be installed with your package manager of choice or downloaded directly from source here.
- The HDF Group - Official HDF5 organization
If you're interested in contributing or modifying the code for personal use you can install a local copy with the following instructions. Users who don't need to modify the code can skip ahead to the usage section.
- Clone the repo.
$ git clone https://github.com/seatonullberg/velvet && cd velvet
- Build in release mode.
$ cargo build --release --workspace
- Check that all tests pass. Release mode is required to run the integration tests efficiently.
$ cargo test --release --workspace
Velvet supports a number of compile time options that can be opted into by using the
--features flag when building with Cargo.
f64- Sets the underlying storage type to a 64 bit floating point number. Default is 32 bit.
hdf5-output- Enables HDF5 formatted output. Requires a local installation of
quiet- Hides the simulation progress bar. Recommended when running benchmarks.
rayon- Enables multithreading with rayon parallel iterators.
Velvet is designed to be easy for developers to hack on and extend. With this goal in mind, Velvet forgoes support for static configuration files or input scripts, which can limit flexibility and complicate backend logic, in favor of defining simulations directly in code using the high-level
velvet crate. While this may sound daunting to researchers who are more familiar with mainstream atomistic simulation software, the samples in the
examples directory show that this can be a rather elegant solution.
Why is it called "Velvet"?
- "Velvet" is a concatenation of Velocity Verlet which is a foundational algorithm in the field of molecular dynamics.
Distributed under the MIT License. See LICENSE for more information.
Core feature library for the Velvet simulation engine.
Internal unit system:
Distance- Angstrom (A)
Time- Femtosecond (fs)
Mass- Atomic mass unit (amu)
Temperature- Kelvin (K)
Quantity- Number of particles
Angle- Radians (rad)