First off, thank you for considering contributing to MatterTune! We want to make contributing to MatterTune as easy and transparent as possible, whether it's:
- Reporting a bug
- Discussing the current state of the code
- Submitting a fix
- Proposing new features
- Becoming a maintainer
We use GitHub to host code, to track issues and feature requests, as well as accept pull requests.
- Fork the repo and create your branch from
main
- If you've added code that should be tested, add tests
- If you've changed APIs, update the documentation
- Ensure the test suite passes
- Make sure your code lints
- Issue that pull request!
-
Clone your fork of the repo:
git clone https://github.com/Fung-Lab/mattertune.git
-
Install development dependencies:
cd mattertune pip install -e
-
Install pre-commit hooks:
pre-commit install
Our pre-commit hooks will automatically format your code when you commit. To run formatting manually:
# Format code + imports
ruff check --select I --fix && ruff check --fix && ruff format
# Run linting
ruff check .
# Run type checking
pyright
- Update the README.md with details of changes to the interface, if applicable
- Update the documentation with details of any new functionality
- Add or update tests as appropriate
- Use clear, descriptive commit messages
- The PR should be reviewed by at least one maintainer
- Update the CHANGELOG.md with a note describing your changes
We use pytest for testing. To run tests:
pytest
For coverage report:
pytest --cov=mattertune
We use GitHub issues to track public bugs. Report a bug by opening a new issue.
Great Bug Reports tend to have:
- A quick summary and/or background
- Steps to reproduce
- Be specific!
- Give sample code if you can
- What you expected would happen
- What actually happens
- Notes (possibly including why you think this might be happening, or stuff you tried that didn't work)
We love feature requests! To submit a feature request:
- Check if the feature has already been requested in the issues
- If not, create a new issue with the label "enhancement"
- Include:
- Clear description of the feature
- Rationale for the feature
- Example use cases
- Potential implementation approach (optional)
Documentation improvements are always welcome. Our docs are in the docs/
folder and use Markdown format.
By contributing, you agree that your contributions will be licensed under the MIT License that covers the project. Feel free to contact the maintainers if that's a concern.
When working with model backbones, please note:
- JMP (CC BY-NC 4.0 License): Non-commercial use only
- EquiformerV2 (Meta Research License): Follow Meta's Acceptable Use Policy
- M3GNet (BSD 3-Clause): Include required notices
- ORB (Apache 2.0): Include required notices and attribution
Don't hesitate to ask questions about how to contribute. You can:
- Open an issue with your question
- Tag your issue with "question"
- We'll get back to you as soon as we can
When adding new features or modifying existing ones, please add appropriate references to papers, repositories, or other sources that informed your implementation.
Thank you for contributing to MatterTune! 🎉