Commit f7b98d01 authored by Jason Swails's avatar Jason Swails
Browse files

Corrected minor bug in GBneck screening parameter assignment. The existing logic

was:

if symbl[0] == ('c' or 'C'):
   ...do stuff...

This logic will match only 'c' as ('c' or 'C') evaluates to 'c' while
('c' and 'C') evaluates to 'C':

>>> 'c' or 'C'
'c'
>>> 'C' == ('c' or 'C')
False

The correct logic is either

if symbl[0].upper() == 'C':
   ...do stuff...

or

if symbl[0] in ('C', 'c'):
   ...do stuff...

(Alternatives can be [ if symbl[0] in 'cC' ] or [ if symbl[0].lower() == 'c'])
parent 48dc97ba
...@@ -474,15 +474,15 @@ class PrmtopLoader(object): ...@@ -474,15 +474,15 @@ class PrmtopLoader(object):
# Update screening parameters for GBn if specified # Update screening parameters for GBn if specified
if symbls: if symbls:
for (i, symbl) in enumerate(symbls): for (i, symbl) in enumerate(symbls):
if symbl[0] == ('c' or 'C'): if symbl[0] in ('c', 'C'):
screen[i] = 0.48435382330 screen[i] = 0.48435382330
elif symbl[0] == ('h' or 'H'): elif symbl[0] in ('h', 'H'):
screen[i] = 1.09085413633 screen[i] = 1.09085413633
elif symbl[0] == ('n' or 'N'): elif symbl[0] in ('n', 'N'):
screen[i] = 0.700147318409 screen[i] = 0.700147318409
elif symbl[0] == ('o' or 'O'): elif symbl[0] in ('o', 'O'):
screen[i] = 1.06557401132 screen[i] = 1.06557401132
elif symbl[0] == ('s' or 'S'): elif symbl[0] in ('s', 'S'):
screen[i] = 0.602256336067 screen[i] = 0.602256336067
else: else:
screen[i] = 0.5 screen[i] = 0.5
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment