Skip to content

Commit

Permalink
reverting to 0943c34
Browse files Browse the repository at this point in the history
  • Loading branch information
2AUK committed Oct 11, 2023
1 parent d00e10f commit b5dd6c0
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 10 deletions.
3 changes: 0 additions & 3 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
[target.x86_64-unknown-linux-gnu]
rustflags = ["-Ctarget-cpu=native"]

[stable-x86_64-apple-darwin]
rustflags = ["-Ctarget-cpu=native"]
2 changes: 1 addition & 1 deletion cSPCE_DRISM.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ temp = 298
kT = 1.0
kU = 0.0019872158728366637
charge_coeff = 167101.0
npts = 16384
npts = 1
radius = 409.6
lam = 1

Expand Down
1 change: 1 addition & 0 deletions pyrism/IntegralEquations/DRISM.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ def compute_vv(self):
self.data_vv.p,
self.chi,
)
print(self.data_vv.h)
self.data_vv.t = (
self.data_vv.grid.idht(self.data_vv.h - ck)
- self.data_vv.B * self.data_vv.ur_lr
Expand Down
4 changes: 2 additions & 2 deletions pyrism/Solvers/MDIIS.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ def solve(self, RISM, Closure, lam, verbose=False):
self.RMS_res.pop(0)
self.converged(c_next, c_prev)
print(
"Iteration: {i} Convergence RMS: {RMS}".format(
i=i, RMS=self.rms
"Iteration: {i} Convergence RMS: {RMS}\nDiff: {diff}".format(
i=i, RMS=self.rms, diff=(c_next - c_prev).min()
)
)

Expand Down
4 changes: 2 additions & 2 deletions src/closure.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ pub fn kovalenko_hirata(problem: &DataRs) -> Array3<f64> {
let mut out = Array::zeros(problem.correlations.tr.raw_dim());
par_azip!((a in &mut out, &b in &(-problem.system.beta * &problem.interactions.u_sr + &problem.correlations.tr), &c in &problem.correlations.tr) {
if b < 0.0 {
*a = b.exp() - 1.0 - c
*a = b.exp()
} else {
*a = b - c
*a = b + c
}
});
out
Expand Down
1 change: 1 addition & 0 deletions src/integralequation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ fn rism_vv_equation_impl(
let wcw = w_bar.dot(&ck_matrix.dot(&w_bar));
hk_matrix.assign(&(inverted_iwcp.dot(&wcw) + chi_matrix));
});
println!("{:#?}", hk);

// Compute t(k) = h(k) - c(k)
let tk = &hk - ck;
Expand Down
4 changes: 2 additions & 2 deletions src/mdiis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,6 @@ fn conv_rmse(
curr: &Array3<f64>,
prev: &Array3<f64>,
) -> f64 {
let denom = ns1 as f64 * ns2 as f64 * npts as f64;
(dr * (curr - prev).mapv(|x| x.powf(2.0)).sum() / denom).sqrt()
let denom = 1.0 / ns1 as f64 / ns2 as f64 / npts as f64;
(dr * (curr - prev).mapv(|x| x.powf(2.0)).sum() * denom).sqrt()
}

0 comments on commit b5dd6c0

Please sign in to comment.