NudgedElasticBand — Class for holding a series of configurations, ranging from an initial to a final configuration.
Constructor for a nudged elastic band object. Sets up a series of configurations.
A list configurations that must be included in the series of configurations. Must hold at least two configurations.
Type: List of configurations, where all configurations must be of the same type, with the same elements and with the same spatial regions.
Distance between the coordinates of successive configurations in the series of configurations if auto-generation is allowed.
Type: PhysicalQuantity with a length unit e.g. 0.5*Angstrom.
Default:
0.5*Angstrom
Auto-generate intermediate images between specified configurations where necessary such that no distance between successive images is greater than the image_distance parameter.
Type: Boolean value e.g. True.
Default:
True
A NudgedElasticBand object provides the following methods:
calculator(): Returns the attached calculator - assumed to be the same across all images,
we only select the first image's calculator.
configurationCopy(new_coordinates): Routine for getting a copy of a neb configuration, with new coordinates.
configurationType(): Returns the configuration type - e.g. BulkConfiguration.
dielectricRegions(): Return the dielectric regions for the configuration.
elements(): Returns a list of the atomic elements - e.g. [Oxygen, Hydrogen, Hydrogen]
ghostAtoms(): Returns the list of ghost_atoms.
imageDistance(): Returns the image distance, if it is set by the user.
images(): Returns all configurations.
indicesFromTags(): NEB presently contains no tags.
metallicRegions(): Return the metallic regions for the configuration.
nlprint(stream, name): Print a string containing an ASCII description of the NudgedElasticBand object.
reactionCoordinates(): Returns the distance from the first image along the series of images - e.g. [0.0, 1.0, 2.1]*Angstrom.
refine(first, last, image_distance): Refine a section of the reaction path. Any current images between the specified
starting and ending images are dropped in favor of new refinement images.
The starting image index in the reaction subpath being refined.
Type: An integer
The ending image index in the reaction subpath being refined.
Type: An integer
The maximum distance between successive configurations - e.g. 0.2*Angstrom.
Type: A strictly positive PhysicalQuantity of type length > 0.0*Angstrom
setCalculator(calculator, initial_state, initial_spin): Attach a calculator to the NudgedElasticBand, which will be used further calculations.
The calculator object that should be attached to the NudgedElasticBand.
Type: A calculator compatible with the configuration type.
A configuration to take the initial state from.
Type: A configuration that the NudgedElasticBand was initialized with.
Default:
None
The initial InitialSpin object to be used for this configuration.
Type: InitialSpin | None
Default:
None for calculators not supporting spin. Maximally spin-polarized InitialSpin for calculators supporting spin.
setDielectricRegions(dielectric_regions): Set the dielectric regions for the configuration.
A sequence of BoxRegion's.
setMetallicRegions(metallic_regions): Set the metallic regions for the configuration.
A sequence of BoxRegion's.
symbols(): The element symbols of the configuration.
tags(): NEB presently contains no tags.
update():
Setup a NudgedElasticBand calculation for conversion of ethane to ethene, i.e.
# 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)
Calculate the Total Energy for all images in a nudged elastic band configuration.
# Define elements.
elements = [Oxygen, Hydrogen, Hydrogen]
# Define coordinates.
c0 = [[ 0.00, 0.00, 0.12],
[ 0.00, 0.76, -0.48],
[ 0.00, -0.76, -0.48]]*Angstrom
c1 = [[ 0.00, 0.00, 1.20],
[ 0.00, 0.76, -0.48],
[ 0.00, -0.76, -0.48]]*Angstrom
# Set up a list of configurations.
configuration_list = [ MoleculeConfiguration(elements,c) for c in [c0,c1] ]
# Create the NudgedElasticBand object.
neb = NudgedElasticBand(configuration_list)
# Set a calculator on the configurations in the NEB - for analysis.
neb.setCalculator(LCAOCalculator())
# Create a Trajectory with a TotalEnergy analysis carried out on each configuration.
t = MakeTrajectory(neb, TotalEnergy)
The NudgedElasticBand configuration sets up a reaction path for a nudged elastic band calculation [33].
See also OptimizeNudgedElasticBand.