Skip to content

Switch to pixi#131

Merged
fjclark merged 37 commits intoopenforcefield:mainfrom
fjclark:feature-pixi
Feb 19, 2026
Merged

Switch to pixi#131
fjclark merged 37 commits intoopenforcefield:mainfrom
fjclark:feature-pixi

Conversation

@fjclark
Copy link
Copy Markdown
Collaborator

@fjclark fjclark commented Jan 12, 2026

Description

Switches to pixi for package management. This fixes issues such as the one described here avoiding duplication of shared dependencies in conda environment yaml files and also makes the Makefile redundant as we can specific commands for pixi in pyproject.toml. I've also updated the CI and documentation. All tests pass for pydantic > and < 1 environments once merged with #129 (but will fail as-is).

Happy to merge this and #129 into a single PR with passing CI if that's preferable. Thanks!

Status

  • Ready to go

@fjclark
Copy link
Copy Markdown
Collaborator Author

fjclark commented Jan 22, 2026

Happy to merge this and #129 into a single PR with passing CI if that's preferable.

I've gone ahead and done this, just to check the CI runs.

Copy link
Copy Markdown
Contributor

@Yoshanuikabundi Yoshanuikabundi left a comment

Choose a reason for hiding this comment

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

Looks good! I have a few nits on how the environments are set up - would be good to improve the experience for developers who don't have a Linux/CUDA machine, which is I think most of the people who are likely to work on this. Unfortunately Pixi makes it a bit difficult to work with PyTorch from custom PyPi indexes, so we're limited in how accessible that is for now.

Comments marked "(non-blocking)" are improvements that I think will help most other devs working on this project, but if you judge that they will impair your work more than they will help everyone else that's your call. Comments marked "(blocking)" are the bare minimum for things to work on certain other machines, so I think they're important.

Hope you're enjoying Pixi!

pyproject.toml Outdated
Comment on lines +125 to +129
default = { features = ["cu12", "mm", "fe", "examples", "dev", "docs", "pydantic-2"] }
cpu = { features = ["cpu", "mm", "fe", "examples", "dev", "docs", "pydantic-2"] }
# The fe feature is excluded when pydantic < 2 as femto (used by absolv) needs pydantic >= 2
pydantic-1-cu12 = { features = ["cu12", "mm", "examples", "dev", "docs", "pydantic-1"] }
pydantic-1-cpu = { features = ["cpu", "mm", "examples", "dev", "docs", "pydantic-1"] }
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

(non-blocking) Using solve groups makes sure that you're using the same versions of shared packages across different environments. This makes debugging upstream issues easier to collaborate on. The default is for each environment to be solved independently:

Suggested change
default = { features = ["cu12", "mm", "fe", "examples", "dev", "docs", "pydantic-2"] }
cpu = { features = ["cpu", "mm", "fe", "examples", "dev", "docs", "pydantic-2"] }
# The fe feature is excluded when pydantic < 2 as femto (used by absolv) needs pydantic >= 2
pydantic-1-cu12 = { features = ["cu12", "mm", "examples", "dev", "docs", "pydantic-1"] }
pydantic-1-cpu = { features = ["cpu", "mm", "examples", "dev", "docs", "pydantic-1"] }
default = { features = ["cu12", "mm", "fe", "examples", "dev", "docs", "pydantic-2"], solve-group = "default" }
cpu = { features = ["cpu", "mm", "fe", "examples", "dev", "docs", "pydantic-2"], solve-group = "default" }
# The fe feature is excluded when pydantic < 2 as femto (used by absolv) needs pydantic >= 2
pydantic-1-cu12 = { features = ["cu12", "mm", "examples", "dev", "docs", "pydantic-1"], solve-group = "pydantic-1" }
pydantic-1-cpu = { features = ["cpu", "mm", "examples", "dev", "docs", "pydantic-1"], solve-group = "pydantic-1" }

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Thanks, I tried this, but ended up going back to separate solve groups to allow the pytorch version to be different between the cpu and cuda environments.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ahh yeah that makes sense, good call!

@fjclark
Copy link
Copy Markdown
Collaborator Author

fjclark commented Feb 17, 2026

Thanks for the very helpful review! And yes, I love pixi.

I think I've addressed your points other than adding osx-64, which seemed a bit of a pain to get working from a quick initial shot (running into issues with antechamber failing, maybe related to conda-forge/ambertools-feedstock#140 though I haven't looked in detail). How important is it to include this? I'm happy to put more time into adding it if it's important, but notice that e.g. Interchange doesn't provide osx-64 environments.

@mattwthompson
Copy link
Copy Markdown
Member

For me it's +1 on osx-arm64 and -1 on osx-64 - I don't think any of the team currently uses Intel-based Macs and, as you've found, upstreams are quietly becoming more and more of a headache with them

We quietly dropped support for this elsewhere and, at least for a first pass, I don't think it's worth worrying about here

@Yoshanuikabundi
Copy link
Copy Markdown
Contributor

Matt's take makes complete sense to me!

@lilyminium
Copy link
Copy Markdown
Contributor

Thanks @fjclark, please merge when you're ready -- just added you to write access :-)

@fjclark fjclark merged commit 370a429 into openforcefield:main Feb 19, 2026
4 checks passed
@fjclark
Copy link
Copy Markdown
Collaborator Author

fjclark commented Feb 19, 2026

Thanks @lilyminium!

@fjclark fjclark deleted the feature-pixi branch February 19, 2026 09:54
This was referenced Feb 19, 2026
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.

4 participants