code: def write_vasp(filename, cell, direct=True):
      
  
      lines = get_vasp_structure_lines(cell, direct=direct)
      with open(filename, 'w') as w:
          w.write("\n".join(lines))
docs: Write crystal structure to a VASP POSCAR style file.
  
      Parameters
      ----------
      filename : str
          Filename.
      cell : PhonopyAtoms
          Crystal structure.
      direct : bool, optional
          In 'Direct' or not in VASP POSCAR format. Default is True.