theochem / NICE.jl

https://theochem.github.io/NICE.jl/
MIT License
2 stars 2 forks source link

NICE and NICE.jl give different results #3

Open PaulWAyers opened 1 year ago

PaulWAyers commented 1 year ago

Based on Hasan's tests, NICE and NICE.jl give different results.

We should figure out what's going on. His presentation is Thursday, and I doubt I'll have time to look at it before then. @msricher do you think you could see what's off? @mmg870630 might be helpful too.

Marco, this is a net-event kinetic-Monte-Carlo code we've been working on in the group.

msricher commented 1 year ago

I'd tend to trust the Julia version over the Fortran version, which interfaces with Python and might no longer work properly? They're just ports of the same code otherwise. (Just speculation)

PaulWAyers commented 1 year ago

True. But we need to know why they are different too. I thought it was just that the equilibrium constants were defined in inverse (one used forward, and one used reverse) equilibrium constants. But I'm not sure it is that simple.

Charlie-1-3 commented 5 months ago

Different languages and libraries might handle numerical precision differently. Small differences in numerical precision can accumulate over time and lead to divergent results. Also, both implementations involve randomness in selecting reactions (kmc_select_reaction and nekmc_select_reaction). Ensure that both implementations use the same random number generation method and seed to obtain consistent results.