You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to figure out how to use M3GNETCalculator directly on ASE if it is possible. This is very short code that I've tried to setup but I'm still facing the same error
`import os
import ase
import m3gnet
from m3gnet.models import M3GNetCalculator, Potential
atoms=ase.io.read('xtbopt.xyz')
atoms.calc=M3GNetCalculator(potential=Potential)
energy = atoms.get_potential_energy()`
which returns:
Traceback (most recent call last):
File "", line 1, in
File "/opt/homebrew/Caskroom/miniforge/base/envs/m3gnet/lib/python3.9/site-packages/ase/atoms.py", line 731, in get_potential_energy
energy = self._calc.get_potential_energy(self)
File "/opt/homebrew/Caskroom/miniforge/base/envs/m3gnet/lib/python3.9/site-packages/ase/calculators/calculator.py", line 709, in get_potential_energy
energy = self.get_property('energy', atoms)
File "/opt/homebrew/Caskroom/miniforge/base/envs/m3gnet/lib/python3.9/site-packages/ase/calculators/calculator.py", line 737, in get_property
self.calculate(atoms, [name], system_changes)
File "/opt/homebrew/Caskroom/miniforge/base/envs/m3gnet/lib/python3.9/site-packages/m3gnet/models/_dynamics.py", line 84, in calculate
graph = self.potential.graph_converter(atoms)
AttributeError: module 'Potential' has no attribute 'graph_converter'
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Dear developers,
I'm trying to figure out how to use M3GNETCalculator directly on ASE if it is possible. This is very short code that I've tried to setup but I'm still facing the same error
`import os
import ase
import m3gnet
from m3gnet.models import M3GNetCalculator, Potential
atoms=ase.io.read('xtbopt.xyz')
atoms.calc=M3GNetCalculator(potential=Potential)
energy = atoms.get_potential_energy()`
which returns:
What am I missing?
Thank you for your help
Beta Was this translation helpful? Give feedback.
All reactions