Skip to content

Commit

Permalink
Added sqrt(3.0) for displacement and renamed target acceptance.
Browse files Browse the repository at this point in the history
  • Loading branch information
g-bauer committed Nov 25, 2016
1 parent a51006d commit 773c8d1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/src/sim/mc/monte_carlo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,8 @@ impl MoveCounter {
}

/// Set the target acceptance for the move counter.
pub fn set_acceptance(&mut self, target: f64) {
self.target_acceptance = Some(target);
pub fn set_acceptance(&mut self, target_acceptance: f64) {
self.target_acceptance = Some(target_acceptance);
}

/// Compute a scaling factor according to the desired acceptance.
Expand Down
1 change: 1 addition & 0 deletions src/core/src/sim/mc/moves/translate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ impl Translate {
/// Factorizing the constructors
fn create(dr: f64, moltype: Option<u64>) -> Translate {
assert!(dr > 0.0, "dr must be positive in Translate move");
let dr = dr / f64::sqrt(3.0);
Translate {
moltype: moltype,
molid: usize::MAX,
Expand Down

0 comments on commit 773c8d1

Please sign in to comment.