api icon indicating copy to clipboard operation
api copied to clipboard

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

Open xuechuang1999 opened this issue 1 year ago • 1 comments

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

xuechuang1999 avatar Dec 02 '24 14:12 xuechuang1999

@xuechuang1999 thanks for the useful suggestion! Would you be willing to propose some algorithms that leverage MP's existing materials data to produce its bonding type? We would be happy to work with you if you want to contribute your current post-processing code so we can review it for potential usage in our production. P.S this functionality would need to be made in our data pipeline repo emmet along with the api client.

yang-ruoxi avatar Dec 03 '24 20:12 yang-ruoxi