Saves files for the minimization.

        Notes
        -----
        Currently saves a logfile with best individual and a pdb of
        the best model.

def log_results(self):
        """Saves files for the minimization.

        Notes
        -----
        Currently saves a logfile with best individual and a pdb of
        the best model.
        """
        best_ind = self.halloffame[0]
        model_params = self.parse_individual(
            best_ind)  # need to change name of 'params'
        with open(
                '{0}{1}_log.txt'.format(
                    self._params['output_path'],
                    self._params['run_id']), 'a+') as log_file:
            log_file.write('\nEvaluated {0} models in total\n'.format(
                self._params['model_count']))
            log_file.write('Run ID is {0}\n'.format(self._params['run_id']))
            log_file.write('Best fitness is {0}\n'.format(
                self.halloffame[0].fitness))
            log_file.write(
                'Parameters of best model are {0}\n'.format(model_params))
            log_file.write(
                'Best individual is {0}\n'.format(self.halloffame[0]))
            for i, entry in enumerate(self.halloffame[0]):
                if entry > 0.95:
                    log_file.write(
                        "Warning! Parameter {0} is at or near maximum allowed "
                        "value\n".format(i + 1))
                elif entry < -0.95:
                    log_file.write(
                        "Warning! Parameter {0} is at or near minimum allowed "
                        "value\n".format(i + 1))
            log_file.write('Minimization history: \n{0}'.format(self.logbook))
        with open('{0}{1}_bestmodel.pdb'.format(
                self._params['output_path'],
                self._params['run_id']), 'w') as output_file:
            model = self._params['specification'](*model_params)
            model.build()
            model.pack_new_sequences(self._params['sequence'])
            output_file.write(model.pdb)