ForceFieldRelaxMaker¶
- class atomate2.forcefields.jobs.ForceFieldRelaxMaker(name='Force field relax', calculator_kwargs=<factory>, ionic_step_data=('energy', 'forces', 'magmoms', 'stress', 'mol_or_struct'), store_trajectory=StoreTrajectoryOption.NO, tags=None, relax_cell=True, fix_symmetry=False, symprec=0.01, steps=500, relax_kwargs=<factory>, optimizer_kwargs=<factory>, force_field_name=MLFF.Forcefield, task_document_kwargs=<factory>)[source]¶
Bases:
AseRelaxMaker
Base Maker to calculate forces and stresses using any force field.
Should be subclassed to use a specific force field. By default, the code attempts to use the self.force_field_name attr to look up a predefined forcefield. To overwrite this behavior, redefine self.calculator.
- Parameters:
name (str) – The job name.
force_field_name (str or .MLFF) – The name of the force field.
relax_cell (bool = True) – Whether to allow the cell shape/volume to change during relaxation.
fix_symmetry (bool = False) – Whether to fix the symmetry during relaxation. Refines the symmetry of the initial structure.
symprec (float | None = 1e-2) – Tolerance for symmetry finding in case of fix_symmetry.
steps (int) – Maximum number of ionic steps allowed during relaxation.
relax_kwargs (dict) – Keyword arguments that will get passed to
AseRelaxer.relax
.optimizer_kwargs (dict) – Keyword arguments that will get passed to
AseRelaxer()
.calculator_kwargs (dict) – Keyword arguments that will get passed to the ASE calculator.
ionic_step_data (tuple[str,...] or None) – Quantities to store in the TaskDocument ionic_steps. Possible options are “struct_or_mol”, “energy”, “forces”, “stress”, and “magmoms”. “structure” and “molecule” are aliases for “struct_or_mol”.
store_trajectory (emmet .StoreTrajectoryOption = "no") – Whether to store trajectory information (“no”) or complete trajectories (“partial” or “full”, which are identical).
task_document_kwargs (dict (deprecated)) – Additional keyword args passed to
ForceFieldTaskDocument()
.
- make(structure, prev_dir=None)[source]¶
Perform a relaxation of a structure using a force field.
- Parameters:
structure (.Structure) – pymatgen structure.
prev_dir (str or Path or None) –
- A previous calculation directory to copy output files from. Unused, just
added to match the method signature of other makers.
- Return type:
- property calculator: Calculator¶
ASE calculator, can be overwritten by user.