Replaced is and is not
This commit is contained in:
@ -34,7 +34,7 @@ def locate(fname, namespace=''):
|
|||||||
|
|
||||||
def open_sim(directory, maxcache=None):
|
def open_sim(directory, maxcache=None):
|
||||||
tr = None
|
tr = None
|
||||||
if len(glob(os.path.join(directory, 'nojump.xtc'))) is 1:
|
if len(glob(os.path.join(directory, 'nojump.xtc'))) == 1:
|
||||||
tr = md.open(directory, trajectory='nojump.xtc', cached=maxcache, reindex=True)
|
tr = md.open(directory, trajectory='nojump.xtc', cached=maxcache, reindex=True)
|
||||||
else:
|
else:
|
||||||
tr = md.open(directory, trajectory='out/*.xtc', cached=maxcache, reindex=True, nojump=True)
|
tr = md.open(directory, trajectory='out/*.xtc', cached=maxcache, reindex=True, nojump=True)
|
||||||
|
@ -123,7 +123,7 @@ class Simulation(Base):
|
|||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
attrs = []
|
attrs = []
|
||||||
for attr, val in self.__dict__.items():
|
for attr, val in self.__dict__.items():
|
||||||
if attr[0] is not '_' and attr is not 'type':
|
if attr[0] != '_' and attr != 'type':
|
||||||
attrs.append('{}={}'.format(attr, val))
|
attrs.append('{}={}'.format(attr, val))
|
||||||
return '<{classname}({attributes})>'.format(classname=self.__class__.__name__, attributes=', '.join(attrs))
|
return '<{classname}({attributes})>'.format(classname=self.__class__.__name__, attributes=', '.join(attrs))
|
||||||
|
|
||||||
@ -208,7 +208,7 @@ class Evaluation(Base):
|
|||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
attrs = []
|
attrs = []
|
||||||
for attr, val in self.__dict__.items():
|
for attr, val in self.__dict__.items():
|
||||||
if attr[0] is not '_' and attr not in ['type', 'data']:
|
if attr[0] != '_' and attr not in ['type', 'data']:
|
||||||
attrs.append('{}={}'.format(attr, val))
|
attrs.append('{}={}'.format(attr, val))
|
||||||
return '<{classname}({attributes})>'.format(classname=self.__class__.__name__, attributes=', '.join(attrs))
|
return '<{classname}({attributes})>'.format(classname=self.__class__.__name__, attributes=', '.join(attrs))
|
||||||
|
|
||||||
@ -227,7 +227,7 @@ def float_query(value, dbattr):
|
|||||||
crit = dbattr == float(value)
|
crit = dbattr == float(value)
|
||||||
elif isinstance(value, str):
|
elif isinstance(value, str):
|
||||||
limits = value.split('-')
|
limits = value.split('-')
|
||||||
if len(limits) is 2:
|
if len(limits) == 2:
|
||||||
try:
|
try:
|
||||||
limits = [float(x) for x in limits]
|
limits = [float(x) for x in limits]
|
||||||
except:
|
except:
|
||||||
|
@ -30,7 +30,7 @@ def number_shorthand(x):
|
|||||||
return True
|
return True
|
||||||
elif isinstance(x, str):
|
elif isinstance(x, str):
|
||||||
limits = x.split('-')
|
limits = x.split('-')
|
||||||
if len(limits) is 2:
|
if len(limits) == 2:
|
||||||
try:
|
try:
|
||||||
limits = [float(a) for a in limits]
|
limits = [float(a) for a in limits]
|
||||||
except:
|
except:
|
||||||
|
Reference in New Issue
Block a user