chemparseplot 1.13.0__tar.gz → 1.13.1__tar.gz
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.
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/PKG-INFO +1 -1
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/_version.py +2 -2
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/chemparseplot/plot/reaction.py +23 -5
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/tests/plot/test_reaction.py +51 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/.gitignore +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/LICENSE +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/chemparseplot/__init__.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/chemparseplot/api.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/chemparseplot/contracts/__init__.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/chemparseplot/contracts/load_outcome.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/chemparseplot/parse/__init__.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/chemparseplot/parse/benchmark.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/chemparseplot/parse/chemgp_hdf5.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/chemparseplot/parse/chemgp_jsonl.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/chemparseplot/parse/converter.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/chemparseplot/parse/eon/__init__.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/chemparseplot/parse/eon/_trajectory_common.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/chemparseplot/parse/eon/con_io.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/chemparseplot/parse/eon/con_trajectory.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/chemparseplot/parse/eon/dimer_trajectory.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/chemparseplot/parse/eon/frame_series.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/chemparseplot/parse/eon/gprd.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/chemparseplot/parse/eon/min_trajectory.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/chemparseplot/parse/eon/minimization.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/chemparseplot/parse/eon/neb.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/chemparseplot/parse/eon/saddle_search.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/chemparseplot/parse/eon/stitch.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/chemparseplot/parse/file_.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/chemparseplot/parse/grammar/__init__.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/chemparseplot/parse/grammar/_deps.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/chemparseplot/parse/grammar/orca_text.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/chemparseplot/parse/grammar/xyz.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/chemparseplot/parse/mlneb.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/chemparseplot/parse/neb_utils.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/chemparseplot/parse/orca/__init__.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/chemparseplot/parse/orca/_opi.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/chemparseplot/parse/orca/geomscan.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/chemparseplot/parse/orca/neb/__init__.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/chemparseplot/parse/orca/neb/interp.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/chemparseplot/parse/orca/neb/opi_parser.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/chemparseplot/parse/patterns.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/chemparseplot/parse/plumed.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/chemparseplot/parse/projection.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/chemparseplot/parse/sella/saddle_search.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/chemparseplot/parse/surrogate/__init__.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/chemparseplot/parse/surrogate/cases.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/chemparseplot/parse/surrogate/gpr_optim.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/chemparseplot/parse/surrogate/mlneb.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/chemparseplot/parse/surrogate/model.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/chemparseplot/parse/trajectory/__init__.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/chemparseplot/parse/trajectory/hdf5.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/chemparseplot/parse/trajectory/neb.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/chemparseplot/parse/types.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/chemparseplot/plot/__init__.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/chemparseplot/plot/benchmark.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/chemparseplot/plot/chemgp.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/chemparseplot/plot/con.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/chemparseplot/plot/disconnectivity.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/chemparseplot/plot/geomscan.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/chemparseplot/plot/landscape.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/chemparseplot/plot/mlneb.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/chemparseplot/plot/neb.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/chemparseplot/plot/optimization.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/chemparseplot/plot/plumed.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/chemparseplot/plot/provenance.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/chemparseplot/plot/rings.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/chemparseplot/plot/structs.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/chemparseplot/plot/surrogate.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/chemparseplot/plot/theme.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/chemparseplot/units.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/chemparseplot/util.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/pyproject.toml +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/readme.md +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/tests/__init__.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/tests/_optional_imports.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/tests/conftest.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/tests/fixtures/h2mol.xyz +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/tests/fixtures/orca_energy_coords_snippet.out +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/tests/fixtures/restart_exact.con +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/tests/fixtures/restart_exact_vel.con +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/tests/fixtures/surrogate/cases/baselines.csv +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/tests/fixtures/surrogate/cases/cases.csv +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/tests/fixtures/surrogate/mlneb/evaluated.traj +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/tests/fixtures/surrogate/mlneb/ml_summary.txt +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/tests/fixtures/surrogate/mlneb/ml_time.txt +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/tests/fixtures/surrogate/mlneb/predicted.traj +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/tests/fixtures/surrogate/record/baker/25_hcnh2/band/band.h5 +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/tests/fixtures/surrogate/record/baker/25_hcnh2/band/obs-archive/kernel.txt +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/tests/fixtures/surrogate/record/baker/25_hcnh2/result.json +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/tests/fixtures/surrogate/record/baker/25_hcnh2/saddle/pos.con +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/tests/fixtures/surrogate/record/birkholz/16_oxirane/result.json +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/tests/fixtures/surrogate/record/birkholz/16_oxirane/saddle/mlflow.run.json +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/tests/fixtures/surrogate/record/mlruns/606078088088587/7eaf5653201fe6b92f3e3831bead3063/metrics/dimer.curvature +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/tests/fixtures/surrogate/record/mlruns/606078088088587/7eaf5653201fe6b92f3e3831bead3063/metrics/dimer.force +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/tests/fixtures/surrogate/record/mlruns/606078088088587/7eaf5653201fe6b92f3e3831bead3063/metrics/dimer.measured_curvature +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/tests/fixtures/surrogate/record/mlruns/606078088088587/7eaf5653201fe6b92f3e3831bead3063/metrics/dimer.oracle_calls +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/tests/fixtures/surrogate/record/mlruns/606078088088587/7eaf5653201fe6b92f3e3831bead3063/metrics/dimer.surrogate_curvature +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/tests/fixtures/surrogate/scaling/breakdown.csv +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/tests/fixtures/surrogate/scaling/components.csv +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/tests/fixtures/surrogate/scaling/counts.csv +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/tests/fixtures/surrogate/scaling/pop.csv +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/tests/fixtures/surrogate/scaling/wall.csv +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/tests/fixtures_geomscan_snippet.txt +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/tests/parse/__init__.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/tests/parse/_con_fixtures.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/tests/parse/grammar/__init__.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/tests/parse/grammar/test_grammar_deps.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/tests/parse/grammar/test_orca_text_grammar.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/tests/parse/grammar/test_xyz_grammar.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/tests/parse/orca/test_geomscan.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/tests/parse/orca/test_interp.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/tests/parse/test_chemgp_hdf5.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/tests/parse/test_chemgp_jsonl_types.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/tests/parse/test_con_io.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/tests/parse/test_con_trajectory.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/tests/parse/test_con_units_and_corpus.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/tests/parse/test_converter.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/tests/parse/test_dimer_trajectory.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/tests/parse/test_eon_neb_types.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/tests/parse/test_eon_trajectory_common.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/tests/parse/test_frame_series.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/tests/parse/test_min_trajectory.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/tests/parse/test_minimization_result.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/tests/parse/test_neb_stitch.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/tests/parse/test_neb_utils.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/tests/parse/test_orca_public_api.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/tests/parse/test_parser_types.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/tests/parse/test_patterns.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/tests/parse/test_plumed.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/tests/parse/test_projection.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/tests/parse/test_readcon_boundary.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/tests/parse/test_saddle_results.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/tests/parse/test_sella_saddle.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/tests/parse/test_surrogate_gpr_optim.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/tests/parse/test_surrogate_mlneb.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/tests/parse/test_trajectory_hdf5.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/tests/parse/test_trajectory_neb.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/tests/plot/__init__.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/tests/plot/data/sexithiophene.sdf +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/tests/plot/test_benchmark.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/tests/plot/test_chemgp_utils.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/tests/plot/test_landscape_disconnectivity.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/tests/plot/test_mlneb.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/tests/plot/test_neb_helpers.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/tests/plot/test_neb_renderers.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/tests/plot/test_optimization.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/tests/plot/test_orca_neb_payload.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/tests/plot/test_primitive_rings.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/tests/plot/test_projection_refactor.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/tests/plot/test_provenance.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/tests/plot/test_ring_track.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/tests/plot/test_ring_updater.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/tests/plot/test_strip_rendering.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/tests/plot/test_structs_units.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/tests/plot/test_surface_auto_thin.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/tests/plot/test_surrogate_plots.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/tests/test_coverage_batch.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/tests/test_full_coverage.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/tests/test_load_outcome.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/tests/test_public_api.py +0 -0
- {chemparseplot-1.13.0 → chemparseplot-1.13.1}/tests/tutorials/test_chemparseplot.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: chemparseplot
|
|
3
|
-
Version: 1.13.
|
|
3
|
+
Version: 1.13.1
|
|
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
|
|
@@ -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.13.
|
|
22
|
-
__version_tuple__ = version_tuple = (1, 13,
|
|
21
|
+
__version__ = version = '1.13.1'
|
|
22
|
+
__version_tuple__ = version_tuple = (1, 13, 1)
|
|
23
23
|
|
|
24
24
|
__commit_id__ = commit_id = None
|
|
@@ -89,12 +89,18 @@ def changed_bonds(reactant, product, limit=3):
|
|
|
89
89
|
return [(i, j) for _, i, j in sorted(pairs, reverse=True)[:limit]]
|
|
90
90
|
|
|
91
91
|
|
|
92
|
-
def apply_wbo_style(
|
|
92
|
+
def apply_wbo_style(
|
|
93
|
+
molecule, bond_orders, *, minimum=0.1, weak=0.5, vmax=3.0, max_contact=2.0
|
|
94
|
+
):
|
|
93
95
|
"""Replace geometric connectivity with measured Wiberg bond orders.
|
|
94
96
|
|
|
95
97
|
Atom numbering follows the source file. Dotted edges encode WBO below
|
|
96
98
|
``weak``; colour and width use a common scale across all structures.
|
|
99
|
+
A pair farther apart than ``max_contact`` times its covalent-radius sum
|
|
100
|
+
gets no edge: a closed-shell density at a near-degenerate geometry can
|
|
101
|
+
assign bond order to separated radical centres, which is not a bond.
|
|
97
102
|
"""
|
|
103
|
+
from ase.data import covalent_radii # noqa: PLC0415
|
|
98
104
|
from matplotlib import colormaps # noqa: PLC0415
|
|
99
105
|
from matplotlib.colors import to_hex # noqa: PLC0415
|
|
100
106
|
|
|
@@ -117,6 +123,13 @@ def apply_wbo_style(molecule, bond_orders, *, minimum=0.1, weak=0.5, vmax=3.0):
|
|
|
117
123
|
for (i, j), value in bond_orders.items():
|
|
118
124
|
if value < minimum:
|
|
119
125
|
continue
|
|
126
|
+
a, b = graph.nodes[nodes[i - 1]], graph.nodes[nodes[j - 1]]
|
|
127
|
+
if "position" in a and "position" in b:
|
|
128
|
+
reach = max_contact * (
|
|
129
|
+
covalent_radii[a["atomic_number"]] + covalent_radii[b["atomic_number"]]
|
|
130
|
+
)
|
|
131
|
+
if np.linalg.norm(np.subtract(a["position"], b["position"])) > reach:
|
|
132
|
+
continue
|
|
120
133
|
graph.add_edge(
|
|
121
134
|
nodes[i - 1],
|
|
122
135
|
nodes[j - 1],
|
|
@@ -182,13 +195,18 @@ def plot_reaction_atlas(cases, *, density=False, width=7.2):
|
|
|
182
195
|
|
|
183
196
|
from chemparseplot.plot.neb import _crop_transparent_rgba # noqa: PLC0415
|
|
184
197
|
|
|
185
|
-
|
|
186
|
-
|
|
198
|
+
line_height = 0.13
|
|
199
|
+
row_heights = [
|
|
200
|
+
2.4 + line_height * max(len(s["bonds"]) for s in case["states"]) for case in cases
|
|
201
|
+
]
|
|
202
|
+
margin = 0.75
|
|
203
|
+
height = sum(row_heights) + margin
|
|
187
204
|
fig = plt.figure(figsize=(width, height))
|
|
188
205
|
left, right, gap = 0.025, 0.985, 0.02
|
|
189
206
|
column_width = (right - left - 3 * gap) / 4
|
|
207
|
+
offsets = np.concatenate([[0.0], np.cumsum(row_heights)[:-1]])
|
|
190
208
|
for row, case in enumerate(cases):
|
|
191
|
-
top = 1 - (0.08 + row
|
|
209
|
+
top = 1 - (0.08 + offsets[row]) / height
|
|
192
210
|
fig.text(
|
|
193
211
|
left,
|
|
194
212
|
top,
|
|
@@ -236,7 +254,7 @@ def plot_reaction_atlas(cases, *, density=False, width=7.2):
|
|
|
236
254
|
from matplotlib.cm import ScalarMappable # noqa: PLC0415
|
|
237
255
|
from matplotlib.colors import Normalize # noqa: PLC0415
|
|
238
256
|
|
|
239
|
-
cax = fig.add_axes([0.30, 0.
|
|
257
|
+
cax = fig.add_axes([0.30, 0.3 / height, 0.40, 0.12 / height])
|
|
240
258
|
cbar = fig.colorbar(
|
|
241
259
|
ScalarMappable(norm=Normalize(0, 3), cmap="viridis"),
|
|
242
260
|
cax=cax,
|
|
@@ -102,3 +102,54 @@ def test_gallery_places_one_titled_tile_per_reaction(tmp_path):
|
|
|
102
102
|
plt.close(fig)
|
|
103
103
|
with pytest.raises(ValueError, match="one column"):
|
|
104
104
|
plot_reaction_gallery(tiles, columns=0)
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
def test_bond_order_between_separated_atoms_draws_no_edge(tmp_path):
|
|
108
|
+
import xyzrender as xr
|
|
109
|
+
|
|
110
|
+
from chemparseplot.plot.reaction import apply_wbo_style
|
|
111
|
+
|
|
112
|
+
path = tmp_path / "radicals.xyz"
|
|
113
|
+
path.write_text("3\nradicals\nC 0 0 0\nH 1.09 0 0\nH -3.85 0 0\n")
|
|
114
|
+
graph = apply_wbo_style(
|
|
115
|
+
xr.load(str(path), quick=True), {(1, 2): 0.98, (1, 3): 0.75}
|
|
116
|
+
).graph
|
|
117
|
+
a, b, c = sorted(graph.nodes)
|
|
118
|
+
assert graph.has_edge(a, b)
|
|
119
|
+
assert not graph.has_edge(a, c)
|
|
120
|
+
# a stretched transition-state contact within the reach keeps its edge
|
|
121
|
+
graph = apply_wbo_style(
|
|
122
|
+
xr.load(str(path), quick=True), {(1, 3): 0.75}, max_contact=4.0
|
|
123
|
+
).graph
|
|
124
|
+
assert graph.has_edge(a, c)
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
def test_atlas_rows_make_room_for_every_bond_line(tmp_path):
|
|
128
|
+
import matplotlib as mpl
|
|
129
|
+
|
|
130
|
+
mpl.use("Agg")
|
|
131
|
+
import matplotlib.pyplot as plt
|
|
132
|
+
|
|
133
|
+
from chemparseplot.plot.reaction import plot_reaction_atlas
|
|
134
|
+
|
|
135
|
+
image = tmp_path / "state.png"
|
|
136
|
+
plt.imsave(image, np.ones((8, 8, 4)))
|
|
137
|
+
bond = {"label": "C1\u2013C2", "distance_A": 2.2, "wbo": 0.3}
|
|
138
|
+
|
|
139
|
+
def case(n):
|
|
140
|
+
return {
|
|
141
|
+
"title": "row",
|
|
142
|
+
"states": [
|
|
143
|
+
{"title": "s", "image": str(image), "bonds": [bond] * n} for _ in range(4)
|
|
144
|
+
],
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
short = plot_reaction_atlas([case(1)] * 4)
|
|
148
|
+
tall = plot_reaction_atlas([case(3)] * 4)
|
|
149
|
+
assert tall.get_figheight() > short.get_figheight()
|
|
150
|
+
# the colour bar sits below the lowest bond annotation
|
|
151
|
+
tall.canvas.draw()
|
|
152
|
+
bar = tall.axes[-1].get_position()
|
|
153
|
+
lowest = min(t.get_window_extent().y0 for t in tall.texts if "\u2013" in t.get_text())
|
|
154
|
+
assert bar.y1 * tall.bbox.height < lowest
|
|
155
|
+
plt.close("all")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{chemparseplot-1.13.0 → chemparseplot-1.13.1}/tests/fixtures/surrogate/scaling/breakdown.csv
RENAMED
|
File without changes
|
{chemparseplot-1.13.0 → chemparseplot-1.13.1}/tests/fixtures/surrogate/scaling/components.csv
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|