forked from Angel-Jia/VASP-script
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcel2vas.py
21 lines (17 loc) · 780 Bytes
/
cel2vas.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/env python3
from VASP import readCell, writeVasp
import sys
if len(sys.argv) < 2:
print('')
print('Usage: %s cell_file1 cell_file2 ...' % sys.argv[0].split('/')[-1])
print('Please try again')
exit(1)
print('')
print('################## This script converts .cell into POSCAR ##################')
print(' ############### .cell -> POSCAR ###############')
for file_name in sys.argv[1:]:
print(' processing %s' % file_name)
basis, elements, num_atoms, coordinate_type, coordinates = readCell(file_name)
writeVasp(file_name.replace('.cell', '.vasp'), 1.0, basis, elements,
num_atoms, '', coordinate_type, coordinates, [])
print(' ----------------- Done -----------------\n')