Skip to content

Commit

Permalink
adjust radius
Browse files Browse the repository at this point in the history
  • Loading branch information
hmlli committed Sep 1, 2022
1 parent f4d43ba commit a0bf356
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions crystal_toolkit/renderables/migrationgraph.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
from turtle import pos
import numpy as np

from pymatgen.analysis.diffusion.neb.full_path_mapper import MigrationGraph
from crystal_toolkit.core.scene import Scene, Cylinders

from crystal_toolkit.core.scene import Cylinders, Scene


def get_migrationgraph_scene(
self,
Expand All @@ -19,13 +18,19 @@ def get_migrationgraph_scene(
result_scene = self.structure.get_scene()
hop_contents = []
for one_hop in self.unique_hops.values():
hop_cyl = Cylinders(positionPairs=[[list(one_hop["ipos_cart"]), list(one_hop["epos_cart"])]], radius=0.2, visible=True)
hop_cyl = Cylinders(
positionPairs=[[list(one_hop["ipos_cart"]), list(one_hop["epos_cart"])]],
radius=0.25,
)
hop_contents.append(hop_cyl)

result_scene.contents.append(
Scene(name="hops", origin=result_scene.contents[0].origin, contents=hop_contents)
Scene(
name="hops", origin=result_scene.contents[0].origin, contents=hop_contents
)
)
print(result_scene.contents[-1])
return result_scene

MigrationGraph.get_scene = get_migrationgraph_scene

MigrationGraph.get_scene = get_migrationgraph_scene

0 comments on commit a0bf356

Please sign in to comment.