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

NVE ensemble is added #266

Merged
merged 41 commits into from
May 17, 2024
Merged

NVE ensemble is added #266

merged 41 commits into from
May 17, 2024

Conversation

kenko911
Copy link
Contributor

Summary

NVE ensemble is added

Checklist

  • Google format doc strings added. Check with ruff.
  • Type annotations included. Check with mypy.
  • Tests added for new features/fixes.
  • If applicable, new classes/functions/modules have duecredit @due.dcite decorators to reference relevant papers by DOI (example)

Tip: Install pre-commit hooks to auto-check types and linting before every commit:

pip install -U pre-commit
pre-commit install

kenko911 and others added 30 commits November 18, 2023 02:52
…oat_th and including linear layer in TensorNet to match the original implementations
@kenko911 kenko911 requested a review from shyuep as a code owner May 17, 2024 17:34
Copy link

coderabbitai bot commented May 17, 2024

Walkthrough

The recent changes focus on enhancing the consistency of units in the PES training for MatGL and expanding the capabilities of molecular dynamics simulations. Specifically, the updates include the addition of the nve ensemble to the available options in the ase.py module and corresponding tests. This ensures that the code aligns with MatGL's requirements and supports a broader range of molecular dynamics simulations.

Changes

File Change Summary
README.md Updated to emphasize the importance of consistent units in PES training for MatGL.
src/.../ext/ase.py Added VelocityVerlet import, expanded ensemble options, and included a new block for nve.
tests/.../test_ase.py Modified test_molecular_dynamics function to include nve in the ensemble list.

Recent Review Details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits Files that changed from the base of the PR and between ce75f36 and 06998e5.
Files selected for processing (3)
  • README.md (1 hunks)
  • src/matgl/ext/ase.py (4 hunks)
  • tests/ext/test_ase.py (1 hunks)
Additional Context Used
LanguageTool (4)
README.md (4)

Near line 17: Style-wise, it’s not ideal to insert an adverb (‘consistently’) in the middle of an infinitive construction (‘to deliver’). Try moving the adverb to avoid split infinitives.
Context: ...s. Graph deep learning models have been shown to consistently deliver exceptional performance as surrogate models for the prediction ...


Near line 42: The phrase ‘in future’ is British English. Did you mean: “in the future”?
Context: ...atGL team as well as other contributors in future. <div style="float: left; padding: 10p...


Near line 63: The phrase ‘in many cases’ is used quite frequently. Consider using a less frequent alternative to set your writing apart.
Context: ...els for property predictions, achieving in many cases accuracies that are better or similar t...


Near line 188: As an alternative to the over-used intensifier ‘extremely’, consider replacing this phrase.
Context: ...e training, validation and test sets is extremely important to be consistent with the unit used in ...

Additional comments not posted (2)
tests/ext/test_ase.py (1)

120-120: The addition of the 'nve' ensemble to the test function aligns with the PR objectives and ensures comprehensive testing of all supported ensembles.

src/matgl/ext/ase.py (1)

Line range hint 371-457: The implementation of the 'nve' ensemble using the VelocityVerlet class is appropriate and aligns with the PR objectives. This addition ensures that the library supports a broader range of molecular dynamics simulations.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Comment on lines +188 to +193
In the PES training, the unit of energies, forces and stresses (optional) in the training, validation and test sets is extremely important to be consistent with the unit used in MatGL.

- energies: a list of energies with unit eV.
- forces: a list of nx3 force matrix with unit eV/Å, where n is the number of atom in each structure. n does not need to be the same for all structures.
- stresses: a list of 3x3 stress matrices with unit GPa (optional)

Copy link

Choose a reason for hiding this comment

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

The emphasis on unit consistency in the PES training documentation is crucial and well-explained. Consider using a less frequent alternative to "extremely" to enhance the readability.

- The unit of energies, forces and stresses in the training, validation and test sets is extremely important to be consistent with the unit used in MatGL.
+ The unit of energies, forces and stresses in the training, validation and test sets is critically important to be consistent with the unit used in MatGL.

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
In the PES training, the unit of energies, forces and stresses (optional) in the training, validation and test sets is extremely important to be consistent with the unit used in MatGL.
- energies: a list of energies with unit eV.
- forces: a list of nx3 force matrix with unit eV/Å, where n is the number of atom in each structure. n does not need to be the same for all structures.
- stresses: a list of 3x3 stress matrices with unit GPa (optional)
In the PES training, the unit of energies, forces and stresses (optional) in the training, validation and test sets is critically important to be consistent with the unit used in MatGL.
- energies: a list of energies with unit eV.
- forces: a list of nx3 force matrix with unit eV/Å, where n is the number of atom in each structure. n does not need to be the same for all structures.
- stresses: a list of 3x3 stress matrices with unit GPa (optional)

@kenko911 kenko911 merged commit 2a983bf into materialsvirtuallab:main May 17, 2024
3 checks passed
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.

None yet

1 participant