occ
Loading...
Searching...
No Matches
occ::descriptors Namespace Reference

Classes

class  FastNeighborFinder
 Faster neighbor finding using incremental shell approach. More...
struct  PointwiseDistanceDistributionConfig
 Configuration for Pointwise Distance Distribution calculations. More...
class  PointwiseDistanceDistribution
 Pointwise Distance Distribution for crystals. More...
struct  PromoleculeDensityShape
struct  RinseParams
 Hyper-parameters for the RINSE descriptor. More...
struct  ReflectionList
 The reflections the descriptor is built from. More...
class  Rinse
 RINSE – Reciprocal-space INvariant Spectral Embedding. More...
class  SortedKDistances
class  Steinhardt

Typedefs

using PDDConfig = PointwiseDistanceDistributionConfig
using PDD = PointwiseDistanceDistribution
using SortedK1Distance = SortedKDistances<1>
using SortedK5Distances = SortedKDistances<5>
using SortedK10Distances = SortedKDistances<10>
using SortedK20Distances = SortedKDistances<20>
using SortedK50Distances = SortedKDistances<50>
using SortedK100Distances = SortedKDistances<100>

Enumerations

enum class  RinseRadialBasis { CVGaussian , LinGaussian }
 Radial basis for the RINSE descriptor. More...

Functions

template<int MaxK = 256>
void find_multiple_k_nearest (const crystal::Crystal &crystal, const Mat3N &query_points, int k, Mat &out_distances)
 Convenient wrapper for multiple query points.
ReflectionList rinse_reflections (const crystal::Crystal &crystal, const RinseParams &params={})
 Enumerate the resolution sphere and compute reflection intensities.
Mat rinse_radial_basis (Eigen::Ref< const Vec > q, const RinseParams &params)
 Evaluate the radial basis functions.
std::string rinse_hash (Eigen::Ref< const Vec > descriptor, int num_words=default_hash_words)
 A locality-sensitive hash of a descriptor, as pronounceable proquints.
std::vector< bool > rinse_hash_to_bits (std::string_view hash)
 Decode a proquint hash back to its bits, most significant first.

Variables

constexpr const char * rinse_reference_version = "3.2.0"
 Number of proquint words produced by rinse_hash() unless asked otherwise.
constexpr int default_hash_words = 1

Typedef Documentation

◆ PDD

◆ PDDConfig

◆ SortedK100Distances

◆ SortedK10Distances

◆ SortedK1Distance

◆ SortedK20Distances

◆ SortedK50Distances

◆ SortedK5Distances

Enumeration Type Documentation

◆ RinseRadialBasis

Radial basis for the RINSE descriptor.

Both families anchor shell n by index through a single scale factor, so raising n_max extends the descriptor to higher |G| without disturbing the shells already computed.

Enumerator
CVGaussian 

Constant-volume Gaussians ("cv_gaussian"): edges at scale * n^(1/3), each shell spanning an equal volume of reciprocal space, each Gaussian scaled so its q^2-weighted integral is shell-independent.

|G|max = scale * n_max^(1/3).

LinGaussian 

Linearly spaced Gaussians ("lin_gaussian") at scale * n of width scale, row-normalised to a partition of unity.

|G|max = scale * (n_max - 1).

Function Documentation

◆ find_multiple_k_nearest()

template<int MaxK = 256>
void occ::descriptors::find_multiple_k_nearest ( const crystal::Crystal & crystal,
const Mat3N & query_points,
int k,
Mat & out_distances )

Convenient wrapper for multiple query points.

◆ rinse_hash()

std::string occ::descriptors::rinse_hash ( Eigen::Ref< const Vec > descriptor,
int num_words = default_hash_words )

A locality-sensitive hash of a descriptor, as pronounceable proquints.

PCA SimHash: centre and project the descriptor onto the leading principal components of a model fitted to the CSD, take the sign of each coefficient as a bit, and encode each 16 bits as a five-character CVCVC proquint word. Similar structures give the same or a nearby string, e.g. "lusab-babad".

Parameters
descriptora flat 128-element descriptor, as returned by Rinse::compute() with the default parameters
num_wordswords in the output; each carries 16 bits, at most 8 words
Exceptions
std::invalid_argumentif the descriptor is the wrong length or more words are asked for than the bundled model has components.

◆ rinse_hash_to_bits()

std::vector< bool > occ::descriptors::rinse_hash_to_bits ( std::string_view hash)

Decode a proquint hash back to its bits, most significant first.

◆ rinse_radial_basis()

Mat occ::descriptors::rinse_radial_basis ( Eigen::Ref< const Vec > q,
const RinseParams & params )

Evaluate the radial basis functions.

Parameters
q(M,) reciprocal-space magnitudes in A^-1
Returns
(M, n_max) with element (i, n) = R_n(q_i)

◆ rinse_reflections()

ReflectionList occ::descriptors::rinse_reflections ( const crystal::Crystal & crystal,
const RinseParams & params = {} )

Enumerate the resolution sphere and compute reflection intensities.

Structure factors come from direct summation over the unit cell with Waasmaier-Kirfel (1995) X-ray form factors – hydrogen being the bonded Stewart-Davidson-Simpson form factor, see xray_form_factors.h – and Debye-Waller factors from the structure's ADPs. Anomalous dispersion is not modelled.

Exceptions
std::runtime_errorif an element has no tabulated form factor.

Variable Documentation

◆ default_hash_words

int occ::descriptors::default_hash_words = 1
inlineconstexpr

◆ rinse_reference_version

const char* occ::descriptors::rinse_reference_version = "3.2.0"
inlineconstexpr

Number of proquint words produced by rinse_hash() unless asked otherwise.

The rinse-descriptor release whose descriptors and hashes this reproduces.