code: def from_file(filename, use_cores=True, thresh=1.e-4):
          
          with zopen(filename, "rt") as f:
              return Xr.from_string(
                      f.read(), use_cores=use_cores,
                      thresh=thresh)
docs: Reads an xr-formatted file to create an Xr object.
  
          Args:
              filename (str): name of file to read from.
              use_cores (bool): use core positions and discard shell
                      positions if set to True (default).  Otherwise,
                      use shell positions and discard core positions.
              thresh (float): relative threshold for consistency check
                      between cell parameters (lengths and angles) from
                      header information and cell vectors, respectively.
  
          Returns:
              xr (Xr): Xr object corresponding to the input
                      file.