Jupyter notebooks¶
- chemiscope.show(frames=None, properties=None, meta=None, environments=None, settings=None, mode='default')¶
Show the dataset defined by the given
frames
andproperties
(optionallymeta
andenvironments
as well) using a embedded chemiscope visualizer inside a Jupyter notebook. These parameters have the same meaning as in thechemiscope.create_input()
function.The
mode
keyword also allows overriding the default two-panels visualization to show only a structure panel (mode = "structure"
) or the map panel (mode = "map"
). These modes also make it possible to view a dataset for which properties (or frames) are not available.When inside a jupyter notebook, the returned object will create a new chemiscope visualizer displaying the dataset. The returned object also have a
save
function that can be used to save the dataset to a.json
or.json.gz
file to load it in the main website later.import chemiscope from sklearn.decomposition import PCA import ase.io pca = PCA(n_components = 3) frames = ase.io.read(...) properties = { "PCA": pca.fit_transform(some_data) } widget = chemiscope.show(frames, properties) # display the dataset in a chemiscope visualizer inside the notebook widget # ... # Save the file for later use widget.save("dataset.json")