Source code for boltz_data.mol._op._transform

from typing import Any, TypeVar

from boltz_data.mol._mol import BZMol

TMol = TypeVar("TMol", bound=BZMol)


[docs] def transform_bzmol(bzmol: TMol, **kwargs: Any) -> TMol: """Create a new BZMol with modified fields by replacing specified attributes.""" return bzmol.__class__(**{**bzmol.model_dump(), **kwargs}) # type: ignore[call-arg]