add_driving_field
- Model.add_driving_field(driving_field, target_spins=None)
Add a driving field to the model.
- Parameters:
driving_field (
BaseDrivingField) – Driving field instance to attach.target_spins (
str|Sequence[str] |None) – Optional override of the spins driven by the field.Nonekeeps or sets the field to act on all spins. Providing a value replaces any existing target list and emits a warning when it changes.
- Raises:
SimphonyError – If a driving field with the same name is already registered.
SimphonyError – If the (possibly overridden) targets reference spins that are not part of the model.