| Crates.io | ground-motion-lib |
| lib.rs | ground-motion-lib |
| version | 0.1.3 |
| created_at | 2025-05-25 14:15:45.456299+00 |
| updated_at | 2025-05-26 13:06:55.160846+00 |
| description | A performant, modular Rust library for computing and analyzing ground motion predictions using GMPE models. |
| homepage | |
| repository | https://github.com/geophystech/GroundMotion.rs |
| max_upload_size | |
| id | 1688395 |
| size | 75,146 |
ground-motion-lib is a Rust library for seismic ground motion prediction
using state-of-the-art Ground Motion Prediction Equations (GMPEs), including
the Morikawa & Fujiwara (2013) models. It supports efficient, vectorized
computations over site grids, configurable earthquake scenarios, and provides
tools for loading site data, performing parallelized calculations, and
exporting results.
Designed for researchers, engineers, and seismologists, this library enables robust and scalable seismic hazard modeling workflows in Rust.
Add this to your Cargo.toml:
[dependencies]
ground-motion-lib = "0.1"
use ground_motion_lib::gmm::{Vs30Point, Earthquake, Magnitude, GroundMotionModeling};
use ground_motion_lib::mf2013::MF2013;
use ground_motion_lib::configs::get_mf2013_lib_configs;
use ground_motion_lib::vectorized::calc_gmpe_vec;
fn main() {
let points = vec![
Vs30Point::new(142.5, 50.0, 400,, Some(200.), Some(0)),
Vs30Point::new(142.6, 50.1, 350., Some(150.), Some(1)),
];
let eq = Earthquake {
lon: 142.4,
lat: 50.0,
depth: 10.0,
magnitude: 6.5,
magnitude_kind: Magnitude::Mw,
};
let gmpe_ref = get_mf2013_lib_configs().get("config_mf2013_crustal_pga").unwrap();
let results = calc_gmpe_vec(&points, gmpe_ref, &eq);
for r in results {
println!("{:?}", r);
}
}
Full API documentation is available on docs.rs.
Contributions, bug reports, and feature requests are welcome! Please open an issue or submit a pull request.
Licensed under the Apache License, Version 2.0. See LICENSE for details.
If you use this library in academic work, please cite:
@article{konovalov2022new,
title={New Tools for Rapid Assessment of Felt Reports and a Case Study on Sakhalin Island},
author={Konovalov, AV and Stepnov, AA and Bogdanov, ES and Dmitrienko, R Yu and Orlin, ID and Sychev, AS and Gavrilov, AV and Manaychev, KA and Tsoy, AT and Stepnova, Yu A},
journal={Seismic Instruments},
volume={58},
number={6},
pages={676--693},
year={2022},
publisher={Springer}
}