script chg2cube.pl
Moderator: moderators
script chg2cube.pl
I tried to use the script chg2cube.pl but when I have to enter atom types by atomic number I don't know how the program will read. For example, I have Pt 12 atoms Co 12 atom O 1 atom and H 2 atoms. I enter 78 27 8 1 but it have error said NUMBER OF ELEMENT TYPES DOES NOT MATCH NUMBER OF ATOMIC NUMBERS GIVEN. How am I supposed to enter the input?
Thank you.
Thank you.
Re: script chg2cube.pl
It looks to me like you are entering the data correctly. If you have four atom groups in your CHGCAR then you need to enter four numbers, separated by spaces and <enter>. If you have not updated on cvs in a while that particular script was updated in late August.
Re: script chg2cube.pl
Does this code work for non-orthogonal cells also ?
or works properly for cubic cells/or othogonal cells only ..?
thanx
rajesh
or works properly for cubic cells/or othogonal cells only ..?
thanx
rajesh
Re: script chg2cube.pl
I does not look like this script does deal with non-orthogonal boxes correctly. But it should. We'll post back when it's been done.
Re: script chg2cube.pl
The script has been checked and can handle non-orthogonal cells at this point.
Re: script chg2cube.pl
Hello,
I'm getting the same error. I am just running a 16 atom Fe and 1 N supercell. I enter the atomic numbers as:
26 7
and I get the "NUMBER OF ELEMENT TYPES DOES NOT MATCH NUMBER OF ATOMIC NUMBERS GIVEN" error
My CHGCAR file looks like:
FeN Oct Bulk Calc
1.00000000000000
5.740000 0.000000 0.000000
0.000000 5.740000 0.000000
0.000000 0.000000 5.740000
16 1
Direct
0.000000 0.998361 0.000000
0.500000 0.949386 0.000000
0.000000 0.501639 0.000000
0.000000 0.007031 0.500000
0.500000 0.550614 0.000000
0.500000 0.998361 0.500000
0.000000 0.492969 0.500000
0.500000 0.501639 0.500000
0.254426 0.250000 0.245574
0.745574 0.250000 0.245574
0.240959 0.750000 0.259041
0.254426 0.250000 0.754426
0.759041 0.750000 0.259041
0.745574 0.250000 0.754426
0.240959 0.750000 0.740959
0.759041 0.750000 0.740959
0.500000 0.250000 0.000000
36 36 36
CHARGE DENSITY DATA
What could be the problem?
Thank you
modey3
I'm getting the same error. I am just running a 16 atom Fe and 1 N supercell. I enter the atomic numbers as:
26 7
and I get the "NUMBER OF ELEMENT TYPES DOES NOT MATCH NUMBER OF ATOMIC NUMBERS GIVEN" error
My CHGCAR file looks like:
FeN Oct Bulk Calc
1.00000000000000
5.740000 0.000000 0.000000
0.000000 5.740000 0.000000
0.000000 0.000000 5.740000
16 1
Direct
0.000000 0.998361 0.000000
0.500000 0.949386 0.000000
0.000000 0.501639 0.000000
0.000000 0.007031 0.500000
0.500000 0.550614 0.000000
0.500000 0.998361 0.500000
0.000000 0.492969 0.500000
0.500000 0.501639 0.500000
0.254426 0.250000 0.245574
0.745574 0.250000 0.245574
0.240959 0.750000 0.259041
0.254426 0.250000 0.754426
0.759041 0.750000 0.259041
0.745574 0.250000 0.754426
0.240959 0.750000 0.740959
0.759041 0.750000 0.740959
0.500000 0.250000 0.000000
36 36 36
CHARGE DENSITY DATA
What could be the problem?
Thank you
modey3
Re: script chg2cube.pl
I'm pretty sure this is due to a convention that we have in which the first line of your POSCAR or CHGCAR file should be the elements used in the calculation. Try changing your first line from
FeN Oct Bulk Calc
to
Fe N
FeN Oct Bulk Calc
to
Fe N
Re: script chg2cube.pl
Hi,
I got the same problem. I have CHGCAR file for Aluminium bulk system.
POSCAR file
SELECT INPUT FILE FORMAT 1=CHGCAR or 2=LOCPOT: 1
READING 'chgcar' FILE FORMAT
USING 'bohr' FOR OUTPUT UNITS
ENTER ELEMENT TYPES BY ATOMIC NUMBER: 13
NUMBER OF ELEMENT TYPES DOES NOT MATCH NUMBER OF ATOMIC NUMBERS GIVEN
Please help!
I got the same problem. I have CHGCAR file for Aluminium bulk system.
POSCAR file
CHGCAR fileAl
4.05000000000000
0.4985804050614968 0.4985804050614968 0.0000000000000000
0.0000000000000000 0.4985804050614968 0.4985804050614968
0.4985804050614968 0.0000000000000000 0.4985804050614968
1
Direct
0.0000000000000000 0.0000000000000000 0.0000000000000000
perl chg2cube.pl CHGCARAl
4.05000000000000
0.498580 0.498580 0.000000
0.000000 0.498580 0.498580
0.498580 0.000000 0.498580
1
Direct
0.000000 0.000000 0.000000
24 24 24
-.17130759910E+00 -.27145340249E-01 0.38590045741E+00 0.10061363175E+01 0.17299028414E+01
0.24304876139E+01 0.29933762663E+01 0.33514083817E+01 0.35035584706E+01 0.35078623871E+01
0.34438003969E+01 0.33757276029E+01 0.33478536358E+01 0.33757276029E+01 0.34438003969E+01
SELECT INPUT FILE FORMAT 1=CHGCAR or 2=LOCPOT: 1
READING 'chgcar' FILE FORMAT
USING 'bohr' FOR OUTPUT UNITS
ENTER ELEMENT TYPES BY ATOMIC NUMBER: 13
NUMBER OF ELEMENT TYPES DOES NOT MATCH NUMBER OF ATOMIC NUMBERS GIVEN
Please help!
Re: script chg2cube.pl
The top line in vasp4 CHGCAR is an optional comment line, our group by convention uses this line to include element types. However because the cube format uses atomic numbers instead of element names so the script was not written to accommodate anything but a blank comment line or no comment line.
To make the script work simply delete any text in the top line.
I will update the script to handle a comment line and modernize it work with what I expect is a new vasp5 CHGCAR format.
I will post here when the script has been updated
Dan
To make the script work simply delete any text in the top line.
I will update the script to handle a comment line and modernize it work with what I expect is a new vasp5 CHGCAR format.
I will post here when the script has been updated
Dan
Re: script chg2cube.pl
chg2cube.pl has been updated to handle vasp5 and the optional comment line. It can be obtained from cvs
Dan
Dan