I have been trying to visualize a crystal structure obtained from ICSD database (cif file) using
Following is my code snippet.
from pymatgen.vis.structure_vtk import StructureVis from pymatgen import Lattice, Structure structure = Structure.from_file('cif/ICSD_CollCode54150.cif') vis = StructureVis(structure) vis.show()
However, this opens up an empty window. Alternatively, I have tried to visualize the structure as follows, but still getting an empty window. I have the VTK package installed.
lattice = mg.Lattice.cubic(4.2) comp = mg.Composition("Fe2O3") structure = Structure(lattice, ["Cs", "Cl"], [[0, 0, 0], [0.5, 0.5, 0.5]]) vis = StructureVis(structure) vis.show()
Am I doing something wrong or is visualization not supported at the moment?
Thanks in advance!