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: