Bader with Gaussian cube reference

Bader charge density analysis

Moderator: moderators

Post Reply
maharan
Posts: 6
Joined: Mon Jun 11, 2007 2:16 pm

Bader with Gaussian cube reference

Post by maharan »

Is there a way to make bader program use a reference charge file specified as gaussian cube file ?

Or is there a free tool to convert my gaussian cube file to vasp format ?

Thank you, Maciek
graeme
Site Admin
Posts: 2276
Joined: Tue Apr 26, 2005 4:25 am
Contact:

Post by graeme »

The reference file reading is only set up for chgcar file, but there is no good reason for this. With a small change, the code should be able to read cube or chgcar files. If this would help, we'll implement it.

A cube -> chgcar converter would also be nice.
maharan
Posts: 6
Joined: Mon Jun 11, 2007 2:16 pm

Post by maharan »

I would appreciate it very much if you could implement reading of cube reference!


I am trying to write cube->chgcar converter but I am stuck with debuging. Integrated number of electron is the same whenever I use cube or converted chgcar but the distribution over atoms is different. I tried different units (Bohr/A), loops ordering for grid (z or x first) but I cant locate bug.
Could you point me to very detailed description of CHGCAR format ?
I cant find on the web so my work is revese engineering.
maharan
Posts: 6
Joined: Mon Jun 11, 2007 2:16 pm

Post by maharan »

I wrote a simple Cube to CHGCAR converter. I tested it on one of my G98 cube files and it seems to work (The output CHGCAR file gives the same results with Bader program).

Please feel free to use and modify it:

http://www.chem.univ.gda.pl/~maharan/cube2chgcar.c
jvoss
Posts: 1
Joined: Tue Sep 18, 2007 9:46 am

patch for cube format as reference input

Post by jvoss »

I've made a patch which allows bader to read cube files as reference densities:
http://dcwww.camd.dtu.dk/~jovo/bader_cuberef.diff
Run
patch -p1 <somepath/bader_cuberef.diff
inside the bader source directory to apply the patch.
Bader will distinguish between cube and chgcar automatically.
andri
Site Admin
Posts: 117
Joined: Tue Apr 26, 2005 6:20 am

Post by andri »

Thanks Johannes, this looks excellent.
graeme
Site Admin
Posts: 2276
Joined: Tue Apr 26, 2005 4:25 am
Contact:

Post by graeme »

Nice addition Johannes. We've added your cube reference file loading code to the current source and binaries.
maharan
Posts: 6
Joined: Mon Jun 11, 2007 2:16 pm

Post by maharan »

Thank you. Although I used my converter program I think this modification will be useful in the future!
Post Reply