diff --git a/binarycpython/utils/grid.py b/binarycpython/utils/grid.py
index 7dcd814f7777cffa5f7de0e3899969de0bb9d517..5228374a35444664f38a2322e54fb59404bbf7ac 100644
--- a/binarycpython/utils/grid.py
+++ b/binarycpython/utils/grid.py
@@ -1116,6 +1116,10 @@ class Population:
             elif self.grid_options["evolution_type"] == "custom_generator":
                 # Use the same as the normal grid evolution but just a different generator
                 self._evolve_population_grid()
+            elif self.grid_options["evolution_type"] == "source_file":
+                # Use the same as the normal grid evolution but just a different generator
+                self._evolve_population_grid()
+
 
             # elif self.grid_options["evolution_type"] == "mc":
             #     # TODO: add MC option
@@ -1209,11 +1213,14 @@ class Population:
         if self.grid_options["verbosity"] >= _LOGGER_VERBOSITY_LEVEL:
             stream_logger.debug(f"setting up the system_queue_filler now")
 
-        # Setup of the generator
+        # Setup of the generator and do some 
         # Check again if we use custom generator or not:
         if self.grid_options["evolution_type"] == "custom_generator":
             generator = self.grid_options["custom_generator"]
-        else:
+        elif self.grid_options["evolution_type"] == "source_file":
+            generator = self.grid_options["_system_generator"]
+        else:   
+            # TODO: this might go somewhere else?
             self._generate_grid_code(dry_run=False)
 
             self._load_grid_function()
@@ -2133,11 +2140,11 @@ class Population:
 
         # Source file
         elif self.grid_options["evolution_type"] == "source_file":
-            # TODO: fix this function
-            raise ValueError("This functionality is not available yet")
 
-        # Source file
-        elif self.grid_options["evolution_type"] == "montecarlo":
+            # load the source file
+            self._load_source_file()
+
+            # Do a dry run if wanted
             if self.grid_options["do_dry_run"]:
                 # Do a dry run
                 self._dry_run_source_file()
@@ -2157,7 +2164,8 @@ class Population:
                 "_start_time_evolution"
             ] = time.time()  # Setting start time of grid
 
-            #
+        # Source file
+        elif self.grid_options["evolution_type"] == "montecarlo":
             # TODO: fix this function
             raise ValueError("This functionality is not available yet")
 
@@ -3041,9 +3049,14 @@ class Population:
                 )
                 raise ValueError
 
+        # Get filehandle
         source_file_filehandle = open(self.grid_options["source_file_filename"], "r")
 
-        self.grid_options["_system_generator"] = source_file_filehandle
+        # Create a generator that returns dictionaries
+        source_file_generator = self._create_generator_for_sourcefile(source_file_filehandle)
+
+        # Set this as the generator
+        self.grid_options["_system_generator"] = source_file_generator
 
         verbose_print("Source file loaded", self.grid_options["verbosity"], 1)
 
@@ -3066,6 +3079,14 @@ class Population:
 
         return arg_dict
 
+    def _create_generator_for_sourcefile(self, filehandle):
+        """
+        Function to create a generator for handling systems from a sourcefile
+        """
+
+        for line in filehandle:
+            yield self._dict_from_line_source_file(line)
+
     ###################################################
     # SLURM functions
     #
diff --git a/binarycpython/utils/grid_options_defaults.py b/binarycpython/utils/grid_options_defaults.py
index 68db0f4b9c677a7758f1f4cf2d2ef55a54568868..02ecbf34f0a054c4f2f681121d93dc19047b7bf9 100644
--- a/binarycpython/utils/grid_options_defaults.py
+++ b/binarycpython/utils/grid_options_defaults.py
@@ -102,6 +102,7 @@ grid_options_defaults_dict = {
     "_evolution_type_options": [
         "grid",
         "custom_generator",
+        "source_file",
     ],  # available choices for type of population evolution. # TODO: fill later with Monte Carlo, source file
     "_system_generator": None,  # value that holds the function that generates the system
     # (result of building the grid script)