code: def write_file(self, filename, distance=6, velocity=8, charge=3):
          
          with open(filename, "w") as f:
              f.write(self.get_string(distance=distance, velocity=velocity,
                                      charge=charge))
docs: Writes LammpsData to file.
  
          Args:
              filename (str): Filename.
              distance (int): No. of significant figures to output for
                  box settings (bounds and tilt) and atomic coordinates.
                  Default to 6.
              velocity (int): No. of significant figures to output for
                  velocities. Default to 8.
              charge (int): No. of significant figures to output for
                  charges. Default to 3.