Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make SOAP initialization more intuitive w.r.t. species lists #353

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

max-veit
Copy link
Contributor

Fix #350

In particular, merge the expansion_by_species_method and global_species keys in the Python interface, so the confusion that led to the aforementioned issue doesn't happen again.

Tasks before review:

  • Add tests, examples, and complete documentation of any added functionality
    • Make sure the autogenerated documentation appears in Sphinx and is
      formatted correctly (ask @max-veit if you need help with this task).
    • Make sure the examples run (!) and produce the expected output
    • For bugfix pull requests, list here which tests have been added or re-enabled
      to verify the fix and catch future regressions as well as similar bugs
      elsewhere in the code.
  • Run make lint on the project, ensure it passes
    • Run make pretty-cpp and make pretty-python, check that the
      auto-formatting is sensible
    • Review variable names, make sure they're descriptive (ask a friend)
    • Review all TODOs, convert to issues wherever possible
    • Make sure draft, in-progress, and commented-out code is moved to its
      own branch
  • Merge with master and resolve any conflicts

max-veit added 2 commits May 7, 2021 19:46
(it was ignored before if 'expansion_by_species_method' was not set
appropriately; this is now done automatically)

Fix #350
This replaces the originally separate 'expansion_by_species_method' and
'global_species' keys, which are kept in the C++ backend; the wrapper
just provides a more intuitive interface now.  Some backwards
compatibility is provided; it should be removed after a few months.
@max-veit max-veit marked this pull request as draft May 10, 2021 14:41
@agoscinski
Copy link
Contributor

Don't you think expansion_by_species_method is the better variable name to keep? Open for any other naming, species_list is just a bad name for variable which can also be a string

@max-veit
Copy link
Contributor Author

No, I deliberately chose a different name to make the switch to the new behaviour clear and be able to warn code trying to use the old options. Also, I really wasn't a fan of the old name; too verbose and technical.

As for the new name, why is it a problem that you can pass a string instead of a list?

SphericalInvariants(..., species_list="structure wise", ...)

reads very well to me; it just says "the species list is defined structure wise".

max-veit added 2 commits May 10, 2021 17:49
Also, fix strangely-meta deprecated deprecation warnings
@ceriottm
Copy link
Contributor

ceriottm commented May 10, 2021 via email

@agoscinski
Copy link
Contributor

find it confusing when variable name contains a data type and also accepts other data types. I would go with something as species_storage but its not so important, its your call.

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.

Pad Representation with zeros for non-present species
3 participants