In [1]:
from chemview.gg import *
from chemview.viewer import RepresentationViewer
from chemview.install import enable_notebook
enable_notebook()

In [3]:
import numpy as np
gg = ggview(Aes(xyz=[[0.0, 0.0, 0.0],
                     [0.0, 0.0, 0.3],
                     [0.0, 0.0, 0.4],
                     [0.0, 0.0, 0.5],
                     [0.0, 0.0, 0.6],
                     [0.0, 0.0, 0.7]], 
                colors=[0.0, 0.1, 0.2, 0.3, 0.5, 0.6],
                visible=np.array([False, True, True, False, True, True])))
gg += GeomPoints() 
gg += ScaleColorsGradient(limits=[0.0, 0.6], palette='viridis')
gg.display()



In [4]:
_.get_scene()


---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-4-b973f1d4ab25> in <module>()
----> 1 _.get_scene()

/home/gabriele/workspace/chemview/chemview/widget.pyc in get_scene(self)
    218                              'color': 0xffffff } ]
    219         # Objects
--> 220         rep = {k: v.copy() for v in self.representations.items()}
    221 
    222         scene['representations'] = [v.update({"id" : k}) for k, v in rep.items()]

/home/gabriele/workspace/chemview/chemview/widget.pyc in <dictcomp>((v,))
    218                              'color': 0xffffff } ]
    219         # Objects
--> 220         rep = {k: v.copy() for v in self.representations.items()}
    221 
    222         scene['representations'] = [v.update({"id" : k}) for k, v in rep.items()]

AttributeError: 'tuple' object has no attribute 'copy'

In [3]:
rv = RepresentationViewer()
rv.from_scene({"representations": gg.primitives})
rv


---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-3-788af0ec0a8f> in <module>()
      1 rv = RepresentationViewer()
----> 2 rv.from_scene({"representations": gg.primitives})
      3 rv

AttributeError: 'ggview' object has no attribute 'primitives'

In [10]:



---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-10-e0ca25e79947> in <module>()
      1 xyz = np.random.rand(10, 10, 3)
----> 2 gg = ggtraj(Aes(xyz_traj=xyz)) + GeomPoints()

NameError: name 'ggtraj' is not defined

In [ ]: