orix
orix copied to clipboard
New Feature: Allow passing phase to sample generation
Description of the change
Adds #480 for sampling generators.
Progress of the PR
- [x] Docstrings for all functions
- [x] Unit tests with pytest for all lines
- [x] Clean code style by running black via pre-commit
Minimal example of the bug fix or new feature
a = 5.431
latt = Lattice(a, a, a, 90, 90, 90)
atom_list = []
for coords in [[0, 0, 0], [0.5, 0, 0.5], [0, 0.5, 0.5], [0.5, 0.5, 0]]:
x, y, z = coords[0], coords[1], coords[2]
atom_list.append(
Atom(atype="Si", xyz=[x, y, z], lattice=latt)
) # Motif part A
atom_list.append(
Atom(atype="Si", xyz=[x + 0.25, y + 0.25, z + 0.25], lattice=latt)
) # Motif part B
struct = Structure(atoms=atom_list, lattice=latt)
p = Phase(structure=struct, space_group=227)
rotations = get_sample_reduced_fundamental(resolution=4, phase=phase)
For reviewers
- [ ] The PR title is short, concise, and will make sense 1 year later.
- [ ] New functions are imported in corresponding
__init__.py
. - [ ] New features, API changes, and deprecations are mentioned in the unreleased
section in
CHANGELOG.rst
. - [ ] Contributor(s) are listed correctly in
__credits__
inorix/__init__.py
and in.zenodo.json
.