Skip to content

Commit

Permalink
Changed screen to work with new cub file grid from tcintegral
Browse files Browse the repository at this point in the history
  • Loading branch information
YHordijk committed Nov 11, 2023
1 parent 5061993 commit f61e208
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/tcviewer/screen.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,11 @@ def draw_orbital(self, orb, gridd=None, isovalue=0.03, color1=[0, 0, 1], color2=
# and draw the isosurface with phase
self.draw_isosurface(gridd, isovalue=isovalue, color=[color1, color2], material=material, with_phase=True)

def draw_cub(self, cub, isovalue=0.03, color1=[0, 0, 1], color2=[1, 0, 0], material=materials.orbital_shiny):
self.draw_molecule(cub.get_molecule())
self.draw_isosurface(cub.to_grid(), isovalue=isovalue, color=[color1, color2], material=material, with_phase=True)
def draw_cub(self, cub: grid.Grid or str, isovalue=0.03, color1=[0, 0, 1], color2=[1, 0, 0], material=materials.orbital_shiny):
if isinstance(cub, str):
cub = grid.from_cub_file(cub)
self.draw_molecule(cub.molecule)
self.draw_isosurface(cub, isovalue=isovalue, color=[color1, color2], material=material, with_phase=True)

def draw_axes(self, center=[0, 0, 0], length=1, width=.04, **kwargs):
arrow_x = o3d.geometry.TriangleMesh.create_arrow(width, width*2, cylinder_height=length, cone_height=length*.2, **kwargs)
Expand Down

0 comments on commit f61e208

Please sign in to comment.