Skip to content

In pymatgen.analysis.transition_state there is label issue #4465

@Asif-Iqbal-Bhatti

Description

@Asif-Iqbal-Bhatti

Python version

3.11.13

Pymatgen version

2025.6.14

Operating system version

Ubuntu WSL

Current behavior

When I use the pymatgen.analysis.transition_state to plot the NEB from VASP files. I get the plot but there is an issue with a label when calling this "ax = neb_analysis.get_plot(normalize_rxn_coordinate = False, label_barrier = True)"

Expected Behavior

([], [(np.float64(1.83), np.float64(373.9006905519205))]) from "rxn_coord = neb_analysis.get_extrema(normalize_rxn_coordinate=False)"

neb_energy_profile.pdf. These are both different label.

Minimal example

import os, sys, shutil
from pathlib import Path
import os
import matplotlib.pyplot as plt
from pymatgen.analysis.transition_state import NEBAnalysis

plt.figure(figsize=(8, 6))

neb_directory = "LPSCl_bulk_diffusion"
neb_analysis = NEBAnalysis.from_dir(neb_directory)
neb_analysis.setup_spline({"saddle_point": "zero_slope"})

# Extract reaction coordinates and energies
reaction_coords = neb_analysis.r
energies = neb_analysis.energies
rxn_coord = neb_analysis.get_extrema(normalize_rxn_coordinate=False)

print(rxn_coord)
# {“saddle_point”: “zero_slope”} 
ax = neb_analysis.get_plot(normalize_rxn_coordinate = False, label_barrier = True)

plt.title("NEB Energy Profile")
plt.xlabel("Reaction Coordinate")
plt.ylabel("Energy (eV)")
plt.grid(False)
plt.tight_layout()

plt.savefig("neb_energy_profile.pdf", bbox_inches="tight", dpi=300)

Relevant files to reproduce this bug

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions