Skip to content

Commit

Permalink
added a MlffVaspLobsterMaker
Browse files Browse the repository at this point in the history
  • Loading branch information
QuantumChemist committed Jan 25, 2025
1 parent ff9f938 commit f05cad0
Showing 1 changed file with 52 additions and 4 deletions.
56 changes: 52 additions & 4 deletions src/atomate2/vasp/flows/lobster.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,9 @@

if TYPE_CHECKING:
from pathlib import Path

from pymatgen.core import Structure

from atomate2.vasp.jobs.base import BaseVaspMaker
from atomate2.forcefields.jobs import ForceFieldRelaxMaker


LOBSTER_UNIFORM_MAKER = UniformBandStructureMaker(
Expand Down Expand Up @@ -67,13 +66,13 @@
@dataclass
class VaspLobsterMaker(Maker):
"""
Maker to perform a Lobster computation.
Maker to perform VASP and LOBSTER computations.
The calculations performed are:
1. Optional optimization.
2. Static calculation with ISYM=0.
3. Several Lobster computations testing several basis sets are performed.
3. Several LOBSTER computations testing several basis sets are performed.
.. Note::
Expand Down Expand Up @@ -186,3 +185,52 @@ def make(
jobs.append(delete_wavecars)

return Flow(jobs, output=lobster_jobs.output)


@dataclass
class MlffVaspLobsterMaker(VaspLobsterMaker):
"""
Maker to perform MLFF, VASP and LOBSTER computations.
The calculations performed are:
1. MLFF based optimization.
2. Static calculation with ISYM=0 (to generate a WAVECAR file).
3. Several LOBSTER computations testing several basis sets are performed.
.. Note::
The basis sets can only be changed with yaml files.
Parameters
----------
name : str
Name of the flows produced by this maker.
relax_maker : .ForceFieldRelaxMaker
A MLFF based maker to perform a relaxation on the bulk.
lobster_static_maker : .BaseVaspMaker
A maker to perform the computation of the wavefunction before the static run.
Cannot be skipped. It can be LOBSTERUNIFORM or LobsterStaticMaker()
lobster_maker : .LobsterMaker
A maker to perform the Lobster run.
delete_wavecars : bool
If true, all WAVECARs will be deleted after the run.
address_min_basis : str
A path to a yaml file including basis set information.
address_max_basis : str
A path to a yaml file including basis set information.
"""

name: str = "mlff_lobster"
relax_maker: ForceFieldRelaxMaker = field(
default_factory=lambda: ForceFieldRelaxMaker(
force_field_name="CHGNet", relax_kwargs={"fmax": 0.00001}
)
)
lobster_static_maker: BaseVaspMaker = field(
default_factory=lambda: LOBSTER_UNIFORM_MAKER
)
lobster_maker: LobsterMaker | None = field(default_factory=LobsterMaker)
delete_wavecars: bool = True
address_min_basis: str | None = None
address_max_basis: str | None = None

0 comments on commit f05cad0

Please sign in to comment.