File: headerTest.py

package info (click to toggle)
pymol 2.2.0%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 43,400 kB
  • sloc: cpp: 482,465; python: 81,253; ansic: 27,428; sh: 94; makefile: 32; csh: 8
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 ""