Name

OptimizeNudgedElasticBand — Function for performing a NEB optimization.

Synopsis

Namespace: NanoLanguage
OptimizeNudgedElasticBand(
neb,
max_forces,
max_steps,
max_step_length,
scf_restart_step_length,
constraints,
trajectory_filename,
log_interval,
spring_constant,
climbing_image,
preoptimization,
optimizer_method
)

Description

Function for performing a NEB optimization. Returns: : The optimized nudged elastic band configuration. @param preoptimization : Flag indicating if the endpoints should be optimized before the NEB optimization. @type : Boolean @default : False @param optimizer_method : The optimizer to use for optimizing the structure. @type : QuasiNewton | FIRE @default : An instance of QuasiNewton @return : The optimized nudged elastic band configuration.

OptimizeNudgedElasticBand Arguments

neb

The nudged elastic band configuration to optimize.

Type: NudgedElasticBand

max_forces

The maximum forces when the optimization should stop.

Type: Physical quantity with units eV/Ang

Default: 0.05*eV/Ang
max_steps

The maximum number of steps to take before the NEB relaxation stops.

Type: Positive integer number.

Default: 200
max_step_length

The maximum step length the optimizer may take.

Type: A physical quantity with length units.

Default: 0.5*Ang
scf_restart_step_length

The maximum step length for running a restart scf calculation for the new geometry.

Type: A physical quantity with length units.

Default: 0.1*Ang
constraints

List of atom indices that are kept fixed during optimization.

Type: A list of integers.

Default: []
trajectory_filename

Filename of the trajectory file.

Type: String

Default: None
log_interval

Indicating how often the configuration trajectory should be saved.

Type: Positive integer number.

Default: 1
spring_constant

The spring constant used for the NEB relaxation.

Type: A physical quantity with units eV/Ang**2

Default: 5.0*(eV/Ang**2)
climbing_image

Flag indicating if the climbing image algorithm should be used to find a transition state.

Type: Boolean

Default: False
preoptimization

Flag indicating if the endpoints should be optimized before the NEB optimization.

Type: Boolean

Default: False
optimizer_method

The optimizer to use for optimizing the structure.

Type: QuasiNewton | FIRE

Default: An instance of QuasiNewton

Usage Examples

Find the reaction path for conversion of ethane to ethene, i.e.

\displaystyle

\mathrm{C}_2\mathrm{H}_6 \rightarrow \mathrm{C}_2\mathrm{H}_4 +\mathrm{H}_2

# Nudged Elastic Band configuration

# Setup the configuration list
configuration_list = []

# Define elements
elements = [Carbon,]*2 + [Hydrogen,]*6

# Define initial configuration
cartesian_coordinates = [[  0.0000000,  -1.2257e-05,   0.7716335],
                         [  0.0000000,   1.2257e-05,  -0.7716335],
                         [  0.0000000,   1.02162746,   1.1513662],
                         [ -0.8847539,  -0.51081476,   1.1513615],
                         [  0.8847539,  -0.51081476,   1.1513615],
                         [  0.0000000,  -1.02162746,  -1.1513662],
                         [ -0.8847539,   0.51081476,  -1.1513615],
                         [  0.8847539,   0.51081476,  -1.1513615]]*Angstrom

initial_configuration = MoleculeConfiguration(
    elements=elements,
    cartesian_coordinates=cartesian_coordinates
    )

# Append to the list of configurations
configuration_list.append(initial_configuration)

# Define final configuration
cartesian_coordinates = [[ 0.07475139, -0.04996446,  0.65332658],
                         [-0.07215805,  0.03485788, -0.6533275 ],
                         [ 0.66099367,  3.98448079, -0.09787249],
                         [-0.62932721,  0.35668865,  1.38033322],
                         [ 0.91714293, -0.53575571,  1.1465225 ],
                         [ 0.63207421, -0.37155137, -1.38032121],
                         [-0.91406328,  0.52147801, -1.1465376 ],
                         [ 1.05253733,  3.75843821, -0.68559951]]*Angstrom

final_configuration = MoleculeConfiguration(
    elements=elements,
    cartesian_coordinates=cartesian_coordinates
    )

# Append to the list of configurations
configuration_list.append(final_configuration)

# Construct the Nudged Elastic Band object
neb_configuration = NudgedElasticBand(
    configuration_list,
    image_distance=0.2*Ang)

#define a calculator
calculator = LCAOCalculator()

#find the reaction path
optimized_neb = OptimizeNudgedElasticBand(
        neb_configuration,
        maximum_forces=0.05*eV/Ang)

neb_c6h6.py

Notes

  • We use the Broyden–Fletcher–Goldfarb–Shanno (BFGS) method for optimization, which is a Quasi-Newton method.

  • Our implementation uses the ASE code.

  • See also NudgedElasticBand.