Skip to content

refactoring HDF5Dataset class to check and convert units.#301

Merged
wiederm merged 3 commits intochoderalab:mainfrom
chrisiacovella:ref-fix-force-units
Oct 27, 2024
Merged

refactoring HDF5Dataset class to check and convert units.#301
wiederm merged 3 commits intochoderalab:mainfrom
chrisiacovella:ref-fix-force-units

Conversation

@chrisiacovella
Copy link
Copy Markdown
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
Copy Markdown

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
Copy Markdown
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!

Comment thread modelforge/utils/prop.py
@wiederm
Copy link
Copy Markdown
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
Copy Markdown
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
@chrisiacovella
Copy link
Copy Markdown
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).

@chrisiacovella chrisiacovella deleted the ref-fix-force-units branch August 27, 2025 18: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.

3 participants