Skip to content

Nudged Elastic Band

NEBAnalyzer

NEBAnalyzer(
    n_images: int = 5,
    spring_constant: float | list[float] = 0.1,
    climb: bool = False,
    remove_rotation_and_translation: bool = False,
    method: Literal[
        "aseneb",
        "improvedtangent",
        "eb",
        "spline",
        "string",
    ] = "improvedtangent",
    interpolate_lattices: bool = False,
    pbc: bool = True,
    autosort_tol: float = 0.5,
    end_amplitude: float = 1,
    calculator: BaseCalculator | None = None,
    neb_transformation: NEBTransformation | None = None,
)

A class used to perform the Nudged Elastic Band (NEB) calculation.

Interpolates a series of images between two endpoint structures (via NEBTransformation) and optimizes them into a minimum energy path (MEP) using the NEB method.

Initializes the NEBAnalyzer object.

Parameters:

Name Type Description Default
n_images int

Number of images to use in the NEB calculation. Defaults to 5.

5
spring_constant float | list[float]

Spring constant(s) for the NEB calculation. Defaults to 0.1 eV/Ang^2.

0.1
climb bool

Whether to use the climbing image method. When True, the path is first optimized to convergence without the climbing image, then re-optimized with it enabled, following standard NEB practice. Defaults to False.

False
remove_rotation_and_translation bool

Whether to remove rotation and translation of images. Defaults to False.

False
method str

Method to use for the NEB calculation. Options are 'aseneb', 'improvedtangent', 'eb', 'spline', or 'string'. Defaults to 'improvedtangent'.

'improvedtangent'
interpolate_lattices bool

Whether to interpolate lattices between images. Defaults to False.

False
pbc bool

Whether to apply periodic boundary conditions. Defaults to True.

True
autosort_tol float

Tolerance for autosorting images. Defaults to 0.5.

0.5
end_amplitude float

Amplitude for the end images. Defaults to 1.

1
calculator BaseCalculator | None

The calculator object used for energy calculations. Defaults to a lazily constructed default calculator.

None
neb_transformation NEBTransformation | None

The transformation object used to generate the intermediate images. If not provided, a new instance is initialized from n_images, interpolate_lattices, pbc, autosort_tol, and end_amplitude.

None

calculate

calculate(
    initial_structure: Structure | Atoms,
    final_structure: Structure | Atoms,
    is_relaxed: bool = False,
    **kwargs: Any,
) -> dict[
    str, list[Structure] | list[float] | float | bool
]

Calculates the minimum energy path (MEP) between two structures.

Interpolates intermediate images between initial_structure and final_structure (via NEBTransformation), then optimizes the resulting band with the NEB method. If the endpoints are not already relaxed, each is relaxed with self.calculator first.

Parameters:

Name Type Description Default
initial_structure Structure | Atoms

The initial structure for the NEB calculation.

required
final_structure Structure | Atoms

The final structure for the NEB calculation.

required
is_relaxed bool

Whether initial_structure and final_structure are already relaxed. Defaults to False.

False
**kwargs Any

Additional keyword arguments passed to the calculator's optimizer.

{}

Returns:

Type Description
dict[str, list[Structure] | list[float] | float | bool]

dict[str, list[Structure] | list[float] | float | bool]: Dictionary with keys: - images: The optimized path images as pymatgen Structure objects, including the endpoints as the first and last elements. - energies: Potential energy (eV) of each image after optimization. - barrier: Forward energy barrier, from a cubic-spline fit through the images' energies and forces (ase.mep.NEBTools.get_barrier), relative to the initial (first) image. - reverse_barrier: Reverse energy barrier, i.e. the fitted barrier minus the reaction energy. - reaction_energy: Reaction energy, i.e. the energy of the final (last) image minus the energy of the initial (first) image. - converged: Whether the last optimizer run converged within self.calculator.steps.

Raises:

Type Description
ValueError

If the calculator does not implement the 'energy' property.

neb_transformation

neb_transformation() -> NEBTransformation

Returns the transformation object used to generate the interpolated NEB images.

Returns:

Name Type Description
NEBTransformation NEBTransformation

The transformation object used to generate the interpolated images.