Giter VIP home page Giter VIP logo

Comments (11)

chryswoods avatar chryswoods commented on August 24, 2024 1

We can do a 2023.1.1 release of sire once we work out what the clash is... (it will also give me a chance to include the other fixes I've been doing - I want to get to a point where all the SireUnitTests tests pass on all platforms)

from biosimspace.

lohedges avatar lohedges commented on August 24, 2024 1

Right, fixed it. The issue was this line:

# Create the view.
view = _py3Dmol.view(
    linked=False, width=width, height=height, viewergrid=viewergrid
)

Here both height or width could be a float (since this is worked out in the function) but it is expected to be an int. Annoying that no error is raised, or that py3Dmol can't convert to an int for you. This definitely used to work, so I can only assume that they've changed something behind the scenes.

from biosimspace.

chryswoods avatar chryswoods commented on August 24, 2024

Very curious - I'll look to debug too. I added an exporter for sire objects to nglview in 2023.X, but I don't think that BSS would use that route?

from biosimspace.

chryswoods avatar chryswoods commented on August 24, 2024

I confirm I see this too on safari, MacOS M1. I suspect it is universal. m0._sire_object.view() still works, showing that nglview is rendering.

from biosimspace.

lohedges avatar lohedges commented on August 24, 2024

Thanks for confirming. I only mentioned the possibility of a rebuild for Sire since a lot of things seem to be tied to ipywidgets, so if that is the culprit then quite a few dependencies might change it we adjust the version. I'll see if the problem goes away with different versions of py3Dmol on Monday.

from biosimspace.

chryswoods avatar chryswoods commented on August 24, 2024

Yes - there is definitely a package clash somewhere. In a vanilla mambaforge environment where I only install jupyterlab and py3dmol it works.

image

In the openbiosim environment with sire and BioSimSpace installed it doesn't...

image

from biosimspace.

lohedges avatar lohedges commented on August 24, 2024

Okay, so the issue is py3Dmol itself. It works with the latest version (2.0.0), but not with the version installed via BioSimSpace (1.8.1). The new version works with the pinned version of ipywidgets from our environment (7.7.2) and also with the latest version (8.0.4). Version 2.0.0 of py3Dmol is only 15 days old, so I would assume that sire would have been built against it (unless the dependency resolution doesn't allow it). For packages built prior to this, I think the pinning rules used by conda during the build wouldn't allow us to resolve against 2.0.0, i.e. it is a new major version.

I'll try re-building Sire locally to see what version we end up with. If it works, then a simple rebuild might fix things. I'll also check nglview, as it would be good to remove the ipywidgets pin if it is no longer necessary.

from biosimspace.

lohedges avatar lohedges commented on August 24, 2024

Hmm, the latest Sire build did use py3Dmol 2.0.0, so it might just be my local development environment that's out of date. I'll refresh it and see.

from biosimspace.

lohedges avatar lohedges commented on August 24, 2024

Nope, that's not it. It still doesn't work downloading the latest conda package, which does pull in py3Dmol 2.0.0.

from biosimspace.

lohedges avatar lohedges commented on August 24, 2024

I've unpinned ipywidgets locally and I still see the same issue. Interestingly, just drawing a simple sphere works. (Just re-using your example.)

viewMapping_issue2

The function is pretty simple and is just using standard py3Dmol function calls. I'll see if I can strip parts out in order to get it to work.

Just to note that we do still need to pin ipywidgets, since an nglview update hasn't been released yet. (I think they've fixed it locally, but not updated the conda package yet.) Without this pin we'd get the following error:

File ~/.conda/envs/sire-dev/lib/python3.9/site-packages/nglview/color.py:54, in _ColormakerRegistry._ipython_display_(self, **kwargs)
     52 if self._ready:
     53     return
---> 54 super()._ipython_display_(**kwargs)

AttributeError: 'super' object has no attribute '_ipython_display_'

from biosimspace.

chryswoods avatar chryswoods commented on August 24, 2024

That's a good fix (and quite a rabbit-hole debug!)

from biosimspace.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.