-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from seatonullberg/dev
v0.4.0
- Loading branch information
Showing
361 changed files
with
844 additions
and
35,172 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
[package] | ||
name = "velvet" | ||
version = "0.3.2" | ||
version = "0.4.0" | ||
authors = ["Seaton Ullberg <[email protected]>"] | ||
edition = "2018" | ||
repository = "https://github.com/seatonullberg/velvet" | ||
description = "An experimental molecular dynamics engine with a focus on user-friendliness and extensibility." | ||
description = "Classical atomistic simulation engine with a focus on user-friendliness and extensibility" | ||
license = "MIT" | ||
keywords = [ | ||
"chemistry", | ||
|
@@ -20,21 +20,43 @@ categories = [ | |
[workspace] | ||
members = [ | ||
"crates/cli", | ||
"crates/convert", | ||
"crates/core", | ||
"crates/external-data", | ||
"crates/test-utils", | ||
] | ||
|
||
[dependencies] | ||
hdf5 = "0.7" | ||
hdf5-sys = "0.7" | ||
velvet-convert = { path = "crates/convert", version = "0.1.2" } | ||
velvet-core = { path = "crates/core", version = "0.3.3" } | ||
velvet-core = { path = "crates/core", version = "0.4.0" } | ||
velvet-external-data = { path = "crates/external-data", version = "0.1.0" } | ||
|
||
[dev-dependencies] | ||
log = "0.4" | ||
plotters = "0.3.0" | ||
pretty_env_logger = "0.4" | ||
approx = "0.4" | ||
criterion = "0.3" | ||
nalgebra = "0.23" | ||
ron = "0.6" | ||
test-utils = { path = "crates/test-utils" } | ||
|
||
[[bench]] | ||
name = "integrator-benchmarks" | ||
path = "benches/integrators.rs" | ||
harness = false | ||
|
||
[[bench]] | ||
name = "property-benchmarks" | ||
path = "benches/properties.rs" | ||
harness = false | ||
|
||
[[bench]] | ||
name = "thermostat-benchmarks" | ||
path = "benches/thermostats.rs" | ||
harness = false | ||
|
||
[[bench]] | ||
name = "pair-potential-benchmarks" | ||
path = "benches/potentials/pair.rs" | ||
harness = false | ||
|
||
[package.metadata.docs.rs] | ||
features = ["hdf5-sys/static", "hdf5-sys/zlib"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 13 additions & 11 deletions
24
crates/core/benches/integrators.rs → benches/integrators.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
49 changes: 27 additions & 22 deletions
49
crates/core/benches/properties.rs → benches/properties.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
use criterion::{criterion_group, criterion_main, Criterion}; | ||
use velvet_core::integrators::{Integrator, VelocityVerlet}; | ||
use velvet_core::thermostats::{Berendsen, NoseHoover, Thermostat}; | ||
use velvet_core::velocity_distributions::{Boltzmann, VelocityDistribution}; | ||
use velvet_external_data::poscar::load_poscar; | ||
|
||
use test_utils; | ||
|
||
use std::fs::File; | ||
use std::io::BufReader; | ||
|
||
pub fn thermostats_group_benchmark(c: &mut Criterion) { | ||
let mut group = c.benchmark_group("thermostats"); | ||
|
||
let file = File::open(test_utils::test_resources_path("argon.poscar")).unwrap(); | ||
let reader = BufReader::new(file); | ||
let mut system = load_poscar(reader); | ||
|
||
let target = 100 as f32; | ||
let boltz = Boltzmann::new(target); | ||
boltz.apply(&mut system); | ||
|
||
// load potentials | ||
// let path = test_resources_path("argon.pot.velvet"); | ||
// let file = File::open(&path).unwrap(); | ||
// let pots: Potentials = ron::de::from_reader(file).unwrap(); | ||
let potentials = test_utils::get_argon_potentials(&system); | ||
|
||
let mut vv = VelocityVerlet::new(1.0); | ||
vv.setup(&system, &potentials); | ||
|
||
let mut berendsen = Berendsen::new(target, 2.0); | ||
berendsen.setup(&system); | ||
|
||
let mut nose = NoseHoover::new(target, 1.01, 1.0); | ||
nose.setup(&system); | ||
|
||
group.bench_function("berendsen", |b| { | ||
b.iter(|| { | ||
berendsen.pre_integrate(&mut system); | ||
vv.integrate(&mut system, &potentials); | ||
berendsen.post_integrate(&mut system); | ||
}) | ||
}); | ||
|
||
group.bench_function("nose_hoover", |b| { | ||
b.iter(|| { | ||
nose.pre_integrate(&mut system); | ||
vv.integrate(&mut system, &potentials); | ||
nose.post_integrate(&mut system); | ||
}) | ||
}); | ||
|
||
group.finish() | ||
} | ||
|
||
criterion_group!(thermostats, thermostats_group_benchmark); | ||
criterion_main!(thermostats); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "velvet-cli" | ||
version = "0.1.1" | ||
version = "0.1.2" | ||
authors = ["Seaton Ullberg <[email protected]>"] | ||
description = "Command line tool built on top of the Velvet API" | ||
license = "MIT" | ||
|
@@ -10,8 +10,8 @@ edition = "2018" | |
[dependencies] | ||
clap = "2.33" | ||
ron = "0.6" | ||
velvet-convert = { path = "../convert", version = "0.1.2" } | ||
velvet-core = { path = "../core", version = "0.3.0" } | ||
velvet-core = { path = "../core", version = "0.4.0" } | ||
velvet-external-data = { path = "../external-data", version = "0.1.0" } | ||
|
||
[[bin]] | ||
name = "velvet" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.