.CUB file extension

To open .CUB files on Windows, if you need to inspect/convert the file, install and use Open Babel, then use its conversion tools to read/write Gaussian cube (.cub/.cube) files.

To open a .cub file, use software that supports the Gaussian Cube format—commonly Open Babel (for conversion/inspection) or tools in scientific computing environments that read Cube files. If you are on mobile, you will usually need to transfer the file to a desktop system, because Cube files are typically handled by scientific desktop tools.

Last updated: April 30, 2026 · Reviewed by Julian Stricker

Open on your device

Choose your operating system for a dedicated step-by-step opening guide.

How to open .CUB files

Use these platform-specific instructions to open .CUB files safely.

Windows

  1. If you need to inspect/convert the file, install and use Open Babel, then use its conversion tools to read/write Gaussian cube (.cub/.cube) files.
  2. If you are using a scientific computing stack, open the file with a tool/library that supports Gaussian Cube data (for example, a workflow that reads Cube grids for analysis or visualization).
  3. If double-clicking does not work, use "Open with" and select the application you installed that explicitly supports Gaussian Cube/Cube files.
Full Windows guide

Mac

  1. Install and use Open Babel to read/convert Gaussian cube (.cub/.cube) files when you need to validate or transform the data.
  2. If you use Wolfram Language, import the file as a Cube format (Gaussian cube plain-text grid data) within your Wolfram workflow.
  3. If Finder cannot open it directly, use "Open With" and select a compatible scientific tool rather than renaming the extension.
Full Mac guide

Linux

  1. Use Open Babel to read/convert the Gaussian cube (.cub/.cube) file (for example, for format conversion or basic validation).
  2. For scripting/analysis workflows, use a chemistry/scientific toolchain that supports the Cube structure (header, atoms, 3D grid) to parse it.
  3. If your desktop environment prompts for an app, choose the installed tool that explicitly lists Gaussian cube/Cube support.
Full Linux guide

iOS

  1. iOS typically does not provide common native support for Gaussian Cube files; transfer the .cub file to a desktop system (Windows/macOS/Linux) and open it with Open Babel or a compatible scientific tool.
Full iOS guide

Android

  1. Android typically does not provide common native support for Gaussian Cube files; transfer the .cub file to a desktop system and open it with Open Babel or another Cube-capable scientific tool.
Full Android guide

Security notes

  • Gaussian Cube files are plain text and typically do not contain active content (no macros or scripts), but they can still trigger crashes or vulnerabilities in poorly-written scientific parsers—prefer reputable, well-maintained tools for opening files from untrusted sources.
  • Because Cube files can be very large, opening an untrusted .cub can cause resource exhaustion (high memory/CPU/disk usage). If the file size is unexpectedly huge, open it cautiously and consider inspecting the header in a text viewer first.
  • Avoid relying on the .cub extension alone: verify the contents look like a Cube file (header + atom list + grid data) before importing into complex toolchains.

Recommended antivirus software

Scan files before opening them. These antivirus tools help protect against malware and viruses.

We may earn a commission when you use affiliate links. This supports our free file extension guides.

Can't open this file?

These are the most common causes and fixes when .CUB files fail to open.

Common reasons

  • The .CUB file opens as plain text or looks like numbers and coordinates
  • App says the file is invalid or cannot be parsed
  • The file is extremely large or slow to open
  • Confusion between .cub and .cube extensions

Fix steps

  1. Open the file with a Cube-capable scientific tool (for example Open Babel for conversion/inspection, or a workflow that can visualize volumetric grids).
  2. If your goal is visualization, convert the Cube file to a format your visualization tool supports using Open Babel.

What is a .CUB file?

A Gaussian Cube file is a plain-text file that contains a short header, an atom list with coordinates, and one or more 3D volumetric grids of values. It is used to represent scalar fields (such as electron density or orbital amplitudes) sampled on a regular grid in space. The .cub extension is associated with the Gaussian Cube (wavefunction/volumetric) format and the MIME type chemical/x-gaussian-cube.

Background

In practice, Cube files are used in workflows that compute and visualize electron densities, molecular orbitals, and other scalar fields. They are also frequently converted to other chemistry/visualization formats or parsed by scripting tools for analysis.

Common MIME types: chemical/x-gaussian-cube

Further reading

Authoritative resources for more details on the .CUB format.

Common .CUB issues

The .CUB file opens as plain text or looks like numbers and coordinates

Gaussian Cube files are plain-text scientific data, so a text editor will show comments, atom coordinates, and long blocks of grid values rather than a visual model.

  1. Open the file with a Cube-capable scientific tool (for example Open Babel for conversion/inspection, or a workflow that can visualize volumetric grids).
  2. If your goal is visualization, convert the Cube file to a format your visualization tool supports using Open Babel.

App says the file is invalid or cannot be parsed

Parsers may fail if the Cube header/grid dimensions do not match the amount of data, if the file was truncated, or if the file is not actually a Gaussian Cube despite using .cub.

  1. Confirm the file is a Gaussian Cube file (it should contain header lines, atom list, and 3D grid data).
  2. Re-download or re-export the file to ensure it is complete (large grids are easy to truncate during transfer).
  3. Try reading/converting it with Open Babel to see whether it recognizes the file and can round-trip it.

The file is extremely large or slow to open

Cube files can be very large because they store full 3D grids of values; higher grid resolution increases size and load time.

  1. If you control the export, regenerate the Cube with a coarser grid or smaller region of interest.
  2. Use a tool that can handle large volumetric grids efficiently, or convert to a format better suited for your downstream software.

Confusion between .cub and .cube extensions

The Gaussian cube format is commonly referenced with both .cub and .cube; some tools may prefer one extension even though the structure is the same.

  1. Check your tool’s documentation for whether it expects .cub or .cube for auto-detection.
  2. If needed, keep the content unchanged and only adjust the extension to the expected one (this is not a “conversion,” just a naming convention some tools rely on).

FAQ

What does a .cub file usually contain?

Most commonly it is a Gaussian Cube file containing atom coordinates plus one or more 3D grids of volumetric data (for example electron density or molecular orbital values).

Is .cub the same as Gaussian Cube / Cube format?

In chemistry and scientific computing contexts, yes—the .cub (and sometimes .cube) extension commonly refers to the Gaussian Cube format.

Can I convert a .cub file to another format?

Yes. Open Babel documentation indicates it can read and write Gaussian cube files, making it a common option for converting Cube data when your target tool needs a different format.

Is the MIME type for .cub always the same?

For Gaussian Cube files, a commonly cited MIME type is chemical/x-gaussian-cube. Other uses of .cub may exist in other domains, but the provided sources associate this MIME type with Gaussian Cube.

Similar file extensions

Compare related formats in the same category to find the right tool faster.