Page 1 of 1

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

Posted: Thu Aug 03, 2023 9:45 pm
by rubel
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

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

Posted: Fri Aug 04, 2023 8:44 am
by alexey.tal
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.

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

Posted: Fri Aug 04, 2023 10:47 pm
by rubel
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

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

Posted: Mon Aug 07, 2023 1:01 pm
by alexey.tal
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.

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

Posted: Wed Aug 09, 2023 1:15 pm
by ralf_tonner1
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.

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

Posted: Thu Aug 10, 2023 8:21 am
by alex
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

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

Posted: Thu Aug 10, 2023 1:13 pm
by alexey.tal
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.

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

Posted: Mon Oct 16, 2023 8:57 am
by inna_ponomareva12
I agree - pymatgen cannot process new CONTCAR files and it is a huge problem, because so many postprocessing tools utilize pymatgen.

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

Posted: Wed Nov 22, 2023 3:18 pm
by 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?

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

Posted: Mon Nov 27, 2023 2:20 pm
by alexey.tal
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?

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

Posted: Mon Nov 27, 2023 3:36 pm
by meb444
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!

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

Posted: Wed Jul 03, 2024 3:23 am
by Dankomaister
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

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

Posted: Wed Jul 03, 2024 10:17 am
by alexey.tal
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?

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

Posted: Thu Jul 04, 2024 12:48 am
by Dankomaister
I was using 6.4.2 without the patch. I'll try with 6.4.3 then.