The java implementation of the MMTF API, decoder and encoder.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Build Status Coverage Status Version Changelog

MMTF Java API and encoder/decoder

The macromolecular transmission format (MMTF) is a binary encoding of biological structures.

This repository holds the Java API, encoding and decoding libraries. Along with a description of the data in the MMTF using Java data types.

Releases are available on Maven central.


Quick getting started.

  1. Get the data for a PDB structure and print the number of chains:
StructureDataInterface dataInterface = new GenericDecoder(ReaderUtils.getDataFromUrl("4CUP"));
System.out.println("PDB Code: "+dataInterface.getStructureId()+" has "+dataInterface.getNumChains()+" chains");
  1. Show the charge information for the first group:
System.out.println("Group name: "+dataInterface.getGroupName(0)+" has the following atomic charges: "+dataInterface.getGroupAtomCharges(0));
  1. Show how many bioassemblies it has:
System.out.println("PDB Code: "+dataInterface.getStructureId()+" has "+dataInterface.getNumBioassemblies()+" bioassemblies");

For developers: release process

Prepare the release, setting new version numbers when prompted

mvn release:prepare

Perform the release, uploading artifacts to sonatype/maven central

mvn release:perform

To be able to upload to sonatype (to publish to maven central) you need to have an oss sonatype login, obtainable by signing up to their JIRA tracking system. Once you have a username and password add this to your ~/.m2/settings.xml maven file (<servers> section):


Finally edit the release tag in github and update the file.