chemparseplot 1.9.1__py3-none-any.whl → 1.9.2__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.1'
22
- __version_tuple__ = version_tuple = (1, 9, 1)
21
+ __version__ = version = '1.9.2'
22
+ __version_tuple__ = version_tuple = (1, 9, 2)
23
23
 
24
24
  __commit_id__ = commit_id = None
chemparseplot/plot/neb.py CHANGED
@@ -1592,12 +1592,19 @@ def landscape_half_span(x_limits, final_r, final_p, additional_atoms_data, globa
1592
1592
 
1593
1593
 
1594
1594
  def save_plot(output_file, dpi, *, has_strip):
1595
- """Save plots without tight-bbox strip overflow."""
1596
-
1597
- save_kwargs = {"transparent": False, "pad_inches": 0.1, "dpi": dpi}
1598
- if not has_strip:
1599
- save_kwargs["bbox_inches"] = "tight"
1600
- plt.savefig(output_file, **save_kwargs)
1595
+ """Save plots, cropping unused figure canvas (including strip layouts)."""
1596
+
1597
+ # Strips use imshow+Text (not unclipped AnnotationBbox growth), so tight
1598
+ # bbox is safe and removes the large whitespace left by equal-aspect
1599
+ # landscape axes inside a tall/wide figure.
1600
+ del has_strip # kept for API compatibility with callers
1601
+ plt.savefig(
1602
+ output_file,
1603
+ transparent=False,
1604
+ dpi=dpi,
1605
+ bbox_inches="tight",
1606
+ pad_inches=0.12,
1607
+ )
1601
1608
 
1602
1609
 
1603
1610
  def profile_structure_indices(atoms_list, y_values, plot_structures, plot_mode):
@@ -1617,15 +1624,22 @@ def profile_strip_payload(atoms_list, x_values, y_values, plot_structures, plot_
1617
1624
  """Build an ordered strip payload for profile plots."""
1618
1625
 
1619
1626
  payload = []
1627
+ saddle_idx = (
1628
+ int(np.argmax(y_values[1:-1]) + 1)
1629
+ if plot_mode == "energy" and len(y_values) > 2
1630
+ else int(np.argmin(y_values))
1631
+ )
1620
1632
  for index in profile_structure_indices(
1621
1633
  atoms_list, y_values, plot_structures, plot_mode
1622
1634
  ):
1623
- if plot_structures == "all":
1624
- label = str(index)
1625
- elif index == 0:
1635
+ if index == 0:
1626
1636
  label = "R"
1627
1637
  elif index == len(atoms_list) - 1:
1628
1638
  label = "P"
1639
+ elif index == saddle_idx:
1640
+ label = "SP"
1641
+ elif plot_structures == "all":
1642
+ label = str(index)
1629
1643
  else:
1630
1644
  label = "SP"
1631
1645
  payload.append(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: chemparseplot
3
- Version: 1.9.1
3
+ Version: 1.9.2
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=mvIV8ywews3RAJesoI4ThDe2u4r1m5J07IiiC0b-Frc,520
1
+ _version.py,sha256=nWUsyvbnNxGSPfdaHRbZwP5Vc6X8vUYWkDBZLc2Uheg,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=O-d7IQ1mDWtWzCuH_0H-18_9WIYXlwkPOSa_cne7wqM,61002
37
+ chemparseplot/plot/neb.py,sha256=JLZm9k65oJXrNsrUjiyTyMUva5QfcU3f99B33bA20cs,61463
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.1.dist-info/METADATA,sha256=G21Vk2JERgldNu-ifu8-nqT7S_EJ-HvpnRr5aB6KdUY,8504
82
- chemparseplot-1.9.1.dist-info/WHEEL,sha256=mffPy8wBnZQn2VnJUU5jE99KsxaSfiyMHV9Yt0aLVxs,87
83
- chemparseplot-1.9.1.dist-info/licenses/LICENSE,sha256=WpBevJdirrfildX-iO61fdIm4hJ0EQniBoxNJJPlFl0,1127
84
- chemparseplot-1.9.1.dist-info/RECORD,,
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,,