def METHOD_NAME(self, mag):
    filestring = "#****  LATTICE and ATOMS  ****   \n"
    #
    # some default input options
    brav_type = {
        0:"None",
        1:"Cubic Primitive",
        2:"Cubic Face Centered",
        3:"Cubic Body Centered",
        4:"Hexagonal Primitive",
        8:"Orthorhombic Primitive"
    }
    filestring += 'bravais_lattice_type="%s"  \n'%brav_type[self.ibrav]
    if self.cell.unit == "angstrom":
        filestring += 'crds_units = "Angstrom"  \n'
        filestring += 'lattice_units = "Angstrom"  \n'
    elif self.cell.unit == "bohr":
        filestring += 'crds_units = "Bohr"  \n'
        filestring += 'lattice_units = "Bohr"  \n'
    else:
        st.markdown("WARNING: unit = ",self.cell.unit)
    t = LatticeMatrix(self.cell.latticevectors)
    if self.ibrav !=0:
        filestring += 'a_length="%16.8f"  \n'%self.cell.a
        filestring += 'b_length="%16.8f"  \n'%self.cell.b
        filestring += 'c_length="%16.8f"  \n'%self.cell.c
    else:
        t = LatticeMatrix(self.cell.latticevectors)
        filestring += 'lattice_vector="  \n'
        for i in range(3):
            for j in range(3):
                filestring += " %.12e "%(self.cell.latticevectors[i][j] * self.cell.lengthscale)
            filestring += '  \n'    
        filestring += '"  \n'
    filestring += 'atomic_coordinate_type = "%s"  \n'%self.atom_unit 
    filestring += 'atoms="  \n'
    atom_format = "%s  %.12e %.12e %.12e"
    iatom = 0
    for a in self.atoms:
        b = a[0]
        if b[len(b) -1].isdigit():
            b = b[:len(b)-1]
        filestring += atom_format%(b,a[1], a[2], a[3])
        filestring += "  1 1 1 %6.2f %6.2f %6.2f  \n"%(mag[iatom][0],mag[iatom][1],mag[iatom][2])
        iatom += 1
    filestring += '"  \n'
    return filestring