1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
|
[](https://travis-ci.org/rcsb/mmtf-java)
[](https://coveralls.io/github/rcsb/mmtf-java?branch=master)
[](https://github.com/rcsb/mmtf-java/)
[](https://github.com/rcsb/mmtf-java/blob/master/CHANGELOG.md)
# MMTF Java API and encoder/decoder
The **m**acro**m**olecular **t**ransmission **f**ormat (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.
```xml
<dependency>
<groupId>org.rcsb</groupId>
<artifactId>mmtf-codec</artifactId>
<version>1.0.9</version>
</dependency>
<dependency>
<groupId>org.rcsb</groupId>
<artifactId>mmtf-api</artifactId>
<version>1.0.9</version>
</dependency>
```
## Quick getting started.
1) Get the data for a PDB structure and print the number of chains:
```java
StructureDataInterface dataInterface = new GenericDecoder(ReaderUtils.getDataFromUrl("4CUP"));
System.out.println("PDB Code: "+dataInterface.getStructureId()+" has "+dataInterface.getNumChains()+" chains");
```
2) Show the charge information for the first group:
```java
System.out.println("Group name: "+dataInterface.getGroupName(0)+" has the following atomic charges: "+dataInterface.getGroupAtomCharges(0));
```
3) Show how many bioassemblies it has:
```java
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](https://central.sonatype.org/pages/releasing-the-deployment.html).
Once you have a username and password add this to your `~/.m2/settings.xml` maven file (`<servers>` section):
```xml
<server>
<id>ossrh</id>
<username>my_username</username>
<password>my_password</password>
</server>
```
Finally edit the release tag in github and update the CHANGELOG.md file.
|