ai4materials.descriptors.prdf module

class ai4materials.descriptors.prdf.PRDF(configs=None, cutoff_radius=20, rdf_only=False)[source]

Bases: ai4materials.descriptors.base_descriptor.Descriptor

Compute the partial radial distribution of a given crystal structure.

Cell vectors v1,v2,v3 with values in the columns: [[v1x,v2x,v3x],[v1y,v2y,v3x],[v1z,v2z,v3z]]

Parameters:

cutoff_radius: float, optional (default=20)
Atoms within a sphere of cut-off radius (in Angstrom) are considered.
rdf_only: bool, optional (defaults=`False`)
If False calculates partial radial distribution function. If True calculates radial distribution function (all atom types are considered as the same)

Code author: Fawzi Mohamed <mohamed@fhi-berlin.mpg.de> and Angelo Ziletti <angelo.ziletti@gmail.com>

calculate(structure, **kwargs)[source]

Calculate the descriptor for the given ASE structure.

Parameters:

structure: ase.Atoms object
Atomic structure.

Code author: Fawzi Mohamed <mohamed@fhi-berlin.mpg.de>

write(structure, tar, op_id=0, write_geo=True, format_geometry='aims')[source]

Write the descriptor to file.

Parameters:

structure: ase.Atoms object
Atomic structure.
tar: TarFile object
TarFile archive where the descriptor is added. This is created internally with tarfile.open.
op_id: int, optional (default=0)
Number of the applied operation to the descriptor. At present always set to zero in the code.
write_geo: bool, optional (default=`True`)
If True, write a coordinate file of the structure for which the diffraction pattern is calculated.

Code author: Angelo Ziletti <angelo.ziletti@gmail.com>

ai4materials.descriptors.prdf.get_design_matrix(structures, total_bins=50, max_dist=25)[source]

Starting from atomic structures calculate the design matrix for the partial radial distribution function.

The list of structures must contain the calculated ai4materials.descriptors.prdf.PRDF. The discretization is performed using a logarithmic grid as follows:

bins = np.logspace(0, np.log10(max_dist), num=total_bins + 1) - 1

Parameters:

structures: ase.Atoms object or list of ase.Atoms object
Atomic structure or list of atomic structure.
total_bins: int, optional (default=50)
Total number of bins to be used in the discretization of the partial radial distribution function.
max_dist: float, optional (default=25)
Maximum distance to consider in the partial radial distribution function when the design matrix is calculated. Unit in Angstrom. The unit of measure is the same as ai4materials.descriptors.prdf.PRDF.

Return:

scipy.sparse.csr.csr_matrix, shape [n_samples, largest_atomic_nb * largest_atomic_nb * total_bins]
Returns a sparse row-compressed matrix.

Code author: Angelo Ziletti <angelo.ziletti@gmail.com>

ai4materials.descriptors.prdf.get_unique_chemical_species(structures)[source]

Get the set of unique chemical species from a list of atomic structures.

The list of structures must contain the calculated ai4materials.descriptors.prdf.PRDF.

Parameters:

structures: ase.Atoms object or list of ase.Atoms objects
Atomic structure or list of atomic structure.

Code author: Angelo Ziletti <angelo.ziletti@gmail.com>