FAIR-Chem / fairchem

FAIR Chemistry's library of machine learning methods for chemistry
https://opencatalystproject.org/
Other
774 stars 243 forks source link

How to get the totale system energy of a "fairchem.data.oc.core.Slab" or "fairchem.data.oc.core.Adsorbate" #709

Closed GoosMulder closed 4 months ago

GoosMulder commented 4 months ago

Hi,

I am calculating the adsorption energy of an NH2 and Fe(110) system. For this, I am using the pkl files from the repository.

However when using an OCPcalc() from the model OC_22 model, I am not managing to calculate the total energy of the empty slab and the adsorbate is the gas phase.

My system is set up with "fairchem.data.oc.core.Slab" and "fairchem.data.oc.core.Adsorbate", however I am only able to calculate the total energy after setting up the system with "adsorbate_slab_config.AdsorbateSlabConfig".

It seems that this last function sets the system as class(ase.Atoms. object) thus it is possible to calculate the total energy.

Is there a way to transfer the Slab and Adsorbate definitions into an ase.Atoms object as well, such that I can get their potential energy separately and thus calculate the adsorption energy.

mshuaibii commented 4 months ago

The atoms objects of the slab and adsorbate can be accessed by:

slab.atoms and adsorbate.atoms