dftbplus / dftbplus

DFTB+ general package for performing fast atomistic simulations
http://www.dftbplus.org
Other
330 stars 164 forks source link

dftbplus-21.2 no more working with USPEX 10 #992

Closed xavbdlt closed 1 year ago

xavbdlt commented 2 years ago

USPEX can work with dftb+ since their version 10. They provide an example with Carbon, which is example 25. I checked that this example 25 works with dftb+ 18 and 19, but no more with dftb 20 nor 21. I looked into the issue and it appears the format of geo_end.gen is different in dftb+ 20 and 21.

I edited the dftb+ 21.2 file named formatout.F90 to restore the geo_end.gen format to its former version, and it works again with USPEX 10.5's example 25. I changed the lines:

character(len=*), parameter :: formatHead1 = '(1X,I0,1X,A2)'

to

character(len=*), parameter :: formatHead1 = '(I5," ",A2)'

then

  write(fd, '(1X,A)', advance='NO')trim(speciesName(ii))

to

  write(fd, '(2X,A)', advance='NO')trim(speciesName(ii))

and

write(formatCoordinates, '("(I5,2X,I",I0,",3E20.10)")') floor(log10(real(nSpecies)))+1

to

write(formatCoordinates, '("(I5,1X,I",I0,",3E20.10)")') floor(log10(real(nSpecies)))+1

If you have a better correction, feel free to adjust, but the formatting of geo_end.gen must be compliant with USPEX analysis tools. I'm aware that modifying the 1st line limits dftb+ to 99999 atoms. A better solution would be to modify USPEX 10.5, but USPEX is no more freely editable since version 10. And their website is now unacessible.

Thank you, Xavier Bidault

aradi commented 2 years ago

Dear Xavier, thanks a lot for reporting the issue. I absolutely agree with you, that it is USPEX, which should be fixed. USPEX seems to use a fixed-format reader which is whitespace sensitive, which is really weird for a software written in this century. (Note, that the GEN-format is documented in the DFTB+ manual, and it does not specify any compulsory field widths for any quantities.)

Unfortunately, reverting the GEN-header output back to a format, which limits the number of atoms to a given number, is a no go for us. So currently, I don't see any trivial solution, apart of patching the code by those users, who wish to use DFTB+ with USPEX...

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

stale[bot] commented 1 year ago

This stale issue has been automatically closed.