Files
LPP/examples/test_pdbfile.py
danielque 539fd060c2 python 3 compatibility for examples/*.py files
add from __future__ import
print statement -> print() function
xrange -> range
map() -> list(map())
range() -> list(range())
StandardError -> Exception
2023-08-10 13:25:36 +02:00

21 lines
435 B
Python

# simple test of pdbfile tool
# requires files/dump.peptide.* and files/peptide.pdb
# creates tmp*.pdb
d = dump("files/dump.peptide.*")
p = pdbfile("files/peptide",d)
p.one()
p.many()
p.single(0,"tmp.single")
n = flag = 0
while 1:
index,time,flag = p.iterator(flag)
if flag == -1: break
p.single(time,"tmp.single")
n += 1
print("Incrementally processed %d PDB files" % n)
print("all done ... type CTRL-D to exit Pizza.py")