OpenBioSim / biosimspace_tutorials

A tutorials suite for BioSimSpace.
GNU General Public License v3.0
15 stars 5 forks source link

Tutorial 1: 01_introduction/03_molecular_dynamics.ipynb broken with 2023.4 #17

Closed jmichel80 closed 11 months ago

jmichel80 commented 11 months ago

I am re-runnning all tutorials on try.openbiosim.org as part of finalising the revisions to the tutorials suite paper

The following tutorial https://github.com/OpenBioSim/biosimspace_tutorials/blob/main/01_introduction/03_molecular_dynamics.ipynb

fails with a runtime error at the last cell if the selected backend is MDTRAJ

image

The backends mdanalysis and sire behave as expected.

lohedges commented 11 months ago

Thanks, I'll take a look. There's a unit test for this, so surprising that it's failing.

lohedges commented 11 months ago

It works fine for me using the latest development version of the code.

rmsd

Note that the cell that is supposedly returning a trajectory in mdtraj format will need to be updated to:

mdtraj = traj.getTrajectory(format="mdtraj")

The default has been changed to "auto", which will use the first backend that works, which in this case is Sire.

lohedges commented 11 months ago

Looking at the history of the trajectory code I don't see any updates related to what you are seeing. It looks like the specified backend is being ignored and Sire is being used instead, e.g. it's effectively using "auto" rather than "mdtraj". (This could be the case if the mdtraj install is borked for some reason.)

jmichel80 commented 11 months ago

Very strange. I cannot reproduce the error with the code update

mdtraj = traj.getTrajectory(format="mdtraj")

before execution of the rmsd plot cell.

lohedges commented 11 months ago

Ah, interesting. I'll check that. It could be that it sets the backend the first time you use it, then isn't updating when you specify it a second time, i.e. it was using Sire both times.

lohedges commented 11 months ago

Yes, that's the issue. It doesn't seem to swap the backend the second time you call .getTrajectory. I'll fix this now.

lohedges commented 11 months ago

Now fixed here.