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

pdbfixer references openmm.app and causes jax error #323

Open
astomer2 opened this issue Jan 20, 2025 · 2 comments · May be fixed by #324
Open

pdbfixer references openmm.app and causes jax error #323

astomer2 opened this issue Jan 20, 2025 · 2 comments · May be fixed by #324

Comments

@astomer2
Copy link

astomer2 commented Jan 20, 2025

hi, everyone, I am currently using MNPP to generate some structures, which requires a good initial structure. However, when I write pdbfixer and mpnn into the same script, mpnn will report an error and jax cannot be initialized correctly (I specified the gpu to use). After checking, I found that it was because pdbfixer automatically performed some operations on the gpu, causing the program to run on the GPU I did not specify, which would prevent jax from initializing (or the index of cuda was messed up). If I disable the processing of pdbfixer, there will be no error.

Now my question is, is there any way for me to specify the gpu that openmm.app will use, or run it on the cpu?

@peastman
Copy link
Member

Not currently, but that would make sense to add. We could let you pass a Platform to the PDBFixer constructor. I'll mark this as a feature request.

@peastman peastman linked a pull request Jan 21, 2025 that will close this issue
@peastman
Copy link
Member

#324 adds a platform argument to the constructor. You can specify platform=Platform.getPlatform('CPU') to make it do calculations on the CPU.

Can you test it out and confirm that it fixes your problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants