SpeciesSwapMoveSpec

class jaxrens.cli.schema.moves.SpeciesSwapMoveSpec(*, step_size=0.1, weight=1.0, adaptation_warmup=100, target_acceptance=0.5, name=None, type='species_swap', species=None)[source]

Bases: BaseMoveSpec

Exchange the identities of two atoms of different species.

The kernel draws an unlike pair by construction, so no evaluation is wasted on a same-species draw and the acceptance rate is not capped by the composition.

species restricts the exchange to the named elements:

moves:
  - {type: species_swap, weight: 2}                 # any unlike pair
  - {type: species_swap, species: [Ge, Si]}         # Ge <-> Si only

A scoped move needs at least two distinct elements — a one-element scope has nothing to exchange and is rejected at parse time rather than becoming a silent no-op.

The kernel ignores step_size (a swap has no continuous magnitude), so the inherited step_size / target_acceptance fields do nothing here.

Parameters:
model_config = {'extra': 'forbid', 'frozen': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].