Questions about “chgdiff.pl CHGCAR1 CHGCAR2”

Vasp transition state theory tools

Moderator: moderators

Post Reply
Jiang12
Posts: 15
Joined: Thu Mar 13, 2014 7:58 am

Questions about “chgdiff.pl CHGCAR1 CHGCAR2”

Post by Jiang12 »

Dear Prof. Graeme and others,

For the script chgdiff.pl, the command "chgdiff.pl CHGCAR1 CHGCAR2" is CHGCAR1-CHGCAR2 or CHGCAR2-CHGCAR1.

I have three CHGCAR, how can I realize "CHGCAR1-CHGCAR2-CHGCAR3"?

Thank you very much.
graeme
Site Admin
Posts: 2290
Joined: Tue Apr 26, 2005 4:25 am
Contact:

Re: Questions about “chgdiff.pl CHGCAR1 CHGCAR2”

Post by graeme »

I think it's as simple as:

chgdiff.pl CHGCAR1 CHGCAR2
mv CHGCAR_diff CHGCAR1-2
chgdiff.pl CHGCAR1-2 CHGCAR3
lisu555
Posts: 1
Joined: Thu Jan 18, 2018 7:23 am

Re: Questions about “chgdiff.pl CHGCAR1 CHGCAR2”

Post by lisu555 »

But I am confused that: the script is

$line1 = <IN1>;
$line2 = <IN2>;
@line1 = split(/\s+/,$line1);
@line2 = split(/\s+/,$line2);
for ($j=1; $j<@line1; $j++) {
$line1[$j] = $line2[$j]-$line1[$j];


it seems to be CHGCAR2 - CHGCAR1 ?
graeme
Site Admin
Posts: 2290
Joined: Tue Apr 26, 2005 4:25 am
Contact:

Re: Questions about “chgdiff.pl CHGCAR1 CHGCAR2”

Post by graeme »

Yes, that's right.
Post Reply