TODO: the average positions should be calculated at the start of extractforceconstants, and compared to ssposcar with a tolerance, to avoid numerous errors in users switching atom orders, e.g. in conforming with POSCAR format, or going back and forth with LAMMPS and making supercells.
The tolerance could/should be T dependent (larger fluctuations -> larger residual error in average positions), M dependent (lighter mass idem), N_config dependent (more averaging -> lower error), and could be, e.g., 1% of the maximum fluctuations observed, eventually divided by sqrt(N_config)
TODO: the average positions should be calculated at the start of extractforceconstants, and compared to ssposcar with a tolerance, to avoid numerous errors in users switching atom orders, e.g. in conforming with POSCAR format, or going back and forth with LAMMPS and making supercells.
The tolerance could/should be T dependent (larger fluctuations -> larger residual error in average positions), M dependent (lighter mass idem), N_config dependent (more averaging -> lower error), and could be, e.g., 1% of the maximum fluctuations observed, eventually divided by sqrt(N_config)