geom.angle()
Measure the angle between three atoms.
Usage
geom.angle(
geo,
keys,
*,
degrees=False,
)Parameters
geo: Geometry-
Geometry.
keys: Sequence[int]-
Indices of the three atoms, with the vertex in the middle.
degrees: bool = False-
If
True, return degrees instead of radians.
Returns
float- The angle, between 0 and pi.
Examples
>>> geo = Geometry(
... symbols=["O", "H", "H"],
... coordinates=[[0, 0, 0], [1, 0, 0], [0, 1, 0]],
... charge=0,
... spin=0,
... )
>>> angle(geo, [1, 0, 2], degrees=True)90.0