def extract_input_parameters(path_file_in, df_input_params, dict_result={}):
   """extracts the data from the input file of the simulation

   Parameters
   ----------
   path_file_in : string
       relative path to the file that contains the input of the simulation
   df_input_params : pd.Series
       names of the parameters to extract in the input files with the corresponding
       names wanted in the final file 
   dict_result : dict, optional
       previous state of the dict containing the extracted data, by default {}

   Returns
   -------
   dict_result : dict
       new state of the dict containing the extracted data
   """
   with open(path_file_in) as f:
      lines = f.readlines()

      # for each parameter we want to extract, read the file line by line until we find
      # the corresponding one 
      for param_key in df_input_params.index:
         param_name = df_input_params.at[param_key]
         for line in lines:
            if param_key in line:
               dict_result[param_name] = line.split()[0]
               break
               
         if param_name not in dict_result.keys():
            raise NameError(f"parameter {param_key} not in file {path_file_in}")

   return dict_result