kups.application.simulations.mcmc_widom
¶
Widom test-particle insertion entry point.
Each cycle runs a displacement-move loop at fixed \(N\) followed by a batch of Widom ghost insertions; cumulative WidomStatistics snapshots are logged per cycle to HDF5 and reduced post-hoc via analyze_widom_file.
Config
¶
Bases: BaseModel
Top-level Widom simulation configuration.
Source code in src/kups/application/simulations/mcmc_widom.py
WidomRunConfig
¶
Bases: BaseModel
Run-time configuration for a plain Widom simulation.
Source code in src/kups/application/simulations/mcmc_widom.py
WidomState
¶
Bases: MCMCState
State for the Widom test-particle simulation.
Inherits all MCMCState fields and adds one accumulator.
Attributes:
| Name | Type | Description |
|---|---|---|
widom_statistics |
Table[SystemId, WidomStatistics]
|
Running sums for the Widom averages (\(\langle W\rangle\), \(\langle UW\rangle\), \(\langle U\rangle\)). |
Source code in src/kups/application/simulations/mcmc_widom.py
init_state(key, config)
¶
Build the batched Widom state via one mcmc_state_from_config call per host.
Source code in src/kups/application/simulations/mcmc_widom.py
142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 | |
make_propagator(state, config)
¶
Init + production propagator pair. Ewald and blocking spheres are
added automatically based on state.is_charged / has_blocking_spheres.
Source code in src/kups/application/simulations/mcmc_widom.py
make_widom_probe_from_state(state, patch_fn, log_probability_ratio_fn)
¶
Plain-Widom probe: ghost insertion + WidomStatistics accumulator.
Bundles the ExchangeMove construction, widom_statistics stat lens,
and _update_widom_stats update callback. patch_fn and
log_probability_ratio_fn are caller-provided (matching the
:func:make_displacement_mcmc_propagator shape) so the same probe works
with a bare Boltzmann ratio (plain Widom) or a fugacity-corrected ratio
(Widom-in-GCMC).
Source code in src/kups/application/simulations/mcmc_widom.py
run(config)
¶
Initialise, warm up, and accumulate Widom statistics.