I got this error when I tried to use this fork https://github.com/peastman/openmm-ml/blob/aimnet2/openmmml/models/aimnet2potential.py
Traceback (most recent call last): File "/app/someproject/production/FC/test.py", line 607, in <module> Minimize() File "/app/someproject/production/FC/test.py", line 245, in Minimize system = create_mixed_system( File "/app/someproject/production/FC/test.py", line 226, in create_mixed_system hybrid_system = potential.createMixedSystem( File "/root/miniconda3/envs/workflow2/lib/python3.10/site-packages/openmmml/mlpotential.py", line 269, in createMixedSystem self._impl.addForces(topology, newSystem, atomList, forceGroup, **args) File "/root/miniconda3/envs/workflow2/lib/python3.10/site-packages/openmmml/models/aimnet2potential.py", line 62, in addForces model = torch.load('aimnet2_wb97m-d3_ens.jpt') File "/root/miniconda3/envs/workflow2/lib/python3.10/site-packages/torch/serialization.py", line 1495, in load raise RuntimeError( RuntimeError: Cannot use ``weights_only=True`` with TorchScript archives passed to ``torch.load``. In PyTorch 2.6, we changed the default value of the weights_onlyargument intorch.loadfromFalsetoTrue. Re-running torch.loadwithweights_onlyset toFalse will likely succeed, but it can result in arbitrary code execution. Do it only if you got the file from a trusted source.
I got this error when I tried to use this fork https://github.com/peastman/openmm-ml/blob/aimnet2/openmmml/models/aimnet2potential.py
Traceback (most recent call last): File "/app/someproject/production/FC/test.py", line 607, in <module> Minimize() File "/app/someproject/production/FC/test.py", line 245, in Minimize system = create_mixed_system( File "/app/someproject/production/FC/test.py", line 226, in create_mixed_system hybrid_system = potential.createMixedSystem( File "/root/miniconda3/envs/workflow2/lib/python3.10/site-packages/openmmml/mlpotential.py", line 269, in createMixedSystem self._impl.addForces(topology, newSystem, atomList, forceGroup, **args) File "/root/miniconda3/envs/workflow2/lib/python3.10/site-packages/openmmml/models/aimnet2potential.py", line 62, in addForces model = torch.load('aimnet2_wb97m-d3_ens.jpt') File "/root/miniconda3/envs/workflow2/lib/python3.10/site-packages/torch/serialization.py", line 1495, in load raise RuntimeError( RuntimeError: Cannot use ``weights_only=True`` with TorchScript archives passed to ``torch.load``. In PyTorch 2.6, we changed the default value of theweights_onlyargument intorch.loadfromFalsetoTrue. Re-runningtorch.loadwithweights_onlyset toFalsewill likely succeed, but it can result in arbitrary code execution. Do it only if you got the file from a trusted source.