Problem on CONTCAR to xyz file

Vasp transition state theory tools

Moderator: moderators

Post Reply
jianmin
Posts: 71
Joined: Fri Jan 15, 2010 2:39 am

Problem on CONTCAR to xyz file

Post by jianmin »

Dear fellows,
I had a problem when I tried to convert the CONTCAR to an xyz format file.

1. The CONTCAR file contains the following lines:
structure_of_propoxy_molecule
10.0000000000000
1.0000000000000000 0.0000000000000000 0.0000000000000000
0.0000000000000000 1.0000000000000000 0.0000000000000000
0.0000000000000000 0.0000000000000000 1.0000000000000000
7 3 1
Direct
0.2835848566144139 0.4930978808653607 0.4891700000000014
0.3702131016301856 0.6211958136751263 0.5773551440820904
0.3702131016301856 0.6211958136751263 0.4009848559179124
0.4986254314366886 0.4022002054956919 0.5772169283801495
0.4986254314366886 0.4022002054956919 0.4011230716198462
0.6966289884821945 0.5143562278596172 0.5759833840057055
0.6966289884821945 0.5143562278596172 0.4023566159942975
0.3736957622365021 0.5558973226676394 0.4891700000000014
0.4986768713667363 0.4684601992514037 0.4891700000000014
0.6331364059563893 0.5481771152724620 0.4891700000000014
0.6252385108522485 0.6816091536559431 0.4891700000000014

2. After I issued the command: vasp2con.pl CONTCAR, I got a CONTCAR.con file which, weirdly, contains the following lines
10000 RANDOM NUMBER SEED
0.0000 TIME
10.0000000000 10.0000000000 10.0000000000
90.0000000000 90.0000000000 90.0000000000
0 0
0 0 0
3
7 3 1
1.0 1.0 1.0
structure_of_propoxy_molecule
Coordinates of Component 1
2.83584856614414 4.93097880865361 4.89170000000001 0 1
3.70213101630186 6.21195813675126 5.77355144082090 0 2
3.70213101630186 6.21195813675126 4.00984855917912 0 3
4.98625431436689 4.02200205495692 5.77216928380150 0 4
4.98625431436689 4.02200205495692 4.01123071619846 0 5
6.96628988482194 5.14356227859617 5.75983384005705 0 6
6.96628988482194 5.14356227859617 4.02356615994298 0 7
Type1
Coordinates of Component 2
3.73695762236502 5.55897322667639 4.89170000000001 0 8
4.98676871366736 4.68460199251404 4.89170000000001 0 9
6.33136405956389 5.48177115272462 4.89170000000001 0 10
Type2
Coordinates of Component 3
6.25238510852248 6.81609153655943 4.89170000000001 0 11


3. After I issued the command: con2xyz.pl CONTCAR.con, I got a more weird CONTCAR.xyz file which contains the following lines
11
Generated with con2xyz
structure_of_propoxy_molecule 2.83584856614414 4.93097880865361 4.89170000000001
structure_of_propoxy_molecule 3.70213101630186 6.21195813675126 5.77355144082090
structure_of_propoxy_molecule 3.70213101630186 6.21195813675126 4.00984855917912
structure_of_propoxy_molecule 4.98625431436689 4.02200205495692 5.77216928380150
structure_of_propoxy_molecule 4.98625431436689 4.02200205495692 4.01123071619846
structure_of_propoxy_molecule 6.96628988482194 5.14356227859617 5.75983384005705
structure_of_propoxy_molecule 6.96628988482194 5.14356227859617 4.02356615994298
Type1 3.73695762236502 5.55897322667639 4.89170000000001
Type1 4.98676871366736 4.68460199251404 4.89170000000001
Type1 6.33136405956389 5.48177115272462 4.89170000000001
Type2 6.25238510852248 6.81609153655943 4.89170000000001

Could anyone tell me what the problem is and how to solve it? Thanks a lot in advance.
graeme
Site Admin
Posts: 2276
Joined: Tue Apr 26, 2005 4:25 am
Contact:

Re: Problem on CONTCAR to xyz file

Post by graeme »

There isn't really a problem. A program such as jmol will load that xyz file but it won't know what the atom types are. The reason is that the (vasp4.x) CONTCAR/POSCAR files do not contain the atomic identities.

To fix this, replace the first line in your CONTCAR file with a list of the atom types in your system. The script will then properly use these in your xyz file.
jianmin
Posts: 71
Joined: Fri Jan 15, 2010 2:39 am

Re: Problem on CONTCAR to xyz file

Post by jianmin »

Hi graeme, Thank you very much for your reply and it solves my problem.
Wish you a good day!
Post Reply