Exemplo n.º 1
0
def null_position_structure(raw_structure) -> Structure:
    """Create and return adapters.Structure with sites that have None values"""
    raw_structure["attributes"]["cartesian_site_positions"][0] = [None] * 3
    if "structure_features" in raw_structure["attributes"]:
        if "unknown_positions" not in raw_structure["attributes"][
                "structure_features"]:
            raw_structure["attributes"]["structure_features"].append(
                "unknown_positions")
    else:
        raw_structure["attributes"]["structure_feature"] = [
            "unknown_positions"
        ]
    return Structure(raw_structure)
Exemplo n.º 2
0
def null_lattice_vector_structure(raw_structure) -> Structure:
    """Create and return adapters.Structure with lattice_vectors that have None values"""
    raw_structure["attributes"]["lattice_vectors"][0] = [None] * 3
    raw_structure["attributes"]["dimension_types"][0] = 0
    raw_structure["attributes"]["nperiodic_dimensions"] = 2
    return Structure(raw_structure)
Exemplo n.º 3
0
def structures(RAW_STRUCTURES) -> List[Structure]:
    """Create and return list of adapters.Structure"""
    return [Structure(_) for _ in RAW_STRUCTURES]
Exemplo n.º 4
0
def structure(raw_structure) -> Structure:
    """Create and return adapters.Structure"""
    return Structure(raw_structure)
def null_species_structure(raw_structure) -> Structure:
    raw_structure["attributes"]["species"] = None
    return Structure(raw_structure)