PhasesResearchLab / prlworkflows

High-throughput workflows and scripts for the Phases Research Lab with atomate
MIT License
4 stars 3 forks source link

ENH: Add equivalence to SQS object #8

Closed bocklund closed 7 years ago

bocklund commented 7 years ago

Equivalence is tested by checking that the sublattice configuration, occupancies, and site ratios are equal.

This does not handle cases where the indices of the sublattices are different:

    config_1 = [['A', 'B'], ['A']]
    occupancy_1 = [[0.25, 0.75], [1]]
    site_ratios_1 = [3, 1]

    config_2 = [['A'], ['A', 'B']]
    occupancy_2 = [[1], [0.25, 0.75]]
    site_ratios_2 = [1, 3]

or cases where the case where the elements in a sublattice are ordered differently:

    config_1 = [['A', 'B'], ['A']]
    occupancy_1 = [[0.25, 0.75], [1]]
    site_ratios_1 = [3, 1]

    config_2 = [['B', 'A'], ['A']]
    occupancy_2 = [[0.75, 0.25], [1]]
    site_ratios_2 = [3, 1]

But there are failing (skipped) tests to verify this behavior