## geom.dihedral()


Measure the dihedral angle between four atoms.


Usage

``` python
geom.dihedral(
    geo,
    keys,
    *,
    degrees=False,
)
```


Looking down the 2-3 bond, the angle is positive when atom 4 is rotated clockwise from atom 1.


## Parameters


`geo: Geometry`  
Geometry.

`keys: Sequence[int]`  
Indices of the four atoms.

`degrees: bool = ``False`  
If `True`, return degrees instead of radians.


## Returns


`float`  
The dihedral angle, between -pi and pi.


## Examples

``` python
    >>> geo = Geometry(
    ...     symbols=["H", "O", "O", "H"],
    ...     coordinates=[[0, 0, 1], [0, 0, 0], [0, 1, 0], [1, 1, 0]],
    ...     charge=0,
    ...     spin=0,
    ... )
    >>> dihedral(geo, [0, 1, 2, 3], degrees=True)
```

    90.0
