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.
Questions about “chgdiff.pl CHGCAR1 CHGCAR2”
Moderator: moderators
Re: Questions about “chgdiff.pl CHGCAR1 CHGCAR2”
I think it's as simple as:
chgdiff.pl CHGCAR1 CHGCAR2
mv CHGCAR_diff CHGCAR1-2
chgdiff.pl CHGCAR1-2 CHGCAR3
chgdiff.pl CHGCAR1 CHGCAR2
mv CHGCAR_diff CHGCAR1-2
chgdiff.pl CHGCAR1-2 CHGCAR3
Re: Questions about “chgdiff.pl CHGCAR1 CHGCAR2”
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 ?
$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 ?
Re: Questions about “chgdiff.pl CHGCAR1 CHGCAR2”
Yes, that's right.