parameters: (self, filename)
docstring: write out a LAMMPS data file (from data.py in Pizza.py)
docstring_summary: write out a LAMMPS data file (from data.py in Pizza.py)
docstring_tokens: write out a LAMMPS data file ( from data . py in Pizza . py )
function: def write(self, filename):
          '''write out a LAMMPS data file (from data.py in Pizza.py)'''
  
          with open(filename, "w") as f:
              f.write(self.title + '\n')
              for keyword in hkeywords:
                  if keyword in self.headers:
                      if keyword == "xlo xhi" or keyword == "ylo yhi" or \
                         keyword == "zlo zhi":
                          f.write("{0:f} {1:f} {2}\n".format(
                              self.headers[keyword][0],
                              self.headers[keyword][1], keyword))
                      elif keyword == "xy xz yz":
                          f.write("{0:f} {1:f} {2:f} {3}\n".format(
                              self.headers[keyword][0],
                              self.headers[keyword][1],
                              self.headers[keyword][2], keyword))
                      else:
                          f.write("{0:d} {1}\n".format(self.headers[keyword],
                                                     keyword))
              for pair in skeywords:
                  keyword = pair[0]
                  if keyword in self.sections:
                      f.write("\n{}\n\n".format(keyword))
                      for line in self.sections[keyword]:
                          f.write(line)
function_tokens: def write ( self , filename ) : with open ( filename , "w" ) as f : f . write ( self . title + '\n' ) for keyword in hkeywords : if keyword in self . headers : if keyword == "xlo xhi" or keyword == "ylo yhi" or keyword == "zlo zhi" : f . write ( "{0:f} {1:f} {2}\n" . format ( self . headers [ keyword ] [ 0 ] , self . headers [ keyword ] [ 1 ] , keyword ) ) elif keyword == "xy xz yz" : f . write ( "{0:f} {1:f} {2:f} {3}\n" . format ( self . headers [ keyword ] [ 0 ] , self . headers [ keyword ] [ 1 ] , self . headers [ keyword ] [ 2 ] , keyword ) ) else : f . write ( "{0:d} {1}\n" . format ( self . headers [ keyword ] , keyword ) ) for pair in skeywords : keyword = pair [ 0 ] if keyword in self . sections : f . write ( "\n{}\n\n" . format ( keyword ) ) for line in self . sections [ keyword ] : f . write ( line )