I am using xdat2pos.pl to extract certain step's coordinate to new POSCAR file for re-optimization as the structure Deformation is obviously, so I want to restart from the middle configuration which could save the time.
At first, I had to find the certain step's Information in OUTCAR, then find and copy the coordinates, vi POSCAR and paste. It takes a lot of time....
I find the xdat2pos.pl could helpful to extract the certain step's coordinates, but it seems wrong, the attachments is my POSCAR, XDATCAR and POSCAR231.out file. I want to extract the coordinates for step number 231, the command is xdat2pos.pl 1 231, and I got POSCAR231.out file.
Here I paste some lines in the POSCAR231.out, there is an extra line during the file, that is, the second line. And the first line should be the coordinates for the last Atom in POSCAR, the third line is the first Atom's coordinates in POSCAR.
Am I use this script in a wrong way? How can I solve this Problem?
Selective dynamics
Direct
0.7487487600 0.7523415300 0.2878050500 T T T
0.0000000000 0.0000000000 231.0000000000 T T T
0.0754188800 0.0918578900 0.3356459400 T T T
usage of xdat2pos.pl
Moderator: moderators
usage of xdat2pos.pl
- Attachments
-
- XDATCAR.gz
- (144.5 KiB) Downloaded 6679 times
-
- POSCAR231.out.gz
- (957 Bytes) Downloaded 6705 times
-
- POSCAR.gz
- (1.34 KiB) Downloaded 6668 times
Re: usage of xdat2pos.pl
anyone know how to fix this Problem?
Thanks
Thanks
Re: usage of xdat2pos.pl
Ok, I looked into this. I think the problem is that the script reads the POSCAR file and uses that to determine if you using vasp4 or vasp5 style files. In your case, the POSCAR file is vasp4, in the sense that the element types are not listed on line 6. But then you have a vasp5 style XDATCAR file where the element types are listed. The inconsistence between the files is messing up the script.
Try just adding the element types on line 6 of your POSCAR file so that starts as:
H C O Fe
1.00000000000000
9.2595636259286902 3.2737489626679599 -0.0000026155570740
0.0000000000000000 9.8212499618526792 -0.0000026155570740
0.0000000000000000 0.0000000000000000 21.0142593383788991
H C O Fe
2 1 2 64
Selective dynamics
Direct
0.0751726583337913 0.0911749019564709 0.3355235147866300 T T T
....
I'm also attaching a slightly modified script that corrects a different error.
In principle the script could separately detect vasp4 vs 5 style files for the POSCAR and XDATCAR files.
Try just adding the element types on line 6 of your POSCAR file so that starts as:
H C O Fe
1.00000000000000
9.2595636259286902 3.2737489626679599 -0.0000026155570740
0.0000000000000000 9.8212499618526792 -0.0000026155570740
0.0000000000000000 0.0000000000000000 21.0142593383788991
H C O Fe
2 1 2 64
Selective dynamics
Direct
0.0751726583337913 0.0911749019564709 0.3355235147866300 T T T
....
I'm also attaching a slightly modified script that corrects a different error.
In principle the script could separately detect vasp4 vs 5 style files for the POSCAR and XDATCAR files.
- Attachments
-
- xdat2pos.pl.gz
- (1.53 KiB) Downloaded 6746 times
Re: usage of xdat2pos.pl
Thanks for your help! Add the element types on line 6 in POSCAR can fix this Problem, but the new xdat2pos.pl seems unable to detect the different between vasp4 and vasp5 because use this new command, I get the same results as the old script.
And one more question, the coordinates in my POSCAR are in Cartesian type and the coordinates in XDATCAR are all in Direct type, so after I use this command, the line 9 of new POSCAR**.out is Cartesian as old POSCAR but the coordinates are in Direct type actually.
And one more question, the coordinates in my POSCAR are in Cartesian type and the coordinates in XDATCAR are all in Direct type, so after I use this command, the line 9 of new POSCAR**.out is Cartesian as old POSCAR but the coordinates are in Direct type actually.
Re: usage of xdat2pos.pl
Good points. I'll fix those problems today. Thank you for the input -- clearly this script is not used regularly!
Re: usage of xdat2pos.pl
yes, only under some Special conditions that we Need re-calculate from the middle steps. Where can I find the new Version of this script, will you update the xdat2pos.pl in this post or will you add it in the vtstscripts.tgz on the Website?
Re: usage of xdat2pos.pl
Ok, I've updated the script again. The correct version is in svn and should be in our most recent downloadable tarball.