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

Automatically Importing Rascaline's JSON Schema #278

Open
PicoCentauri opened this issue Jul 2, 2024 · 0 comments
Open

Automatically Importing Rascaline's JSON Schema #278

PicoCentauri opened this issue Jul 2, 2024 · 0 comments
Labels
GAP GAP experimental architecture Priority: Low Non-urgent issues to handle last. SOAP BPNN SOAP BPNN experimental architecture

Comments

@PicoCentauri
Copy link
Contributor

PicoCentauri commented Jul 2, 2024

it would be interesting to check if we can automatically import rascaline's JSON schema file here.

Originally posted by @Luthaf in #241 (comment)

This should be feasible in principle since the jsonschema library allows external referencing, either via an external file or a URL. The easiest approach would be to expose the schemas in the Rascaline online documentation. This way, we wouldn't need to copy the files into metatrain every time there are changes in the hypers.

However, one issue we might encounter is that in Rascaline, some arguments are required. For example:

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "PowerSpectrumParameters",
  "description": "Parameters for SOAP power spectrum calculator.\n\nIn the SOAP power spectrum, each sample represents rotationally-averaged atomic density correlations, built on top of the spherical expansion. Each sample is a vector indexed by `n1, n2, l`, where `n1` and `n2` are radial basis indexes and `l` is the angular index:\n\n`< n1 n2 l | X_i > = \\sum_m < n1 l m | X_i > < n2 l m | X_i >`\n\nwhere the `< n l m | X_i >` are the spherical expansion coefficients.\n\nSee [this review article](https://doi.org/10.1063/1.5090481) for more information on the SOAP representations.",
  "type": "object",
  "required": [
    "atomic_gaussian_width",
    "center_atom_weight",
    "cutoff",
    "cutoff_function",
    "max_angular",
    "max_radial",
    "radial_basis"
  ]
}

In metatrain, we don't require these parameters because we use default values if the user doesn't provide them. I'm not sure how to reconcile this difference at the moment. Maybe we can discuss potential solutions, @Luthaf?

@PicoCentauri PicoCentauri changed the title Use rascaline's JSON schema file directly for verifying model hypers Automatically Importing Rascaline's JSON Schema Jul 2, 2024
@PicoCentauri PicoCentauri added Priority: Low Non-urgent issues to handle last. SOAP BPNN SOAP BPNN experimental architecture GAP GAP experimental architecture labels Jul 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GAP GAP experimental architecture Priority: Low Non-urgent issues to handle last. SOAP BPNN SOAP BPNN experimental architecture
Projects
None yet
Development

No branches or pull requests

1 participant