Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crystal_toolkit/components/localenv.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
8 changes: 4 additions & 4 deletions crystal_toolkit/components/structure.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion crystal_toolkit/renderables/moleculegraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Loading