dxtb.components.field.new_efield#
- dxtb.components.field.new_efield(field, device=None, dtype=None)[source]#
Create an instance of the electric field interaction.
- Return type:
- Parameters:
field (Tensor) – Electric field vector consisting of the three cartesian components.
device (torch.device | None, optional) – Device to store the tensor on. If
None(default), the device is inferred from the field argument.dtype (torch.dtype | None, optional) – Data type of the tensor. If
None(default), the data type is inferred from the field argument.
- Returns:
Instance of the electric field interaction.
- Return type:
- Raises:
RuntimeError – Shape of field is not a vector of length 3.
- Parameters: