Closed scottwsides closed 1 year ago
Dear @scottwsides, please see the example here: https://github.com/nglviewer/nglview/issues/998
thats the first thing I saw and it didn't work at all. I'll double check my setup and try to find what I'm doing wrong.
More generally, its just hard to find docs on the options in the functions... and the pydoc strings all just show '**kargs' that don't have any detailed info. Any tips?
More generally, its just hard to find docs on the options in the functions... and the pydoc strings all just show '**kargs' that don't have any detailed info. Any tips?
view.add_surface(**kwargs)
means specifying NGL
options:
Examples
tab -> color/volume
-> Then you can use any option in the right menu to put it in kwargs.hats the first thing I saw and it didn't work at all. I'll double check my setup and try to find what I'm doing wrong.
Can you try with NGL
's cube files first? https://github.com/nglviewer/ngl/tree/master/data
Sure... I'll try those. Also.. I'll try the viewer. However I actually use embedded in jupyterlab notebook. But... I can use this to introspect methods. Thanks!
However I actually use embedded in jupyterlab notebook.
um may be you are getting the same issue here: https://github.com/nglviewer/nglview/issues/975
Perhaps... I'll check it out.
The benzene-homo.cube file complained about negative coordinates not being allowed. I can see a simple charge density with my .cube files.... but not molecular orbitals. I think I'm not setting the NWChem dplot options correctly so I'll keep looking. Your example above still doesnt viz for any file... I have to replace view[1].add_surface --> view.compoent_1.add_surface to get anything to viz.
So copying .cube file to /tmp seems to let detailed MO info get plotted. But this is very cumbersome... has this 'current file directory' been fixed?
has this 'current file directory' been fixed?
@scottwsides unfortunately I don't know how to fix it.
Understood... I've got a workaround, but it is odd. Cheers,
Sorry for asking this question if its been answered somewhere already, I have found .cube examples but none of them seem to work for my case. Before providing more detail... am I missing a cache of examples of this sort somewhere? I'm dumping a .cube file from NWChem with
dplot
TITLE HOMO
vectors n2.movecs
LimitXYZ
-3.0 3.0 10
-3.0 3.0 10
-3.0 3.0 10
spin total gaussian
output chargedensity.cube end task dplot
This step seems to work fine. I found a few examples of visualizing surfaces... one of them is
view.add_component('water_den.cube', color="red") view.component_0.add_surface(isolevelType="value", isolevel=0.002)
with my .cube file and nothing appears. Is this example the correct one?