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
|
|