"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "examples/devel/count_molecules.py" between
pymol-v1.8.6.0.tar.bz2 and pymol-v2.1.0.tar.bz2

About: PyMOL is a Python-enhanced molecular graphics tool. It excels at 3D visualization of proteins, small molecules, density, surfaces, and trajectories. It also includes molecular editing, ray tracing, and movies. Open Source version.

count_molecules.py  (pymol-v1.8.6.0.tar.bz2):count_molecules.py  (pymol-v2.1.0.tar.bz2)
skipping to change at line 21 skipping to change at line 21
mole_sele = prefix + "mole" mole_sele = prefix + "mole"
mole_cnt = 0 mole_cnt = 0
if cmd.select(iter_sele, input_sele)>0: if cmd.select(iter_sele, input_sele)>0:
while 1: while 1:
atom_cnt = cmd.select(mole_sele, "bymol (first "+iter_sele+")") atom_cnt = cmd.select(mole_sele, "bymol (first "+iter_sele+")")
togo_cnt = cmd.select(iter_sele, iter_sele+" and not "+mole_sele) togo_cnt = cmd.select(iter_sele, iter_sele+" and not "+mole_sele)
if atom_cnt>0: if atom_cnt>0:
mole_cnt = mole_cnt + 1 mole_cnt = mole_cnt + 1
print "molecule %d contains %d atoms"%(mole_cnt,atom_cnt) print("molecule %d contains %d atoms"%(mole_cnt,atom_cnt))
if togo_cnt<=0: if togo_cnt<=0:
break break
print "(%s) contains %d molecules total."%(input_sele, mole_cnt) print("(%s) contains %d molecules total."%(input_sele, mole_cnt))
 End of changes. 2 change blocks. 
1 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)