Top Page > Browsing
Question about the sum of PDOS
Date: 2020/12/12 11:00
Name: Liu Jie   <2642880654@qq.com>

Dear Openmx developers:
I have performed the DOS calculation.Now I want to get the PDOS of one element,e.g. I have a system containing 16 oxygens,now I want to get the sum of the PDOS of the 16 oxygens.How do I specify the atom number when performing the script DOSmain.
Your suggestion will be greatly appreciated.Thank you.

Regards,
Liujie
メンテ
Page: [1]

Re: Question about the sum of PDOS ( No.1 )
Date: 2020/12/12 17:19
Name: Naoya Yamaguchi

Hi,

When you take the sum of "example.PDOS.Tetrahedron.atom1" and "example.PDOS.Tetrahedron.atom3", you can do it as follows, for example:
$ paste example.PDOS.Tetrahedron.atom1 example.PDOS.Tetrahedron.atom3 | awk -v num_columns=5 '{for (j=2; j<=num_columns; j++) columns[j]=0; for (i=1; i<=NF; i+=num_columns) {for (j=2; j<=num_columns; j++) columns[j]+=$(i+j-1);} printf $1; for (j=2; j<=num_columns; j++) printf " %17.15f", columns[j]; print ""}'

When adding "example.PDOS.Tetrahedron.atom5", you can add "example.PDOS.Tetrahedron.atom5" to arguments of the "paste" command.
$ paste example.PDOS.Tetrahedron.atom1 example.PDOS.Tetrahedron.atom3 example.PDOS.Tetrahedron.atom5 | awk -v num_columns=5 '{for (j=2; j<=num_columns; j++) columns[j]=0; for (i=1; i<=NF; i+=num_columns) {for (j=2; j<=num_columns; j++) columns[j]+=$(i+j-1);} printf $1; for (j=2; j<=num_columns; j++) printf " %17.15f", columns[j]; print ""}'

Regards,
Naoya Yamaguchi
メンテ
Re: Question about the sum of PDOS ( No.2 )
Date: 2020/12/12 18:31
Name: Liu Jie  <2642880654@qq.com>

Thank you a lot Prof.Naoya Yamaguchi.I get it.
メンテ

Page: [1]

Thread Title (must) Move the thread to the top
Your Name (must)
E-Mail (must)
URL
Password (used in modification of the submitted text)
Comment (must)

   Save Cookie