docs: def write_atoms(fn, this, cycfn=None, conv=1.0, symbols=True):
      """
      Write atom information to an atoms.dat file (i.e., tblmd, MDCORE input file)
      """
      f = paropen(fn, "w")
  
      f.write("<--- Number of atoms\n")
      f.write("%i\n" % len(this))
      f.write("<--- Number of occupied orbitals\n")
      f.write("%f\n" % 0.0)
      f.write("<--- Atom positions\n")
  
      groups = None
      if this.has("groups"):
          groups = this.get_array("groups")
  
      gamma = None
      if this.has("gamma"):
          gamma = this.get_array("gamma")
  
      T = None
      if this.has("T"):
          T = this.get_array("T")
  
      for idx, i in enumerate(this):
          group_str = "1"
          if groups is not None:
              group_str = "%i" % groups[idx]
          gamma_str = "0.0"
          if gamma is not None:
              gamma_str = "%20.10e" % gamma[idx]
          T_str = "0.0"
          if T is not None:
              T_str = "%20.10e" % T[idx]
  
          sym = i.symbol
  
          r = i.position
  
          if symbols:
              f.write("%s   %f   %20.10e  %20.10e  %20.10e   %s %s %s\n" % (sym, ase.data.atomic_masses[ase.data.chemical_symbols.index(sym)], r[0]*conv, r[1]*conv, r[2]*conv, group_str, gamma_str, T_str))
          else:
              f.write("%i   %f   %20.10e  %20.10e  %20.10e   %s %s %s\n" % (ase.data.chemical_symbols.index(sym), ase.data.atomic_masses[ase.data.chemical_symbols.index(sym)], r[0]*conv, r[1]*conv, r[2]*conv, group_str, gamma_str, T_str))
  
  
      f.write("<--- Velocities\n")
      for i in this:
          m = i.mass
          if m is None:
              m = ase.data.atomic_masses[ase.data.chemical_symbols.index(i.symbol)]
          if i.momentum is not None:
              v = i.momentum/m
          else:
              v = [ 0.0, 0.0, 0.0 ]
          f.write("%20.10e %20.10e %20.10e\n" % ( v[0], v[1], v[2] ))
  
      f.write("<--- Forces\n")
      for i in this:
          f.write("0 0 0\n")
  
      f.write("<--- cell\n")
      cell = this.get_cell()
      f.write("%f %f %f\n" % tuple(cell[0, :]))
      f.write("%f %f %f\n" % tuple(cell[1, :]))
      f.write("%f %f %f\n" % tuple(cell[2, :]))
  
      for name, aux in this.arrays.items():
          if not name in atoms_default_fields:
              f.write("<--- %s\n" % name)
              if aux.dtype == int:
                  if len(aux.shape) == 1:
                      for i in this:
                          f.write(" %i\n" % aux[i.index])
                  else:
                      for i in this:
                          f.write(( aux.shape[1]*" %i" + "\n" ) % tuple(aux[i.index].tolist()))
              else:
                  if len(aux.shape) == 1:
                      for i in this:
                          f.write(" %e\n" % aux[i.index])
                  else:
                      for i in this:
                          f.write(( aux.shape[1]*" %e" + "\n" ) % tuple(aux[i.index].tolist()))
  
      f.close()
  
      if cycfn:
          write_cyc(cycfn, this, conv=conv)