cagrikymk / JAX-ReaxFF

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

missing parameter of pi bond distance in off-diagonal section #11

Open dtt507 opened 10 months ago

dtt507 commented 10 months ago

Hi, I used Jax-reaxff to train the molecules of HClO2, HClO3, and HClO4. There are both Cl-O, and Cl=O bonds in these molecules. When I set the offdiag O-Cl r0_pi at parameter # in the ffield file, the trained ffield file does showed the final value is 0.0000. Additionally, when I included this parameter in the 'params' file, the code did not work.

4 8 5 0.0100 1.1976 1.4536

Could you please fix this issue or show me where I should include this parameter?

Kindest regards,

Thi Ta DTU, Denmark

cagrikymk commented 9 months ago

Hello, I think this issue might be related to the following line in the force field parser: helper.py:line 1952.

To be able to use off-diagonal terms, you need to have a valid value for the corresponding single body parameter. For example, if you have rapt parameter set to 0 for Cl, then the off-diagonal rob2 values corresponding to Cl - X will be ignored. I implemented it this way as it aligns with the other implementations of ReaxFF.

If you think there is some other issue, I could provide more detailed help if you can share the force field with me.