"""Sets for the MPMorph amorphous workflows."""from__future__importannotationsfromdataclassesimportdataclassfrompymatgen.io.vasp.setsimportMPMDSetfromatomate2.vasp.sets.coreimportMDSetGenerator
[docs]@dataclassclassMPMorphMDSetGenerator(MPMDSet):""" Class to generate VASP molecular dynamics input sets for amorphous materials. This class wraps around pymatgen's `.MPMDSet` by adding sensible ensemble defaults from atomate2's `.MDSetGenerator`. Parameters ---------- ensemble Molecular dynamics ensemble to run. Options include `nvt`, `nve`, and `npt`. start_temp Starting temperature. The VASP `TEBEG` parameter. end_temp Final temperature. The VASP `TEEND` parameter. nsteps Number of time steps for simulations. The VASP `NSW` parameter. spin_polarized Whether to do spin polarized calculations. The VASP ISPIN parameter. Defaults to False. time_step The time step (in femtosecond) for the simulation. The VASP `POTIM` parameter. **kwargs Other keyword arguments that will be passed to :obj:`VaspInputGenerator`. """auto_ismear:bool=Falseauto_kspacing:bool=Trueauto_ispin:bool=Falseauto_lreal:bool=Falseinherit_incar:bool|None=Falseensemble:str="nvt"spin_polarized:bool=Falsetime_step:float=2nsteps:int=2000@propertydefincar_updates(self)->dict:""" Get updates to the INCAR for a molecular dynamics job. Returns ------- dict A dictionary of updates to apply. """updates=super().incar_updatesupdates.update({"LPLANE":True,# may cause performance issues on modern machines"LAECHG":False,"EDIFFG":None,**MDSetGenerator._get_ensemble_defaults(self.structure,self.ensemble),# noqa: SLF001})returnupdates