Page 1 of 1

chg2cube.pl - strange result

Posted: Sun Apr 25, 2010 1:28 pm
by yeops
Hi all,

I've been using the chg2cube.pl utility to convert the PARCHG file generated by VASP to the cube format to be read by Materials Studio. The chg2cube.pl utility has been working fine for me so far except for one case where the isosurface looks really strange: the isosurfaces on top and below the plane of atoms are sheared in opposite directions to one another. (Imagine a perfect sphere sliced in the centre with the top hemisphere displaced to the left and the bottom hemisphere displaced to the right)

I've used another program to look at the cube file and it looks the same, so I don't think it is the fault of Materials Studio. I've also used another program to look at the PARCHG file and the isosurfaces look fine too, so something must have gone wrong during the PARCHG to cube conversion process. Unfortunately I'm perl illiterate, so i can't look at the code to see what has gone wrong. If someone is willing to look at the files, I can post the PARCHG and corresponding cube files somewhere for download. Thanks in advance!

Re: chg2cube.pl - strange result

Posted: Mon Apr 26, 2010 4:34 am
by graeme
If you post a link or send us the file, we'll take a look. Without a precise format definition, we would like to output a file that is as compatible with other tools as possible.

Re: chg2cube.pl - strange result

Posted: Mon Apr 26, 2010 8:30 am
by yeops
Hi graeme,

I've uploaded the PARCHG file for my system and the weird looking cube file to ftp://ftp.ihpc.a-star.edu.sg/outgoing/yeops

Unfortunately the files are really huge so I can't keep them up for long. Please let me know when the download is done so that I may remove them.

Thanks so much for your help!

Re: chg2cube.pl - strange result

Posted: Mon Apr 26, 2010 4:00 pm
by dano
can you zip the file so it will transfer faster? We have been getting some time out errors

Re: chg2cube.pl - strange result

Posted: Tue Apr 27, 2010 4:15 am
by yeops
My apologies, I've zipped the files so the transfer should be faster now. Thank you!

Re: chg2cube.pl - strange result

Posted: Thu Apr 29, 2010 8:45 pm
by dano
Nice catch. There was a bug causing the script to skip numbers that ended in a period. The bug has been fixed. And the file has been updated in CVS.

Re: chg2cube.pl - strange result

Posted: Mon May 03, 2010 6:30 am
by yeops
Many thanks!

Re: chg2cube.pl - strange result

Posted: Thu Sep 08, 2011 6:56 am
by tarzan11_11
Hi Yeops
Hope u still lokk at this forum ..
Can you pls giude how to plot the .cude files using materials studio ..
gaussview by itself is no good for plotting periodic systems ...
thanks

Re: chg2cube.pl - strange result

Posted: Thu Sep 08, 2011 1:36 pm
by dano
you should consider using vmd

Re: chg2cube.pl - strange result

Posted: Fri Sep 09, 2011 12:59 am
by yeops
Hi tarzan11_11,

Which version of Materials Studio are you using? As far as I know, you need version 4.4 and above to visualize the cube files. Do an "Edit | Insert from..." to load the cube file to the structure file.

Hope this helps.

Re: chg2cube.pl - strange result

Posted: Wed Sep 14, 2011 4:18 am
by tarzan11_11
hi thanks
we have MS 4.0

best wishes