Teoroo-CMC / CCS

Curvature Constrained Splines
GNU General Public License v3.0
8 stars 11 forks source link

The steep wall is poorly resolved from the CCS data, but here's a possible suggestion for a fix. #23

Open ThijsSmolders opened 1 year ago

ThijsSmolders commented 1 year ago

Often we find a delicate trade-off between the fit of the minimum, which we want to capture very well, and the repulsive wall, which we want to capture but to a lesser degree of accuracy. Based on the least-square fitting however, any error in the steep wall will be huge, often completely killing the accuracy of the minimum. A proposed solution now is to fix the c-coefficients for a region beyond a certrain threshold, say 2 eV and to do a secondary fit for the steep wall while keeping the other c-coefficients fixed. Code-wise this can be done by using the aa*x=bb constraint, found in the objective.py file, and setting the aa coefficients to be 1 for the intervals that have previously been fitted, and zero for the ones before while setting the c-coefficients in the bb part.

aksam432 commented 1 year ago

Another approach could be to use weighted least squares with weights inversely proportional to the value. So, we shift the objective more towards optimising mean percentage error. However, in this approach one needs to be careful about the weights for data points with extremely low values for the energies or forces.