torchref.base.get_scattering_factor_torch module
- torchref.base.get_scattering_factor_torch.get_scattering_factors(scattering_dict, elements)[source]
- torchref.base.get_scattering_factor_torch.calc_scattering_factors_paramtetrization(parametrization, s, atom_list)[source]
- torchref.base.get_scattering_factor_torch.get_parameterization_extended(df)[source]
Extended parametrization function that handles all atoms in a DataFrame.
Creates a dictionary mapping element symbols (and optionally charges) to their ITC92 parameters (A, B, C). This is optimized for FT-based calculations where we need fast access to parametrization without scattering vectors.
Parameters:
- dfpandas.DataFrame
DataFrame with ‘element’ and ‘charge’ columns
Returns:
- dict{element_str: (A, B, C)}
A: torch.Tensor, shape (1, 4) - amplitude coefficients B: torch.Tensor, shape (1, 4) - width coefficients (Ų) C: torch.Tensor, shape (1,) - constant term
- torchref.base.get_scattering_factor_torch.get_parametrization_for_elements(elements, charges=None)[source]
Get ITC92 parametrization for a list of elements.
Useful for getting parametrization for specific atoms without a full DataFrame.
Parameters:
- elementslist of str
Element symbols (e.g., [‘C’, ‘N’, ‘O’])
- chargeslist of int, optional
Charges for each element (default: all zeros)
Returns:
dict : {element: (A, B, C)}