Skip to content

[Feature Request]: Add ionic crystal filter for querying structures #946

@xuechuang1999

Description

@xuechuang1999

Problem

Currently, the mp-api does not provide a built-in filter to identify materials based on their crystal type, such as ionic crystals. While I can query materials by formula, band gap, or other properties, there is no direct way to determine whether a material is an ionic crystal. As a result, I need to manually analyze the returned data (e.g., bonding information or material classification) to identify ionic crystals, which is inefficient and impractical for large datasets.

Proposed Solution

  1. Add a filter parameter:
    Introduce a new filter parameter, such as ionic_crystal: True/False, in the mp-api query interface. This parameter would allow users to directly filter materials classified as ionic crystals without needing additional post-processing.

  2. Criteria for classification:
    The classification as an "ionic crystal" could be based on existing data in the Materials Project database. For example:

    • Utilize the ionic bonding percentage (if available) to determine whether a material predominantly features ionic bonding.
    • Leverage the structural data to infer the bonding type, as ionic crystals typically exhibit characteristic coordination environments and bonding patterns.
  3. Implementation ideas:

    • Incorporate a pre-existing algorithm or method for classifying materials by bonding type or crystal type.
    • Alternatively, annotate materials in the database with a property indicating their crystal type (e.g., ionic, covalent, metallic, etc.), which could then be exposed as a queryable field in the API.
  4. Documentation and examples:
    Update the API documentation to explain how the ionic_crystal filter works and provide examples for users to understand its application.

Alternatives

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions