shnitsel.data.charge_helpers#
Functions#
|
Helper function to guess the charge of a system configuration. |
Module Contents#
- guess_molecular_charge(atXYZ_source, max_range_abs=5)#
Helper function to guess the charge of a system configuration.
Will attempt to make RDKit generate a molecule with various molecular charges starting with the smallest possible absolute values (0) and working upwards to the maximum absolute value of max_range_abs. It will try both negative and positive values.
- Parameters:
atXYZ_source (xr.DataArray | xr.Dataset | ShnitselDataset | TreeNode[Any, xr.DataArray | xr.Dataset | ShnitselDataset]) – The source for positional data. Can either be only the positional data as a DataArray or a full (Shnitsel) dataset.
max_range_abs (int)
- Raises:
RuntimeError – If no charge that makes the system self-consistent could be found in the range.
- Returns:
The charge with the smallest absolute value within the specified range for which rdkit returned a self-consistent molecular state.
- Return type: