chemparseplot 1.9.2__py3-none-any.whl → 1.9.3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
_version.py CHANGED
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
18
18
  commit_id: str | None
19
19
  __commit_id__: str | None
20
20
 
21
- __version__ = version = '1.9.2'
22
- __version_tuple__ = version_tuple = (1, 9, 2)
21
+ __version__ = version = '1.9.3'
22
+ __version_tuple__ = version_tuple = (1, 9, 3)
23
23
 
24
24
  __commit_id__ = commit_id = None
chemparseplot/plot/neb.py CHANGED
@@ -1577,18 +1577,86 @@ def landscape_projection_basis(global_basis, final_r, final_p):
1577
1577
  return compute_projection_basis(final_r, final_p)
1578
1578
 
1579
1579
 
1580
- def landscape_half_span(x_limits, final_r, final_p, additional_atoms_data, global_basis):
1581
- """Expand the symmetric landscape half-span to keep extra markers visible."""
1580
+ def landscape_half_span(
1581
+ x_limits,
1582
+ final_r,
1583
+ final_p,
1584
+ additional_atoms_data,
1585
+ global_basis,
1586
+ *,
1587
+ path_pad: float = 1.15,
1588
+ min_half: float = 0.02,
1589
+ ):
1590
+ """Symmetric |d| half-span from the path (and optional overlays), not s/2.
1582
1591
 
1583
- half_span = (x_limits[1] - x_limits[0]) / 2
1584
- if not additional_atoms_data:
1585
- return half_span
1592
+ Using the reaction-progress half-width as the default forced a near-square
1593
+ frame and large empty bands above/below paths that stay near ``d=0``.
1594
+ """
1586
1595
 
1587
1596
  basis = landscape_projection_basis(global_basis, final_r, final_p)
1588
- for overlay in additional_atoms_data:
1589
- _, add_d = project_to_sd(np.array([overlay.r]), np.array([overlay.p]), basis)
1590
- half_span = max(half_span, abs(float(add_d[0])) * 1.15)
1591
- return half_span
1597
+ _s, _d = project_to_sd(np.asarray(final_r), np.asarray(final_p), basis)
1598
+ half_span = max(abs(float(_d.max())), abs(float(_d.min())), min_half) * path_pad
1599
+ for overlay in additional_atoms_data or []:
1600
+ _, add_d = project_to_sd(
1601
+ np.array([overlay.r]), np.array([overlay.p]), basis
1602
+ )
1603
+ half_span = max(half_span, abs(float(add_d[0])) * path_pad)
1604
+ # Tiny floor only (absolute), never a fraction of s — that reintroduced the
1605
+ # empty top/bottom bands on near-linear paths.
1606
+ del x_limits # reserved for future asymmetric s handling
1607
+ return max(half_span, min_half)
1608
+
1609
+
1610
+ def mark_saddle_point(
1611
+ ax,
1612
+ x,
1613
+ y,
1614
+ *,
1615
+ label: str = "SP",
1616
+ font_size: float = 12.0,
1617
+ vline: bool = False,
1618
+ annotate: bool = True,
1619
+ ):
1620
+ """Draw a high-contrast saddle marker (gold star) on a profile or landscape."""
1621
+
1622
+ ax.scatter(
1623
+ float(x),
1624
+ float(y),
1625
+ marker="*",
1626
+ s=max(280, int(font_size**2 * 3.2)),
1627
+ c="#FFD700",
1628
+ edgecolors="black",
1629
+ linewidths=1.8,
1630
+ zorder=100,
1631
+ label=label,
1632
+ )
1633
+ if vline:
1634
+ ax.axvline(
1635
+ float(x),
1636
+ color="black",
1637
+ linestyle="--",
1638
+ linewidth=1.4,
1639
+ alpha=0.75,
1640
+ zorder=50,
1641
+ )
1642
+ if annotate:
1643
+ ax.annotate(
1644
+ label,
1645
+ xy=(float(x), float(y)),
1646
+ xytext=(10, 14),
1647
+ textcoords="offset points",
1648
+ fontsize=int(font_size * 1.05),
1649
+ fontweight="bold",
1650
+ color="black",
1651
+ zorder=101,
1652
+ bbox={
1653
+ "boxstyle": "round,pad=0.2",
1654
+ "facecolor": "white",
1655
+ "edgecolor": "black",
1656
+ "linewidth": 0.8,
1657
+ "alpha": 0.92,
1658
+ },
1659
+ )
1592
1660
 
1593
1661
 
1594
1662
  def save_plot(output_file, dpi, *, has_strip):
@@ -1603,7 +1671,7 @@ def save_plot(output_file, dpi, *, has_strip):
1603
1671
  transparent=False,
1604
1672
  dpi=dpi,
1605
1673
  bbox_inches="tight",
1606
- pad_inches=0.12,
1674
+ pad_inches=0.05,
1607
1675
  )
1608
1676
 
1609
1677
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: chemparseplot
3
- Version: 1.9.2
3
+ Version: 1.9.3
4
4
  Summary: Parsers and plotting tools for computational chemistry
5
5
  Project-URL: Documentation, https://chemparseplot.rgoswami.me
6
6
  Project-URL: Issues, https://github.com/HaoZeke/chemparseplot/issues
@@ -1,4 +1,4 @@
1
- _version.py,sha256=nWUsyvbnNxGSPfdaHRbZwP5Vc6X8vUYWkDBZLc2Uheg,520
1
+ _version.py,sha256=YQ1hPUE08l-suAhs5mF82Ar_S1TGPGw71H8z1_WMuAw,520
2
2
  chemparseplot/__init__.py,sha256=8M1TQDLxtr2EvjQbG6EiIyiIu149VwGMBdLfoL1LsDc,890
3
3
  chemparseplot/units.py,sha256=oWRy5OnGH4bAELtlzrAwxZQvliFDCWOtInj_itpC2rc,3688
4
4
  chemparseplot/util.py,sha256=4tYNyZcIGtjMnk0fk2XsOVZwhi0cx5_xlHzPkevY6Z0,4214
@@ -34,7 +34,7 @@ chemparseplot/parse/trajectory/neb.py,sha256=URrWXuPLBmzEZvE79QEOPI2Mj1cCzZ-V00D
34
34
  chemparseplot/plot/__init__.py,sha256=3u02ig8DBXHKtNFH_3W0nMl7r5ogHoqiDvnFmm9PdnE,946
35
35
  chemparseplot/plot/chemgp.py,sha256=V0NBfrCiNdlwUZ3fXx1Q6tuh-cIgBm91vO8KwvhKt08,37460
36
36
  chemparseplot/plot/geomscan.py,sha256=rK8z0rTTCwU_E_MS8TVOLzD_5jn3NHTeZd7PcQRDh7s,1628
37
- chemparseplot/plot/neb.py,sha256=JLZm9k65oJXrNsrUjiyTyMUva5QfcU3f99B33bA20cs,61463
37
+ chemparseplot/plot/neb.py,sha256=Lc9lTPdlEJ7Vx3WtIkX4Z_HYHY0ZgPim63eo5fdHvX8,63200
38
38
  chemparseplot/plot/optimization.py,sha256=rTmssH6TCkqRrm5xk5_B-ElhZ8FKEVvOLD9UBaYbvzQ,20099
39
39
  chemparseplot/plot/plumed.py,sha256=-TJsB_ughlXtjj7dI-yOH9uzcBypMFWyr_z0V2LYo40,3883
40
40
  chemparseplot/plot/structs.py,sha256=VISc4doNnsQs2arpuI4CBVpMEH09ajrlykjULRuz-e0,6480
@@ -78,7 +78,7 @@ tests/plot/test_projection_refactor.py,sha256=O0iydKG4qfVfIv7cLsTYkZOjKLOZrlGCkI
78
78
  tests/plot/test_strip_rendering.py,sha256=zWeR9aK9YrDLzhaYw607VG3c4m6xi9YNCOctQ2zbYQs,7018
79
79
  tests/plot/test_structs_units.py,sha256=p-nisWH2jXNzYLE5SbDKAKd2-SCBX34fq-gDg_QvLCs,1403
80
80
  tests/tutorials/test_chemparseplot.py,sha256=m275SQVJ2c1AMiUMOWZFpBPje_bMVwkjwisFEoaIdC8,3581
81
- chemparseplot-1.9.2.dist-info/METADATA,sha256=erb_8mjbozXW74JogWULWZJ4DD3025UFxMXmOYvZVuE,8504
82
- chemparseplot-1.9.2.dist-info/WHEEL,sha256=mffPy8wBnZQn2VnJUU5jE99KsxaSfiyMHV9Yt0aLVxs,87
83
- chemparseplot-1.9.2.dist-info/licenses/LICENSE,sha256=WpBevJdirrfildX-iO61fdIm4hJ0EQniBoxNJJPlFl0,1127
84
- chemparseplot-1.9.2.dist-info/RECORD,,
81
+ chemparseplot-1.9.3.dist-info/METADATA,sha256=DKonW-c3dIcXpLlP30zPL-fgjK3n_Wo_tcmAW_N-M4g,8504
82
+ chemparseplot-1.9.3.dist-info/WHEEL,sha256=mffPy8wBnZQn2VnJUU5jE99KsxaSfiyMHV9Yt0aLVxs,87
83
+ chemparseplot-1.9.3.dist-info/licenses/LICENSE,sha256=WpBevJdirrfildX-iO61fdIm4hJ0EQniBoxNJJPlFl0,1127
84
+ chemparseplot-1.9.3.dist-info/RECORD,,