Skip to content

Commit 816b6e0

Browse files
committed
adjust radius, visual
1 parent d7c97c5 commit 816b6e0

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

crystal_toolkit/renderables/migrationgraph.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from crystal_toolkit.core.scene import Cylinders, Scene
55

66

7-
def _get_extras_cross_boundary(one_hop, only_wi_structure):
7+
def _get_extras_cross_boundary(self, one_hop, only_wi_structure):
88
extras = []
99
working_struct = only_wi_structure.copy()
1010
wi = working_struct[0].specie.name
@@ -14,7 +14,8 @@ def _get_extras_cross_boundary(one_hop, only_wi_structure):
1414
working_struct.insert(0, wi, one_hop["epos"])
1515
shifted_ipos = one_hop["ipos"] - np.array(one_hop["to_jimage"])
1616
working_struct.insert(0, wi, shifted_ipos)
17-
extras.extend([working_struct[0].get_scene(), working_struct[1].get_scene()])
17+
sites_contents = [working_struct[0].get_scene(), working_struct[1].get_scene()]
18+
extras.extend(sites_contents)
1819

1920
# extra cylinders
2021
extra_ipos = list(working_struct[0].coords)
@@ -55,7 +56,9 @@ def get_migrationgraph_scene(
5556
one_hop_contents.append(hop_cyl)
5657

5758
if one_hop["to_jimage"] != (0, 0, 0):
58-
extras_cross_boundary = _get_extras_cross_boundary(one_hop, self.only_sites)
59+
extras_cross_boundary = self._get_extras_cross_boundary(
60+
one_hop, self.only_sites
61+
)
5962
one_hop_contents.extend(extras_cross_boundary)
6063

6164
one_hop_scene = Scene(name=f"hop_{k}", contents=one_hop_contents)
@@ -69,4 +72,5 @@ def get_migrationgraph_scene(
6972
return result_scene
7073

7174

75+
MigrationGraph._get_extras_cross_boundary = _get_extras_cross_boundary
7276
MigrationGraph.get_scene = get_migrationgraph_scene

0 commit comments

Comments
 (0)