Target g3 Construction¶
A target g3 distribution represents the desired structural correlations for a supercell. It is built from a crystalline reference measurement by blurring and blending toward the random limit. Target construction is independent of supercell generation and is used for comparison.
Construction pipeline¶
Starting from a measured crystalline g3:
Reduce. Divide out the ideal density factor to obtain the reduced distribution \(\tilde{g}_3\), which approaches 1.0 in the random limit.
Blur in \(\phi\). Gaussian convolution along the angular axis with reflected boundaries at \(\phi = 0\) and \(\phi = \pi\). The blur \(\sigma\) grows linearly with radius:
If r_sigma_at is omitted, phi_sigma_deg is interpreted as the
slope directly (\(\sigma_\phi(r) = \phi_{\sigma,\text{deg}} \, r\)).
Blur in \(r\). 1D Gaussian kernel applied sequentially along \(r_{01}\) then \(r_{02}\) (a separable 2D blur). The radial \(\sigma\) scales with \(r_{01}\) and \(r_{02}\) respectively using the same
r_sigma / r_sigma_atrelation.Blend toward random. Smooth Hermite cubic interpolation between the blurred crystalline distribution and the random limit:
where the mixing factor transitions from 0 to 1 between target_r_min and target_r_max:
with \(r_\text{eff} = \max(r_{01}, r_{02})\).
Un-reduce. Multiply back by the ideal density factor to recover the raw histogram form.
Parameters¶
Parameter |
Description |
|---|---|
|
Radius where the transition from crystalline to random begins |
|
Radius where the distribution is fully random |
|
Radial blur width in Å (at |
|
Reference radius where the radial blur equals |
|
Angular blur width in degrees (at |
Usage¶
Target construction is a pure G3Distribution operation with no dependence on Supercell:
dist = tc.G3Distribution(atoms)
dist.measure_g3(
r_max=10,
r_step=0.1,
phi_num_bins=90,
)
target = dist.target_g3(
target_r_min=5.0,
target_r_max=8.0,
r_sigma=0.05,
r_sigma_at=2.34,
phi_sigma_deg=3.0,
)
# View the target
target.plot_g3()
# Use for comparison after generating a supercell
cell = tc.Supercell(
target,
cell_dim_angstroms=(40, 40, 40),
)
cell.generate(shell_target, grain_size=15.0)
cell.measure_g3()
cell.plot_g3_compare()
The g2 pair distribution¶
The same blurring and blending pipeline is also applied to the pair distribution \(g_2\), using a 1D version of each operation. The target g2 is stored alongside the target g3 in the returned G3Distribution object.