Skip to content

Commit 3bffabd

Browse files
committed
Fix kTAM dimer formation rates, add get_param for energy_nw/energy_we.
1 parent 681604c commit 3bffabd

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

Diff for: CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# 0.14.1
2+
3+
- Fix dimer formation rates in kTAM model.
4+
15
# 0.14.0
26

37
- Allow state references to be cloned into normal states (useful for FFS results).

Diff for: rgrow/src/models/ktam.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -663,6 +663,8 @@ impl System for KTAM {
663663
"tile_concs" => Ok(Box::new(self.tile_concs.clone())),
664664
"glue_strengths" => Ok(Box::new(self.glue_strengths.clone())),
665665
"glue_links" => Ok(Box::new(self.glue_links.clone())),
666+
"energy_ns" => Ok(Box::new(self.energy_ns.clone())),
667+
"energy_we" => Ok(Box::new(self.energy_we.clone())),
666668
_ => Err(GrowError::NoParameter(name.to_string())),
667669
}
668670
}
@@ -688,7 +690,7 @@ impl SystemWithDimers for KTAM {
688690

689691
for ((t1, t2), e) in self.energy_ns.indexed_iter() {
690692
if *e > 0. {
691-
let biconc = self.tile_concs[t1] * self.tile_concs[t2];
693+
let biconc = self.tile_concs[t1] * self.tile_concs[t2] / 1.0e9;
692694
dvec.push(DimerInfo {
693695
t1: t1 as Tile,
694696
t2: t2 as Tile,
@@ -701,7 +703,7 @@ impl SystemWithDimers for KTAM {
701703

702704
for ((t1, t2), e) in self.energy_we.indexed_iter() {
703705
if *e > 0. {
704-
let biconc = f64::exp(2. * self.alpha) * self.tile_concs[t1] * self.tile_concs[t2];
706+
let biconc = self.tile_concs[t1] * self.tile_concs[t2] / 1.0e9;
705707
dvec.push(DimerInfo {
706708
t1: t1 as Tile,
707709
t2: t2 as Tile,

0 commit comments

Comments
 (0)