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 |