Particle mixture

A Mixture is a probabilistic particle: at each placement, it resolves to one of its configured particle types — the possible outcomes — with probabilities given by the (internally normalized) abundance weights. This is especially suited to uncorrelated compositional disorder: random substitutions at lattice sites, or species mixing in dilute distributions.

mix = ba.Mixture()
mix.addParticle(particle_1, 0.8)
mix.addParticle(particle_2, 0.2)

mix.nbrParticles() returns the number of added particle alternatives (2 here), regardless of their abundance weights.

Equal abundances may also be expressed without normalization:

mix.addParticle(particle_1, 1)
mix.addParticle(particle_2, 1)

A Mixture can be used as the particle in Dilute2D or as the basis particle of an ordered structure such as RadialParacrystal.

A Mixture can also appear inside other particles: as a component of a Compound, as the core of a CoreAndShell, or as the basis of a Mesocrystal. The random choice is then made independently for each instance of the enclosing particle, e.g. for each lattice site of a mesocrystal. A mesocrystal computed with the reciprocal-space sum requires a basis without Mixture.

Physics

Compared with Compound, which coherently sums the form factors of its constituents at fixed positions, Mixture represents the incoherent case: each particle type contributes to the scattered intensity independently, weighted by its abundance, with no interference between different types.

Examples