Show HN: Open-source protein and ligand viewer

github.com

32 points by the__alchemist 8 days ago

I just published an open-source protein and ligand viewer. Goal: fast and easy-to-use. Long-term: It's a platform for docking and molecular dynamics. The basic functionality for viewing and inspecting work. I'm currently working on Coot-like electron-density viewing.

I'm gradually splitting it into standalone libs, published to crates.io. Some are up already, others are integrated, and will be split off when sufficiently mature and decoupled.

Uses parallel execution when able, through thread pools (Rayon), CPU SIMD and Cuda.

The default control scheme is non-standard, unless you play video games...

Any feedback and critique appreciated!

colingauvin 6 days ago

I'm a structural biologist working for a small biotech. Very interested in alternatives to PyMOL and ChimeraX. Took it for a small spin, right away I'm unable to move with the mouse using the free cam. Also was unable to open a .pdb file that I had locally (fetching from RCSB worked though). Really cool work thus far though.

what type of docking are you planning to support? Autodock? Or something from scratch?

  • the__alchemist 4 days ago

    Would love to solve the PDB file and cam errors. Is there a way you can share the .PDB? Or, if it's exactly the one available on RCSB, if you share the ident, I can download it and fix.

    Re free cam: Does the arc cam work? Do the movement keys in free cam work? Does right clicking to select an atom or residue work? Are you holding M1 when moving the mouse? Thank you!

    For docking, I initially wanted to do ADV integration, but am leaning more towards from-scratch.

  • landl0rd 6 days ago

    Second this question; would be really cool if we had solid support for some of the qvina2/qvina-w/gpuvina implementations too along with stuff like haddock for affinity-based protein-protein.

    P.S. putting this here since I can't edit prior comment; fails to build on mac. It looks like you may have local updated versions of dependency crates (bio_apis) not pushed to gh since I see things like missing `rcsb::load_validation_2fo_fc_cif`, `f32x8` (I assume this is SIMD?), derive(Debug) on ReqError, etc. even with your forked versions of the crates.

    • the__alchemist 4 days ago

      Good call; I just updated the dependencies, and removed the local patches on the latest Github. Should compile now on Mac/x86, but I can't test.

      Is the Mac in question ARM CPU? I ask because the `f32x8` missing you see shouldn't be affected by the local patches. I hard-coded SIMD for x86. The latest push attempts to gate SIMD so it will still compile on ARM, but I haven't tested it.

      Good call on the qvina2/qvina-w/gpuvina implementations!

landl0rd 6 days ago

This looks really nice, but what's the plugin/extension story? Part of the reason PyMol is popular is bc it's easy to write plugins in Python, which ngl is much closer to what a lot of researchers are comfortable with. This looks way better and I'd love something faster for quick-and-dirty work than PyVol but extensibility is king :)

Thanks for the work on this! It's badly needed.

  • the__alchemist 4 days ago

    That's a great idea. There is currently no plugin or extension support, and I think the immediate thing that makes this not usable for most workflows is lack of specific functionality, and the ability for a user to add it. This needs to happen.

webprofusion 3 days ago

Great stuff - I built a web based protein model viewer in 1997 (maybe 96), it used VRML for the 3D view and queried a database called SRS.

bionhoward 6 days ago

Is this “scriptable” in rust? I have a lot of Pymol scripts I’d love to rewrite in rust

  • the__alchemist 4 days ago

    It's not. I considered this, or at least CLI functionality. I think it would have to ape PyMol's to be useful, so people don't have to learn new CLI commands. Great idea!

    • bionhoward a day ago

      Mostly what I do is make animations, so a minimalist set for this would be like

      - load mmCIF / PDB - zoom camera out to show everything - show spheres - remove solvents - color by chain or element - take screenshots - rotate molecules - translate atoms

      Rust would be wayyy better than pymol, I’m trying to minimize my Python

      • the__alchemist a day ago

        Screw it; I just added a basic CLI. Implemented save, load, view, help, fetch, and show. I'll add the ones you suggested as well, if they're supported by the underlying data structures. (e.g. the cam stuff is straightfwd, but `remove solvents` may reduce to `hide hetero atoms; sort of like how `show` just toggles the view mode`.

gilleain 6 days ago

Looks good. Colour scheme looks a but wacky in the screenshots. Hopefully CPK or other standards are in your backlog :)

(For some reason Rasmol used to have 'hotpink' as a colour option)

  • the__alchemist 4 days ago

    Great idea on CPK! I copied the PyMol color values for atom, but the residues are... arbitrary. This looks like an easy change.