Dear Admin,
When using M3GNet to calculate the total energy of a system the output shows nothing. Is it due to some bug?
Thanks
Here is the code:
# %% MoSe2
# Set up lattice
lattice = Hexagonal(3.288*Angstrom, 40.0*Angstrom)
# Define elements
elements = [Molybdenum, Selenium, Selenium]
# Define coordinates
fractional_coordinates = [[ 0.333333333333, 0.666666666667, 0.5 ],
[ 0.666666666667, 0.333333333333, 0.4583975 ],
[ 0.666666666667, 0.333333333333, 0.5416025 ]]
# Set up configuration
mose2 = BulkConfiguration(
bravais_lattice=lattice,
elements=elements,
fractional_coordinates=fractional_coordinates
)
mose2_name = "mose2"
# %% Set LCAOCalculator
from tremolox.neighborlistcalculator.M3GNetCalculator import TremoloXM3GNetDirectPESCalculator
calculator = TremoloXM3GNetDirectPESCalculator(device='cpu')
# %% Set Calculator
mose2.setCalculator(calculator)
mose2.update()
nlsave('TE.hdf5', mose2)
# %% TotalEnergy
total_energy = TotalEnergy(
configuration=mose2
)
nlsave('TE.hdf5', total_energy)