Skip to content

Conversation

@jan-janssen
Copy link
Member

No description provided.

Copy link
Contributor

@pmrv pmrv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Been meaning to add DScribe myself, so I like this. docstring wouldn't hurt though.

Copy link
Member

@liamhuber liamhuber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Docstring is also critical for a new tool, but for a tool like this it could be as simple as "Creates a dscribe.SOAP object and creates descriptors from it, as documented below (if dscribe is available:" and then (conditionally on dscribe being available) append the the docs from SOAP and SOAP.create to the function's __doc__ attribute. Actually, I guess the structure arg should still be documented, but the rest line up perfectly with the wrapped library so there's no need to re-write things here.

@@ -0,0 +1,44 @@
def calculate_soap_descriptor_per_atom(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: I'd just go with stk.analyse.soap_descriptor_per_atom as I'm not convinced calculate_ really adds any information

Comment on lines +38 to +44
return periodic_soap.create(
system=structure,
centers=centers,
n_jobs=n_jobs,
only_physical_cores=only_physical_cores,
verbose=verbose,
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer

structure_soap_array = periodic_soap.create(...)

return structure_soap_array 

More explicit and clearer to someone who is trying to figure out what the function does.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would actually integrate better with the workflow stuff too. There, we scrape the output channel label from whatever's after the return value -- giving it a nice variable like that keeps things extra tidy.

@jan-janssen
Copy link
Member Author

Check if it is possible to build dscribe for Windows conda-forge/dscribe-feedstock#36

@jan-janssen jan-janssen marked this pull request as draft February 14, 2024 14:07
@jan-janssen jan-janssen reopened this Feb 14, 2024
@jan-janssen jan-janssen marked this pull request as ready for review February 14, 2024 16:16
@jan-janssen jan-janssen merged commit 3975c60 into main Feb 14, 2024
@jan-janssen jan-janssen deleted the soap branch February 14, 2024 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants