File: headerTest.py

package info (click to toggle)
pymol 1.8.4.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 42,248 kB
  • ctags: 24,095
  • sloc: cpp: 474,635; python: 75,034; ansic: 22,888; sh: 236; makefile: 78; csh: 21
file content (34 lines) | stat: -rw-r--r-- 650 bytes parent folder | download | duplicates (6)
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
import headering
import glob
import pprint
import sys
import os

if len(sys.argv)>1:
	p = sys.argv[1:]
else:
	print "Usage: pymol -cq ./headerTest.py -- MTZTestDirectory"
	sys.exit(1)


for curPath in p:
	print "Processing MTZ files in path: '%s'" % curPath

	l = glob.glob(curPath + os.sep + "*.mtz")

	d = {}

	for mtzFile in l:
	    print "Processing %s." % mtzFile
	    d[mtzFile] = headering.MTZHeader(mtzFile)

	for f in d:
	    print "Columns for file '%s':" % f
	    pprint.pprint(d[f].getColumns())
	    print ""

	for f in d:
	    print "Columns of type W ofr file '%s':" % f
	    pprint.pprint(d[f].getColumnsOfType("W"))
	    print ""