# COMBOptimizationOption¶

class COMBOptimizationOption(maxIterations=None, relFTol=None, gradTol=None, linEqTol=None, disableOptimization=None)

Constructor of the option.

Parameters: maxIterations (int) – The maximal number of iterations that are allowed during the optimization of the COMB potential. relFTol (float) – Stop the optimization of the COMB potential if the relative change in the objective function value is smaller than this value. If set to < 0, this stopping criterion is disabled.

return “combopt: max_iterations=%d, tol_f=%s, tol_grad=%s, tol_lin_eq=%s;” % (self[“maxIterations”], self[“relFTol”], self[“gradTol”], self[“linEqTol”]) :param gradTol: Stop the optimization of the COMB potential if the

2-norm of the gradient of the objective function is smaller than this value. If set to < 0, this stopping criterion is disabled.
Parameters: linEqTol (float) – The tolerance that is passed to the linear equation solver that is called when dipoles are calculated. disableOptimization (bool) – If set to True, the calculation of the dynamical charges in the COMB potential is disabled. Instead, the charges of the corresponding particle types are used.
getAllParameterNames()

Return the names of all used parameters as a list.

getAllParameters()

Return all parameters of this potential and their current values as a <parameterName / parameterValue> dictionary.

static getDefaults()

Get the default parameters of this potential and return them in form of a dictionary of <parameter name, default value> key-value pairs.

getParameter(parameterName)

Get the current value of the parameter parameterName.

setParameter(parameterName, value)

Set the parameter parameterName to the given value.

Parameters: parameterName (str) – The name of the parameter that will be modified. value – The new value that will be assigned to the parameter parameterName.

## Usage Examples¶

Set up a COMB potential and add an optimization option to stop the internal optimization of the dynamical charges after 20 iterations.

# Set up a new COMB potential.
comb_potential = COMB_OSi_2007()

# Set up an optimization option to stop the optimization after 20 iterations.
comb_optimization_option = COMBOptimizationOption(
maxIterations=20,
)

# Add the option to the potential.
comb_potential.addOption(comb_optimization_option)


## Notes¶

This option can be used to specify the details of the internal optimization of the dynamic charges in a COMB potential. It can be added to a TremoloXPotentialSet via the addOption() method.