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

refactoring HDF5Dataset class to check and convert units. #301

Merged
merged 3 commits into from
Oct 27, 2024

Conversation

chrisiacovella
Copy link
Member

@chrisiacovella chrisiacovella commented Oct 25, 2024

Pull Request Summary

This address the issue related to the force units being off (per angstrom, not per nanometer) in the datasets.

Key changes

  • Units are attached to data read in and converted to our target system
  • Each dataset now includes a mapping of a given property in the dataset to one of our available data fields (E, F, dipole_moment, total_charge).
  • I commented out any available property that doesn't work in our current system (e.g., per_atom_charges, vibrational frequency, etc.), as they would be read in but couldn't be used in any context

Questions

  • While we dont' necessarily intend to embed using per-atom charges for our applications, do we want that to be an option? this might require more extensive discussion, just listing it because I've removed our ability to read any of those properties in at the moment.

Associated Issue(s)

Pull Request Checklist

  • Issue(s) raised/addressed and linked
  • Includes appropriate unit test(s)
  • Appropriate docstring(s) added/updated
  • Appropriate .rst doc file(s) added/updated
  • PR is ready for review

@codecov-commenter
Copy link

codecov-commenter commented Oct 25, 2024

Codecov Report

Attention: Patch coverage is 96.96970% with 1 line in your changes missing coverage. Please review.

Project coverage is 85.20%. Comparing base (2998bf1) to head (ae87fb0).

Additional details and impacted files

Copy link
Member

@wiederm wiederm left a comment

Choose a reason for hiding this comment

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

Looks great! Thanks for the quick fix!

@wiederm
Copy link
Member

wiederm commented Oct 26, 2024

While we dont' necessarily intend to embed using per-atom charges for our applications, do we want that to be an option? this might require more extensive discussion, just listing it because I've removed our ability to read any of those properties in at the moment.

I think that's fine. I can't imagine a scenario in which partial charges as input features might be relevant. Even if we were to train on a particular partial charge scheme, we would still do it using element-specific electron negativity as input (which is fixed and can be put inside the model).

@wiederm
Copy link
Member

wiederm commented Oct 26, 2024

It might be good to add a test that checks that the first datapoint in each dataset has the correct implied units for energies and forces

@wiederm wiederm merged commit 046cf24 into choderalab:main Oct 27, 2024
6 checks passed
@chrisiacovella
Copy link
Member Author

It might be good to add a test that checks that the first datapoint in each dataset has the correct implied units for energies and forces

This is a good idea. I'll need to create a new, fake dataset to do this sort of testing. I can do this in a separate PR (especially since this is merged).

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.

3 participants