Top Page > Browsing
Output format of the stress tensor
Date: 2017/05/22 23:44
Name: Pascal Bliem   <bliem@mch.rwth-aachen.de>

Dear OpenMX developers,

when the stress tensor is calculated in the variable cell optimisation, the output in the System.Name.out file looks like this:

Cell vectors (Ang.) and derivatives of total energy
with respect to them (Hartree/Bohr)
***********************************************************
***********************************************************

a1 = 3.45297 0.00000 0.00000 dE/da1 = 0.00653 0.00000 -0.00000
a2 = 0.00000 3.18735 0.00000 dE/da2 = 0.00000 -0.00415 0.00000
a3 = 0.00000 0.00000 3.32548 dE/da3 = -0.00000 0.00000 0.00012

Unfortunately, there are very few digits on the values for the derivatives of total energy with respect to the cell vectors. Is there another place in one of the the output files where I can find these values with more digits? Or can I somehow enable an output with higher precision on these values?

Cheers,
Pascal

メンテ
Page: [1]

Re: Output format of the stress tensor ( No.1 )
Date: 2017/05/29 09:56
Name: Yung Ting Lee  <ytlee@issp.u-tokyo.ac.jp>

Dear Pascal,

If you want to have more decimal digits of lattice vectors or dE/da, you can modify the "MD_pac.c" code.

The code in "MD_pac.c" for printing lattice vectors and dE/da is written in the line 1477-1482 as below:

-------------------------------------------------------------
printf(" Cell vectors and derivatives of total energy with respect to them\n");

printf(" a1(Ang.) =%10.5f %10.5f %10.5f dE/da1(a.u.) =%10.5f %10.5f %10.5f\n",
tv[1][1]*BohrR,tv[1][2]*BohrR,tv[1][3]*BohrR,dE_da[1][1],dE_da[1][2],dE_da[1][3]);
printf(" a2(Ang.) =%10.5f %10.5f %10.5f dE/da2(a.u.) =%10.5f %10.5f %10.5f\n",
tv[2][1]*BohrR,tv[2][2]*BohrR,tv[2][3]*BohrR,dE_da[2][1],dE_da[2][2],dE_da[2][3]);
printf(" a3(Ang.) =%10.5f %10.5f %10.5f dE/da3(a.u.) =%10.5f %10.5f %10.5f\n",
tv[3][1]*BohrR,tv[3][2]*BohrR,tv[3][3]*BohrR,dE_da[3][1],dE_da[3][2],dE_da[3][3]);
-------------------------------------------------------------

You can change float value of lattice vectors or dE/da from 5 decimal digits to 10 or more decimal digits, e.g. "%10.5f" ->"%15.10f" in the line 1477.

Then, recompile the OpenMX code and use it to perform calculations. The output file will show more decimal digits.


For example,
-------------------------------------------------------------
printf(" Cell vectors and derivatives of total energy with respect to them\n");
printf(" a1(Ang.) =%15.10f %15.10f %15.10f dE/da1(a.u.) =%15.10f %15.10f %15.10f\n",tv[1][1]*BohrR,tv[1][2]*BohrR,tv[1][3]*BohrR,dE_da[1][1],dE_da[1][2],dE_da[1][3]);
printf(" a2(Ang.) =%15.10f %15.10f %15.10f dE/da2(a.u.) =%15.10f %15.10f %15.10f\n",tv[2][1]*BohrR,tv[2][2]*BohrR,tv[2][3]*BohrR,dE_da[2][1],dE_da[2][2],dE_da[2][3]);
printf(" a3(Ang.) =%15.10f %15.10f %15.10f dE/da3(a.u.) =%15.10f %15.10f %15.10f\n",tv[3][1]*BohrR,tv[3][2]*BohrR,tv[3][3]*BohrR,dE_da[3][1],dE_da[3][2],dE_da[3][3]);
-------------------------------------------------------------

Best regards,
Yung Ting Lee
メンテ

Page: [1]

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