# CoreShellOptimizationOption¶

class CoreShellOptimizationOption(maxIterations=None, relFTol=None, gradTol=None)

Constructor of the option.

Parameters: maxIterations (int) – The maximal number of iterations that are allowed during the optimization of the core-shell potential. relFTol (float) – Stop the optimization of the core-shell potential if the relative change in the objective function value is smaller than this value. If set to < 0, this stopping criterion is disabled. gradTol (float) – Stop the optimization of the core-shell 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.
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 core-shell potential and add an optimization option to stop the internal optimization of the shell positions charges after 20 iterations.

# Set up a new core-shell potential.
coreshell_potential = Pedone_AlCaNaOSi_2012()

# Set up an optimization option to stop the optimization of the shell positions
# after 20 iterations.
optimization_option = CoreShellOptimizationOption(
maxIterations=20,
)

# Add the option to the potential.

This option can be used to specify the details of the internal optimization of the shell-positions in a Core-Shell potential. It can be added to a TremoloXPotentialSet via the addOption() method.