def all_lines_at_idx(mm, idx_list):
  """ return a list of lines given a list of memory locations
  follow up on all_lines_with_tag
  e.g. all_lines_at_idx(mm, all_lines_with_tag(mm, 'Atom') )
  reads '''
  Atom 0 0 0 0
  Atom 1 1 1 1
  Atom 2 2 2 2
  '''

  Args:
    mm (mmap.mmap): memory map to file
    idx_list (list): a list of memory locations (int)
  Return:
    list: a list of strings, each being the line at idx
  """
  lines = []
  for idx in idx_list:
    mm.seek(idx)
    # row back to beginning of line
    ibegin = mm.rfind('\n')
    if ibegin == -1:
      ibegin = 0
    mm.seek(ibegin)
    mm.readline()
    # read desired line
    line = mm.readline()
    lines.append(line)
  return lines