error with using chgsum.pl

Vasp transition state theory tools

Moderator: moderators

Post Reply
jinshang
Posts: 3
Joined: Sat Dec 29, 2012 1:35 am

error with using chgsum.pl

Post by jinshang »

Dear all,

I have encountered an error when using "chgsum.pl CHGCAR1 CHGCAR2":

In the output file "CHGCAR_sum", the charges from the two files (i.e. CHGCAR1 and CHGCAR2) are correctly added, but the coordinates part only display the coordinate from "CHGCAR1" but not "CHGCAR2". So I have to manually input coordinate for "CHGCAR2" into "CHGCAR_sum" evry time.

Does anyone has the same problem?

Thank you very much in advance.

Best regards,
Eric
graeme
Site Admin
Posts: 2260
Joined: Tue Apr 26, 2005 4:25 am
Contact:

Re: error with using chgsum.pl

Post by graeme »

The script has to choose the coordinates of one of the files. It chooses the first.

If you want the coordinates of the second file, you can do chgsum.pl CHGCAR2 CHGCAR1

But we warned that it probably doesn't make sense to add charge density files for structures with different geometries.
jinshang
Posts: 3
Joined: Sat Dec 29, 2012 1:35 am

Re: error with using chgsum.pl

Post by jinshang »

Dear Graeme,

Thank you very much for your prompt reply!

I am adding charge density files for structures with the same geometries in order to obtain the charge density difference. First, I calculate charge density for a complex "A+B"; then calculate that for "A" by removing "B" and fixing the geometry of "A+B"; then calculate that for "B" by removing "A" and fixing the geometry of "A+B". Second, I use chgsum.pl to add "A"+"B". Finally, I use chgdiff.pl to obtain the difference between "A"+"B" and "A+B".

The problem lies in the second step: there is only coordinates for "A" in the resulting file "A"+"B". Therefore I have to manually add coordinates for "B" into file "A"+"B" in order to do the third step.

I am wondering if there is a method to bypass my manual work?

Thank you very much.

Best regards,
Eric
graeme
Site Admin
Posts: 2260
Joined: Tue Apr 26, 2005 4:25 am
Contact:

Re: error with using chgsum.pl

Post by graeme »

Ah, yes, of course, I see what you mean.

It would be easy enough to concatenate all the atomic positions. Perhaps this functionality makes sense as the default for the chgsum.pl script. If I can't think of any reason why we shouldn't, I'll change it.
jinshang
Posts: 3
Joined: Sat Dec 29, 2012 1:35 am

Re: error with using chgsum.pl

Post by jinshang »

Thank you very much! Could you please let me know if you fix the script to enable this function? My email address is jin.shang916@gmail.com or j.shang@student.unimelb.edu.au
Post Reply