-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add tests for magnetism The Base FHI-aims schemas will also have to be modified * ADd magnetism job for FHI-aims * Modify the Aims Schemas to run with magnetism workflows * Add magnetic ordering support for FHI-aims This is approximate as magnetic properties in aims are only done approximately * Add magnetic ordering jobs Facilitates calculations via making default InputSet Generators * Update to pymatgen 2024.9.10 for new aims interface * fix lint error * Default phonon tests no longer needed with latest pymatge * Remove properties in ASE jobs test output.structure.properties is filled, fcc_ne_structure does not the equality assertion is therefore false * Fix ASE jobs test * Update src/atomate2/aims/schemas/calculation.py Co-authored-by: J. George <JaGeo@users.noreply.github.com> --------- Co-authored-by: J. George <JaGeo@users.noreply.github.com>
- Loading branch information
1 parent
4944aed
commit 480f75e
Showing
51 changed files
with
201,644 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
"""Define Makers for Magnetic ordering flow in FHI-aims.""" | ||
|
||
from __future__ import annotations | ||
|
||
from dataclasses import dataclass, field | ||
from typing import TYPE_CHECKING | ||
|
||
from pymatgen.io.aims.sets.magnetism import ( | ||
MagneticRelaxSetGenerator, | ||
MagneticStaticSetGenerator, | ||
) | ||
|
||
if TYPE_CHECKING: | ||
from pymatgen.io.aims.sets.base import AimsInputGenerator | ||
|
||
|
||
from atomate2.aims.jobs.core import RelaxMaker, StaticMaker | ||
|
||
|
||
@dataclass | ||
class MagneticStaticMaker(StaticMaker): | ||
"""Maker to create FHI-aims SCF jobs. | ||
Parameters | ||
---------- | ||
calc_type: str | ||
The type key for the calculation | ||
name: str | ||
The job name | ||
input_set_generator: .AimsInputGenerator | ||
The InputGenerator for the calculation | ||
""" | ||
|
||
calc_type: str = "magnetic_scf" | ||
name: str = "Magnetic SCF Calculation" | ||
input_set_generator: AimsInputGenerator = field( | ||
default_factory=MagneticStaticSetGenerator | ||
) | ||
|
||
|
||
@dataclass | ||
class MagneticRelaxMaker(RelaxMaker): | ||
"""Maker to create relaxation calculations. | ||
Parameters | ||
---------- | ||
calc_type: str | ||
The type key for the calculation | ||
name: str | ||
The job name | ||
input_set_generator: .AimsInputGenerator | ||
The InputGenerator for the calculation | ||
""" | ||
|
||
calc_type: str = "relax" | ||
name: str = "Magnetic Relaxation calculation" | ||
input_set_generator: AimsInputGenerator = field( | ||
default_factory=MagneticRelaxSetGenerator | ||
) | ||
|
||
@classmethod | ||
def fixed_cell_relaxation(cls, *args, **kwargs) -> RelaxMaker: | ||
"""Create a fixed cell relaxation maker.""" | ||
return cls( | ||
input_set_generator=MagneticRelaxSetGenerator( | ||
*args, relax_cell=False, **kwargs | ||
), | ||
name=cls.name + " (fixed cell)", | ||
) | ||
|
||
@classmethod | ||
def full_relaxation(cls, *args, **kwargs) -> RelaxMaker: | ||
"""Create a full relaxation maker.""" | ||
return cls( | ||
input_set_generator=MagneticRelaxSetGenerator( | ||
*args, relax_cell=True, **kwargs | ||
) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.