RustBCA
RustBCA copied to clipboard
[feature] replace expensive sigmoidal interpolation in morse-Kr-C potential with smoothstep or other polynomial interpolation
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.