speed improvement to lammps writer