def METHOD_NAME(self, outfiles: Dict[str, str], input_model: OptimizationInput) -> OptimizationResult:
    # Get the stdout from the calculation (required)
    stdout = outfiles.pop("stdout")
    stderr = outfiles.pop("stderr")
    # Parse out the atomic results from the file
    atomic_results = harvest_as_atomic_result(input_model, stdout)
    # Isolate the converged result
    final_step = atomic_results[-1]
    return OptimizationResult(
        initial_molecule=input_model.initial_molecule,
        input_specification=input_model.input_specification,
        final_molecule=final_step.molecule,
        trajectory=atomic_results,
        energies=[float(r.extras["qcvars"]["CURRENT ENERGY"]) for r in atomic_results],
        stdout=stdout,
        stderr=stderr,
        success=True,
        provenance=Provenance(creator="NWChemRelax", version=self.get_version(), routine="nwchem_opt"),
    )