chgdiff failed

Vasp transition state theory tools

Moderator: moderators

Post Reply
paapu
Posts: 6
Joined: Tue Apr 26, 2011 12:35 pm

chgdiff failed

Post by paapu »

Dear All,

I added to vasp CHGCAR files with chgsum, that was fine.
But when using chgdiff for the output file resulting from chgsum (CHGCAR_sum) and another CHGCAR file
an error resulted
>Atoms in file1: 0, Atoms in file2: 0
>Points in file1: 0.195141112677741, Points in file2: 0.227019420883369
>....

I have vasp5.2 and utexas scipts have been downloaded about 1/2011.

Problem was that there are missing lines in chgdiff.pl when compared to chgsum.pl

When I added folllowing lines (from chgsum.pl to chgdiff.pl)
# check whether it is a vasp5 format
$line1=<IN1>; $line2=<IN2>;
$header1.=$line1;

$line1=~s/^\s+//; $line2=~s/^\s+//;
@line1=split(/\s+/,$line1); @line2=split(/\s+/,$line2);
if ($line1[0]=~ /^\d+$/) {
@atoms1=@line1;
} else {
$atoms1=<IN1>;
$header1.=$atoms1;
@atoms1=split(/\s+/,$atoms1);
}
if ($line2[0]=~ /^\d+$/) {
@atoms2=@line2;
} else {
$atoms2=<IN2>;
@atoms2=split(/\s+/,$atoms2);
}

and changed to (in the end)
printf OUT "%18.11e %18.11e %18.11e %18.11e %18.11e\n",$line1[1],$line1[2],$line1[3],$line1[4],$line1[5];

chgdiff.pl works fine.

I guess other chg***.pl are similarly missing the vasp5.2 part and the output formats differ.
Can you update this?

terveisin, Markus
Post Reply