Skip to main content

rd.set_coordinates()

Set the atomic coordinates, replacing any existing conformers.

Usage

Source

rd.set_coordinates(
    mol,
    coords,
    *,
    in_place=False,
)

Parameters

mol: Mol

RDKit molecule.

coords: FloatArray

Coordinates, shape (N, 3).

in_place: bool = False
If True, modify mol instead of returning a copy.

Returns

Mol
The molecule with the given coordinates.

Raises

ValueError
If coords does not have shape (N, 3).