-
Notifications
You must be signed in to change notification settings - Fork 129
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
Error when using pytorch lightning #607
Comments
Similar issue, probably related?
Clean conda environment on Ubuntu, installed packages:
|
Hi, thanks for the report! Could you provide a minimal example to reproduce this? |
It might be more suitable for a separate issue since I'm using an openmm stack. See the full output of the code here: https://github.com/meyresearch/ANI-Peptides/blob/main/demos/ANI_minimal.ipynb Setup
Code# Import libraries
from openmm.app import *
from openmm import *
from openmm.unit import *
from openmmml import MLPotential
import sys
# Setup
pdb = PDBFile("aaa.pdb")
potential = MLPotential('ani2x')
system = potential.createSystem(pdb.topology)
integrator = LangevinIntegrator(
300 * kelvin,
1 / picosecond,
1.0 * femtosecond,
)
simulation = Simulation(
pdb.topology,
system,
integrator,
Platform.getPlatformByName("CUDA"),
)
simulation.context.setPositions(pdb.positions)
# Minimize and run
simulation.minimizeEnergy()
simulation.step(1000)
print("done") |
Hi, the error came from the openmm-ml wrapper. A temp fixed version work ONLY for GPU could be found at: yueyericardo/openmm-ml@1d1d3f2#diff-911692ca194bf903c77d038662969ad3277dcf2fa8b3b3048d95a5aa3af59de1 It is using cuaev pdb = PDBFile("aaa.pdb")
# add this line
pdb.topology.setPeriodicBoxVectors(None)
potential = MLPotential('ani2x') Our internal version has some other updates to make it faster, but it currently is not open source yet. Edit:
|
Fantastic! Thank you for looking into this and getting back to me so quickly. |
I am still getting the same issue I showed above while using an ANI model within pytorch lightning. Any ideas how to fix it? |
I am trying to define an ANI model along with the AEVComputer (with cuda enabled) module within a Pytorch Lightning Module, but I am getting the following error:
I have seen that some of the parameters are registered as buffers, but some are not. Please let me know what you think.
Kev
The text was updated successfully, but these errors were encountered: