AutomaticNEB

class AutomaticNEB(neb, number_of_intermediate_images, simultaneous_images=None, optimization_parameters=None, spring_constant=None, climbing_image=None, log_filename_prefix=<class 'NL.ComputerScienceUtilities.NLFlag._NLFlag.Automatic'>, resolution_ratio=None, suppress_warnings=None)

The automatic NEB optimization algorithm adds images one by one in the largest gap between current images. The NEB segment around the added image is then optimized using the attached calculator. The spring constant of the new segments is calculated to conserve the original spring constant. Thus, the automatic NEB is able to locate the transition state with fewer image optimizations than the traditional NEB.

The name of log and trajectory files is passed through the optimization_parameters keyword. An additional prefix is added to the filenames. The first part of the prefix determines the step in the automatic NEB. This is either the current number of intermediate images or CI for the climbing image optimization. The second and third parts of the prefix are the indices of the endpoints of the segment being optimized. For example: 3_1_4_ corresponds to the second step with images 2 and 3 being optimized.

Parameters:
  • neb (NudgedElasticBand) – The NEB to optimize. The NEB must have a calculator set. The interpolation algorithm set on the NEB is also used in the automatic optimization. The class:`~.ImageDependentPairPotential is recommended for the interpolation. If the NEB has only two images, the initial set of simultaneous images are set all at once. The NEB can not have more intermediate images than simultaneous images at the start of the optimization.

  • number_of_intermediate_images (int) – The total number of intermediate images the NEB should have after the automatic optimization is complete.

  • simultaneous_images (int) – The number of images to optimize simultaneously.

  • optimization_parameters (OptimizeGeometryParameters) – The optimization parameters.

  • spring_constant (class:`~.PhysicalQuantity of type force per length squared) – The spring constant for the new segments. If a single value is provided, it will be used for all new segments. Note that in this case the original distances between images are not conserved. If a list is provided, it must have the same length as the number of segments in the NEB.

  • climbing_image (bool) – Whether to perform a climbing-image optimization around the highest energy image after all intermediate images have been added.
    Default: False.

  • log_filename_prefix (Automatic | str | None) – The logging output from each segment will be written to filenames starting with this value. If it is set to Automatic then the prefix will be the name of the calling python script. If it is set to None, then all output will be written to stdout.
    Default: Automatic.

  • resolution_ratio (float) – The resolution ratio used to switch between geometry and energy gaps. Energy gaps are furthermore weighted to prefer higher absolute energies closer to the transition state. A value of 0.0 means that a new image is always added in the geometric gap. A very large value means that a new image is always added in the energy gap. The value 1.0 is free of any bias.
    Default: 0.5.

  • suppress_warnings (bool) – Whether to suppress warnings printed during the optimization of the NEB segments. Warnings that will be ignored include: Detection of additional minima, unconverged images, and drift in the forces. In the majority of cases, these warnings are not relevant for the automatic NEB and can be ignored.
    Default: True.

climbingImage()
Returns:

Whether to perform a climbing-image optimization around the highest energy image after all intermediate images have been added.

Return type:

bool

finalNEB()
Returns:

The final nudged elastic band configuration.

Return type:

NudgedElasticBand

interpolationAlgorithm()
Returns:

The interpolation algorithm used in the NEB.

Return type:

InterpolationAlgorithm

logFilenamePrefix()
Returns:

The prefix for the log and trajectory filenames.

Return type:

str

neb()
Returns:

The input nudged elastic band configuration.

Return type:

NudgedElasticBand

numberOfIntermediateImages()
Returns:

The total number of intermediate images the NEB should have after the automatic optimization is complete.

Return type:

int

optimizationParameters()
Returns:

The optimization parameters.

Return type:

OptimizeGeometryParameters

resolutionRatio()
Returns:

The resolution ratio used to switch between the geometric and energy gaps.

Return type:

float

run()

Run the main loop of the automatic NEB optimization. In each step of the main loop a subsection of the NEB containing the newest image is optimized. Then another image is added to the largest gap in the NEB. The process is repeated until the desired number of intermediate images have been added.

Returns:

The optimized NEB trajectory.

Return type:

NudgedElasticBand

simultaneousImages()
Returns:

The number of images to optimize simultaneously.

Return type:

int

springConstant()
Returns:

The input spring constant.

Return type:

PhysicalQuantity of type force per length squared

springConstants()
Returns:

Return the spring constants of the NEB segments.

Return type:

PhysicalQuantity

suppressWarnings()
Returns:

Whether to suppress warnings printed during the optimization of the NEB segments.

Return type:

bool

Notes

The automatic NudgedElasticBand (NEB) method [1] is an alternative to a regular NEB optimization OptimizeNudgedElasticBand. It aims to combine both a reduction in computational resources and improved stability in the process of finding the transition state. It achieves this by converging the path segment by segment, rather than all at once. Finally, the region around the transition state is refined to ensure the highest accuracy. If one is interested in converging the the full minimum energy path, the OptimizeNudgedElasticBand() function should be used.

Usage Examples

The AutomaticNEB has a similar interface as the OptimizeNudgedElasticBand() function. However, one key difference is that AutomaticNEB is a class and and the simulation is run by calling the run() method.

optimization_parameters = OptimizeGeometryParameters(
    max_forces=0.02 * eV/Angstrom,
)
auto_neb = AutomaticNEB(
    neb=initial_neb,
    number_of_intermediate_images=5,
    simultaneous_images=2,
    optimization_parameters=optimization_parameters,
    spring_constant=0.5 * eV/Angstrom**2,
    climbing_image=True
)
final_neb = auto_neb.run()