def atom_text(elem,pos):
  """ convert elem,pos to text representation """
  assert len(elem) == len(pos)
  lines = []
  for iatom in range(len(elem)):
      mypos = pos[iatom]
      line = '%5s  %10.6f  %10.6f  %10.6f' % (elem[iatom],mypos[0],mypos[1],mypos[2])
      lines.append(line)
  atext = ';\n'.join(lines)
  return atext