diffpy.structure.expansion package
Methods and classes for manipulating Structure instances.
- Package content:
supercell – create a supercell from an existing Structure.
Submodules
diffpy.structure.expansion.shapeutils module
Utilities for making shapes.
diffpy.structure.expansion.makeellipsoid module
Make a spheroid nanoparticle from a template structure.
- diffpy.structure.expansion.makeellipsoid.makeEllipsoid(S, a, b=None, c=None)[source]
Cut a Structure out of another one.
- Parameters:
S (Structure) – A Structure instance.
a (float) – Primary equatorial radius (along x-axis).
b (float, Optional) – Secondary equatorial radius (along y-axis). If b is
None
(default), then it is set equal to a.c (float, Optional) – Polar radius (along z-axis). If c is
None
(default), then it is set equal to a.
- Returns:
A new Structure instance.
- Return type:
diffpy.structure.expansion.supercell_mod module
This module contains functions for simple Structure manipulation.
- diffpy.structure.expansion.supercell_mod.supercell(S, mno)[source]
Perform supercell expansion for a Structure.
New lattice parameters are multiplied and fractional coordinates divided by corresponding multiplier. New Atoms are grouped with their source in the original cell.
- Parameters:
S (Structure) – An instance of Structure from diffpy.structure.
mno (array_like) – Sequence of 3 integers for cell multipliers along the a, b and c axes.
- Returns:
A new Structure instance representing the expanded supercell.
- Return type:
- Raises:
TypeError – S is not a Structure instance.
ValueError – Invalid mno argument.