kups.application.mcmc.data
¶
Reusable data types and configuration for rigid-body MCMC simulations.
AdsorbateConfig
¶
Bases: BaseModel
Configuration for a single adsorbate species.
Thermodynamic parameters feed Peng-Robinson EOS for fugacity calculation.
Molecular geometry is defined by positions and symbols; charges,
masses, and atomic numbers are auto-derived from ASE if omitted.
Source code in src/kups/application/mcmc/data.py
acentric_factor
instance-attribute
¶
Acentric factor (dimensionless).
as_particles
property
¶
Convert this adsorbate config into indexed particles with motif data.
atomic_numbers = ()
class-attribute
instance-attribute
¶
Atomic numbers. Derived from symbols via ASE if omitted.
charges = ()
class-attribute
instance-attribute
¶
Partial charges on each atom (e). Defaults to zeros.
critical_pressure
instance-attribute
¶
Critical pressure (Pa) for Peng-Robinson EOS.
critical_temperature
instance-attribute
¶
Critical temperature (K) for Peng-Robinson EOS.
masses = ()
class-attribute
instance-attribute
¶
Atomic masses (amu). Derived from symbols via ASE if omitted.
positions
instance-attribute
¶
Atom positions within the molecule, relative to its centre of mass (Ang).
symbols
instance-attribute
¶
Element symbols for each atom in the molecule.
EwaldCfg
¶
Bases: BaseModel
Ewald summation settings for electrostatic interactions.
Source code in src/kups/application/mcmc/data.py
HostConfig
¶
Bases: BaseModel
Configuration for a single host framework (e.g. zeolite, MOF).
Each host gets its own system with unit cell, thermodynamic conditions, and optional initial adsorbate placement.
Source code in src/kups/application/mcmc/data.py
adsorbate_composition = (1.0,)
class-attribute
instance-attribute
¶
Mole fractions for each adsorbate component (must sum to 1).
adsorbate_interaction = ((0.0,),)
class-attribute
instance-attribute
¶
Binary interaction parameters k_ij (n_ads x n_ads).
cif_file
instance-attribute
¶
Path to the host structure CIF file.
init_adsorbates = (0,)
class-attribute
instance-attribute
¶
Number of initial adsorbates per species to randomly insert.
pressure
instance-attribute
¶
System pressure (Pa).
temperature
instance-attribute
¶
System temperature (K).
unitcell_replication = None
class-attribute
instance-attribute
¶
(nx, ny, nz) replication of the unit cell. Auto-computed if None.
LJConfig
¶
Bases: BaseModel
Lennard-Jones force-field parameters.
Source code in src/kups/application/mcmc/data.py
MCMCGroup
¶
Molecular group state for rigid-body MCMC.
Attributes:
| Name | Type | Description |
|---|---|---|
system |
Index[SystemId]
|
Index mapping each group to its parent system. |
motif |
Index[MotifId]
|
Index mapping each group to its adsorbate species. |
Source code in src/kups/application/mcmc/data.py
labels
property
¶
Group labels derived from motif index.
MCMCParticles
¶
Bases: Particles
Particle state for rigid-body MCMC with group membership.
Attributes:
| Name | Type | Description |
|---|---|---|
group |
Index[GroupId]
|
Index mapping each particle to its molecular group. |
Source code in src/kups/application/mcmc/data.py
MCMCSystems
¶
Per-system thermodynamic state for MCMC simulations.
Attributes:
| Name | Type | Description |
|---|---|---|
unitcell |
UnitCell
|
Unit cell geometry, batched shape |
temperature |
Array
|
Temperature (K), shape |
potential_energy |
Array
|
Total potential energy per system (eV), shape |
log_fugacity |
Array
|
Log fugacity per species (dimensionless), shape |
Source code in src/kups/application/mcmc/data.py
log_activity
property
¶
Log activity: log(fugacity / kT), shape (n_systems, n_species).
MotifParticles
¶
Template particle data for an adsorbate motif (molecule template).
Stores the reference geometry, atomic properties, and species assignment for each atom in an adsorbate molecule. Used as a lookup table during exchange moves to populate new particle data.
Attributes:
| Name | Type | Description |
|---|---|---|
positions |
Array
|
Reference atom positions relative to COM (Ang), shape |
masses |
Array
|
Atomic masses (amu), shape |
atomic_numbers |
Array
|
Atomic numbers, shape |
charges |
Array
|
Partial charges (e), shape |
labels |
Index[Label]
|
Per-atom string labels. |
motif |
Index[MotifId]
|
Index mapping atoms to their species (MotifId). |
Source code in src/kups/application/mcmc/data.py
RunConfig
¶
Bases: BaseModel
Run configuration for MCMC simulation.
Source code in src/kups/application/mcmc/data.py
exchange_prob = 1 / 2
class-attribute
instance-attribute
¶
Ordered move sequence for the palindrome propagator.
num_cycles
instance-attribute
¶
Number of production cycles.
num_warmup_cycles
instance-attribute
¶
Number of warmup cycles (not written to output).
out_file
instance-attribute
¶
Path to the output HDF5 file.
seed = None
class-attribute
instance-attribute
¶
Random seed. None uses a time-based seed.
StressResult
¶
Bases: NamedTuple
Decomposed stress tensor with potential, tail correction, and ideal gas components.
Source code in src/kups/application/mcmc/data.py
mcmc_state_from_config(key, host, adsorbates)
¶
Build per-host MCMC state from ASE Atoms and adsorbate configs.
Host atoms get one group each (sentinel motif). Initial adsorbates
from host.init_adsorbates are placed randomly within the unit cell.
Log activity is computed internally via Peng-Robinson EOS.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
key
|
Array
|
JAX PRNG key for random adsorbate placement. |
required |
host
|
HostConfig
|
Host configuration. |
required |
adsorbates
|
tuple[AdsorbateConfig, ...]
|
Adsorbate species configurations. |
required |
Returns:
| Type | Description |
|---|---|
tuple[Table[ParticleId, MCMCParticles], Table[GroupId, MCMCGroup], Table[SystemId, MCMCSystems], Table[MotifParticleId, MotifParticles]]
|
Tuple of |
Source code in src/kups/application/mcmc/data.py
341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 | |