From e9dd6ff9fc37653f625d80c31986b5cb73be4eca Mon Sep 17 00:00:00 2001 From: Min-Hsueh Chiu Date: Mon, 20 Jul 2026 17:17:45 -0700 Subject: [PATCH 1/2] chore: bump release to v2026.7.20 From c0b258bf4b7a0ccc15cdfaa2c8810bb8ad354c51 Mon Sep 17 00:00:00 2001 From: Min-Hsueh Chiu Date: Wed, 12 Aug 2026 11:26:51 -0700 Subject: [PATCH 2/2] fix pmg deprecated methods --- crystal_toolkit/components/localenv.py | 2 +- crystal_toolkit/components/structure.py | 8 ++++---- crystal_toolkit/renderables/moleculegraph.py | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/crystal_toolkit/components/localenv.py b/crystal_toolkit/components/localenv.py index 2620d5eb..52e7694d 100644 --- a/crystal_toolkit/components/localenv.py +++ b/crystal_toolkit/components/localenv.py @@ -810,7 +810,7 @@ def get_valences(struct): [struct[index], *lse.neighbors_sets[index][0].neighb_sites] ) mol = mol.get_centered_molecule() - mg = MoleculeGraph.with_empty_graph(molecule=mol) + mg = MoleculeGraph.from_empty_graph(molecule=mol) for i in range(1, len(mol)): mg.add_edge(0, i) diff --git a/crystal_toolkit/components/structure.py b/crystal_toolkit/components/structure.py index 84f4a7b4..b6e67ec4 100644 --- a/crystal_toolkit/components/structure.py +++ b/crystal_toolkit/components/structure.py @@ -996,19 +996,19 @@ def _preprocess_input_to_graph( with warnings.catch_warnings(): warnings.simplefilter("ignore") if isinstance(input, Structure): - graph = StructureGraph.with_local_env_strategy( + graph = StructureGraph.from_local_env_strategy( input, bonding_strategy ) else: - graph = MoleculeGraph.with_local_env_strategy( + graph = MoleculeGraph.from_local_env_strategy( input, bonding_strategy, reorder=False ) except Exception: # for some reason computing bonds failed, so let's not have any bonds(!) if isinstance(input, Structure): - graph = StructureGraph.with_empty_graph(input) + graph = StructureGraph.from_empty_graph(input) else: - graph = MoleculeGraph.with_empty_graph(input) + graph = MoleculeGraph.from_empty_graph(input) return graph diff --git a/crystal_toolkit/renderables/moleculegraph.py b/crystal_toolkit/renderables/moleculegraph.py index 53a22e94..f425b8db 100644 --- a/crystal_toolkit/renderables/moleculegraph.py +++ b/crystal_toolkit/renderables/moleculegraph.py @@ -40,7 +40,7 @@ def get_molecule_graph_scene( A Molecule Graph scene. """ if visualize_bond_orders: - vis_mol_graph = MoleculeGraph.with_local_env_strategy( + vis_mol_graph = MoleculeGraph.from_local_env_strategy( self.molecule, OpenBabelNN() ) else: