display Package
display
Module
mvtk
Module
mayavi toolkit.
WARNING: This code is still under development.
- abipy.display.mvtk.plot_wigner_seitz(lattice, figure=None, **kwargs)[source]
Adds the skeleton of the Wigner-Seitz cell of the lattice to a mayavi figure
- Parameters:
lattice – Reciprocal-space
pymatgen.core.lattice.Lattice
objectfigure – mayavi figure, None to plot on the curretn figure
kwargs – kwargs passed to the mayavi function
plot3d
. Color defaults to black and line_width to 1.
Returns: mayavi figure
- abipy.display.mvtk.plot_unit_cell(lattice, figure=None, **kwargs)[source]
Adds the unit cell of the lattice to a mayavi figure.
- Parameters:
lattice – Lattice object
figure – mayavi figure, None to plot on the curretn figure
kwargs – kwargs passed to the mayavi function
plot3d
. Color defaults to black and line_width to 1.
Returns: mayavi figure
- abipy.display.mvtk.plot_lattice_vectors(lattice, figure=None, **kwargs)[source]
Adds the basis vectors of the lattice provided to a mayavi figure.
- Parameters:
lattice –
pymatgen.core.lattice.Lattice
object.figure – mayavi figure, None if a new figure should be created.
kwargs – kwargs passed to the mayavi function
plot3d
. Color defaults to black and line_width to 1.
Returns: mayavi figure
- abipy.display.mvtk.plot_structure(structure, frac_coords=False, to_unit_cell=False, style='points+labels', unit_cell_color=(0, 0, 0), color_scheme='VESTA', figure=None, show=False, **kwargs)[source]
Plot structure with mayavi.
- Parameters:
structure –
abipy.core.structure.Structure
objectfrac_coords
to_unit_cell – True if sites should be wrapped into the first unit cell.
style – “points+labels” to show atoms sites with labels.
unit_cell_color
color_scheme – color scheme for atom types. Allowed values in (“Jmol”, “VESTA”)
figure
kwargs
Returns: mayavi figure
- abipy.display.mvtk.plot_labels(labels, lattice=None, coords_are_cartesian=False, figure=None, **kwargs)[source]
Adds labels to a mayavi figure.
- Parameters:
labels – dict containing the label as a key and the coordinates as value.
lattice –
pymatgen.core.lattice.Lattice
object used to convert from reciprocal to cartesian coordinatescoords_are_cartesian – Set to True if you are providing. coordinates in cartesian coordinates. Defaults to False. Requires lattice if False.
figure – mayavi figure, None to plot on the curretn figure
kwargs – kwargs passed to the mayavi function text3d. Color defaults to blue and size to 25.
Returns: mayavi figure
utils
Module
Tools to build ipython widgets.