Merging two or more ML_AB files

Queries about input and output files, running specific calculations, etc.


Moderators: Global Moderator, Moderator

Post Reply
Message
Author
ivan.kondov@kit.edu
Newbie
Newbie
Posts: 4
Joined: Tue Dec 17, 2019 3:08 pm

Merging two or more ML_AB files

#1 Post by ivan.kondov@kit.edu » Fri Mar 28, 2025 1:46 pm

I would like to merge two or more ML_AB files coming from training runs of different systems with the same two elements. I strictly followed the approach suggested here [1] using ML_MODE = select. I performed all described manupulations on the two original ML_AB files and concatenated them into one file. After running with ML_MODE = select only the configurations of the first original ML_AB file have been processed and the ones from the second original ML_AB files were skipped. The newly produced ML_ABN file includes only the configrations from the first original file.

Maybe I have overseen some detail not mentioned in the wiki?

[1] https://www.vasp.at/wiki/index.php/ML_A ... L_AB_files


marie-therese.huebsch
Full Member
Full Member
Posts: 237
Joined: Tue Jan 19, 2021 12:01 am

Re: Merging two or more ML_AB files

#2 Post by marie-therese.huebsch » Fri Mar 28, 2025 2:40 pm

Mh, in principle, you are following the correct instructions. Could you please share a minimal reproducible example in accordance with the forum guidelines?


ivan.kondov@kit.edu
Newbie
Newbie
Posts: 4
Joined: Tue Dec 17, 2019 3:08 pm

Re: Merging two or more ML_AB files

#3 Post by ivan.kondov@kit.edu » Mon Mar 31, 2025 12:16 pm

Thank you for your prompt answer! Attached a minimal working example. I omitted only the POTCAR files for license reasons.

You do not have the required permissions to view the files attached to this post.

marie-therese.huebsch
Full Member
Full Member
Posts: 237
Joined: Tue Jan 19, 2021 12:01 am

Re: Merging two or more ML_AB files

#4 Post by marie-therese.huebsch » Wed Apr 02, 2025 1:41 pm

I am confused because it seems you did not do any of the manipulations. When I look at combined/ML_AB in your example there are 3 problems

  • line 5 should be changed to the total number of configurations. 6 in your example.

  • Only the configurations should be added and not the entire file including the header. I.e. in your file (combined/ML_AB) line 219 - 259 need to be deleted.

  • The configurations need to be enumerated. That is

    Code: Select all

    grep "Configuration num." ML_AB

    should yield

    Code: Select all

         Configuration num.      1
         Configuration num.      2
         Configuration num.      3
         Configuration num.      4
         Configuration num.      5
         Configuration num.      6
         

    in your case. But it yields

    Code: Select all

         Configuration num.      1
         Configuration num.      2
         Configuration num.      3
         Configuration num.      1
         Configuration num.      2
         Configuration num.      3
         

    in the file you uploaded.

Did you upload the wrong example? Anyway, please let me know if applying the suggested changes solves the issue.

Best regards,
Marie-Therese


Post Reply