from typing import Tuple
from typing import Dict
from typing import Any


def _build_optimiser_settings(
    dihedral: Tuple[int, int, int, int], dihedral_angle: float
) -> Dict[str, Any]:
    """
    Build up the optimiser settings dict which will be merged into the keywords to control the optimisation.
    """
    constraints = {
        "set": [{"type": "dihedral", "indices": dihedral, "value": dihedral_angle}]
    }
    optimiser_extras = {
        "coordsys": "dlc",
        "reset": True,
        "qccnv": True,
        "convergence_set": "gau",
        "constraints": constraints,
        "enforce": 0.1,
        "epsilon": 0.0,
    }
    return optimiser_extras