Skip to content

Conversation

@srmnitc
Copy link
Member

@srmnitc srmnitc commented Apr 19, 2025

This pull request introduces several enhancements and refinements to the calphy codebase, focusing on Monte Carlo swap functionality, composition scaling, and input handling. The changes improve functionality, add new features, and refine existing methods. Below is a categorized summary of the most important updates:

Monte Carlo Swap Enhancements

  • Added Monte Carlo swap functionality to run_integration in calphy/alchemy.py, including commands for defining swap groups, performing swap moves, and logging swap details. This feature supports both forward and reverse swaps between specified atom types. [1] [2]
  • Introduced a new MonteCarlo class in calphy/input.py to define parameters for Monte Carlo swap moves, such as the number of swaps, swap types, and whether swaps are reversed. [1] [2]

Composition Scaling Improvements

  • Added a new property entropy_contribution in calphy/composition_transformation.py to calculate the entropy contribution of a transformation.
  • Implemented a get_swap_types method in calphy/composition_transformation.py to determine the atom types involved in swaps.
  • Improved the update_types method in calphy/composition_transformation.py for more efficient handling of atom type updates.

Input Handling and Validation

  • Enhanced input validation in calphy/input.py to support composition scaling and phase diagram modes, including new attributes like phase_name and reference_composition.
  • Added functionality to rename structure files based on unique identifiers during input validation.
  • Integrated tqdm for progress tracking when reading multiple calculations from input files.

Miscellaneous Updates

  • Introduced a new CLI function phase_diagram in calphy/clitools.py for preparing inputs for phase diagram calculations.
  • Added kb from calphy.integrators to calphy/composition_transformation.py for entropy calculations.

These changes collectively enhance the flexibility, usability, and performance of the calphy package.

@srmnitc srmnitc merged commit 5da794f into main Apr 19, 2025
3 checks passed
@srmnitc srmnitc deleted the add_swap branch April 19, 2025 21:00
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.

2 participants