xtalmet.screen module

This module offers screening functions based on validity or stability criteria.

xtalmet.screen.screen_smact(xtals: list[Crystal], dir_intermediate: str | None = None) ndarray[bool]View on GitHub

Screen crystals using SMACT.

Parameters:
  • xtals (list[Crystal]) – List of crystals to screen.

  • dir_intermediate (str | None) – Directory to search for pre-computed screening results. If the pre-computed file does not exist in the directory, it will be saved to the directory for future use. If set to None, no files will be loaded or saved. Default is None.

Returns:

Array indicating which crystals pass the screening.

Return type:

np.ndarray[bool]

References

xtalmet.screen.screen_ehull(xtals: list[Crystal], diagram: Literal['mp_250618', 'mp'] | PatchedPhaseDiagram | str = 'mp_250618', dir_intermediate: str | None = None) ndarray[bool]View on GitHub

Screen crystals using the energy above hull.

Parameters:
  • xtals (list[Crystal]) – List of crystals to screen.

  • diagram (Literal["mp_250618", "mp"] | PatchedPhaseDiagram | str) – A phased diagram to use. If “mp_250618” is specified, the diagram constructed using this function from the MP entries on June 18, 2025, will be used. If “mp” is specified, the diagram will be constructed on the spot. You can also pass your own diagram or a path to it. If the pre-computed screening results (screen_ehull.pkl.gz) exist in dir_intermediate, this argument will be ignored.

  • dir_intermediate (str | None) – Directory to search for pre-computed screening results. If the pre-computed file does not exist in the directory, it will be saved to the directory for future use. If set to None, no files will be loaded or saved. Default is None.

Returns:

Array indicating which crystals pass the screening.

Return type:

np.ndarray[bool]