This thread is locked.Only browsing is available.
 Top Page > Browsing
 How to plot Vhart in a given direction. Date: 2018/05/23 02:08 Name: Carlos Dear OpenMX developers and users,I investigating a 2D material.I know that in OpenMX the Hartree potential is written in Gaussian cube format(.vhart.cube).However, I would like to plot the Hartree potential the along a specific direction. For instance, the direction "z" (perpendicular to plane of the 2D material). Is there any available code to do that?Please, could anyone indicate me the easiest way to do that?Thanks in advance!
 Page: [1]

 Re: How to plot Vhart in a given direction. ( No.1 ) Date: 2018/05/23 03:33 Name: Naoya Yamaguchi Hi,You can prepare the code by modifying "diff_gcube.c".I leave an example of it (plotting the average in terms of a-b plane along c-axis):You can modify lines 250-283 in "diff_gcube.c" as follows: /******************************************* make a file *******************************************/ if ((fp1 = fopen(argv[3],"w")) != NULL){/* Disabled ********************************************************************************************* fprintf(fp1,"%s\n",ctmp); fprintf(fp1,"%s\n",ctmp); fprintf(fp1,"%5d %12.6f %12.6f %12.6f\n",atomnum1,Grid_Origin1[1],Grid_Origin1[2],Grid_Origin1[3]); fprintf(fp1,"%5d %12.6f %12.6f %12.6f\n",Ngrid1_1,gtv1[1][1],gtv1[1][2],gtv1[1][3]); fprintf(fp1,"%5d %12.6f %12.6f %12.6f\n",Ngrid1_2,gtv1[2][1],gtv1[2][2],gtv1[2][3]); fprintf(fp1,"%5d %12.6f %12.6f %12.6f\n",Ngrid1_3,gtv1[3][1],gtv1[3][2],gtv1[3][3]); for (i=1; i<=atomnum1; i++){ fprintf(fp1,"%5.0f %12.6f %12.6f %12.6f %12.6f\n", Gxyz1[i][0],0.0,Gxyz1[i][1],Gxyz1[i][2],Gxyz1[i][3]); } for (n1=0; n1

 Page: [1]