code: def read_reaction(self, root):
          folder_name = os.path.basename(root)
  
          self.reaction, self.sites = ase_tools.get_reaction_from_folder(
              folder_name)  # reaction dict
  
          self.stdout.write(
              '----------- REACTION:  {} --> {} --------------\n'
              .format('+'.join(self.reaction['reactants']),
                      '+'.join(self.reaction['products'])))
  
          self.reaction_atoms, self.prefactors, self.prefactors_TS, \
              self.states = ase_tools.get_reaction_atoms(self.reaction)
  
          
          r_empty = ['' for n in range(len(self.reaction_atoms['reactants']))]
          p_empty = ['' for n in range(len(self.reaction_atoms['products']))]
          self.structures = {'reactants': r_empty[:],
                             'products': p_empty[:]}
  
          key_value_pairs = {}
  
          """ Match reaction gas species with their atomic structure """
          for key, mollist in self.reaction_atoms.items():
              for i, molecule in enumerate(mollist):
                  if self.states[key][i] == 'gas':
                      assert molecule in self.ase_ids_gas.keys(), \
                          """Molecule {molecule} is missing in folder {gas_folder}"""\
                          .format(molecule=clear_prefactor(self.reaction[key][i]),
                                  gas_folder=self.gas_folder)
                      self.structures[key][i] = self.gas[molecule]
                      species = clear_prefactor(
                          self.reaction[key][i])
                      key_value_pairs.update(
                          {'species': clear_state(species)})
                      self.ase_ids.update({species: self.ase_ids_gas[molecule]})
  
          """ Add empty slab to structure dict"""
          for key, mollist in self.reaction_atoms.items():
              if '' in mollist:
                  n = mollist.index('')
                  self.structures[key][n] = self.empty
docs: Create empty dictionaries