Detects if MPI is running for writing lammps scripts and only lets rank 0 write them