Skip to content

Commit c8381d1

Browse files
committed
Revert "spectrumany.py: Code cleanup"
This reverts commit 6ef9cda.
1 parent 931c012 commit c8381d1

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

spectrumany.py

+11-11
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
"""
1+
'''
22
http://pymolwiki.org/index.php/spectrumany
33
44
(c) 2010 Thomas Holder
55
66
License: BSD-2-Clause
7-
"""
7+
'''
88

99
from __future__ import print_function
1010

@@ -20,16 +20,16 @@
2020

2121

2222
def spectrumany(expression, color_list, selection='(all)', minimum=None, maximum=None, quiet=1):
23-
"""
24-
DESCRIPTION
23+
'''
24+
DESCRIPTION
2525
2626
Define a color spectrum with as many color-stops as you like (at least 2).
2727
28-
USAGE
28+
USAGE
2929
3030
spectrumany expression, color_list [, selection [, minimum [, maximum ]]]
3131
32-
ARGUMENTS
32+
ARGUMENTS
3333
3434
expression = count, resi, b, q, or pc: respectively, atom count, residue
3535
index, temperature factor, occupancy, or partial charge {default: count}
@@ -38,15 +38,15 @@ def spectrumany(expression, color_list, selection='(all)', minimum=None, maximum
3838
3939
... all other arguments like with `spectrum` command
4040
41-
EXAMPLE
41+
EXAMPLE
4242
4343
spectrumany count, forest green yellow white
4444
spectrumany b, red yellow white, (polymer), maximum=100.0
4545
46-
SEE ALSO
46+
SEE ALSO
4747
4848
spectrum
49-
"""
49+
'''
5050
quiet = int(quiet)
5151
colors = color_list.split()
5252
if len(colors) < 2:
@@ -67,7 +67,7 @@ def spectrumany(expression, color_list, selection='(all)', minimum=None, maximum
6767

6868
if None in [minimum, maximum]:
6969
stored.e = list()
70-
cmd.iterate(selection, 'stored.e.append(%s)' % minmax_expr)
70+
cmd.iterate(selection, 'stored.e.append(%s)' % (minmax_expr))
7171
if minimum is None:
7272
minimum = min(stored.e)
7373
if maximum is None:
@@ -77,7 +77,7 @@ def spectrumany(expression, color_list, selection='(all)', minimum=None, maximum
7777
print(' Spectrum: range (%.5f to %.5f)' % (minimum, maximum))
7878

7979
if maximum == minimum:
80-
print('no spectrum possible, only equal %s values' % expression)
80+
print('no spectrum possible, only equal %s values' % (expression))
8181
return
8282

8383
if expression in discrete_expr:

0 commit comments

Comments
 (0)