improve the script
also be able to run npt ensemble