Atom symbols appended with slash "/" in CONTCAR when compiled with HDF5-support

Problems running VASP: crashes, internal errors, "wrong" results.


Moderators: Global Moderator, Moderator

Post Reply
Message
Author
rubel
Newbie
Newbie
Posts: 12
Joined: Fri Jan 27, 2017 11:25 pm
License Nr.: 5-2663

Atom symbols appended with slash "/" in CONTCAR when compiled with HDF5-support

#1 Post by rubel » Thu Aug 03, 2023 9:45 pm

Dear Developers,

I noticed some additional slash symbols that append atomic symbols in CONTCAR file generated by a newly compiled VASP 6.4.2 with HDF5 support

Code: Select all

$ head CONTCAR
Cs1 Pb1 I3
   1.00000000000000
    18.8254268700000011    0.0000000000000000    0.0000000000000000
     0.0000000000000000   18.8254268700000011    0.0000000000000000
     0.0000000000000000    0.0000000000000000   62.7514229000000014
  Cs/             Pb/             I/
              63              54             170
Direct
 -0.0001638258374794 -0.0000714977503180  0.2087057120684550
I believe it has to do with the poscar.F file, specifically this section where the symbol '/' is introduced:

Code: Select all

#ifdef VASP_HDF5
      DO NT=1,T_INFO%NTYP
            FULLTYP(NT) = TRIM(T_INFO%TYPEF(NT)) // '/' // TRIM(T_INFO%SHA256(NT))
      ENDDO
      WRITE(IU, '(20A16)') (FULLTYP(NT)(:14),NT=1,T_INFO%NTYP)
      WRITE(IU,'(20I16)') (T_INFO%NITYP(NT),NT=1,T_INFO%NTYP)
#endif
This code was not there in VASP 6.4.0. Any comments will be appreciated.

Thank you in advance
Oleg
You do not have the required permissions to view the files attached to this post.

alexey.tal
Global Moderator
Global Moderator
Posts: 314
Joined: Mon Sep 13, 2021 12:45 pm

Re: Atom symbols appended with slash "/" in CONTCAR when compiled with HDF5-support

#2 Post by alexey.tal » Fri Aug 04, 2023 8:44 am

Dear Oleg,

Please see my answer to a similar question in this thread.

It is not a bug. The hash value after slash in POSCAR can be provided to specify the potential.
The hashes in POSCARs are recognized by VASP and shouldn't cause any trouble.

rubel
Newbie
Newbie
Posts: 12
Joined: Fri Jan 27, 2017 11:25 pm
License Nr.: 5-2663

Re: Atom symbols appended with slash "/" in CONTCAR when compiled with HDF5-support

#3 Post by rubel » Fri Aug 04, 2023 10:47 pm

Dear Alexey,

thank you so much for explaining changes in POSCAR. I will try to find out why, I my case, these was no identifier printed after slash.

I also noticed that the slash screws up reading of the structure in VESTA for single-letter elements, e.g., iodine becomes 'I/', while lead is fine. I will try to contact VESTA developers and let them know about changes in the POSCAR format.

Thank you again
Oleg

alexey.tal
Global Moderator
Global Moderator
Posts: 314
Joined: Mon Sep 13, 2021 12:45 pm

Re: Atom symbols appended with slash "/" in CONTCAR when compiled with HDF5-support

#4 Post by alexey.tal » Mon Aug 07, 2023 1:01 pm

thank you so much for explaining changes in POSCAR. I will try to find out why, I my case, these was no identifier printed after slash.
There is no identifier in your case because SHA is not present in your version of the POTCAR file. You can download the updated POTCAR files from the user portal.
I also noticed that the slash screws up reading of the structure in VESTA for single-letter elements, e.g., iodine becomes 'I/', while lead is fine. I will try to contact VESTA developers and let them know about changes in the POSCAR format.
Thank you for bringing that to our attention.

ralf_tonner1
Newbie
Newbie
Posts: 17
Joined: Mon Dec 21, 2020 2:19 pm

Re: Atom symbols appended with slash "/" in CONTCAR when compiled with HDF5-support

#5 Post by ralf_tonner1 » Wed Aug 09, 2023 1:15 pm

Dear Admin,
To add to rubel's comment, addition of hash value in CONTCAR is breaking other visualization softwares as well, for e.g. ASE GUI, wxDragon.

alex
Hero Member
Hero Member
Posts: 584
Joined: Tue Nov 16, 2004 2:21 pm
License Nr.: 5-67
Location: Germany

Re: Atom symbols appended with slash "/" in CONTCAR when compiled with HDF5-support

#6 Post by alex » Thu Aug 10, 2023 8:21 am

Dear developers,

I'd also suggest - like Ralf - to keep HDF5 related changes within the vaspout.h5 file and not to mess with the human readable output data.

For a simple reason: the ecosystem evolved around VASP heavily relies on continuity of the data which is written.
Lucky us end-users, there have been only small changes from time to time, which were somehow easy to follow.

However, if it comes to changing output data, which provides no extra value for us as humans, but messes up our day-to-day handling, I'd kindly suggest that you discuss internally the need of these changes again.

Best regards,

alex

alexey.tal
Global Moderator
Global Moderator
Posts: 314
Joined: Mon Sep 13, 2021 12:45 pm

Re: Atom symbols appended with slash "/" in CONTCAR when compiled with HDF5-support

#7 Post by alexey.tal » Thu Aug 10, 2023 1:13 pm

Thank you for bringing this issue to our attention. Your feedback is really appreciated.
We realize that we did not think this through and are very sorry for the inconvenience.

Here is a patch for disabling hash codes in CONTCAR:

Code: Select all

diff --git a/src/poscar.F b/src/poscar.F
index 102dd90b1..279155b78 100644
--- a/src/poscar.F
+++ b/src/poscar.F
@@ -1529,7 +1529,6 @@ IF (IU6>=0) WRITE(IU6,*)'POSCAR: ',TRIM(T_INFO%SZNAM2)
       INTEGER IU
 ! LOCAL
       INTEGER NT, NI, I
-      CHARACTER (200) FULLTYP(T_INFO%NTYP)
 !-----direct lattice
       WRITE(IU,'(A40)') SZNAM
 
@@ -1540,19 +1539,10 @@ IF (IU6>=0) WRITE(IU6,*)'POSCAR: ',TRIM(T_INFO%SZNAM2)
         FORM='(1X,3F12.6)'
       ENDIF
       WRITE(IU,FORM) (A(1,I)/SCALE,A(2,I)/SCALE,A(3,I)/SCALE,I=1,3)
-#ifdef VASP_HDF5
-      DO NT=1,T_INFO%NTYP
-            FULLTYP(NT) = TRIM(T_INFO%TYPEF(NT)) // '/' // TRIM(T_INFO%SHA256(NT))
-      ENDDO
-      WRITE(IU, '(20A16)') (FULLTYP(NT)(:14),NT=1,T_INFO%NTYP)
-      WRITE(IU,'(20I16)') (T_INFO%NITYP(NT),NT=1,T_INFO%NTYP)
-#endif
-#ifndef VASP_HDF5
       IF (T_INFO%TYPE(1)/='  ') THEN
          WRITE(IU,'(20A5)') (T_INFO%TYPE(NT),NT=1,T_INFO%NTYP)
       ENDIF
       WRITE(IU,'(20I6)') (T_INFO%NITYP(NT),NT=1,T_INFO%NTYP)
-#endif
       
       IF (LSDYN) WRITE(13,'(A18)') 'Selective dynamics'
       WRITE(IU,'(A6)')'Direct'
Meanwhile we are working on finding a solution that would be more convenient for users and that preserves workflows and compatibility with other software.

inna_ponomareva12
Newbie
Newbie
Posts: 1
Joined: Thu Mar 05, 2020 1:54 pm

Re: Atom symbols appended with slash "/" in CONTCAR when compiled with HDF5-support

#8 Post by inna_ponomareva12 » Mon Oct 16, 2023 8:57 am

I agree - pymatgen cannot process new CONTCAR files and it is a huge problem, because so many postprocessing tools utilize pymatgen.

meb444
Newbie
Newbie
Posts: 4
Joined: Wed Jan 11, 2023 3:43 pm

Re: Atom symbols appended with slash "/" in CONTCAR when compiled with HDF5-support

#9 Post by meb444 » Wed Nov 22, 2023 3:18 pm

It's been a while since this was posted but I am now running into the same issue. If I add the patch to remove the "/" in the CONTCAR files so that other programs like ase work, will this remove the functionality of the .h5 file? Has a different solution been found since this patch was posted?

alexey.tal
Global Moderator
Global Moderator
Posts: 314
Joined: Mon Sep 13, 2021 12:45 pm

Re: Atom symbols appended with slash "/" in CONTCAR when compiled with HDF5-support

#10 Post by alexey.tal » Mon Nov 27, 2023 2:20 pm

Dear meb444,
It's been a while since this was posted but I am now running into the same issue. If I add the patch to remove the "/" in the CONTCAR files so that other programs like ase work, will this remove the functionality of the .h5 file? Has a different solution been found since this patch was posted?
You should be able to use .h5 files after applying this patch. Did you experience some issues using .h5 files?

meb444
Newbie
Newbie
Posts: 4
Joined: Wed Jan 11, 2023 3:43 pm

Re: Atom symbols appended with slash "/" in CONTCAR when compiled with HDF5-support

#11 Post by meb444 » Mon Nov 27, 2023 3:36 pm

No, I haven't had an issue, but as I am not the one directly in control of the compilation and other people use it, I didn't want to request the patch be added unless I knew it wouldn't impact others. Thanks for the clarification!

Dankomaister
Newbie
Newbie
Posts: 38
Joined: Sat Feb 13, 2016 4:39 pm
License Nr.: 20-0400 5-1605

Re: Atom symbols appended with slash "/" in CONTCAR when compiled with HDF5-support

#12 Post by Dankomaister » Wed Jul 03, 2024 3:23 am

Related to this. I've also noticed that these hashes appear in the CHG/CHGCAR files, which breaks restarting calculations from "reading the charge density" for multi-element systems.

/Daniel

alexey.tal
Global Moderator
Global Moderator
Posts: 314
Joined: Mon Sep 13, 2021 12:45 pm

Re: Atom symbols appended with slash "/" in CONTCAR when compiled with HDF5-support

#13 Post by alexey.tal » Wed Jul 03, 2024 10:17 am

Thank you for reporting this.
What version of VASP are you using? The problem related to hashes should have been resolved in VASP6.4.3. Also, did you use the patch?

Dankomaister
Newbie
Newbie
Posts: 38
Joined: Sat Feb 13, 2016 4:39 pm
License Nr.: 20-0400 5-1605

Re: Atom symbols appended with slash "/" in CONTCAR when compiled with HDF5-support

#14 Post by Dankomaister » Thu Jul 04, 2024 12:48 am

I was using 6.4.2 without the patch. I'll try with 6.4.3 then.

Post Reply