-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathcheck_sol_LLG.py
More file actions
executable file
·43 lines (30 loc) · 885 Bytes
/
check_sol_LLG.py
File metadata and controls
executable file
·43 lines (30 loc) · 885 Bytes
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
#!/usr/bin/python
from sys import argv
import string
from glob import glob
from os.path import exists
sol_files = argv[1:]
llg_lines = []
print_all = 0
if sol_files.count('-all'):
pos = sol_files.index('-all')
del( sol_files[pos] )
print_all = 1
if not exists(sol_files[0]): # Need to use glob
print 'Using glob... '
sol_files = glob( sol_files[0] )
for sol_file in sol_files:
lines = open( sol_file).readlines()
for line in lines[0:3]:
cols = string.split( line )
if len(cols)>5:
llgcol = cols[-1]
# llgcol = cols[-4]
if len(llgcol)>4 and llgcol[3]=='=':
llg = float(llgcol[4:])
llg_lines.append( (llg, line[:-1],sol_file) )
llg_lines.sort()
if not print_all:
llg_lines = llg_lines[-10:]
for llg_line in llg_lines:
print llg_line[2],'==>',llg_line[1]