What is MIME type "chemical/x-pdb"?

A MIME type is a string that tells browsers and other tools how to handle a particular kind of file.

Chemical/x-pdb is a MIME type for molecular structure files. It is used in structural biology and computational chemistry to store 3D coordinates and connectivity data for molecules.

Files using this MIME type come from the Brookhaven Protein Databank format. They hold details about atom positions and bond links for proteins and other molecular structures. For example, files with the PDB extension rely on this type.

Explore more about protein data structures on resources like Protein Data Bank on Wikipedia.

Associated file extensions

Usage Examples

HTTP Header

When serving content with this MIME type, set the Content-Type header:


    Content-Type: chemical/x-pdb    
  

HTML

In HTML, you can specify the MIME type in various elements:


    <a href="file.dat" type="chemical/x-pdb">Download file</a>    
  

Server-side (Node.js)

Setting the Content-Type header in Node.js:


    const http = require('http');    
    
    http.createServer((req, res) => {    
      res.setHeader('Content-Type', 'chemical/x-pdb');    
      res.end('Content here');    
    }).listen(3000);    
  

Associated file extensions

FAQs

What is the chemical/x-pdb MIME type used for?

The chemical/x-pdb MIME type is used to identify files containing 3D molecular structure data, specifically in the Protein Data Bank format. These files, commonly ending in the .pdb extension, store atomic coordinates for proteins and nucleic acids used in bioinformatics and structural biology.

Is chemical/x-pdb the same as the PDB files used in Visual Studio?

No, this is a common source of confusion. While both use the .pdb extension, chemical/x-pdb is for molecular chemistry data. The .pdb files generated by Visual Studio are Program Database files used for debugging, which typically use a distinct MIME type like application/octet-stream or application/x-ms-pdb.

How do I configure Apache to serve chemical/x-pdb files?

To ensure browsers and applications interpret the file correctly, add the following line to your .htaccess file or main configuration: AddType chemical/x-pdb .pdb. This ensures that when a user clicks a link to a molecule file, the server declares it as chemistry data rather than a generic binary file.

Can web browsers display chemical/x-pdb files natively?

Most standard web browsers (Chrome, Firefox, Edge) do not render molecular structures natively. If a server sends this MIME type, the browser will typically prompt the user to download the file. To display these structures directly on a webpage, developers use JavaScript libraries like NGL Viewer or 3Dmol.js.

What software opens files with the chemical/x-pdb MIME type?

Files served as chemical/x-pdb are designed for molecular visualization tools. Popular desktop applications include PyMOL, Jmol, RasMol, and UCSF Chimera. These programs read the atomic coordinates to render 3D models of the molecules.

Why does the MIME type include an 'x-' prefix?

The x- prefix in chemical/x-pdb indicates that it is a non-standard or experimental type that was not originally registered with IANA as a primary standard. However, it has become the de facto standard for serving Protein Data Bank files on the web.

General FAQ

What is a MIME type?

A MIME (Multipurpose Internet Mail Extensions) type is a standard that indicates the nature and format of a document, file, or assortment of bytes. MIME types are defined and standardized in IETF's RFC 6838.

MIME types are important because they help browsers and servers understand how to process a file. When a browser receives a file from a server, it uses the MIME type to determine how to display or handle the content, whether it's an image to display, a PDF to open in a viewer, or a video to play.

MIME types consist of a type and a subtype, separated by a slash (e.g., text/html, image/jpeg, application/pdf). Some MIME types also include optional parameters.

How do I find the MIME type for a file?

You can check the file extension or use a file identification tool such as file --mime-type on the command line. Many programming languages also provide libraries to detect MIME types.

Why are multiple MIME types listed for one extension?

Different applications and historical conventions may use alternative MIME identifiers for the same kind of file. Showing them all helps ensure compatibility across systems.