chemiscope icon indicating copy to clipboard operation
chemiscope copied to clipboard

Stop automatically extracting properties from frames

Open Luthaf opened this issue 2 years ago • 2 comments

Instead, we provide functions to decide what properties one wants to extract

Code like this

chemiscope.input(
    frames=my_frames,
    properties=my_properties,
   ...
)

# only frame properties
chemiscope.input(
    frames=my_frames,
   ...
)

Should now be like this

frame_properties = chemiscope.extract_properties(my_frames)
my_properties.update(frame_properties)

chemiscope.input(
    frames=my_frames,
    properties=my_properties,
   ...
)

# only frame properties
chemiscope.input(
    frames=my_frames,
    properties=chemiscope.extract_properties(my_frames),
   ...
)

I think this makes the API less surprising/less magical, and make it easier for users to select a subset of properties out of the frames.

It also helps on the developer side by reducing the explosion of parameters, for example composition is now a separate function that users can decide to use or not. Similar function could compute a basic SOAP representation and project it in 2 dimensions for nicer integration with lib-rascal-ine, etc.

However, this is breaking enough to warrant a bit of discussion and releasing it in a new version (0.5) altogether.

Luthaf avatar Sep 12 '22 16:09 Luthaf

Also, I suggest we aim to have jupyter-lab integration for 0.5 ^_^

ceriottm avatar Sep 12 '22 18:09 ceriottm

Also, I suggest we aim to have jupyter-lab integration for 0.5 ^_^

Yes, that's my plan: this PR and jupyter-lab will go into 0.5

Luthaf avatar Sep 13 '22 12:09 Luthaf