neighbormodels.interactions.build_model

build_model(neighbor_data: neighbormodels.neighbors.NeighborData, magnetic_patterns: Dict[str, Union[int, float]]) → pandas.core.frame.DataFrame[source]

Builds and returns a data frame describing a pairwise interaction model. The intended use-case for the model is fitting magnetic energies taken from density functional theory calculations and extracting exchange parameters.

Parameters:
  • neighbor_data

    A named tuple with three field names:

    data_frame
    A pandas DataFrame of neighbor counts aggregated over site-index pairs and separation distances.
    bins_data_frame
    A pandas DataFrame of neighbor distances mapped to unique bin intervals.
    structure
    A copy of the Structure object defining the crystal structure.
  • magnetic_patterns – A dictionary of magnetic patterns to be mapped onto the crystal structure and used to compute the interaction coefficients of the model.
Returns:

A pandas DataFrame of the interaction parameter names and coefficients for the pairwise interaction model.