original_docstring: 
          Function for processing a whole folder of catalog files. This takes a user-specified
          mapping scheme that will associate catalog files with molecule names, formulas, and
          any other `LineList`/`Transition` attributes. This can be in the form of a dictionary
          or a YAML file; one has to be provided.
          
          An example scheme is given here:
          {
              "cyclopentadiene": {
                  "formula": "c5h6",
                  "filepath": "../data/catalogs/cyclopentadiene.cat"
              }
          }
          The top dictionary has keys corresponding to the name of the molecule,
          and the value as a sub dictionary containing the formula and filepath
          to the catalog file as minimum input.
          
          You can also provide additional details that are `Transition` attributes:
          {
              "benzene": {
                  "formula": "c6h6",
                  "filepath": "../data/catalogs/benzene.cat",
                  "smiles": "c1ccccc1",
                  "publc": False
              }
          }
          
          Parameters
          ----------
          param_dict : dict or None, optional
              If not None, a dictionary containing the mapping scheme will be used
              to process the catalogs. Defaults to None.
          yml_path : str or None, optional
              If not None, corresponds to a str filepath to the YAML file to be read.
          kwargs
              Additional keyword arguments will be passed into the assignment process,
              which are the args for `process_linelist`.
              
          Raises
          ------
          ValueError : If yml_path and param_dict args are the same value.
          
docstring: Function for processing a whole folder of catalog files. This takes a user-specified
  mapping scheme that will associate catalog files with molecule names, formulas, and
  any other `LineList`/`Transition` attributes. This can be in the form of a dictionary
  or a YAML file; one has to be provided.
  
  
  
  
  
  Parameters
  
  param_dict : dict or None, optional
  If not None, a dictionary containing the mapping scheme will be used
  to process the catalogs. Defaults to None.
  yml_path : str or None, optional
  If not None, corresponds to a str filepath to the YAML file to be read.
  kwargs
  Additional keyword arguments will be passed into the assignment process,
  which are the args for `process_linelist`.
  
  Raises
  
  ValueError : If yml_path and param_dict args are the same value.
docstring_tokens: Function for processing a whole folder of catalog files . This takes a user - specified mapping scheme that will associate catalog files with molecule names formulas and any other ` LineList ` / ` Transition ` attributes . This can be in the form of a dictionary or a YAML file ; one has to be provided . Parameters param_dict : dict or None optional If not None a dictionary containing the mapping scheme will be used to process the catalogs . Defaults to None . yml_path : str or None optional If not None corresponds to a str filepath to the YAML file to be read . kwargs Additional keyword arguments will be passed into the assignment process which are the args for ` process_linelist ` . Raises ValueError : If yml_path and param_dict args are the same value .
code: def process_linelist_batch(self, param_dict=None, yml_path=None, **kwargs):
          """
          Function for processing a whole folder of catalog files. This takes a user-specified
          mapping scheme that will associate catalog files with molecule names, formulas, and
          any other `LineList`/`Transition` attributes. This can be in the form of a dictionary
          or a YAML file; one has to be provided.
          
          An example scheme is given here:
          {
              "cyclopentadiene": {
                  "formula": "c5h6",
                  "filepath": "../data/catalogs/cyclopentadiene.cat"
              }
          }
          The top dictionary has keys corresponding to the name of the molecule,
          and the value as a sub dictionary containing the formula and filepath
          to the catalog file as minimum input.
          
          You can also provide additional details that are `Transition` attributes:
          {
              "benzene": {
                  "formula": "c6h6",
                  "filepath": "../data/catalogs/benzene.cat",
                  "smiles": "c1ccccc1",
                  "publc": False
              }
          }
          
          Parameters
          ----------
          param_dict : dict or None, optional
              If not None, a dictionary containing the mapping scheme will be used
              to process the catalogs. Defaults to None.
          yml_path : str or None, optional
              If not None, corresponds to a str filepath to the YAML file to be read.
          kwargs
              Additional keyword arguments will be passed into the assignment process,
              which are the args for `process_linelist`.
              
          Raises
          ------
          ValueError : If yml_path and param_dict args are the same value.
          """
          if param_dict == yml_path:
              raise ValueError("Please provide arguments to param_dict or yml_path.")
          if yml_path:
              param_dict = routines.read_yaml(yml_path)
              yml_path = Path(yml_path)
              root = yml_path.parents[0]
          linelists = list()
          self.logger.info(f"Processing {len(param_dict)} catalog entries in batch mode.")
          for name, subdict in param_dict.items():
              try:
                  # Append the directory path to the catalog filepath
                  subdict["filepath"] = str(root.joinpath(subdict["filepath"]))
                  self.logger.info(f"Creating LineList for molecule {name}")
                  extension = Path(subdict["filepath"]).suffix
                  if extension == ".cat":
                      func = LineList.from_catalog
                  elif extension == ".lin":
                      func = LineList.from_lin
                  else:
                      raise ValueError(
                          f"File extension not recognized: {name} extension: {extension}"
                      )
                  linelist_obj = func(name=name, **subdict)
                  print(linelist_obj)
                  self.process_linelist(name=linelist_obj.name, linelist=linelist_obj)
              except ValueError:
                  self.logger.warning(f"Could not parse molecule {name}.")
                  raise Exception(f"Could not parse molecule {name} from dictionary.")
          self.logger.info("Completed catalog batch analysis.")
code_tokens: def process_linelist_batch ( self , param_dict = None , yml_path = None , ** kwargs ) : if param_dict == yml_path : raise ValueError ( "Please provide arguments to param_dict or yml_path." ) if yml_path : param_dict = routines . read_yaml ( yml_path ) yml_path = Path ( yml_path ) root = yml_path . parents [ 0 ] linelists = list ( ) self . logger . info ( f"Processing {len(param_dict)} catalog entries in batch mode." ) for name , subdict in param_dict . items ( ) : try : subdict [ "filepath" ] = str ( root . joinpath ( subdict [ "filepath" ] ) ) self . logger . info ( f"Creating LineList for molecule {name}" ) extension = Path ( subdict [ "filepath" ] ) . suffix if extension == ".cat" : func = LineList . from_catalog elif extension == ".lin" : func = LineList . from_lin else : raise ValueError ( f"File extension not recognized: {name} extension: {extension}" ) linelist_obj = func ( name = name , ** subdict ) print ( linelist_obj ) self . process_linelist ( name = linelist_obj . name , linelist = linelist_obj ) except ValueError : self . logger . warning ( f"Could not parse molecule {name}." ) raise Exception ( f"Could not parse molecule {name} from dictionary." ) self . logger . info ( "Completed catalog batch analysis." )
short_docstring: Function for processing a whole folder of catalog files.
short_docstring_tokens: Function for processing a whole folder of catalog files .
comment: """
          Function for processing a whole folder of catalog files. This takes a user-specified
          mapping scheme that will associate catalog files with molecule names, formulas, and
          any other `LineList`/`Transition` attributes. This can be in the form of a dictionary
          or a YAML file; one has to be provided.
          
          An example scheme is given here:
          {
              "cyclopentadiene": {
                  "formula": "c5h6",
                  "filepath": "../data/catalogs/cyclopentadiene.cat"
              }
          }
          The top dictionary has keys corresponding to the name of the molecule,
          and the value as a sub dictionary containing the formula and filepath
          to the catalog file as minimum input.
          
          You can also provide additional details that are `Transition` attributes:
          {
              "benzene": {
                  "formula": "c6h6",
                  "filepath": "../data/catalogs/benzene.cat",
                  "smiles": "c1ccccc1",
                  "publc": False
              }
          }
          
          Parameters
          ----------
          param_dict : dict or None, optional
              If not None, a dictionary containing the mapping scheme will be used
              to process the catalogs. Defaults to None.
          yml_path : str or None, optional
              If not None, corresponds to a str filepath to the YAML file to be read.
          kwargs
              Additional keyword arguments will be passed into the assignment process,
              which are the args for `process_linelist`.
              
          Raises
          ------
          ValueError : If yml_path and param_dict args are the same value.
          """$SEP$# Append the directory path to the catalog filepath