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 , which approaches 1.0 in the random limit.
Blur in . Gaussian convolution along the angular axis with reflected boundaries at and . The blur grows linearly with radius:
If r_sigma_at is omitted, phi_sigma_deg is interpreted as the
slope directly ().
Blur in . 1D Gaussian kernel applied sequentially along then (a separable 2D blur). The radial scales with and 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 .
Un-reduce. Multiply back by the ideal density factor to recover the raw histogram form.
Parameters¶
| Parameter | Description |
|---|---|
target_r_min | Radius where the transition from crystalline to random begins |
target_r_max | Radius where the distribution is fully random |
r_sigma | Radial blur width in Å (at r_sigma_at) |
r_sigma_at | Reference radius where the radial blur equals r_sigma |
phi_sigma_deg | Angular blur width in degrees (at r_sigma_at) |
Usage¶
Target construction is a pure G3Distribution operation with no dependence on Supercell:
dist = am.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 = am.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 , using a 1D version of each operation. The target g2 is stored alongside the target g3 in the returned G3Distribution object.