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

Update hyper-parameters to a more extensible schema #328

Merged
merged 8 commits into from
Nov 14, 2024
Merged

Conversation

Luthaf
Copy link
Owner

@Luthaf Luthaf commented Sep 19, 2024

There are two main ingredients to a spherical expansion:

  • the density being expanded
  • the basis on which to make the expansion

Additionally, real space/short range (i.e. SOAP) density expansion requires the definition of local environments with a cutoff radius and smoothing functions.

This PR refactor the hyper-parameters of spherical expansion and related calculators to reflect this structure and make is easier to add new variations in the density and basis ingredients.

TBD:

  • code to automatically convert from old hypers
  • update examples & tutorials
  • rewrite all of splining code
  • should we expose classes for the hyper building blocks? I.e. allow something like
cutoff = Cutoff(
    radius=5.0,
    smoothing=ShiftedCosineSmoothing(width=0.5),
)

density = GaussianDensity(width=0.3)

basis = TensorProductBasis(
    max_angular=4,
    radial=GtoRadialBasis(max_radial=6),
)

calculator = SoapPowerSpectrum(cutoff, density, basis)

Copy link

github-actions bot commented Sep 19, 2024

Here is a pre-built version of the code in this pull request: wheels.zip, you can install it locally by unzipping wheels.zip and using pip to install the file matching your system

…hema

There are two main ingredients to a spherical expansion:

- the density being expanded
- the basis on which to make the expansion

Additionally, real space/short range (i.e. SOAP) density expansion requires the
definition of local environments with a cutoff radius and smoothing functions.

This commit refactor the hyper-parameters of spherical expansion and related calculators
to reflect this structure and make is easier to add new variations in the density and
basis ingredients.
…t the time

This prepares for basis defintion where some angular channels are missing
Copy link
Collaborator

@jwa7 jwa7 left a comment

Choose a reason for hiding this comment

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

I haven't properly reviewed the code, but I've beta-tested the functionality and to me the new structure of the hypers makes sense, and the error message for converting from old hypers is very helpful. :)

@Luthaf Luthaf merged commit fe18ecc into main Nov 14, 2024
25 checks passed
@Luthaf Luthaf deleted the new-hypers branch November 14, 2024 16:27
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.

2 participants