# EZFF - Easy forcefield fitting¶

ezff.OptProblem

This module provide general functions for EZFF

ezff.Algorithm(myproblem, algorithm_string, population=1024, mutation_probability=None, pool=None)[source]

Provide a uniform interface to initialize an algorithm class for serial and parallel execution

Parameters: myproblem (Problem) – EZFF Problem to be optimized algorithm_string (str) – EZFF Algorithm to use for optimization. Allowed options are NSGAII, NSGAIII and IBEA population (int) – Population size for genetic algorithms mutation_probability (float between 0.0 and 1.0) – Probability of a decision variable to undergo mutation to a random value within defined bounds pool (MPIPool or None) – MPI pool for parallel execution. If this is None, serial execution is assumed
class ezff.Pool(comm=None, debug=False, loadbalance=False)[source]

Wrapper for platypus.MPIPool

Parameters: MPIPool (MPIPool) – MPI Pool
__init__(comm=None, debug=False, loadbalance=False)[source]

Initialize self. See help(type(self)) for accurate signature.

This module provide general functions for EZFF

ezff.optimize(problem, algorithm, iterations=100, write_forcefields=None)[source]

The optimize function provides a uniform wrapper to solve the EZFF problem using the algorithm(s) provided.

Parameters: problem (Problem) – EZFF Problem to be optimized algorithm (str or list (of strings)) – EZFF Algorithm(s) to use for optimization. Allowed options are NSGAII, NSGAIII and IBEA, or a list containing any sequence of these options. The algorithms will be used in the sequence provided iterations (int or list (of ints)) – Number of epochs to perform the optimization for. If multiple algorithms are specified, one iteration value should be provided for each algorithm write_forcefields (int or None) – All non-dominated forcefields are written out every write_forcefields epochs. If this is None, the forcefields are written out for the first and last epoch