forked from zhenming-xu/VASP-3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cluster.py
100 lines (93 loc) · 5.62 KB
/
cluster.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
#!/bin/env python
import sys
from VASP import read_poscar
from VASP import write_poscar
pos=[ [5.8542326628848222, 8.6627288616639202, 5.8614577958952649],
[19.1457883626720999, 8.6618038283281429, 5.8617364474046472],
[12.4996292966500064, 15.5432216444165245, 5.8505835915867426],
[12.4996643651611539, 20.1731884887187114, 5.8689022630647800],
[ 9.8642435232315151, 10.9792336123257641, 5.8473985708617429],
[15.1357647669649271, 10.9791445570918995, 5.8472893749556079],
[ 8.5184517876025279, 17.9094319106692339, 5.8404122824553175],
[16.4803808630984250, 17.9094750385708004, 5.8387698865076327],
[ 5.8239686065138274, 13.2430151734748378, 5.8366213458278002],
[19.1756365833384415, 13.2430391136603038, 5.8350835858967098],
[ 9.8067481495349647, 6.3495826586473152, 5.8328105220657820],
[15.1937500782213348, 6.3490794563218671, 5.8330243464332350],
[ 7.1904979234005300, 15.5651383106483276, 5.8259475258861704],
[17.8087338711519259, 15.5652572833824330, 5.8245572976908671],
[12.5000405878065539, 6.3729308348105809, 5.8218156883507675],
[ 9.8820227202533282, 20.1615823696097038, 5.7844099681486449],
[15.1170850426095829, 20.1616169957727216, 5.7828276269297225],
[ 9.8122233556618639, 15.6062771111702467, 5.7978947497764279],
[15.1870343137687520, 15.6062640823243584, 5.7973780728100950],
[ 8.4652256331715456, 13.2749294624138567, 5.7971824780871497],
[16.5343455597751188, 13.2747877636130056, 5.7962617201112181],
[11.1535516011113938, 8.6216877683269875, 5.7938944716497121],
[13.8466676349981466, 8.6214440419079121, 5.7943806235593751],
[11.1490651429739547, 17.9761055906219411, 5.7801712196507227],
[13.8496966421608665, 17.9760454193992452, 5.7804718311372252],
[ 7.0806236588204898, 10.9316354119090882, 5.7771740040302655],
[17.9196297301407306, 10.9312779304740122, 5.7762362324898824],
[11.1466749444189528, 13.2819533837950718, 5.7838345774454654],
[13.8529870474015446, 13.2820766532686125, 5.7835474481279379],
[ 8.4321768825083225, 8.5939250693677529, 5.7740131122559575],
[16.5679980292057039, 8.5938416892026712, 5.7741364855875670],
[12.5001416610547142, 10.9397393077747278, 5.7828449293659103],
[ 4.5545882618995801, 10.9372558294256201, 5.7785902068256227],
[20.4451384058851815, 10.9363239532347656, 5.7776259828189218],
[ 7.1740910330408996, 6.4035538749654872, 5.7743942607092302],
[17.8255437064344839, 6.4026847899577053, 5.7752304099191845],
[ 5.8568607540469744, 11.7651243950267137, 3.6608883120443871],
[19.1436939971528197, 11.7667770355312129, 3.6604706101656226],
[ 8.5426819733447310, 7.1162155758867005, 3.6587428673277396],
[16.4586851339770135, 7.1174272612378884, 3.6584426541561030],
[ 9.8136168292230721, 18.6222830403632145, 3.6663636877511325],
[12.4995145412520650, 18.6312555181673005, 3.6548235558601054],
[15.1831458084883888, 18.6231885937048105, 3.6654539879666501],
[ 7.1905459875948967, 9.4375562195163099, 3.6484179628325952],
[17.8089055071839013, 9.4369088439504623, 3.6479812702380898],
[ 8.5106357931706622, 16.3341139136295936, 3.6206149773764928],
[16.4878788265676661, 16.3351489370489098, 3.6202856639716825],
[ 7.1851154172870926, 14.0394083936080634, 3.6189915219198379],
[17.8144949861972179, 14.0402357499072128, 3.6176999795794704],
[11.1752410014319725, 7.1318705445070725, 3.6144877158625528],
[13.8259816450236723, 7.1317412695549667, 3.6160137060298552],
[12.4996158325251283, 14.0602012265637786, 3.6075313553575503],
[11.1505765206244050, 11.7223267224017249, 3.6068877754449300],
[13.8502987706658622, 11.7232173727088629, 3.6066155977606549],
[11.1498571077593756, 16.4113638209514292, 3.5760358823059648],
[13.8485674418494789, 16.4107606851385235, 3.5759996716579900],
[ 9.7891812762153094, 9.3780459876955025, 3.5711816461132022],
[15.2101276867227853, 9.3789002597240856, 3.5716568501771477],
[ 8.4393762279991158, 11.7162332293038247, 3.5731022570868047],
[16.5617228908786025, 11.7167625758915364, 3.5727113095524476],
[ 9.7777043270454023, 14.0726331225701404, 3.5575765222356122],
[15.2221258811660487, 14.0731293508385509, 3.5569787180677124],
[12.5002525096445680, 9.3601828303336774, 3.5542392678181502],
[ 8.5320020693175405, 14.7910868434451501, 1.5187845488341576],
[16.4668862744892053, 14.7933338472709952, 1.5180927858648652],
[ 9.8887961265038822, 17.1463588545972883, 1.5146754477426800],
[15.1081461908212749, 17.1487848478586997, 1.5146578136720801],
[12.5020410432031692, 7.9226726991187002, 1.5145458408523949],
[ 7.1705177122920194, 12.4396711855405453, 1.5118473503168626],
[17.8294570832127093, 12.4413426726000420, 1.5111017865561325],
[ 9.7860910857492662, 7.9205963993608606, 1.5076994932664651],
[15.2171821019143749, 7.9212608271536356, 1.5081308582786375],
[12.5003167921428595, 12.5030053504844716, 1.4977462763204274],
[12.4991949683432502, 17.0771780327954161, 1.4738220963398374],
[11.1387551669516434, 14.8215426119312426, 1.4782594263777826],
[13.8601305439163998, 14.8216561851532873, 1.4781982275442249],
[ 9.8121148532213063, 12.5195525373460228, 1.4769349629129875],
[15.1895751883270265, 12.5200970496508468, 1.4764890499645225],
[11.1714269060458786, 10.1654087289077619, 1.4752615333521850],
[13.8288820354799782, 10.1668810853471037, 1.4752820024869751],
[ 8.5369568562395006, 10.2155217644163354, 1.4700324542918575],
[16.4634057452755975, 10.2154701580726197, 1.4701338323750650]
]
lattice, basis, elements, num_atoms, selectiveflag, coordinate_type, coordinates, selective = read_poscar(sys.argv[1])
temp = coordinates[:119]
temp.extend(pos)
temp.extend(coordinates[119:])
num_atoms[0] += 82
write_poscar('POSCAR.vasp', lattice, basis, elements, num_atoms, selectiveflag, coordinate_type, temp, selective)