-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dump_dynamical_matrices from TDEP to QE #61
Comments
Hi Donglin,
indeed - the idea is to have a general tool usable by other DFT / DFPT
platforms. For the moment it only outputs abinit format DDB files, but it
should be quite simple to export qe as well. The reading in and conversion
to bohr/Hartree atomic units is done already.
best
M.
…On Tue, Apr 23, 2024 at 4:47 PM Guodonglin-cqust ***@***.***> wrote:
Dear tdep developers,
At website (https://github.com/tdep-developers/tdep/tree/main/src/dump_dynamical_matrices), you give us a tool to extract the dynamical matrices fromTDEP to ABINIT. It is not known whether a tool can be provided to realize the dynamical matrices from TDEP to QE.
Best wishes
Donglin Guo
—
Reply to this email directly, view it on GitHub
<#61>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABWOT3642WHKDFHQEDQPEZLY6ZX65AVCNFSM6AAAAABGVDEPFSVHI2DSMVQWIX3LMV43ASLTON2WKOZSGI2TSMBYGI4TQNA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Professor Matthieu J Verstraete
Fellow, American Physical Society
Chair, Steering Committee, European Theoretical Spectroscopy Facility
www.etsf.eu
Alumnus Fellow, Young Academy of Europe yacadeuro.org
Institute for Theoretical Physics (ITP) Department of Physics
Buys Ballot Gebouw/Building, Princetonplein 5, office
University of Utrecht, 3584 CC Utrecht
ITP Secretariat: +31 30 253 5928 E-mail: ***@***.***
Group web page (Liège): http://www.nanomat.ulg.ac.be/
Nanomat lab, Q-Mat center, Université de Liège
Département de Physique, Bat. B5a, 4/50
Allée du 6 août, 19 B-4000 Sart Tilman, Liège Belgium
Phone : +32 4 366 90 17
European Theoretical Spectroscopy Facility (ETSF)
Mail : ***@***.***
***@***.***
***@***.***
|
Dear Professor, best Donglin Guo |
Hi Donglin,
have you tried running the test suite? Does that work? See the python and
makefile scripts - it should run the dump_xxx as well, and that would be a
first step before you try your own inputs. dump_xxx requires the
forceconstants and ucposcar files as input (I think that's all that is
needed).
M.
…On Sun, Apr 28, 2024 at 3:08 PM Guodonglin-cqust ***@***.***> wrote:
Dear Professor,
When I type "dump_dynamical_matrices -qg 3 3 3", i can not produce the
file of outfile.many_dynamical_matrices_DDB. I find the main.f90 file has a
lot of comment sections using !, so the outfile.many_dynamical_matrices_DDB
can not be generated by dump_dynamical_matrices command.
best
Donglin Guo
—
Reply to this email directly, view it on GitHub
<#61 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABWOT3YIZ6QNLLJEHFMMHWLY7TYEDAVCNFSM6AAAAABGVDEPFSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOBRGQ3TSOJSHA>
.
You are receiving this because you commented.Message ID:
***@***.***>
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Professor Matthieu J Verstraete
Fellow, American Physical Society
Chair, Steering Committee, European Theoretical Spectroscopy Facility
www.etsf.eu
Alumnus Fellow, Young Academy of Europe yacadeuro.org
Institute for Theoretical Physics (ITP) Department of Physics
Buys Ballot Gebouw/Building, Princetonplein 5, office
University of Utrecht, 3584 CC Utrecht
ITP Secretariat: +31 30 253 5928 E-mail: ***@***.***
Group web page (Liège): http://www.nanomat.ulg.ac.be/
Nanomat lab, Q-Mat center, Université de Liège
Département de Physique, Bat. B5a, 4/50
Allée du 6 août, 19 B-4000 Sart Tilman, Liège Belgium
Phone : +32 4 366 90 17
European Theoretical Spectroscopy Facility (ETSF)
Mail : ***@***.***
***@***.***
***@***.***
|
Dear Professor,
! do x=1,3 The code can be successfully compiled, but it can not output the matrix of QE, could you help me, best Donglin Guo |
Hello Donglin,
The clean way to do this is to implement a method in the
forceconstant object, e.g. write_to_qe to mirror write_to_anaddb
You also do not give us any information about what is going wrong (what
does "can not output" mean?). Your code is generic but looks normal.
Finally, you are using a random unit "u" for fortran writing. You are
probably not turning on the flag readqpointsfromfile, so u is not even
initialized.
I don't know your proficiency with fortran, but a basic googling will help
you with this file handling stuff.
M.
…On Fri, May 3, 2024 at 8:48 AM Guodonglin-cqust ***@***.***> wrote:
Dear Professor,
In test suite, "dump_dynamical_matrices -qg 3 3 3" works well, it could
output the outfile.many_dynamical_matrices_DDB.
i want to export the dynamical_matrices of qe, and i try to modify the
main.f90 file,
the attach file is the main.f90 file, the line 211-223 line is following:
do a2=1,uc%na
do y=1,3
jj=(a2-1)*3+y
do a1=1,uc%na
! do x=1,3
ii=(a1-1)*3
dynmat(ii,jj)=dynmat(ii,jj)*sqrt(uc%mass(a1)*uc%mass(a2))
write (u,'(1x,i5,1x,i5,1x,i5,1x)') a2, a1
write (u,'(1x,f12.8,1x,f12.8,1x,f12.8,1x,f12.8,1x,f12.8,1x,f12.8,1x)')
dynmat(jj,ii+1),dynmat(jj,ii+2),dynmat(jj,ii+3)
! enddo
enddo
enddo
enddo
main.zip <https://github.com/tdep-developers/tdep/files/15196899/main.zip>
The code can be successfully compiled, but it can not output the matrix of
QE, could you help me,
thank you vey much.
best
Donglin Guo
—
Reply to this email directly, view it on GitHub
<#61 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABWOT35XS74DRKT7QUR4OO3ZAMXKLAVCNFSM6AAAAABGVDEPFSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOJSGQYDKMRTHA>
.
You are receiving this because you commented.Message ID:
***@***.***>
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Professor Matthieu J Verstraete
Fellow, American Physical Society
Chair, Steering Committee, European Theoretical Spectroscopy Facility
www.etsf.eu
Alumnus Fellow, Young Academy of Europe yacadeuro.org
Institute for Theoretical Physics (ITP) Department of Physics
Buys Ballot Gebouw/Building, Princetonplein 5, office
University of Utrecht, 3584 CC Utrecht
ITP Secretariat: +31 30 253 5928 E-mail: ***@***.***
Group web page (Liège): http://www.nanomat.ulg.ac.be/
Nanomat lab, Q-Mat center, Université de Liège
Département de Physique, Bat. B5a, 4/50
Allée du 6 août, 19 B-4000 Sart Tilman, Liège Belgium
Phone : +32 4 366 90 17
European Theoretical Spectroscopy Facility (ETSF)
Mail : ***@***.***
***@***.***
***@***.***
|
Hi Professor,
see the line 533 to line 543, i upload the "type_forceconstant_secondorder_io.f90". At present, I encounter two difficulties. The first is that I see that the output is only gama point data, no other q point data, and the second is how to output the frequency of different modes of the corresponding q point. After the successful modification, it is expected that anyone who needs it can use this function, and I do not know whether it is convenient to help, thank you. QE data
0.24218792 0.00000000 -0.00016789 0.00000000 -0.00162230 0.00000000
( 0.691018 0.000000 0.107566 0.000000 -0.103212 0.000000 ) Best |
See the test for the ddb output - there is an external loop over q and you
need to use the grid mode to get a uniform set.
Did you add an input variable to select which output format to use?
Finally, make a fork on GitHub so that we can merge your contribution back
once it is finalized.
Best
Matthieu
…On Thu, Jan 2, 2025, 10:50 Guodonglin-cqust ***@***.***> wrote:
Hi Professor,
Based on your suggestion i modify the file
"type_forceconstant_secondorder_io.f90",
do a2=1,uc%na
do a1=1,uc%na
write (unddb,'(1x,i5,1x,i5,1x,i5,1x)') a2, a1
ii=(a1-1)*3
do y=1,3
jj=(a2-1)*3+y
dmt(ii,jj)=dmt(ii,jj)*sqrt(uc%mass(a1)*uc%mass(a2)) !*lo_emu_to_amu
write (unddb,'(1x,f12.8,1x,f12.8,1x,f12.8,1x,f12.8,1x,f12.8,1x,f12.8,1x)') dmt(jj,ii+1),dmt(jj,ii+2),dmt(jj,ii+3)
enddo
enddo
enddo
see the line 533 to line 543, i upload the
"type_forceconstant_secondorder_io.f90".
At present, I encounter two difficulties. The first is that I see that the
output is only gama point data, no other q point data, and the second is
how to output the frequency of different modes of the corresponding q
point. After the successful modification, it is expected that anyone who
needs it can use this function, and I do not know whether it is convenient
to help, thank you.
QE data
1 1
0.24218792 0.00000000 -0.00016789 0.00000000 -0.00162230 0.00000000
-0.00016789 0.00000000 0.24468761 0.00000000 0.00091912 0.00000000
-0.00162230 0.00000000 0.00091912 0.00000000 0.24506275 0.00000000
1 2
-0.24193141 0.00000000 0.00016766 0.00000000 0.00162155 0.00000000
0.00016764 0.00000000 -0.24442880 0.00000000 -0.00091848 0.00000000
0.00162149 0.00000000 -0.00091842 0.00000000 -0.24480378 0.00000000
2 1
-0.24193141 0.00000000 0.00016764 0.00000000 0.00162149 0.00000000
0.00016766 0.00000000 -0.24442880 0.00000000 -0.00091842 0.00000000
0.00162155 0.00000000 -0.00091848 0.00000000 -0.24480378 0.00000000
2 2
0.24192577 0.00000000 -0.00016761 0.00000000 -0.00162064 0.00000000
-0.00016761 0.00000000 0.24442221 0.00000000 0.00091791 0.00000000
-0.00162064 0.00000000 0.00091791 0.00000000 0.24479641 0.00000000
------------------------------
freq ( 1) = 0.230231 [THz] = 7.679680 [cm-1]
( 0.691018 0.000000 0.107566 0.000000 -0.103212 0.000000 )
( 0.691393 0.000000 0.107624 0.000000 -0.103268 0.000000 )
freq ( 2) = 0.230598 [THz] = 7.691921 [cm-1]
( -0.117487 0.000000 0.091697 0.000000 -0.691026 0.000000 )
( -0.117551 0.000000 0.091747 0.000000 -0.691401 0.000000 )
freq ( 3) = 0.230898 [THz] = 7.701928 [cm-1]
( -0.091760 0.000000 0.692640 0.000000 0.107512 0.000000 )
( -0.091810 0.000000 0.693016 0.000000 0.107571 0.000000 )
freq ( 4) = 14.364018 [THz] = 479.132073 [cm-1]
( 0.188638 0.000000 0.613826 0.000000 -0.296487 0.000000 )
( -0.188536 0.000000 -0.613493 0.000000 0.296326 0.000000 )
freq ( 5) = 14.426032 [THz] = 481.200643 [cm-1]
( -0.238099 0.000000 0.347584 0.000000 0.568125 0.000000 )
( 0.237970 0.000000 -0.347395 0.000000 -0.567816 0.000000 )
freq ( 6) = 14.282876 [THz] = 476.425472 [cm-1]
( -0.638745 0.000000 0.051713 0.000000 -0.299335 0.000000 )
( 0.638399 0.000000 -0.051685 0.000000 0.299172 0.000000 )
------------------------------
Best
Donglin Guo
type_forceconstant_secondorder_io.zip
<https://github.com/user-attachments/files/18289509/type_forceconstant_secondorder_io.zip>
—
Reply to this email directly, view it on GitHub
<#61 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABWOT365BTFETLFSMY2UU732IUDWVAVCNFSM6AAAAABUPVAQRCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNRXGUYTAMZVGM>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Currently, the dump_dynamical_matrices command can output dyn files at different q-points, but the values are much smaller compared to those produced by the ph.x output from Quantum ESPRESSO (see the uploaded folder). I am unsure where the issue lies. Could you assist me in checking and modifying the code? The q-point coordinates generated by the ph.x command are inconsistent with those generated by the dump_dynamical_matrices command. To resolve this inconsistency, the dump_dynamical_matrices command should directly read the corresponding q-point coordinates to generate the dyn files correctly. Additionally, for the different mode frequencies at various q-points, the dump_dynamical_matrices command could include an option to directly output the mode frequencies after diagonalizing the dynamical matrix. Alternatively, the phonon_dispersion_relations command could be used to directly read the q-point data and generate the corresponding frequencies. |
On Fri, Jan 3, 2025, 07:34 Guodonglin-cqust ***@***.***> wrote:
Currently, the dump_dynamical_matrices command can output dyn files at
different q-points, but the values are much smaller compared to those
produced by the ph.x output from Quantum ESPRESSO (see the uploaded
folder). I am unsure where the issue lies. Could you assist me in checking
and modifying the code?
You probably have an issue with units. TDEP should be Hartree atomic units
internally.
The q-point coordinates generated by the ph.x command are inconsistent with
those generated by the dump_dynamical_matrices command.
The QE conventions are a true pain
To resolve this inconsistency, the dump_dynamical_matrices command should
directly read the corresponding q-point coordinates to generate the dyn
files correctly.
I don't think so: the weird qe points actually correspond to the
irreducible effect of a uniform grid. Your main problem should be
converting the natural reduced coordinates in tdep. Test at Gamma to start
with for the units.
Additionally, for the different mode frequencies at various q-points, the
dump_dynamical_matrices command could include an option to directly output
the mode frequencies after diagonalizing the dynamical matrix.
you can certainly add one for debugging, but I don't think it should stay.
Alternatively, the phonon_dispersion_relations command could be used to
directly read the q-point data and generate the corresponding frequencies.
This is the normal way.
Best
M
… test.zip <https://github.com/user-attachments/files/18297005/test.zip>
—
Reply to this email directly, view it on GitHub
<#61 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABWOT333YIKW5WEFDC3CF3D2IYVQZAVCNFSM6AAAAABUPVAQRCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNRYG42TENJSGQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Hello again,
1) please output to a different file, not the outfile...DDB , which is very
confusing. Add an input variable to choose QE instead of abinit output, and
make a separate subroutine which does only the QE part
2) From the looks of the orders of magnitude you may be missing a mass
factor ~ 1800 and a geometrical factor ~ acell or ccell, which would be
multiplying by the matrix of lattice vectors, or the reciprocal space
vectors. I don't know the QE convention, you need to find this in
their documentation, but at q=0 it should be the easiest to compare.
3) do check the dispersion relations you get with QE and TDEP (before your
output) - they should be very close, and you should get the same from your
TDEP dyn files run through the QE scripts as well.
Best
Matthieu
On Tue, Jan 7, 2025 at 11:05 PM matthieu verstraete <
***@***.***> wrote:
…
On Fri, Jan 3, 2025, 07:34 Guodonglin-cqust ***@***.***>
wrote:
> Currently, the dump_dynamical_matrices command can output dyn files at
> different q-points, but the values are much smaller compared to those
> produced by the ph.x output from Quantum ESPRESSO (see the uploaded
> folder). I am unsure where the issue lies. Could you assist me in checking
> and modifying the code?
>
You probably have an issue with units. TDEP should be Hartree atomic units
internally.
The q-point coordinates generated by the ph.x command are inconsistent
> with those generated by the dump_dynamical_matrices command.
>
The QE conventions are a true pain
To resolve this inconsistency, the dump_dynamical_matrices command should
> directly read the corresponding q-point coordinates to generate the dyn
> files correctly.
>
I don't think so: the weird qe points actually correspond to the
irreducible effect of a uniform grid. Your main problem should be
converting the natural reduced coordinates in tdep. Test at Gamma to start
with for the units.
> Additionally, for the different mode frequencies at various q-points, the
> dump_dynamical_matrices command could include an option to directly output
> the mode frequencies after diagonalizing the dynamical matrix.
>
you can certainly add one for debugging, but I don't think it should stay.
> Alternatively, the phonon_dispersion_relations command could be used to
> directly read the q-point data and generate the corresponding frequencies.
>
This is the normal way.
Best
M
> test.zip <https://github.com/user-attachments/files/18297005/test.zip>
>
> —
> Reply to this email directly, view it on GitHub
> <#61 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/ABWOT333YIKW5WEFDC3CF3D2IYVQZAVCNFSM6AAAAABUPVAQRCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNRYG42TENJSGQ>
> .
> You are receiving this because you commented.Message ID:
> ***@***.***>
>
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Professor Matthieu J Verstraete
Fellow, American Physical Society
Chair, Steering Committee, European Theoretical Spectroscopy Facility
www.etsf.eu
Alumnus Fellow, Young Academy of Europe yacadeuro.org
Institute for Theoretical Physics (ITP) Department of Physics
Buys Ballot Gebouw/Building, Princetonplein 5, office
University of Utrecht, 3584 CC Utrecht
ITP Secretariat: +31 30 253 5928 E-mail: ***@***.***
Group web page (Liège): http://www.nanomat.ulg.ac.be/
Nanomat lab, Q-Mat center, Université de Liège
Département de Physique, Bat. B5a, 4/50
Allée du 6 août, 19 B-4000 Sart Tilman, Liège Belgium
Phone : +32 4 366 90 17
European Theoretical Spectroscopy Facility (ETSF)
Mail : ***@***.***
***@***.***
***@***.***
|
Dear tdep developers,
Best wishes
Donglin Guo
The text was updated successfully, but these errors were encountered: