code: def _set_lattice(self):
          
  
          unit = self._values[0]
          if unit == 'alat':
              if not self._tags['celldm(1)']:
                  print("celldm(1) has to be specified when using alat.")
                  sys.exit(1)
              else:
                  factor = self._tags['celldm(1)']  # in Bohr
          elif unit == 'angstrom':
              factor = 1.0 / Bohr
          else:
              factor = 1.0
  
          if len(self._values[1:]) < 9:
              print("CELL_PARAMETERS is wrongly set.")
              sys.exit(1)
  
          lattice = np.reshape([float(x) for x in self._values[1:10]], (3, 3))
          self._tags['cell_parameters'] = lattice * factor
docs: Calculate and set lattice parameters.
  
          Invoked by CELL_PARAMETERS tag.