Exemplo n.º 1
0
def test_standardize_cell(db_test_app):
    # MgO
    atoms = crystal(
        symbols=[12, 8],
        basis=[[0, 0, 0], [0.5, 0.5, 0.5]],
        spacegroup=225,
        cellpar=[4.21, 4.21, 4.21, 90, 90, 90],
    )
    struct = standardize_cell(
        atoms, symprec=0.01, angle_tolerance=None, to_primitive=True
    )
    dataset = compute_symmetry_dataset(struct, symprec=0.01, angle_tolerance=None)
    assert dataset["number"] == 225
    assert len(dataset["rotations"]) == 48
def standard_ideal_structure(structure, settings):
    atol = settings.get_attribute("angle_tolerance", None)
    return standardize_cell(
        structure, settings["symprec"], atol, to_primitive=False, no_idealize=False
    )