Install

Download the mmtf.js source code and dependencies. Include the downloaded scripts before the end of the <head> tag in your HTML document:

					<head>
						    <script src="mmtf.js"></script>
					</head>
				

Getting structures in MMTF format

Fetch PDB ID 3PQR in MMTF format and print the decoded MMTF data (or an loading/decoding error)

					MMTF.fetch(
						    "3PQR",
						    // onLoad callback
						    function( mmtfData ){ console.log( mmtfData ) },
						    // onError callback
						    function( error ){ console.error( error ) }
					);
				
Refer to API documentation for more information.