Skip to content

AtomicData reads charge and spin from ASE calcualator for omol task#1794

Open
alex-l-m wants to merge 3 commits intofacebookresearch:mainfrom
alex-l-m:atomicdatachargespin
Open

AtomicData reads charge and spin from ASE calcualator for omol task#1794
alex-l-m wants to merge 3 commits intofacebookresearch:mainfrom
alex-l-m:atomicdatachargespin

Conversation

@alex-l-m
Copy link

One possible way to address issue #1793

AtomicData reads "charge" and "spin" from atoms.info for task "omol", if r_data_keys is not set.

If r_data_keys is set, it overrides this behavior, so it would need to include "charge" and "spin" as keys.

Also changes FAIRChemCalculator to not use r_data_keys.

The big thing I'm not sure of is making reading from atoms.info conditional on task "omol".
That seems to match the FAIRChemCalculator docstring, although I see that reading charge and spin is not currently conditional on this task.
This change would break anything that requires "charge" and "spin" to be read from atoms.info for any other tasks.
Even if that's not a breaking change now, maybe it's not what you want for the future?

Also changes the example in the docs that motivated me here.

@meta-cla
Copy link

meta-cla bot commented Feb 18, 2026

Hi @alex-l-m!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

@meta-cla meta-cla bot added the cla signed label Feb 18, 2026
@meta-cla
Copy link

meta-cla bot commented Feb 18, 2026

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

[
atoms.info.get("charge", 0)
if r_data_keys is not None and "charge" in r_data_keys
if (r_data_keys is not None and "charge" in r_data_keys) or (r_data_keys is None and task_name == "omol")
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for getting this started!

Assuming tests pass, i think we could get rid of this conditional entirely. atoms.info.get("charge/spin", 0) should be relevant for all our tasks. r_data_keys shouldn't matter here for our other tasks. @rayg1234 thoughts?

Copy link
Contributor

Choose a reason for hiding this comment

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

ya we already default to the "right" values for omol vs not omol tasks here, we probably dont need r_data_keys dont need specific omol logic here

@rayg1234 rayg1234 added enhancement New feature or request patch Patch version release labels Feb 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla signed enhancement New feature or request patch Patch version release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants