cagrikymk / JAX-ReaxFF

JAX-ReaxFF: A Gradient Based Framework for Extremely Fast Optimization of Reactive Force Fields
GNU General Public License v3.0
56 stars 23 forks source link

force in trainset.in file #21

Open sunhl4 opened 5 months ago

sunhl4 commented 5 months ago

1,Why is the weight of the force in the trainset.in file such a special number like 11.86? 2,Is the unit of force expressed as (kcal/mol)/angstrom?

cagrikymk commented 5 months ago
  1. The training data that contains that weight for forces is from this paper: https://pubs.acs.org/doi/10.1021/acs.jctc.6b00461 The weights are just used to calculate the weighted sum of the squared errors. So, My guess is that this number chosen to assign a relatively low importance to the forces. As I am not the person created the dataset, I cannot provide a concrete answer why that exact number is chosen. I only used that dataset for benchmarking.

I can say that assigning very high importance would be detrimental for models performance to get the energies right. Forces are typically used a way to regularize the training.

  1. Yes, the force unit is (kcal/mol)/angstrom.
sunhl4 commented 4 months ago

1,Thank you for your response. I found the answer in the literature you provided. During the force field training mentioned in the literature, the weight of the data related to force is 0.01 (as mentioned in the main text), and the unit of force is Hartree/Bohr (as mentioned in the appendices). In jax-reaxff, the unit of force is (kcal/mol)/angstrom. (Hartree/Bohr)/0.01 = ((kcal/mol)/angstrom)/11.86 Additionally, thank you for explaining the role of the force data in the training set during the force field training. 2,In the source code, I noticed that in the trianset.in file, it is possible to provide training data related to RMSG, as indicated by "rmsg_item = RMSGItem(name, target, weight)". Is the "target" in this part the total force experienced by the structure named "name"? However, it seems that the function produce_error_report in the helper.py file does not implement its functionality.

cagrikymk commented 4 months ago

Hello, First of all, sorry for the delayed response.

  1. I am glad you resolved that problem. The unit logic makes sense.
  2. Yes, you are correct. I forgot about implementing the reporting logic. I will go over the code and if everything else is ready to have RMSE based training item and let you know.