[Wien] convert clmsum to gaussian cube

Alberto Otero de la Roza alberto at carbono.quimica.uniovi.es
Tue Mar 10 12:31:59 CET 2009


Dear Yurko,

> I'm trying to convert the total charge density file (case.clmsum) to
> the Gaussian cube format in order to plot the isosurfaces of charge
> density in 3 dimensions. My first question is if anybody has tried to
> do this and can share the code with me? Or maybe it is already
> available in wien2k distribution, but I somehow haven;t noticed it?

An addition to what has been said about this: you can easily generate
gaussian cube files with our CRITIC program (Comput. Phys. Comm. 180
(2009) 157-166), downloadable from the CPC library. The input for this
task is very simple: 

crystal
 struct xxx.struct
 clm xxx.clmsum
endcrystal
doplot rho format cube 3dc r0x r0y r0z r1x r1y r1z nx ny nz

where r0 and r1 are the points that specify the parallelepiped and nx,
ny and nz are the number of grid points in each direction.

> for (ix=0;ix<NX;ix++) {
>       for (iy=0;iy<NY;iy++) {
>          for (iz=0;iz<NZ;iz++) {
>             printf("%g ",data[ix][iy][iz]);
>             if (iz % 6 == 5)
>                printf("\n");
>          }
>          printf("\n");
>       }
>    }
> 
> where can i find NX, NY and NZ in clmsum file? And is the order of
> loops the same or differs?

The nx, ny and nz are defined by you. The density is calculated
analytically at the nx*ny*nz points of the 3d grid using the
information contained in the clmsum file. The order of the loops and
the 6 field-per-line format seems to be correct to me.

Best regards,

Alberto

----
Alberto Otero de la Roza
PhD Student
Departamento de Química Física y Analítica.
Universidad de Oviedo, 33006 Oviedo, Spain.
----


More information about the Wien mailing list