InterRESpec

class jaxrens.cli.schema.inter_re.InterRESpec(*, flavor='pressure', re_interval=1, n_swap_cycles=1, composition_targets=None, chemical_potentials=None)[source]

Bases: BaseModel

YAML → pydantic → InterREConfig for the inter_re: section.

The "pressure", "xrens", and "semi_grand" flavors are implemented.

For flavor: xrens, composition_targets is required: a list of per-run target compositions (one list-of-ints per run). Each row must sum to the same n_atoms value (validated at runtime when n_atoms and n_runs are known).

For flavor: semi_grand, chemical_potentials is required: a list of per-run per-species chemical potential vectors (one list-of-floats per run). All rows must have the same length (= n_species).

Example YAML (pressure):

inter_re:
  flavor: pressure
  re_interval: 1
  n_swap_cycles: 1

Example YAML (XRENS with 2 runs, 8 atoms each, 2 species):

inter_re:
  flavor: xrens
  re_interval: 1
  n_swap_cycles: 1
  composition_targets:
    - [8, 0]   # run 0: 8 atoms of species 0, 0 of species 1
    - [4, 4]   # run 1: 50/50 mix

Example YAML (semi-grand with 2 runs, 2 species):

inter_re:
  flavor: semi_grand
  re_interval: 1
  n_swap_cycles: 1
  chemical_potentials:
    - [0.0, 0.0]   # run 0: μ for each species
    - [0.5, 1.0]   # run 1
Parameters:
model_config = {'extra': 'forbid', 'frozen': True}

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

to_inter_re_config()[source]

Convert to the frozen InterREConfig dataclass.

Return type:

InterREConfig