Boundary mode
The boundary key is used to show image atoms outside the cell. The default value is [[0, 1], [0, 1], [0, 1]], thus no atoms outside the cell will be shown.
It has two purposes:
For the visualization of a crystal, one usually shows the atoms on the unit cell boundary.
In the DFT calculation, the periodic boundary condition (PBC) is very common. When editing a structure, one may want to see the how the PBC image atoms change.
[1]:
from weas_widget import WeasWidget
from ase.io import read
atoms = read("../../examples/tio2.cif")
viewer = WeasWidget()
viewer.from_ase(atoms)
viewer.avr.model_style = 1
viewer
[1]:
Show the atoms on the unit cell:
[2]:
viewer = WeasWidget()
viewer.from_ase(atoms)
viewer.avr.model_style = 1
viewer.avr.boundary = [[-0.1, 1.1], [-0.1, 1.1], [-0.1, 1.1]]
viewer
[2]:
Show the atoms on the unit cell:
[3]:
viewer = WeasWidget()
viewer.from_ase(atoms)
viewer.avr.model_style = 1
viewer.avr.boundary = [[-1, 2], [-1, 2], [-1, 2]]
viewer
[3]: