In the previous post, I have shown how to find the void in VMD. But if you want to visualize the connected voids, it will become a little complicated. At the beginning, I tried to use watershed algorithm to do that, during which I had an idea to do that in a much simpler way. I will introduce below.
- Use the following Tcl script to find all voids and put a Si atom in each void. And the end of the script, a XYZ file is generated to use Si to represent the voids in the unit cell.
- Use VMD to open the XYZ file.
- In the representation setting, you can select “fragment 0” to “fragment N” to see the connected voids. VMD can figure out the connected voids and treat them as different fragments. With Selection tool, you can even move the connected voids to anywhere you want for better representation.
- You can also use color method “fragment” to use different colors to highlight different fragments, but the default color scheme is not good.