Page 1 of 1

bug with writing ML_LOGFILE

Posted: Tue Aug 30, 2022 7:12 pm
by xiliang_lian
Hello,

I am using VASP 6.3.0 to do machine learning. I didn't find this problem has been reported on the forum. I checked the VASP release notes, but still not sure whether this small problem has been resolved with the latest version.

When setting ML_ISTART = 1, VASP always results in an error while writing the first step data of BEEF for energy, force, and stress as shown below:

REGR 0 1 18 2.78261211E+02 3.15392810E-02 7.05796998E-13 2.12763135E+02
REGR 0 1 19 2.89452503E+02 3.14841992E-02 6.77323324E-13 2.12379793E+02
REGR 0 1 20 2.98229258E+02 3.14429706E-02 6.56529144E-13 2.12092816E+02
REGRF 0 1 21 3.04941167E+02 3.14125333E-02 6.41457066E-13 2.11879210E+02 1.27680294E+14 1.60590301E+08
STDAB 0 2.47326171E-01 9.42364172E-01 2.51760944E+01
ERR 0 1.19960196E-02 1.67365666E-01 5.39205417E+00
BEEF 0 3.10250016-309 0.00000000E+00 1.36023908+187 2.00000000E-03 0.00000000E+00 1.45705968+229

I attached the BEEF data I extracted. It has been truncated to reduce the size.

It doesn't seem to be a problem from the second step, can you please kindly have a look? If this has been resolved in the newer release, can you please let me know? Thanks in advance.

Best,
Xiliang

Re: bug with writing ML_LOGFILE

Posted: Fri Sep 02, 2022 3:13 pm
by andreas.singraber
Hello Xiliang!

Thank you very much for reporting this problem which has not been fixed yet! The reason for this unwanted behavior is uninitialized variables that slipped through our fingers at some point. I have fixed it in our development version so the next release will already include the bugfix.

If you have access to the source code and want to fix it just add the following initializations

Code: Select all

ABN%BE=0.0_q                                                          
ABN%BEAV=0.0_q                                                        
ABN%BEMAX=0.0_q 
after line 1531 in the file src/ml_ff_abinitio.F. It should look like this after adding the lines:

Code: Select all

....
1529 ! Initialization of variables                                                   
1530           ABN%A=0.0_q                                                           
1531           ABN%B=0.0_q                                                           
1532           ABN%BE=0.0_q                                                          
1533           ABN%BEAV=0.0_q                                                        
1534           ABN%BEMAX=0.0_q                                                       
1535           ABN%CTIFOR_ALLCONF=0.0_q                                              
1536           ABN%EATOM_KIN(1:ABN%MIONS_ALLOCATE)=0.0_q
...                             
Then recompile VASP, the ML_LOGFILE should then contain zeros instead of garbage numbers. Thanks again for bringing this to our attention!

All the best,
Andreas Singraber