MaddenOptimizationOption¶
- class MaddenOptimizationOption(repMaxIterations=None, repFTol=None, repGradTol=None, polMaxIterations=None, polFTol=None, polGradTol=None)¶
Constructor of the option.
- Parameters:
repMaxIterations (int) – The maximal number of iterations that are allowed during the optimization of the repulsive potential part.
repFTol (float) – Stop the optimization of the repulsive part of the Madden potential if the relative change in the objective function value is smaller than this value. If set to < 0, this stopping criterion is disabled.
repGradTol (float) – Stop the optimization of the repulsive part of the Madden 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.
polMaxIterations (int) – The maximal number of iterations that are allowed during the optimization of the polarization potential part.
polFTol (float) – Stop the optimization of the polarization part of the Madden potential if the relative change in the objective function value is smaller than this value. If set to < 0, this stopping criterion is disabled.
polGradTol (float) – Stop the optimization of the polarization part of the Madden 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.
- classmethod 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 Madden potential and add an optimization option to stop the internal optimization of the polarization potential after 20 iterations.
# Set up a Madden potential.
potential_set = Tangney_OSi_2002()
# Set up an optimization option to stop the optimization after 20 iterations.
optimization_option = MaddenOptimizationOption(
polMaxIterations=20,
)
potential_set.addOption(optimization_option)
Notes¶
This option can be used to specify the details of the internal optimization in a
Madden potential.
It can be added to a TremoloXPotentialSet via the addOption()
method.