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

Enable NEP interface #288

Merged
merged 55 commits into from
Feb 6, 2025
Merged

Conversation

naik-aakash
Copy link
Collaborator

@naik-aakash naik-aakash commented Dec 9, 2024

This PR addresses #54 by adding the necessary functions needed for fitting NEP models and testing on github CI (we will mock NEP fits as fitting explicitly requires GPU)

Changes

  • Add calorine as dependency in pyproject.toml
  • Grouped some installation commands in Docker file
  • Added flexibility to MLIPFitMaker (eg:- users can now change labels used for training data; change was needed because nep executable can only read files with .xyz extension and needs xyz file to have specific labels)
  • Add nep_fitting function in src/autoplex/fitting/common/utils.py
  • Add NEP as option in MLIPFitMaker
  • Add NEP as option in phonon and RSS workflows
  • Revert GPUMD install in the dockerfile (NEP model training only works with a GPU > thus redundant)
  • Simulate calls to nep using pytest fixtures (add mock_nep in conftest.py)
  • Add tests
  • Resolve merge conflicts
  • Address pending review comment
  • Update Readme to include GPUMD install instructions link

@naik-aakash naik-aakash changed the title Add dependencies to enable NEP interface Enable NEP interface Dec 9, 2024
@naik-aakash naik-aakash marked this pull request as draft December 9, 2024 08:58
@QuantumChemist
Copy link
Collaborator

Can you wait a bit with this until #280 is done? 😃

@naik-aakash
Copy link
Collaborator Author

Can you wait a bit with this until #280 is done? 😃

Yeah ofcourse, it is not priority now and I already intended to do this after #280 is merged. Thus have only added dependencies no code yet.

@naik-aakash naik-aakash added documentation Improvements or additions to documentation enhancement New feature or request dependencies Pull requests that update a dependency file labels Dec 10, 2024
@naik-aakash naik-aakash self-assigned this Dec 14, 2024
Copy link
Collaborator

@QuantumChemist QuantumChemist left a comment

Choose a reason for hiding this comment

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

I don't see anything that needs to be improved 😃
Thank you also for making the part with the ref_names and the train/test file more flexible, as well as adding the mock_nep 👍🏻 💟

src/autoplex/auto/rss/jobs.py Show resolved Hide resolved
src/autoplex/fitting/common/flows.py Show resolved Hide resolved
@naik-aakash naik-aakash mentioned this pull request Feb 5, 2025
Comment on lines +666 to +668
static_energy_maker=ForceFieldStaticMaker(
force_field_name="NEP",
),
Copy link
Collaborator

Choose a reason for hiding this comment

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

Once #333 is merged, this has to be set to None

Suggested change
static_energy_maker=ForceFieldStaticMaker(
force_field_name="NEP",
),
static_energy_maker=None,

Copy link
Collaborator Author

@naik-aakash naik-aakash Feb 6, 2025

Choose a reason for hiding this comment

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

Hi @QuantumChemist, maybe it is better to do it in your #333 itself. I think this PR is now ready to be merged at this point.

Copy link
Collaborator

Choose a reason for hiding this comment

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

of course, will adjust it in the other PR then 😃

@naik-aakash naik-aakash marked this pull request as ready for review February 6, 2025 14:27
@naik-aakash naik-aakash enabled auto-merge February 6, 2025 14:30
@naik-aakash naik-aakash requested a review from JaGeo February 6, 2025 14:31
@JaGeo
Copy link
Collaborator

JaGeo commented Feb 6, 2025

@QuantumChemist Please approve if you are happy.

@naik-aakash naik-aakash marked this pull request as draft February 6, 2025 14:49
auto-merge was automatically disabled February 6, 2025 14:49

Pull request was converted to draft

@naik-aakash naik-aakash marked this pull request as ready for review February 6, 2025 15:06
@naik-aakash naik-aakash enabled auto-merge February 6, 2025 15:06
Copy link
Collaborator

@QuantumChemist QuantumChemist left a comment

Choose a reason for hiding this comment

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

I just added one optional suggestion.

Comment on lines 59 to +63
Use the glue.xml core potential instead of fitting 2b terms.
glue_file_path: str
Name of the glue.xml file path.
gpu_identifier_indices: list[int]
List of GPU indices to be used for fitting. Only used for NEP fitting.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Only an optional suggestion to keep the docstrings more consistent:

Suggested change
Use the glue.xml core potential instead of fitting 2b terms.
glue_file_path: str
Name of the glue.xml file path.
gpu_identifier_indices: list[int]
List of GPU indices to be used for fitting. Only used for NEP fitting.
Use the glue.xml core potential instead of fitting 2b terms. Only used for GAP fitting
glue_file_path: str
Name of the glue.xml file path. Only used for GAP fitting
gpu_identifier_indices: list[int]
List of GPU indices to be used for fitting. Only used for NEP fitting.

and the same for autodelta (which I cannot include in the suggestion feature)

Copy link
Collaborator

Choose a reason for hiding this comment

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

didnt see the automerge enabled ^^

@naik-aakash naik-aakash merged commit c765b97 into autoatml:main Feb 6, 2025
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants