[lammps-users] would you please help me?

yes, you can do that. The fix npt command you list is not the
correct syntax for the most current version of LAMMPS.

Steve