The CrystalShape object

The CrystalShape object is used to draw molecular surface for Batoms. It has a settings attribute (CrystalShapeSettings object), which stores and sets all parameters related to lattice plane data. Possible keywords are: indices, distance, crystal, symmetry and color.

Here we show an example of drawing a crystal shape.

>>> from batoms.build import bulk
>>> au = bulk('au', 'Au', cubic = True)
>>> au.crystal_shape.settings[(1, 1, 1)] = {'indices': (1, 1, 1), 'distance': 2.0}
>>> au.crystal_shape.draw()

One change the setting by.

>>> au.crystal_shape.settings[(1, 1, 1)].distance = 3.0
>>> au.crystal_shape.draw()
../_images/gallery_planesetting_crystal.png