npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@juliocesar-io/nano-protein-viewer-react

v0.0.15

Published

A lightweight, extensible React implementation of the **Nano Protein Viewer**, originally developed as a VSCode extension by [**Steven Yu**](https://marketplace.visualstudio.com/items?itemName=StevenYu.nano-protein-viewer).

Readme

█▄░█ ▄▀█ █▄░█ █▀█   █▀█ █▀█ █▀█ ▀█▀ █▀▀ █ █▄░█   █▀█ █▀▀ ▄▀█ █▀▀ ▀█▀
█░▀█ █▀█ █░▀█ █▄█   █▀▀ █▀▄ █▄█ ░█░ ██▄ █ █░▀█   █▀▄ ██▄ █▀█ █▄▄ ░█░

demo

Overview

A lightweight, extensible React implementation of the Nano Protein Viewer, originally developed as a VSCode extension by Steven Yu.

This project brings the Mol*-powered molecular visualization experience to the web enabling integration into any React or Next.js application.

Install

pnpm install @juliocesar-io/nano-protein-viewer-react

Run tests

pnpm test

Use in your app

import { NanoProteinViewer, type StructureUrl } from '@juliocesar-io/nano-protein-viewer-react';

const structures: StructureUrl[] = [
  { name: '1CRN', url: 'https://files.rcsb.org/download/1CRN.pdb', format: 'pdb' }
];

export default function App() {
  return (
    <div style={{ width: '100%', height: '100vh' }}>
      <NanoProteinViewer structureUrls={structures} />
    </div>
  );

Local development

Run the example react_app locally:

cd react_app
pnpm install
pnpm dev

Go to: http://localhost:5173

grid

Design Rationale

This React app:

  • Decouples the viewer logic into reusable components
  • Enables embedding in research dashboards, notebooks, or web portals
  • Provides a base to extend features (grid view, color themes, External API integration) gradually
  • Allows server-side frameworks (Next.js, Remix, Vite) to integrate molecular viewers easily

Viewer Props

The viewer accepts an array of StructureUrl via the structureUrls prop. Each entry can optionally include initial style settings applied on load.

| Field | Type | Required | Description | | --------------------------- | ------------------------------------------------------------------------------------- | ------------ | ---------------------------------------------------------------------------- | | name | string | Yes | Display name for the structure. Also used for per-file settings. | | url | string | Yes | Direct URL to the structure file. | | format | StructureFormat ('pdb' \| 'mmcif' \| 'sdf') | No | Optional; auto-detected from name or url extension when omitted. | | style.colorMode | 'none' \| 'custom' \| 'element' \| 'residue' \| 'secondary' \| 'chain' \| 'rainbow' | No | Initial color theme applied on load. Use style.customColor when "custom". | | style.customColor | string (hex) | No | Used when colorMode is "custom". | | style.illustrative | boolean | No | Enables illustrative/cartoon effect. | | style.surface.enabled | boolean | No | Toggles molecular surface rendering. | | style.surface.opacity | number (0–100) | No | Surface opacity percentage. | | style.surface.inherit | boolean | No | Inherit surface color from current theme. | | style.surface.customColor | string (hex) | No | Surface color when not inheriting. |

Minimal example:

import { NanoProteinViewer, type StructureUrl } from '@juliocesar-io/nano-protein-viewer-react';

const structures: StructureUrl[] = [
  {
    name: 'AF-A0A2K6V5L6-F1',
    url: 'https://alphafold.ebi.ac.uk/files/AF-A0A2K6V5L6-F1-model_v6.cif',
    format: 'mmcif',
    style: { illustrative: true, surface: { enabled: true, opacity: 8, inherit: true } }
  },
  {
    name: '1CRN',
    url: 'https://files.rcsb.org/download/1CRN.pdb',
    format: 'pdb',
    style: { colorMode: 'secondary', customColor: '#4ECDC4', surface: { enabled: true, opacity: 40, inherit: true } }
  }
];

<NanoProteinViewer structureUrls={structures} />

License & Attribution

This project is released under the MIT License.

Adapted and inspired by the Nano Protein Viewer VSCode Extension by Steven Yu.

Mol* framework © Mol* team – see citation below.

Citation

If you use this viewer or the underlying Mol* visualization engine in academic work:

@article{sehnal2021molstar,
  author = {Sehnal, David and Bittrich, Sebastian and Deshpande, Mandar and Svobodová, Radka and Berka, Karel and Bazgier, Václav and Velankar, Sameer and Burley, Stephen K and Koča, Jaroslav and Rose, Alexander S},
  title = "{Mol* Viewer: modern web app for 3D visualization and analysis of large biomolecular structures}",
  journal = {Nucleic Acids Research},
  volume = {49},
  number = {W1},
  pages = {W431-W437},
  year = {2021},
  doi = {10.1093/nar/gkab314}
}

Contributing

Contributions are welcome! If you’ve added a visualization mode, folding integration, or UI control, please open a PR.

The roadmap includes:

  • APIs integration for folding
  • Structure alignment
  • Animation playback
  • Alphafold DB/ RCSB PDB search import