Understanding the difference between site and Structure featurizers from matminer

Hi, I’m trying to figure out at some level the difference between matminer.featurizers.site and matminer.featurizers.Structure packages. Unfortunately I do not possess too much of materials science knowledge and I have been always working with compositional featurizers until now. I know that both Structure and site featurizers work with pymatgen.core.Structure objects, so I would like to find out the difference in working with a featurizer or the other (or both of them) and at which level this depends on the target we are trying to predict.

Hi @Federico_Ottomano

The site featurizers generate features for an individual site in a crystal structure. For example, you might be interested in one of the oxygen sites in BaTiO3, so you could get features about only that site. The simplest explanation is that most of the time, a site featurizer maps a crystal site (an ion) to a vector of features.

A crystal structure is composed of multiple sites. A structure featurizer gives features aggregated over all the sites. The simplest explanation is that most of the time, a structure featurizer maps a crystal structure (a collection of ions) to a vector of features.

Given that crystal structures are particular arrangements of sites in 3D space, we can also apply most site featurizers to structures using the SiteStatsFeaturizer. The easiest way this is done is mapping a crystal structure to a matrix of features (n_features x n_sites) and then simplifying that matrix down to a constant length vector (so that all samples have the same length of features regardless of their number of sites). Exactly how this is done is based on the particular featurizer you are using.

2 Likes