Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
xuechuang1999 opened this issue Dec 2, 2024 · 1 comment

Comments

@xuechuang1999
Copy link

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

@yang-ruoxi
Copy link
Member

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants