Skip to content
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

What is the energy reference of OCPCalculator ? #1036

Closed
MSJavaScript opened this issue Feb 26, 2025 · 6 comments
Closed

What is the energy reference of OCPCalculator ? #1036

MSJavaScript opened this issue Feb 26, 2025 · 6 comments
Assignees

Comments

@MSJavaScript
Copy link

MSJavaScript commented Feb 26, 2025

What is the energy given by get_potential_energy() when I use OCPCalculator as a calculator ?
If it is an adsorption energy, what is the reference ?
If I want to fine tune a model, what kind of energy should I use ? If I just use the adsorption energy, then the energy reference will be different across different surfaces.

@zulissimeta
Copy link
Collaborator

Hi - the adsorption energies in OC20/OC22 are chosen from a linear combination of N2/CO/H2O/H2 and a relaxed structure for the bare surface. We have some details on this in the Demo FAQ https://open-catalyst.metademolab.com/faq and it should also be in the respective OC20/OC22 papers.

Note that as long you are consistent with whatever your favorite functional is (BEEF/RPBE/etc) and do the referencing yourself, you should be able to fine-tune the models on your new dataset. Obviously do not try to add new structures with a new functional (eg BEEF) and re-use the RPBE gas reference energies from the OC20 paper.

I'm not sure what you mean by If I want to fine tune a model, what kind of energy should I use ? If I just use the adsorption energy, then the energy reference will be different across different surfaces. - for a new surface, if you want to be consistent with OC20 you should prepare adsorption energies of the form "relaxed_surface + gas_references -> relaxed_slab_adsorbate".

@MSJavaScript
Copy link
Author

MSJavaScript commented Mar 3, 2025

@zulissimeta Thanks for your reply.
then the energy reference will be different across different surfaces I meant that, for example, if you calculate the adsorption energy of N* on two different surfaces: a flat $4\times 4\times 3$ Ag(111) surface and a re-constructed one, the adsorption energies are both calculated by
$E_{ads} = E_{tot} - E_{N*} - E_{slab}$, but the energies of $E_{slab}$ s are different for a flat surface and a re-constructed one, so the $E_{ads}$ s will have different energy references.

@mshuaibii
Copy link
Collaborator

Great question - Models were trained directly on adsorption energy where the slab reference, for the most part, is consistent with the adsorbate+slab system. That is - If you construct a system with N* on a flat Ag(111), you can expect the energy returned to be referenced to flat Ag(111).

Models in this scenario are implicitly assuming that the reference is consistent with your original adsorbate+slab system because that's how they were trained. Total energy models found here - https://fair-chem.github.io/core/model_checkpoints.html#s2ef-total-models alleviate this issue because you can use this model to independently predict the adsorbate+slab system and slab system, and subtract them directly.

@mshuaibii mshuaibii self-assigned this Mar 25, 2025
@brunosamp-usp
Copy link

brunosamp-usp commented Mar 26, 2025

@mshuaibii I think that this is what you meant, but i just want to make sure. I am using the checkpoint file of the "EquiformerV2-153M-S2EF-OC20-All+MD" model and calling OCPCalculator.
If i construct a Ni slab adsorbed by a CO molecule, for example, and define

calc = OCPCalculatator(checkpoint_path=checkpoint_path, cpu=False)

atoms.set_calculator(calc)
opt = BFGS(atoms, trajectory='optimization.traj')
slab = fcc111("Ni", (3, 3, 4), vacuum=20)
slab_e = slab.get_potential_energy()
print(slab_e)

The energy that was printed is the adsorption energy, right? So, i don't need to calculate the energy of the clean slab, and of the isolated CO molecule, to do Eads = E(Complex) - E(Clean Slab) - E(Isolated CO)

@MSJavaScript
Copy link
Author

@mshuaibii Thanks for your help. 🤝

@MSJavaScript
Copy link
Author

@brunosamp-usp Yes, you're right, it is just the Eads you write below. So I think it is problematic to use EquiformerV2-153M-S2EF-OC20-All+MD to do NEB or any other tasks in which you can not properly define a clean slab.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants