pymatgen.analysis.wulff module
This module define a WulffShape class to generate the Wulff shape from a lattice, a list of indices and their corresponding surface energies, and the total area and volume of the wulff shape,the weighted surface energy, the anisotropy and shape_factor can also be calculated. In support of plotting from a given view in terms of miller index.
The lattice is from the conventional unit cell, and (hkil) for hexagonal lattices.
If you use this code extensively, consider citing the following:
Tran, R.; Xu, Z.; Radhakrishnan, B.; Winston, D.; Persson, K. A.; Ong, S. P. (2016). Surface energies of elemental crystals. Scientific Data.
- class WulffFacet(normal, e_surf, normal_pt, dual_pt, index, m_ind_orig, miller)[source]
Bases:
object
Helper container for each Wulff plane.
- Parameters:
normal –
e_surf –
normal_pt –
dual_pt –
index –
m_ind_orig –
miller –
- class WulffShape(lattice: Lattice, miller_list, e_surf_list, symprec=1e-05)[source]
Bases:
object
Generate Wulff Shape from list of miller index and surface energies, with given conventional unit cell. surface energy (Jm^2) is the length of normal.
Wulff shape is the convex hull. Based on: http://scipy.github.io/devdocs/generated/scipy.spatial.ConvexHull.html
- Process:
get wulff simplices
label with color
get wulff_area and other properties
- Parameters:
lattice – Lattice object of the conventional unit cell
miller_list ([(hkl) – list of hkl or hkil for hcp
e_surf_list ([float]) – list of corresponding surface energies
symprec (float) – for recp_operation, default is 1e-5.
- property anisotropy[source]
Returns: (float) Coefficient of Variation from weighted surface energy The ideal sphere is 0.
- property effective_radius[source]
Radius of the Wulffshape when the Wulffshape is approximated as a sphere.
- Returns:
(float) radius.
- get_plot(color_set='PuBu', grid_off=True, axis_off=True, show_area=False, alpha=1, off_color='red', direction=None, bar_pos=(0.75, 0.15, 0.05, 0.65), bar_on=False, units_in_JPERM2=True, legend_on=True, aspect_ratio=(8, 8), custom_colors=None)[source]
Get the Wulff shape plot.
- Parameters:
color_set – default is ‘PuBu’
grid_off (bool) – default is True
axis_off (bool) – default is True
show_area (bool) – default is False
alpha (float) – chosen from 0 to 1 (float), default is 1
off_color – Default color for facets not present on the Wulff shape.
direction – default is (1, 1, 1)
bar_pos – default is [0.75, 0.15, 0.05, 0.65]
bar_on (bool) – default is False
legend_on (bool) – default is True
aspect_ratio – default is (8, 8)
({(h (custom_colors) – [r,g,b,alpha}): Customize color of each facet with a dictionary. The key is the corresponding Miller index and value is the color. Undefined facets will use default color site. Note: If you decide to set your own colors, it probably won’t make any sense to have the color bar on.
k – [r,g,b,alpha}): Customize color of each facet with a dictionary. The key is the corresponding Miller index and value is the color. Undefined facets will use default color site. Note: If you decide to set your own colors, it probably won’t make any sense to have the color bar on.
l} – [r,g,b,alpha}): Customize color of each facet with a dictionary. The key is the corresponding Miller index and value is the color. Undefined facets will use default color site. Note: If you decide to set your own colors, it probably won’t make any sense to have the color bar on.
units_in_JPERM2 (bool) – Units of surface energy, defaults to Joules per square meter (True)
- Returns:
(matplotlib.pyplot)
- get_plotly(color_set='PuBu', off_color='red', alpha=1, custom_colors=None, units_in_JPERM2=True)[source]
Get the Wulff shape as a plotly Figure object.
- Parameters:
color_set – default is ‘PuBu’
alpha (float) – chosen from 0 to 1 (float), default is 1
off_color – Default color for facets not present on the Wulff shape.
({(h (custom_colors) – [r,g,b,alpha}): Customize color of each facet with a dictionary. The key is the corresponding Miller index and value is the color. Undefined facets will use default color site. Note: If you decide to set your own colors, it probably won’t make any sense to have the color bar on.
k – [r,g,b,alpha}): Customize color of each facet with a dictionary. The key is the corresponding Miller index and value is the color. Undefined facets will use default color site. Note: If you decide to set your own colors, it probably won’t make any sense to have the color bar on.
l} – [r,g,b,alpha}): Customize color of each facet with a dictionary. The key is the corresponding Miller index and value is the color. Undefined facets will use default color site. Note: If you decide to set your own colors, it probably won’t make any sense to have the color bar on.
units_in_JPERM2 (bool) – Units of surface energy, defaults to Joules per square meter (True)
- Returns:
(plotly.graph_objs.Figure)
- property shape_factor[source]
This is useful for determining the critical nucleus size. A large shape factor indicates great anisotropy. See Ballufi, R. W., Allen, S. M. & Carter, W. C. Kinetics
of Materials. (John Wiley & Sons, 2005), p.461
- Returns:
(float) Shape factor.
- show(*args, **kwargs)[source]
Show the Wulff plot.
- Parameters:
*args – Passed to get_plot.
**kwargs – Passed to get_plot.
- property tot_corner_sites[source]
Returns the number of vertices in the convex hull. Useful for identifying catalytically active sites.
- property tot_edges[source]
Returns the number of edges in the convex hull. Useful for identifying catalytically active sites.