SOAP featurizer - 'str' object has no attribute 'composition'

Hi there,

I am trying to use the SOAP featurizer you have implemented recently (thanks guys!), but I am getting error messages complaining there is no ‘composition’ attribute in the Structure object. However, I haven’t been able to figure out how to include ‘composition’ in a pymatgen Structure object - or perhaps I am misunderstanding something here.

I am attaching here a screen grab.

Many thanks,

Linjiang

Hello Linjiang,

The “fit” operations in matminer require the data as input, which is different than the “featurize_dataframe” operation that takes the name of the column.

Try changing:

“soap_fit.fit(strucs_dataset, ‘Structure_obj’)”

to

“soap_fit.fit(strucs_dataset[‘Structure_obj’])”

Best,

Logan

···

From: [email protected]
Sent: Sunday, May 5, 2019 4:28 AM
To: matminer
Subject: SOAP featurizer - ‘str’ object has no attribute ‘composition’

Hi there,

I am trying to use the SOAP featurizer you have implemented recently (thanks guys!), but I am getting error messages complaining there is no ‘composition’ attribute in the Structure object. However, I haven’t been able to figure out how to include ‘composition’ in a pymatgen Structure object - or perhaps I am misunderstanding something here.

I am attaching here a screen grab.

Many thanks,

Linjiang

Screenshot from 2019-05-05 10-26-34.png


You received this message because you are subscribed to the Google Groups “matminer” group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Hi Logan,

Thanks a lot for your quick reply - greatly appreciated.

I have changed it as advised, but I am seeing a different error as shown below, which is all I use to set a SOAP featurize (I must have missed something here)…

Many thanks,

Linjiang

···

From: Logan Ward [email protected]

Sent: 06 May 2019 14:26

To: Chen, Linjiang; matminer

Subject: RE: SOAP featurizer - ‘str’ object has no attribute ‘composition’

Hello Linjiang,

The “fit” operations in matminer require the data as input, which is different than the “featurize_dataframe” operation that takes the name of the column.

Try changing:

“soap_fit.fit(strucs_dataset, ‘Structure_obj’)”

to

“soap_fit.fit(strucs_dataset[‘Structure_obj’])”

Best,

Logan

From: [email protected]mailto:[email protected]

Sent: Sunday, May 5, 2019 4:28 AM

To: matminermailto:[email protected]

Subject: SOAP featurizer - ‘str’ object has no attribute ‘composition’

Hi there,

I am trying to use the SOAP featurizer you have implemented recently (thanks guys!), but I am getting error messages complaining there is no ‘composition’ attribute in the Structure object. However, I haven’t been able to figure out how to include ‘composition’
in a pymatgen Structure object - or perhaps I am misunderstanding something here.

I am attaching here a screen grab.

Many thanks,

Linjiang

[Screenshot from 2019-05-05 10-26-34.png]

You received this message because you are subscribed to the Google Groups “matminer” group.

To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]mailto:[email protected].

For more options, visit https://groups.google.com/d/optout.

Hi Linjiang,

What version of dscribe are you using?

If you look in the requirements-optional.txt file in matminer we specify the version we use: dscribe==0.1.8

If you are using a newer version of dscribe which does not have the “normalize” argument for SOAP, this will be the source of the error. If this is the case, we would appreciate a pull request on the matminer repo to reflect changes in newer versions of dscribe!

Thanks,

Alex

Hi Linjiang

I also just want to clarify that SOAP was implemented by the dscribe team (https://arxiv.org/abs/1904.08875 , https://github.com/SINGROUP/dscribe/) and matminer just adds a wrapper around dscribe for this descriptor. If you do use this code, please make sure to credit and cite the dscribe team’s effort.

I’ve also updated the implementors list and citations() function for the SOAP descriptor to better convey this.

Hope it all works now!

···

On Tuesday, May 7, 2019 at 9:05:40 AM UTC-7, Logan Ward wrote:

Hello Linjiang,

The “fit” operations in matminer require the data as input, which is different than the “featurize_dataframe” operation that takes the name of the column.

Try changing:

“soap_fit.fit(strucs_dataset, ‘Structure_obj’)”

to

“soap_fit.fit(strucs_dataset[‘Structure_obj’])”

Best,

Logan

From: [email protected]
Sent: Sunday, May 5, 2019 4:28 AM
To: matminer
Subject: SOAP featurizer - ‘str’ object has no attribute ‘composition’

Hi there,

I am trying to use the SOAP featurizer you have implemented recently (thanks guys!), but I am getting error messages complaining there is no ‘composition’ attribute in the Structure object. However, I haven’t been able to figure out how to include ‘composition’ in a pymatgen Structure object - or perhaps I am misunderstanding something here.

I am attaching here a screen grab.

Many thanks,

Linjiang


You received this message because you are subscribed to the Google Groups “matminer” group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.