Skip to content

Commit 277a4fc

Browse files
committed
add lobsterneighbors
1 parent 79e6a99 commit 277a4fc

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

crystal_toolkit/_version.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__version__ = "2020.8.15.dev2217"

crystal_toolkit/components/structure.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,9 @@ class StructureMoleculeComponent(MPComponent):
5454
objects.
5555
"""
5656

57-
available_bonding_strategies = frozendict(
58-
{subcls.__name__: subcls for subcls in NearNeighbors.__subclasses__()}
59-
)
60-
57+
from pymatgen.io.lobster.lobsterenv import LobsterNeighbors
58+
available_bonding_strategies={**{subcls.__name__: subcls for subcls in NearNeighbors.__subclasses__()}, 'LobsterNeighbors': LobsterNeighbors}
59+
6160
default_scene_settings = frozendict(
6261
extractAxis=True,
6362
# For visual diff testing, we change the renderer to SVG since this WebGL
@@ -966,6 +965,7 @@ def _preprocess_input_to_graph(
966965
valid_bond_strategies = (
967966
StructureMoleculeComponent.available_bonding_strategies
968967
)
968+
969969
if bonding_strategy not in valid_bond_strategies:
970970
raise ValueError(
971971
"Bonding strategy not supported. Please supply a name of a NearNeighbor "

0 commit comments

Comments
 (0)