Skip to content

random structure generation#7

Merged
bjmorgan merged 2 commits intomainfrom
dev
Nov 27, 2025
Merged

random structure generation#7
bjmorgan merged 2 commits intomainfrom
dev

Conversation

@bjmorgan
Copy link
Copy Markdown
Owner

Adds the ability to generate N random symmetry-inequivalent configurations without full enumeration, useful when the configuration space is too large to enumerate completely.

New Features

  • ConfigurationSpace.random_unique_configurations() - generate N random unique configurations
  • random_unique_structure_substitutions() - pymatgen interface for random structure generation
  • Two sampling modes:
    • degeneracy_weighted (default): high-degeneracy configurations more likely to be sampled
    • uniform: equal probability for each equivalence class
  • Reproducible results via seed parameter

Documentation

  • New user guide: random_sampling.ipynb

Tests

  • Unit tests for ConfigurationSpace.random_unique_configurations() and helpers
  • Unit tests for random_unique_structure_substitutions()
  • Integration tests for both

@bjmorgan bjmorgan merged commit 2ee022c into main Nov 27, 2025
17 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant