RustBCA icon indicating copy to clipboard operation
RustBCA copied to clipboard

[feature] replace expensive sigmoidal interpolation in morse-Kr-C potential with smoothstep or other polynomial interpolation

Open drobnyjt opened this issue 6 months ago • 0 comments
trafficstars

Is your feature request related to a problem? Please describe. RustBCA includes an attractive-repulsive potential that is exactly Kr-C at short ranges and exactly Morse at long ranges, with a smooth interpolation between the two achieved with a sigmoid function. Since this function will be called many times, it would be a lot faster to replace this with a more efficient interpolation strategy.

Proposed solution First, try smoothstep as interpolating function.

Alternative solution(s) Consider cubic spline interpolation, like the W-W potential included.

drobnyjt avatar Apr 24 '25 22:04 drobnyjt