Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>3Dmol ViewerNew to Visual Studio Code? Get it now.
3Dmol Viewer

3Dmol Viewer

Austin Cheng

|
12 installs
| (0) | Free
Open .xyz or .trj molecular files in a 3Dmol.js webview inside VS Code.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

3Dmol Viewer for VS Code

Interactive 3D molecular visualization for .xyz and .trj files, powered by 3Dmol.js.

Features

  • Interactive 3D: Rotate, zoom, and explore molecules directly in VS Code.
  • Theme Sync: Automatically adapts to your VS Code theme (Light, Dark, or High Contrast).
  • Live Updates: The viewer updates instantly when you save changes to the file.
  • Seamless Toggle: Switch between Text and 3D views with a single click on the molecule icon in the editor title bar.

Usage

  1. Open any .xyz or .trj file.
  2. The 3D viewer launches automatically (default).
  3. Click the Molecule Icon in the editor title bar to toggle between the raw text and the 3D visualization.

Configuration

  • 3dmolViewer.defaultOpenMode: Set to "viewer" (default) to open files in 3D mode, or "text" to open in the text editor first.

This extension uses 3Dmol.js, which bundles code from GLmol, Three.js, and jQuery. The upstream code is distributed under BSD-3-Clause (with GLmol offering a dual MIT/LGPL3 license and Three.js/jQuery using MIT), and we honor those terms by retaining their notices within the 3Dmol.js distribution. The extension itself is licensed under the MIT License (see LICENSE).

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft