Spherical Harmonic Descriptors¶
This module computes descriptors based on combinations of spherical harmonics applied to nearest-neighbor bonds.
-
pythia.spherical_harmonics.
abs_neighbor_average
(box, positions, neigh_min=4, neigh_max=4, lmax=4, negative_m=True, reference_frame='neighborhood', orientations=None, rmax_guess=1.0, noise_samples=0, noise_magnitude=0, nlist=None)[source]¶ Compute the neighbor-averaged spherical harmonics over the nearest-neighbor bonds of a set of particles. Returns the absolute value of the (complex) spherical harmonics
Parameters: - neigh_min – Minimum number of neighbor environment sizes to consider
- neigh_max – Maximum number of neighbor environment sizes to consider (inclusive)
- lmax – Maximum spherical harmonic degree l
- negative_m – Include negative m spherical harmonics in the output array?
- reference_frame – ‘neighborhood’: use diagonal inertia tensor reference frame; ‘particle_local’: use the given orientations array; ‘global’: do not rotate
- orientations – Per-particle orientations, only used when reference_frame == ‘particle_local’
- rmax_guess – Initial guess of the distance to find neigh_max nearest neighbors. Only affects algorithm speed.
- noise_samples – Number of random noisy samples of positions to average the result over (disabled if 0)
- noise_magnitude – Magnitude of (normally-distributed) noise to apply to noise_samples different positions (disabled if noise_samples == 0)
- nlist – Freud neighbor list object to use (None to compute for neighbors up to neigh_max)
This function uses the following citations:
@misc{freud2016, title = {freud}, url = {https://doi.org/10.5281/zenodo.166564}, abstract = {First official open-source release, includes a zenodo DOI for citations.}, author = {Harper, Eric S and Spellings, Matthew and Anderson, Joshua A and Glotzer, Sharon C}, month = nov, year = {2016}, doi = {10.5281/zenodo.166564}, } @article{spellings2018, title = {Machine learning for crystal identification and discovery}, volume = {64}, url = {https://dx.doi.org/10.1002/aic.16157}, doi = {10.1002/aic.16157}, number = {6}, journal = {AIChE Journal}, author = {Spellings, Matthew and Glotzer, Sharon C}, year = {2018}, pages = {2198--2206}, }
-
pythia.spherical_harmonics.
abs_system_average
(box, positions, neigh_min=4, neigh_max=4, lmax=4, negative_m=True, reference_frame='neighborhood', orientations=None, rmax_guess=1.0, noise_samples=0, noise_magnitude=0, nlist=None)[source]¶ Compute the global-averaged spherical harmonics over the nearest-neighbor bonds of a set of particles. Returns the absolute value of the (complex) spherical harmonics
Parameters: - neigh_min – Minimum number of neighbor environment sizes to consider
- neigh_max – Maximum number of neighbor environment sizes to consider (inclusive)
- lmax – Maximum spherical harmonic degree l
- negative_m – Include negative m spherical harmonics in the output array?
- reference_frame – ‘neighborhood’: use diagonal inertia tensor reference frame; ‘particle_local’: use the given orientations array; ‘global’: do not rotate
- orientations – Per-particle orientations, only used when reference_frame == ‘particle_local’
- rmax_guess – Initial guess of the distance to find neigh_max nearest neighbors. Only affects algorithm speed.
- noise_samples – Number of random noisy samples of positions to average the result over (disabled if 0)
- noise_magnitude – Magnitude of (normally-distributed) noise to apply to noise_samples different positions (disabled if noise_samples == 0)
- nlist – Freud neighbor list object to use (None to compute for neighbors up to neigh_max)
This function uses the following citations:
@misc{freud2016, title = {freud}, url = {https://doi.org/10.5281/zenodo.166564}, abstract = {First official open-source release, includes a zenodo DOI for citations.}, author = {Harper, Eric S and Spellings, Matthew and Anderson, Joshua A and Glotzer, Sharon C}, month = nov, year = {2016}, doi = {10.5281/zenodo.166564}, } @article{spellings2018, title = {Machine learning for crystal identification and discovery}, volume = {64}, url = {https://dx.doi.org/10.1002/aic.16157}, doi = {10.1002/aic.16157}, number = {6}, journal = {AIChE Journal}, author = {Spellings, Matthew and Glotzer, Sharon C}, year = {2018}, pages = {2198--2206}, }
-
pythia.spherical_harmonics.
bispectrum
(box, positions, neighbors, lmax, rmax_guess=2.0)[source]¶ Computes bispectrum invariants of particle local environments. These are rotationally-invariant descriptions similar to a power spectrum of the spherical harmonics (i.e. steinhardt order parameters), but retaining more information.
Parameters: - neighbors – number of nearest-neighbors to consider for local environments
- lmax – maximum spherical harmonic degree to consider. O(lmax**3) descriptors will be generated.
This function uses the following citations:
@article{kondor2007, title = {A novel set of rotationally and translationally invariant features for images based on the non-commutative bispectrum}, url = {http://arxiv.org/abs/cs/0701127}, journal = {arXiv:cs/0701127}, author = {Kondor, Risi}, month = jan, year = {2007}, } @misc{freud2016, title = {freud}, url = {https://doi.org/10.5281/zenodo.166564}, abstract = {First official open-source release, includes a zenodo DOI for citations.}, author = {Harper, Eric S and Spellings, Matthew and Anderson, Joshua A and Glotzer, Sharon C}, month = nov, year = {2016}, doi = {10.5281/zenodo.166564}, }
-
pythia.spherical_harmonics.
neighbor_average
(box, positions, neigh_min=4, neigh_max=4, lmax=4, negative_m=True, reference_frame='neighborhood', orientations=None, rmax_guess=1.0, noise_samples=0, noise_magnitude=0, nlist=None)[source]¶ Compute the neighbor-averaged spherical harmonics over the nearest-neighbor bonds of a set of particles. Returns the raw (complex) spherical harmonic values.
Parameters: - neigh_min – Minimum number of neighbor environment sizes to consider
- neigh_max – Maximum number of neighbor environment sizes to consider (inclusive)
- lmax – Maximum spherical harmonic degree l
- negative_m – Include negative m spherical harmonics in the output array?
- reference_frame – ‘neighborhood’: use diagonal inertia tensor reference frame; ‘particle_local’: use the given orientations array; ‘global’: do not rotate
- orientations – Per-particle orientations, only used when reference_frame == ‘particle_local’
- rmax_guess – Initial guess of the distance to find neigh_max nearest neighbors. Only affects algorithm speed.
- noise_samples – Number of random noisy samples of positions to average the result over (disabled if 0)
- noise_magnitude – Magnitude of (normally-distributed) noise to apply to noise_samples different positions (disabled if noise_samples == 0)
- nlist – Freud neighbor list object to use (None to compute for neighbors up to neigh_max)
This function uses the following citations:
@misc{freud2016, title = {freud}, url = {https://doi.org/10.5281/zenodo.166564}, abstract = {First official open-source release, includes a zenodo DOI for citations.}, author = {Harper, Eric S and Spellings, Matthew and Anderson, Joshua A and Glotzer, Sharon C}, month = nov, year = {2016}, doi = {10.5281/zenodo.166564}, } @article{spellings2018, title = {Machine learning for crystal identification and discovery}, volume = {64}, url = {https://dx.doi.org/10.1002/aic.16157}, doi = {10.1002/aic.16157}, number = {6}, journal = {AIChE Journal}, author = {Spellings, Matthew and Glotzer, Sharon C}, year = {2018}, pages = {2198--2206}, }
-
pythia.spherical_harmonics.
steinhardt_q
(box, positions, neighbors=12, lmax=6, rmax_guess=2.0)[source]¶ Compute a vector of per-particle Steinhardt order parameters.
Parameters: - neighbors – Number of neighbors (int) or maximum distance to find neighbors within (float)
- lmax – Maximum spherical harmonic degree l
- rmax_guess – Initial guess of the distance to find nearest neighbors, if appropriate. Only affects algorithm speed.
This function uses the following citations:
@misc{freud2016, title = {freud}, url = {https://doi.org/10.5281/zenodo.166564}, abstract = {First official open-source release, includes a zenodo DOI for citations.}, author = {Harper, Eric S and Spellings, Matthew and Anderson, Joshua A and Glotzer, Sharon C}, month = nov, year = {2016}, doi = {10.5281/zenodo.166564}, }
-
pythia.spherical_harmonics.
system_average
(box, positions, neigh_min=4, neigh_max=4, lmax=4, negative_m=True, reference_frame='neighborhood', orientations=None, rmax_guess=1.0, noise_samples=0, noise_magnitude=0, nlist=None)[source]¶ Compute the global-averaged spherical harmonics over the nearest-neighbor bonds of a set of particles. Returns the raw (complex) spherical harmonic values.
Parameters: - neigh_min – Minimum number of neighbor environment sizes to consider
- neigh_max – Maximum number of neighbor environment sizes to consider (inclusive)
- lmax – Maximum spherical harmonic degree l
- negative_m – Include negative m spherical harmonics in the output array?
- reference_frame – ‘neighborhood’: use diagonal inertia tensor reference frame; ‘particle_local’: use the given orientations array; ‘global’: do not rotate
- orientations – Per-particle orientations, only used when reference_frame == ‘particle_local’
- rmax_guess – Initial guess of the distance to find neigh_max nearest neighbors. Only affects algorithm speed.
- noise_samples – Number of random noisy samples of positions to average the result over (disabled if 0)
- noise_magnitude – Magnitude of (normally-distributed) noise to apply to noise_samples different positions (disabled if noise_samples == 0)
- nlist – Freud neighbor list object to use (None to compute for neighbors up to neigh_max)
This function uses the following citations:
@misc{freud2016, title = {freud}, url = {https://doi.org/10.5281/zenodo.166564}, abstract = {First official open-source release, includes a zenodo DOI for citations.}, author = {Harper, Eric S and Spellings, Matthew and Anderson, Joshua A and Glotzer, Sharon C}, month = nov, year = {2016}, doi = {10.5281/zenodo.166564}, } @article{spellings2018, title = {Machine learning for crystal identification and discovery}, volume = {64}, url = {https://dx.doi.org/10.1002/aic.16157}, doi = {10.1002/aic.16157}, number = {6}, journal = {AIChE Journal}, author = {Spellings, Matthew and Glotzer, Sharon C}, year = {2018}, pages = {2198--2206}, }