A fingerprint for the density of states
- class madas.fingerprints.DOS_fingerprint.DOSFingerprint(name: str = 'DOS', grid_id: str | None = None, grid: ~nomad_dos_fingerprints.grid.Grid | None = None, pass_on_exceptions: bool = False, similarity_function=<function DOS_similarity>)
A DOS fingerprint that uses the NOMAD DOS fingerprint package.
The generation of fingerprints from a Grid object instead of the grid_id is suggested, as it is much faster.
- calculate(energy: List[float] | ndarray, dos: List[float] | ndarray, convert_data: Callable | None = None, **kwargs)
- Calculate the fingerprint. Possible kwargs (and defaults) are:
grid_id = ‘dg_cut:56:-2:7:(-10, 5):56’ unit_cell_volume = 1 n_atoms = 1
- from_material(material: Material, energy_path: str = 'electronic_dos_energies', dos_path: str = 'electronic_dos_values', convert_data: Callable | None = None, **kwargs)
To be defined in child class. Calculate the fingerprint from a Material object.
Expected return value:
- self: Fingerprint
It is expected that the object returns itself after calling calculate.
- classmethod from_nomad_dos_fingerprint(fingerprint: ~nomad_dos_fingerprints.DOSfingerprint.DOSFingerprint, name: str = 'DOS', pass_on_exceptions: bool = False, similarity_function: ~typing.Callable = <function DOS_similarity>) object
Create MADAS DOSFingerprint from NOMAD DOS fingerprint object.
Arguments:
- fingerprint: nomad_dos_fingerprints.DOSFingerprint
nomad_dos_fingerprints.DOSFingerprint object to convert to madas.fingerprints.DOSFingerprint
Keyword arguments:
- name: str
Name of the fingerprint
default: “DOS”
- pass_on_exceptions: bool
Set if fingerprint should pass and return None if an exception occures during calculation of similarities, or raise an Exception.
default: False
- similarity_function: Callable
Similarity function to be used by the fingerprints.
default: madas.fingerprints.DOS_fingerprint.DOS_similarity
Returns:
self: madas.fingerprints.DOS_fingerprint.DOSFingerprint
- plot(show_grid: bool = True, show: bool = True, grid_show_horizontal_only_top: bool = True)
Plot the fingerprint.
Keyword arguments:
- show: bool
Show the plot.
default: True
- show_grid: bool
Show the grid that the fingerpront was created in.
default: True
- grid_show_horizontal_only_top: bool
Show horizonal lines of the grid only on top of the grid. This is useful if the grid is too dense and the visualization does not work well.
default: True
- madas.fingerprints.DOS_fingerprint.DOS_similarity(fingerprint1, fingerprint2)
Compute Tanimoto coefficient (Tc) between two DOS fingerprints.