def test_enumerating_sqs_with_lower_order_subl_raises(): """If a lower order sublattice model is passed be enumerated in an SQS, it should raise.""" structure = lat_in_to_sqs(ATAT_FCC_L12_LATTICE_IN) structures = enumerate_sqs(structure, [['Fe'], ['Al']]) assert len(structures) == 1 structure = lat_in_to_sqs(ATAT_FCC_A1_LEV3_LATTICE_IN) structures = enumerate_sqs(structure, [['Fe', 'Ni']]) assert len(structures) == 4
def test_sqs_is_properly_enumerated_for_a_higher_order_sublattice_model(): """Tests that a sublattice model of higher order than an SQS properly enumerated""" structure = lat_in_to_sqs(ATAT_FCC_L12_LATTICE_IN) structures = enumerate_sqs(structure, [['Al', 'Ni'], ['Fe', 'Cr']]) assert len(structures) == 6 structure = lat_in_to_sqs(ATAT_ROCKSALT_B1_LATTICE_IN) structures = enumerate_sqs(structure, [['Al', 'Ni', 'Fe'], ['Fe', 'Ni', 'Cr']]) assert len(structures) == 36
def test_sqs_is_properly_enumerated_for_a_multiple_solution_sublattice_model(): """Tests that a sublattice model with multiple solution sublattices is properly enumerated""" structure = lat_in_to_sqs(ATAT_ROCKSALT_B1_LATTICE_IN) structures = enumerate_sqs(structure, [['Al', 'Ni'], ['Fe', 'Cr']]) assert len(structures) == 9 structure = lat_in_to_sqs(ATAT_ROCKSALT_B1_LATTICE_IN) structures = enumerate_sqs(structure, [['Al', 'Ni'], ['Fe', 'Cr']]) assert len(structures) == 9 assert all([isinstance(s, PRLStructure) for s in structures])
def test_enumerating_sqs_without_symmetry(): structure = lat_in_to_sqs(ATAT_GAMMA_L12_LATTICE_IN) structures = enumerate_sqs(structure, [['Fe', 'Ni', 'Al'], ['Al']]) assert len(structures) == 9