Mining an old OUTCAR for ML_AB data?

Question on input files/tags, interpreting output, etc.

Please check whether the answer to your question is given in the VASP online manual or has been discussed in this forum previously!

Moderators: Global Moderator, Moderator

Post Reply
Message
Author
victor_robinson
Newbie
Newbie
Posts: 10
Joined: Mon Sep 26, 2022 11:44 pm

Mining an old OUTCAR for ML_AB data?

#1 Post by victor_robinson » Fri Mar 17, 2023 10:18 pm

Dear all,

This is not clear to me still: Can we use previous AIMD runs (OUTCAR's from MD without ML) to then convert the data into ML_AB or 'rerun' vasp over this OUTCAR to create a ML_AB or even ML_FF?

From what I have read I don't think VASP can do this, but perhaps there is a script that mines data to create a ML_AB?

Thanks and regards, Victor

andreas.singraber
Global Moderator
Global Moderator
Posts: 235
Joined: Mon Apr 26, 2021 7:40 am

Re: Mining an old OUTCAR for ML_AB data?

#2 Post by andreas.singraber » Wed Mar 22, 2023 12:55 pm

Dear Victor,

unfortunately we do not yet provide a tool to convert a single or series of OUTCAR files to an ML_AB training structure database. This is on our agenda but I cannot give you a time horizon for delivery. However, it should be possible to write such a converter yourself without much effort. Take an existing ML_AB file as reference, e.g., from the VASP testsuite you could have a look at testsuite/tests/ML_LiF_CaO_ISTART1/ML_ABN.ref which contains mixed-type structures with up to four elements. Here are a few important steps to consider in order to create a valid ML_AB file:
  1. The ML_AB file starts with a header providing general information, e.g. about the types and maximum number of atoms,... Either extract this information from the OUTCAR file (search for VRHFIN, ions per type, etc.) or set up this part manually.
  2. Afterwards the section starting with

    Code: Select all

    The numbers of basis sets per atom type
    usually contains the local reference configurations for each type which were selected during on-the-fly training. Because we cannot know from the data in the OUTCAR file which atoms should go there, you need to add a dummy section only listing a single atom, e.g. like this:

    Code: Select all

    ...
    **************************************************
         The numbers of basis sets per atom type
    --------------------------------------------------
            1    1    1
            1
    **************************************************
         Basis set for Li
    --------------------------------------------------
              1      1
    **************************************************
         Basis set for F
    --------------------------------------------------
              1     1
    **************************************************
         Basis set for Ca
    --------------------------------------------------
              1      1
    **************************************************
         Basis set for O
    --------------------------------------------------
              1     1
              ....
    
  3. Then follows the list of all configurations, always starting with

    Code: Select all

    **************************************************
         Configuration num.      ???
    ==================================================
    
    You can get the lattice, position, energy, force and stress data from the OUTCAR file if you look for these lines:

    Code: Select all

    direct lattice vectors                                                     ---> lattice
    POSITION                                       TOTAL-FORCE (eV/Angst)      ---> positions and forces
    free  energy   TOTEN  =                                                    ---> energy
    in kB                                                                      ---> stress
    
  4. In some ML_AB files each configuration contains a section like this:

    Code: Select all

    ==================================================                                                       
         CTIFOR
    --------------------------------------------------
       1.0000000000000001E-016
    ==================================================
    
    You can safely omit this section, it is not required for this purpose.
Finally, after you created an ML_AB file from your OUTCAR data, you need to perform a special mode of training where local reference configurations are selected. This can be done by setting ML_MODE=select (equal to ML_ISTART=3, NSW=1) in your INCAR file.

Hope this helps you if you attempt to write a script yourself.

All the best,
Andreas Singraber

victor_robinson
Newbie
Newbie
Posts: 10
Joined: Mon Sep 26, 2022 11:44 pm

Re: Mining an old OUTCAR for ML_AB data?

#3 Post by victor_robinson » Fri Mar 24, 2023 9:16 pm

Thanks for the informative response. I agree, it would be good to be able to loop over old OUTCAR data once that is available. I may give this a go until then.
Victor

Post Reply