Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

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:

  1. Reduce. Divide out the ideal density factor to obtain the reduced distribution g~3\tilde{g}_3, which approaches 1.0 in the random limit.

  2. Blur in ϕ\phi. Gaussian convolution along the angular axis with reflected boundaries at ϕ=0\phi = 0 and ϕ=π\phi = \pi. The blur σ\sigma grows linearly with radius:

σϕ(r)=ϕσ,degrσ_atr\sigma_\phi(r) = \frac{\phi_{\sigma,\text{deg}}}{r_{\sigma\text{\_at}}} \cdot r

If r_sigma_at is omitted, phi_sigma_deg is interpreted as the slope directly (σϕ(r)=ϕσ,degr\sigma_\phi(r) = \phi_{\sigma,\text{deg}} \, r).

  1. Blur in rr. 1D Gaussian kernel applied sequentially along r01r_{01} then r02r_{02} (a separable 2D blur). The radial σ\sigma scales with r01r_{01} and r02r_{02} respectively using the same r_sigma / r_sigma_at relation.

  2. Blend toward random. Smooth Hermite cubic interpolation between the blurred crystalline distribution and the random limit:

g~3target=(1m)g~3blurred+m1.0\tilde{g}_3^{\text{target}} = (1 - m) \cdot \tilde{g}_3^{\text{blurred}} + m \cdot 1.0

where the mixing factor transitions from 0 to 1 between target_r_min and target_r_max:

m(reff)=s2(32s),s=clamp(reffrminrmaxrmin,  0,  1)m(r_\text{eff}) = s^2 (3 - 2s), \quad s = \text{clamp}\left(\frac{r_\text{eff} - r_\text{min}}{r_\text{max} - r_\text{min}},\; 0,\; 1\right)

with reff=max(r01,r02)r_\text{eff} = \max(r_{01}, r_{02}).

  1. Un-reduce. Multiply back by the ideal density factor to recover the raw histogram form.

Parameters

ParameterDescription
target_r_minRadius where the transition from crystalline to random begins
target_r_maxRadius where the distribution is fully random
r_sigmaRadial blur width in Å (at r_sigma_at)
r_sigma_atReference radius where the radial blur equals r_sigma
phi_sigma_degAngular 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 g2g_2, using a 1D version of each operation. The target g2 is stored alongside the target g3 in the returned G3Distribution object.