questions about minimum relative distance and OPsiteFingerprint

Hi

I have questions about minimum relative distance and OPsiteFingerprint.

After I use the minimum relative distance, it simply gives me a set of numbers, but how can I know which number corresponds to which site in the crystal?

Also, after I use OPsiteFingerprint, all I get are a bunch of NaN. I am looking at Si crystals so there should at least some data for tetrahedral sites, but in the output, it is still only NaN. Are there arguments I need to adjust in order to get meaningful data?

Thank you!

Hi jason,

The minimum relative distances are in the same order as the sites in the structure when iterated over. For example:

mrd = MinimumRelativeDistances()
mrd_array = mrd.featurize(structure)[0]

for i in range(len(structure.sites)):
    print("distance {} corresponds to site {}:{}".format(mrd_array[i], i, structure.sites[i]))

Regarding OPSiteFingerprint, could you post the code you are using which is throwing nan? It is working for me, but there may be a bug in the code that we are unaware of.

Thanks,

Alex

···

On Friday, October 26, 2018 at 2:00:11 PM UTC-7, Jason wrote:

Hi

I have questions about minimum relative distance and OPsiteFingerprint.

After I use the minimum relative distance, it simply gives me a set of numbers, but how can I know which number corresponds to which site in the crystal?

Also, after I use OPsiteFingerprint, all I get are a bunch of NaN. I am looking at Si crystals so there should at least some data for tetrahedral sites, but in the output, it is still only NaN. Are there arguments I need to adjust in order to get meaningful data?

Thank you!

Note also that we generally recommend CrystalNNFingerprint.from_preset(“ops”) rather than OPSiteFingerprint. We may deprecate OPSiteFingerprint in a future release as CrystalNNFingerprint is shown to produce more reliable neighbor finding, while retaining the order parameters.

···

Best,
Anubhav

Hi Alex:

The code I’m using is like below:

from matminer.featurizers.site import OPSiteFingerprint
feat=OPSiteFingerprint(dr=0.5,ddr=0.1,dop=0.01)
feat.featurize_dataframe(data,‘structure’,ignore_errors=True)

``

I also use this code for VoronoiFingerprint which doesn’t work as well.

在 2018年10月27日星期六 UTC-5上午12:06:41,a…@lbl.gov写道:

···

Hi jason,

The minimum relative distances are in the same order as the sites in the structure when iterated over. For example:

mrd = MinimumRelativeDistances()
mrd_array = mrd.featurize(structure)[0]

for i in range(len(structure.sites)):
    print("distance {} corresponds to site {}:{}".format(mrd_array[i], i, structure.sites[i]))

Regarding OPSiteFingerprint, could you post the code you are using which is throwing nan? It is working for me, but there may be a bug in the code that we are unaware of.

Thanks,

Alex

On Friday, October 26, 2018 at 2:00:11 PM UTC-7, Jason wrote:

Hi

I have questions about minimum relative distance and OPsiteFingerprint.

After I use the minimum relative distance, it simply gives me a set of numbers, but how can I know which number corresponds to which site in the crystal?

Also, after I use OPsiteFingerprint, all I get are a bunch of NaN. I am looking at Si crystals so there should at least some data for tetrahedral sites, but in the output, it is still only NaN. Are there arguments I need to adjust in order to get meaningful data?

Thank you!

Hi Jason,

It seems like you are using OPSiteFingerprint on structure objects without using the site index.

The featurize function for all site featurizers is:

def featurize(self, struct, idx):

This means the structure and the index must be passed to any featurize_* method.

If you want statistics of the OPSiteFingerprint over all sites in a structure, you should use SiteStatsFingeprint in featurizers.structure.

As Anubhav mentioned in another thread though, it is preferred to use CrystalNNFingerprint instead.

···

On Monday, October 29, 2018 at 8:09:19 AM UTC-7, Jason wrote:

Hi Alex:

The code I’m using is like below:

from matminer.featurizers.site import OPSiteFingerprint
feat=OPSiteFingerprint(dr=0.5,ddr=0.1,dop=0.01)
feat.featurize_dataframe(data,‘structure’,ignore_errors=True)

``

I also use this code for VoronoiFingerprint which doesn’t work as well.

Hi jason,

The minimum relative distances are in the same order as the sites in the structure when iterated over. For example:

mrd = MinimumRelativeDistances()
mrd_array = mrd.featurize(structure)[0]

for i in range(len(structure.sites)):
    print("distance {} corresponds to site {}:{}".format(mrd_array[i], i, structure.sites[i]))

Regarding OPSiteFingerprint, could you post the code you are using which is throwing nan? It is working for me, but there may be a bug in the code that we are unaware of.

Thanks,

Alex

On Friday, October 26, 2018 at 2:00:11 PM UTC-7, Jason wrote:

Hi

I have questions about minimum relative distance and OPsiteFingerprint.

After I use the minimum relative distance, it simply gives me a set of numbers, but how can I know which number corresponds to which site in the crystal?

Also, after I use OPsiteFingerprint, all I get are a bunch of NaN. I am looking at Si crystals so there should at least some data for tetrahedral sites, but in the output, it is still only NaN. Are there arguments I need to adjust in order to get meaningful data?

Thank you!

在 2018年10月27日星期六 UTC-5上午12:06:41,a…@lbl.gov写道:

Also a helpful tip for debugging: ignore_errors=False will tell you what is going wrong. When ignore_errors = True, all errors are ignored and nan is inserted as the value.

So because you are not passing a site index to a Site featurizer, but ignore_errors is True, you are getting all nan.

···

On Monday, October 29, 2018 at 8:09:19 AM UTC-7, Jason wrote:

Hi Alex:

The code I’m using is like below:

from matminer.featurizers.site import OPSiteFingerprint
feat=OPSiteFingerprint(dr=0.5,ddr=0.1,dop=0.01)
feat.featurize_dataframe(data,‘structure’,ignore_errors=True)

``

I also use this code for VoronoiFingerprint which doesn’t work as well.

Hi jason,

The minimum relative distances are in the same order as the sites in the structure when iterated over. For example:

mrd = MinimumRelativeDistances()
mrd_array = mrd.featurize(structure)[0]

for i in range(len(structure.sites)):
    print("distance {} corresponds to site {}:{}".format(mrd_array[i], i, structure.sites[i]))

Regarding OPSiteFingerprint, could you post the code you are using which is throwing nan? It is working for me, but there may be a bug in the code that we are unaware of.

Thanks,

Alex

On Friday, October 26, 2018 at 2:00:11 PM UTC-7, Jason wrote:

Hi

I have questions about minimum relative distance and OPsiteFingerprint.

After I use the minimum relative distance, it simply gives me a set of numbers, but how can I know which number corresponds to which site in the crystal?

Also, after I use OPsiteFingerprint, all I get are a bunch of NaN. I am looking at Si crystals so there should at least some data for tetrahedral sites, but in the output, it is still only NaN. Are there arguments I need to adjust in order to get meaningful data?

Thank you!

在 2018年10月27日星期六 UTC-5上午12:06:41,a…@lbl.gov写道: