I’m working with atomistic data coming out of LAMMPS, written in XYZ format. When I open this dataset using the XYZ reader, it creates a vtkMolecule. There doesn’t seem to be a lot I can do with this type of dataset; even things like Reflect don’t work. Is there a way to convert a vtkMolecule to something more common, such as vtkUnstructured, or something like that?
You have the
Molecule to Lines filter to get a polydata (one point per atom, one line per bond), with associated arrays.
Note the reverse exists also and is called
Convert Into Molecule
Thanks for your reply. Molecule to Lines does give me a polydata object. The thing that threw me off before is that it won’t render for anything other than 3D glyphs and Point Gaussian. Points, Surface, and all the rest leave me with a blank screen. I suspect this is because I don’t have any bonds in my dataset. Any thoughts?
ParaView rendering is based on cells.
If you do not have cells but only points, most of rendering will be empty except for 3D Glyph and Point Gaussian that creates extra geometry at point locations.
And you guess correctly,
Molecule To Lines create only cells for bounds.
That makes sense. I am surprised that Points representation does not work, and I thought I remembered Surface rendering individual points in the absence of cell geometry for other datasets (vtkUnstructuredGrid?), but that was several versions ago now.