Skip to content

core

Core recipes for GULP.

relax_job

relax_job(
    atoms: Atoms,
    use_gfnff: bool = True,
    relax_cell: bool = False,
    keywords: list[str] | None = None,
    options: list[str] | None = None,
    library: str | None = None,
    copy_files: (
        SourceDirectory
        | dict[SourceDirectory, Filenames]
        | None
    ) = None,
) -> RunSchema

Carry out a structure relaxation.

Parameters:

  • atoms (Atoms) –

    Atoms object

  • use_gfnff (bool, default: True ) –

    True if (p)GFN-FF should be used; False if not.

  • relax_cell (bool, default: False ) –

    True if the volume should be relaxed; False if not.

  • keywords (list[str] | None, default: None ) –

    List of custom keyword kwargs for the GULP calculator. To remove entries from the defaults, put a # in front of the name. For a list of available keys, refer to the ase.calculators.gulp.GULP calculator.

  • options (list[str] | None, default: None ) –

    Dictionary of custom options kwargs for the GULP calculator. To remove entries from the defaults, put a # in front of the name. For a list of available keys, refer to the ase.calculators.gulp.GULP calculator.

  • library (str | None, default: None ) –

    Filename of the potential library file, if required.

  • copy_files (SourceDirectory | dict[SourceDirectory, Filenames] | None, default: None ) –

    Files to copy (and decompress) from source to the runtime directory.

Returns:

Source code in quacc/recipes/gulp/core.py
@job
def relax_job(
    atoms: Atoms,
    use_gfnff: bool = True,
    relax_cell: bool = False,
    keywords: list[str] | None = None,
    options: list[str] | None = None,
    library: str | None = None,
    copy_files: SourceDirectory | dict[SourceDirectory, Filenames] | None = None,
) -> RunSchema:
    """
    Carry out a structure relaxation.

    Parameters
    ----------
    atoms
        Atoms object
    use_gfnff
        True if (p)GFN-FF should be used; False if not.
    relax_cell
        True if the volume should be relaxed; False if not.
    keywords
        List of custom `keyword` kwargs for the GULP calculator. To remove entries
        from the defaults, put a `#` in front of the name. For a list of
        available keys, refer to the `ase.calculators.gulp.GULP` calculator.
    options
        Dictionary of custom `options` kwargs for the GULP calculator. To remove entries
        from the defaults, put a `#` in front of the name. For a list of
        available keys, refer to the `ase.calculators.gulp.GULP` calculator.
    library
        Filename of the potential library file, if required.
    copy_files
        Files to copy (and decompress) from source to the runtime directory.

    Returns
    -------
    RunSchema
        Dictionary of results from [quacc.schemas.ase.summarize_run][].
        See the type-hint for the data structure.
    """
    keyword_defaults = ["opti", "conp" if relax_cell else "conv"]
    if use_gfnff:
        keyword_defaults += ["gfnff", "gwolf"]

    option_defaults = ["dump every gulp.res"]

    return run_and_summarize(
        atoms,
        library=library,
        keyword_defaults=keyword_defaults,
        option_defaults=option_defaults,
        keyword_swaps=keywords,
        option_swaps=options,
        additional_fields={"name": "GULP Relax"},
        copy_files=copy_files,
    )

static_job

static_job(
    atoms: Atoms,
    use_gfnff: bool = True,
    keywords: list[str] | None = None,
    options: list[str] | None = None,
    library: str | None = None,
    copy_files: (
        SourceDirectory
        | dict[SourceDirectory, Filenames]
        | None
    ) = None,
) -> RunSchema

Carry out a single-point calculation.

Parameters:

  • atoms (Atoms) –

    Atoms object

  • use_gfnff (bool, default: True ) –

    True if (p)GFN-FF should be used; False if not.

  • keywords (list[str] | None, default: None ) –

    List of custom keyword kwargs for the GULP calculator. To remove entries from the defaults, put a # in front of the name. For a list of available keys, refer to the ase.calculators.gulp.GULP calculator.

  • options (list[str] | None, default: None ) –

    List of custom options kwargs for the GULP calculator. To remove entries from the defaults, put a # in front of the name. For a list of available keys, refer to the ase.calculators.gulp.GULP calculator.

  • library (str | None, default: None ) –

    Filename of the potential library file, if required.

  • copy_files (SourceDirectory | dict[SourceDirectory, Filenames] | None, default: None ) –

    Files to copy (and decompress) from source to the runtime directory.

Returns:

Source code in quacc/recipes/gulp/core.py
@job
def static_job(
    atoms: Atoms,
    use_gfnff: bool = True,
    keywords: list[str] | None = None,
    options: list[str] | None = None,
    library: str | None = None,
    copy_files: SourceDirectory | dict[SourceDirectory, Filenames] | None = None,
) -> RunSchema:
    """
    Carry out a single-point calculation.

    Parameters
    ----------
    atoms
        Atoms object
    use_gfnff
        True if (p)GFN-FF should be used; False if not.
    keywords
        List of custom `keyword` kwargs for the GULP calculator. To remove entries
        from the defaults, put a `#` in front of the name. For a list of
        available keys, refer to the `ase.calculators.gulp.GULP` calculator.
    options
        List of custom `options` kwargs for the GULP calculator. To remove entries
        from the defaults, put a `#` in front of the name. For a list of
        available keys, refer to the `ase.calculators.gulp.GULP` calculator.
    library
        Filename of the potential library file, if required.
    copy_files
        Files to copy (and decompress) from source to the runtime directory.

    Returns
    -------
    RunSchema
        Dictionary of results from [quacc.schemas.ase.summarize_run][].
        See the type-hint for the data structure.
    """
    keyword_defaults = ["gfnff", "gwolf"] if use_gfnff else []
    option_defaults = ["dump every gulp.res"]

    return run_and_summarize(
        atoms,
        library=library,
        keyword_defaults=keyword_defaults,
        option_defaults=option_defaults,
        keyword_swaps=keywords,
        option_swaps=options,
        additional_fields={"name": "GULP Static"},
        copy_files=copy_files,
    )