Skip to content
This repository has been archived by the owner on Sep 11, 2023. It is now read-only.

Problems with loading more than two trajectories #1564

Closed
orthonalmatrix opened this issue May 13, 2022 · 2 comments
Closed

Problems with loading more than two trajectories #1564

orthonalmatrix opened this issue May 13, 2022 · 2 comments

Comments

@orthonalmatrix
Copy link

orthonalmatrix commented May 13, 2022

fdir = '../testdata/' feat = pyemma.coordinates.featurizer(fdir+'/step3_pbcsetup.psf') feat.add_backbone_torsions(selstr='residue 38 to 155 and protein' ,cossin=True,deg = False,periodic = False) feats = pyemma.coordinates.source([fdir+'step5.3_200ps_production.dcd',fdir+'step5.5_200ps_production.dcd'] ,features=feat, stride = 100)

The above works fine, but when I use the command (with 3 dcds)

feats = pyemma.coordinates.source([fdir+'step5.3_200ps_production.dcd',fdir+'step5.5_200ps_production.dcd',fdir+'step5.6_200ps_production.dcd'] ,features=feat, stride = 100)

I get the following error. I get this error no matter what dcd's I use so i do not think there is something wrong with them. Any ideas?

HBox(children=(HBox(children=(Label(value='Obtaining file info'),), layout=Layout(max_width='35%', min_width='…

<function pyemma._base.progress.reporter.notebook.my_tqdm_notebook.status_printer..print_status(s='', close=False, bar_style=None, desc=None)>


AttributeError Traceback (most recent call last)
in ()
15 fdir+'step5.6_200ps_production.dcd',
16 fdir+'step5.7_200ps_production.dcd']
---> 17 feats = pyemma.coordinates.source([fdir+'step5.3_200ps_production.dcd',fdir+'step5.4_200ps_production.dcd',fdir+'step5.5_200ps_production.dcd'] ,features=feat, stride = 100)
18 #feats = pyemma.coordinates.source([fdir+'step5.3_200ps_production.dcd',fdir+'step5.5_200ps_production.dcd'] ,features=feat, stride = 100)

~/anaconda3/envs/ms/lib/python3.5/site-packages/pyemma/coordinates/api.py in source(inp, features, top, chunksize, **kw)
384 isinstance(inp, (list, tuple))
385 and (any(isinstance(item, (list, tuple, _string_types)) for item in inp) or len(inp) is 0)):
--> 386 reader = create_file_reader(inp, top, features, chunksize=cs, **kw)
387
388 elif isinstance(inp, _np.ndarray) or (isinstance(inp, (list, tuple))

~/anaconda3/envs/ms/lib/python3.5/site-packages/pyemma/coordinates/data/util/reader_utils.py in create_file_reader(input_files, topology, featurizer, chunksize, **kw)
111
112 reader = FeatureReader(input_list, featurizer=featurizer, topologyfile=topology,
--> 113 chunksize=chunksize)
114 else:
115 if suffix in ['.npy', '.npz']:

~/anaconda3/envs/ms/lib/python3.5/site-packages/pyemma/coordinates/data/feature_reader.py in init(self, trajectories, topologyfile, chunksize, featurizer)
93 self._is_reader = True
94 self.topfile = topologyfile
---> 95 self.filenames = trajectories
96 self._return_traj_obj = False
97

~/anaconda3/envs/ms/lib/python3.5/site-packages/pyemma/coordinates/data/_base/datasource.py in filenames(self, filename_list)
117 from pyemma._base.progress import ProgressReporter
118 pg = ProgressReporter()
--> 119 pg.register(len(filename_list), 'Obtaining file info')
120 with pg.context():
121 for filename in filename_list:

~/anaconda3/envs/ms/lib/python3.5/site-packages/pyemma/_base/progress/reporter/init.py in register(self, amount_of_work, description, stage, tqdm_args)
218
219 def register(self, amount_of_work, description='', stage=0, tqdm_args=None):
--> 220 self._progress_register(amount_of_work=amount_of_work, description=description, stage=stage, tqdm_args=tqdm_args)
221
222 def update(self, increment, stage=0):

~/anaconda3/envs/ms/lib/python3.5/site-packages/pyemma/_base/progress/reporter/init.py in _progress_register(self, amount_of_work, description, stage, tqdm_args)
143 if _attached_to_ipy_notebook_with_widgets():
144 from .notebook import my_tqdm_notebook
--> 145 pg = my_tqdm_notebook(leave=False, **args)
146 else:
147 import tqdm

~/anaconda3/envs/ms/lib/python3.5/site-packages/tqdm/notebook.py in init(self, *args, **kwargs)
247 self.displayed = True
248 self.disp = self.display
--> 249 self.colour = colour
250
251 # Print initial bar state

~/anaconda3/envs/ms/lib/python3.5/site-packages/tqdm/notebook.py in colour(self, bar_color)
206 def colour(self, bar_color):
207 if hasattr(self, 'container'):
--> 208 self.container.children[-2].style.bar_color = bar_color
209
210 def init(self, *args, **kwargs):

AttributeError: 'function' object has no attribute 'children'

@clonker
Copy link
Member

clonker commented May 13, 2022

This seems to be a problem with progress bars. As quick workaround please try the following at the top of your notebook:

from pyemma import config 
config.show_progress_bars = False 

@orthonalmatrix
Copy link
Author

That worked! Thank you!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants