mir-group / flare

An open-source Python package for creating fast and accurate interatomic potentials.
https://mir-group.github.io/flare
MIT License
295 stars 71 forks source link

Adding 'Select' atomic environments to a pre-trained SGP Model using off-line training #387

Closed usamaS97 closed 8 months ago

usamaS97 commented 11 months ago

Hi MIR Team,

I am training a force-field to perform simulations on Platinum adsorbed to TiO2. I have trained a FF using the OTF modules, which gives satisfactory errors for Ti and O atoms. However, the MAE for Pt is still above the threshold I desire.

I have been trying to use FakeMD and FakeDFT to add more Pt environments to the model. The plan was to add 2 or 3 atoms from each frame with the highest uncertainty (They correspond to the Pt atoms). However, FakeMD and FakeDFT do not allow the use of update_style='threshold'.

I wanted to confirm if the 1.4.1 version of flare adds max_atoms during offline training based on the highest uncertainty or randomly.

Thank you and have a great day!

YuuuXie commented 11 months ago

Hi @usamaS97 Could you clarify what you mean by “ However, FakeMD and FakeDFT do not allow the use of update_style='threshold'.”? Did you get any error? I think we have been using this option for all our trainings

usamaS97 commented 10 months ago

Hi @YuuuXie Thank you so much for getting back to me.

Here is the error output I got upon implementing FakeMD:

Traceback (most recent call last): File "GPFA.py", line 86, in test_otf= OTF(atoms, dt=0.001, File "/home1/usaleem/.conda/envs/flare/lib/python3.8/site-packages/flare/learners/otf.py", line 261, in init assert (self.update_style is None) and ( AssertionError: In 'direct' mode, please set update_style=None, and update_threshold=None

YuuuXie commented 8 months ago

I see. You need to set build_mode: "bayesian" under otf to enable this.