[WIP] Add GBCalc class for Grain Boundary Energy Calculation#111
[WIP] Add GBCalc class for Grain Boundary Energy Calculation#111atulcthakur wants to merge 8 commits intomaterialyzeai:mainfrom
GBCalc class for Grain Boundary Energy Calculation#111Conversation
|
When will this be done? |
GBCalc class for computing Grain Boundary EnergeticsGBCalc class for Grain Boundary Energy Calculation
rul048
left a comment
There was a problem hiding this comment.
Thank you for your contribution, Atul.
The test failure in test_GB_calc_basic seems to be caused by using an invalid input parameter, sigma=1, which physically corresponds to a perfect crystal rather than a grain boundary. In this case, GrainBoundaryGenerator.get_rotation_angle_from_sigma() returns no valid CSL configuration and raises a RuntimeError. To fix this, the test should use a physically meaningful ∑ value such as 3, 5, or 7. Alternatively, GBCalc can include a check to raise a clearer error or skip execution when sigma <= 1, ensuring the workflow only runs for valid grain boundary configurations.
Also, could you please run ruff check .py and ruff format .py to check and clear any style issues, and then use mypy .py to catch potential type inconsistencies? These steps can usually resolve linting issues.
|
Hi all, |
Signed-off-by: Shyue Ping Ong <shyuep@users.noreply.github.com>
Summary
Description
This PR introduces the
GBCalcclass, which provides a high-level interface for calculating grain boundary energies of crystalline materials usingPESCalculatorand Pymatgen structures. It supports:GrainBoundaryGenerator.RelaxCalc.Key Features
calc_gbs: Generates GB structures from user input, relaxes bulk structure and stores bulk energy/state.calc: Computes GB energy using stored bulk reference. Relax GB.calc_many: Override basecalc_many. Parallel version ofcalcto handle multiple slab entries.RelaxCalcand ASE optimizers.Todos
If this is work in progress, what else needs to be done?
Checklist
ruff.mypy.duecredit@due.dcitedecorators to reference relevant papers by DOI (example)