pablo-arantes / making-it-rain

Cloud-based molecular simulations for everyone
MIT License
377 stars 97 forks source link

RuntimeError: can not find /content/drive/MyDrive/GROMACS_MIR/1aki_prod_1.dcd #21

Closed avinashkarkada closed 2 years ago

avinashkarkada commented 2 years ago
RuntimeError                              Traceback (most recent call last)
[<ipython-input-26-a2c3b9fd379d>](https://localhost:8080/#) in <module>()
     19 #print(flist)
     20 
---> 21 trajlist = pt.load(flist, pdb, stride=stride_traj)
     22 traj_image = trajlist.iterframe(autoimage=True, rmsfit=0)
     23 traj_write = pt.write_traj(traj_end, traj_image, overwrite=True)

3 frames
[/usr/local/lib/python3.7/site-packages/pytraj/io.py](https://localhost:8080/#) in load(filename, top, frame_indices, mask, stride)
    122     # load to TrajectoryIterator object first
    123     # do not use frame_indices_ here so we can optimize the slicing speed
--> 124     traj = load_traj(filename, top, stride=stride)
    125 
    126     # do the slicing and other things if needed.

[/usr/local/lib/python3.7/site-packages/pytraj/io.py](https://localhost:8080/#) in load_traj(filename, top, *args, **kwd)
    244 
    245     if 'stride' in kwd:
--> 246         ts._load(filename, stride=kwd['stride'])
    247     elif 'frame_slice' in kwd:
    248         ts._load(filename, frame_slice=kwd['frame_slice'])

[/usr/local/lib/python3.7/site-packages/pytraj/trajectory/trajectory_iterator.py](https://localhost:8080/#) in _load(self, filename, top, frame_slice, stride)
    233                 self._frame_slice_list.append(frame_slice)
    234                 super(TrajectoryIterator, self)._load(
--> 235                     fname, top_, frame_slice=fslice)
    236         else:
    237             raise ValueError("filename must a string or a list of string")

pytraj/trajectory/c_traj/c_trajectory.pyx in pytraj.trajectory.c_traj.c_trajectory.TrajectoryCpptraj._load()

[/usr/local/lib/python3.7/site-packages/pytraj/utils/check_and_assert.py](https://localhost:8080/#) in ensure_exist(filename)
     78     if not os.path.exists(filename):
     79         txt = "can not find %s" % filename
---> 80         raise RuntimeError(txt)
     81 
     82 

RuntimeError: can not find /content/drive/MyDrive/GROMACS_MIR/1aki_prod_1.dcd

**I am getting this error even though I executed the cells above "Concatenate and align the trajectory" after I reconnected.

Thank you**

pablo-arantes commented 2 years ago

Hi @avinashkarkada,

Regarding your issue, I tried here and everything worked fine for me. I was able to concatenate the trajectory in the notebook. I have one point to make, if your notebook disconnected, you should run again the cells with the same parameters (from the beginning). The code will recognize your files, and it will not run again the production step. Please, remember to use the same parameters, as Stride_time, Number_of_stried and so on. This is necessary because some variables are declared in the previous cells in the notebook.

Please, let me know if it is working.

Thank you.

Best,

Pablo

avinashkarkada commented 2 years ago

Hey @pablo-arantes

I had not changed the parameters and I re executed the cells. I still got the error. Strange

It worked fine after I redid the whole thing.

Thanks Regards