POWMES is a F90 program to measure very accurately the power spectrum in a N-body simulation, using Taylor expansion of some order on the cosine and sine transforms. It can read GADGET format and requires FFTW2 to be installed.
https://ui.adsabs.harvard.edu/abs/2009MNRAS.393..511C