molecular dynamics ( md ) 
 simulations provide a powerful tool to 
 study the native dynamics of biological macromolecules with atomistic 
 resolution . due to recent advances in hardware and software , 
 as well as the development of enhanced sampling techniques , computer 
 simulations
can now sample biologically relevant time scales ( microsecond 
 and beyond ) . on the other hand , while 
 simulations can better explore the conformational space of interest , 
 the large number of conformations sampled requires increasingly sophisticated 
 methods for analysis .
gromacs ( groningen 
 machine for chemical simulations ) is one 
 of the four most commonly used molecular dynamics 
 simulation suites ( together with charmm , amber , and namd ) .
however , gromacs is the only package of the four that is open - source . 

the gromacs suite also includes a series of tools to process and analyze 
 trajectories generated by simulations . although these in - built tools 
 cover a wide spectrum of standard analysis methods ( from principal 
 component analysis ( pca ) to density calculations to clustering )
, one 
 may need to develop their own analytical tools that process gromacs 
 trajectories .
even though it is possible to modify or extend the open 
 source gromacs code written in c , it would often be more convenient 
 to build applications from scratch that operate on gromacs data files .
the java api ( application programming interface ) introduced in 
 this paper is intended to provide full freedom in developing data 
 analysis tools that can directly process gromacs data .
the library 
 contains native parsers for some gromacs file formats while trajectories 
 can be parsed via the use of gmxdump allowing simulation data to be 
 accessed through the java code .
data read from input files are stored 
 in an object - oriented architecture representing different levels of 
 structural information ( from sequences to structures and trajectories ) . 

processed data can be saved to gromacs formats enabling integration 
 of gromacs and java - based tools into a data analysis pipeline .
our goal is to simplify the analysis of protein motions within 
 the framework of java , one of the most popular programming languages 
 in academic software development and , in particular , bioinformatics . 

one reason for the popularity of java is that it makes cross - platform 
 gui application development very easy , and guis are often essential 
 to visualizing bioinformatics results . at the same time , java is a 
 powerful and robust object - oriented language .
many existing bioinformatics tools and packages were written in 
 java ( including programming libraries such as biojava ; analysis and visualization tools such as statalign , jmol , or jalview ; and complete bioinformatics analysis platforms 
 such as geneious ) .
biojava is a 
 mature open - source project providing a framework for 
 the analysis of biological data in general .
it provides java classes 
 representing biological objects and a large collection of analytical 
 and statistical routines covering a wide range of fields of bioinformatics . 

by contrast , jgromacs is designed to focus on the particular problem 
 of processing and analyzing molecular dynamics ( md ) trajectories ; 
 therefore , it is a much smaller api with more focused functionality . 

packages developed for similar purposes in different programming languages 
 include mdanalysis and mmtk ( molecular 
 modeling toolkit ) designed for python , 
 loos ( lightweight object - oriented structure library ) designed for c++ , and openstructure designed for python / c++ .
while all frameworks mentioned 
 offer object - oriented design , they have different support for reading 
 and writing trajectory and coordinate file formats . from this point 
 of view , mdanalysis and loos
are the most versatile , as they can import 
 and export formats used by multiple md suites such as gromacs , charmm , 
 amber , and namd . unlike the other three packages , mmtk also enables 
 setting up and running md simulations .
mdanalysis , loos , and openstructure 
 all offer an atom selection feature ; i.e. , atom groups can be selected 
 using descriptors and boolean operators .
since jgromacs has been designed 
 to process gromacs trajectories , it defines atom groups via index 
 sets used by gromacs tools .
by contrast to other packages , it also 
 supports input / output of sequences and multiple alignments and enables 
 the joint analysis of sequence and structural / dynamics data . in our paper
, we will first discuss the structure and main features 
 of the jgromacs application programming interface ( api ) .
it is followed 
 by an example presenting a simple jgromacs code and its application 
 on a sample md trajectory .
as illustrated in the example below , complicated 
 concepts that would normally take hours to code up from scratch can 
 be implemented in a matter of minutes with the help of the jgromacs 
 library .
the jgromacs 
 library comprises 5 subpackages , each of which is a collection of 
 java classes sharing a distinct function .
the core subpackage , jgromacs.data , 
 contains 13 classes representing different levels of structural data 
 from single atoms and amino acid residues to protein structures to 
 complete md trajectories .
the subpackage also contains classes to 
 handle amino acid sequences , multiple sequence alignments , atomic 
 index sets , simulation frame index sets , and mathematical objects 
 such as three - dimensional points , point sets , angles , matrices , and 
 vectors .
the objects defined in jgromacs.data are the basic building 
 blocks of jgromacs applications and can be interconverted between 
 each other in many ways .
figure 1 shows 
 how these hierarchically related classes represent multiple levels 
 of sequence , structure , and trajectory information .
the class structure , 
 for example , can be used to store single structural models read from 
 coordinate files and separate polypeptide chains .
a structure object 
 wraps a collection of residue objects that represent amino acid residues , 
 water , and other molecules in the structure . on the other hand , a 
 residue object wraps a collection of atom objects representing the 
 atoms in the residue .
jgromacs defines groups of atoms with the help 
 of index sets , analogously to the index ( .ndx ) files in gromacs .
jgromacs 
 classes and multiple levels of data represented : ( a ) structures 
 and trajectories , ( b ) sequences and alignments , ( c ) atomic index sets 
 and md frame index sets .
arrows between circles show hierarchical 
 relationships , while arrows between circles and pentagons indicate 
 mapping between data and jgromacs objects .
md trajectories and structural ( e.g. , nmr ) ensembles 
 are stored 
 in objects of the trajectory class .
frames of a trajectory can be 
 retrieved either as structure or pointlist objects which are used 
 to extract atomic coordinates .
the sequence and alignment classes 
 are designed to represent amino acid sequences and multiple sequence 
 alignments .
the classes in jgromacs.data provide methods for retrieving and 
 modifying the properties of data objects such as rotating and translating 
 atoms , calculating interatomic and inter - residue distances , extracting 
 trajectory segments , retrieving an amino acid sequence from a protein , 
 etc .
for further information on the functionalities of subpackage 
 jgromacs.data , see the api s documentation ( also available 
 in the si ) .
xtc and 
 trr formats are parsed via use of the gmxdump package within gromacs . 

this enables jgromacs to import structures , trajectories , and index 
 groups to jgromacs objects .
structures and index sets can be saved 
 back to gromacs files with the output routines of jgromacs.io .
the 
 jgromacs.io subpackage also offers parsers and output functions for 
 fasta format to import and export sequences and alignments .
importing 
 and exporting data between gromacs files and jgromacs objects enables 
 us to connect java tools and gromacs tools in an integrated data analysis 
 pipeline .
furthermore , the subpackage jgromacs.io provides an option 
 to execute any gromacs commands from within the java code and automatically 
 import the output files as jgromacs objects .
the subpackage jgromacs.analysis offers a collection of analytical routines 
 covering various areas from calculating dihedral angles to extracting 
 contact matrices to weighted superposition of structures . making use 
 of the toolkit
, one can for example retrieve the mean distance matrix 
 or covariance matrix of a trajectory , calculate the root - mean - square 
 inner product ( rmsip ) between conformational subspaces , look at the 
 cumulative variance profiles in pca , extract time series of interatomic 
 distances or dihedral angles , find the simulation snapshot where two 
 atoms are in closest proximity , use gaussian network models , and many 
 more .
the toolkit can easily be extended with additional 
 routines that fit into this framework .
finally , subpackage 
 jgromacs.ui provides a simple way to add a user - friendly interface 
 to jgromacs applications . the user interface ( ui )
it supports help messages , log 
 files , and command line argument parsing and in many aspects resembles 
 the ui of gromacs tools .
an example 
 is presented below to illustrate how jgromacs simplifies 
 the implementation of complex ideas such as the concept of dynamical 
 networks .
( 2009 , pnas ) 
 to study allosteric signaling in trna : protein complexes .
their idea 
 was to represent a trna : protein complex as a weighted graph in which 
 each amino acid residue and nucleotide of the complex is represented 
 by a single node .
two nodes are connected in the network if the monomers 
 are in contact ; i.e. , their closest heavy atoms are within 4.5  
 of each other for at least 75% of the md simulation frames . an edge 
 between nodes i and j is weighted 
 by the absolute value of the cij correlation between the two monomers calculated over the course 
 of the md simulation .
the weight of a link estimates the probability 
 of information transfer between the two residues .
the  length  
 of a link was defined as log|cij| . adding information about dynamics
, these networks 
 give a more realistic picture about the system than the unweighted 
 protein structure networks ( psn ) constructed on the basis of the contact 
 pattern of a single structure .
sethi et al . used network 
 analysis concepts ( i.e. , shortest path , betweenness centrality , suboptimal 
 path , and community analysis ) to identify nodes and paths in the network 
 crucial for intramolecular signal transduction , highlighting possible 
 allosteric communication pathways within the complex .
the following 
 13-line jgromacs code calculates the weight matrix of the dynamical 
 network of a protein from a gromacs md trajectory : as a first step , the example code imports structure 
 and trajectory data from gro and xtc files .
it then determines the 
 frequency - based contact matrix using a 0.45 nm distance cutoff and 
 a 0.75 contact probability cutoff . after extracting the trajectory 
 of  carbon atoms
finally , 
 the contact and correlation matrices are combined into the output 
 matrix w that defines the connectivity and weights of 
 the dynamical network .
figure 2 shows the dynamical network of the n - terminal pdz 
 domain of inad ( inactivation no afterpotential d ) protein from drosophila based on a 20 ns molecular dynamics simulation . 

the topology and the weights of the graph were calculated with the 
 short jgromacs code above .
starting from scratch , generating this network 
 from an md trajectory file would be time - consuming , but jgromacs significantly 
 reduces programming time .
further examples and a step - by - step quick 
 start guide are downloadable from the project web site .
dynamical network created 
 for the pdz1 domain of inad protein from drosophila based on a 20 ns md simulation .
as computer simulations 
 are becoming more and more effective in 
 sampling the conformational dynamics of biological macromolecules , 
 the storage , management , and analysis of the generated data present 
 an ever - increasing challenge .
there have been not only efforts to 
 address the storage issues but also an 
 additional analysis suite as found in the biosimgrid platform .
the analysis toolkit of biosimgrid is an extensive 
 collection of standard analysis routines ( e.g. , root - mean - square deviations , 
 volume and average structure , interatomic distance , s and surface area ) 
 facilitating cross - comparison of the deposited trajectories . on the 
 other hand ,
molecular dynamics software packages such as gromacs and 
 charmm have their own in - built analysis tools providing the significant 
 advantage of performing simulations and analysis within the same framework . 

however , in addition to making use of the standard analysis routines 
 implemented in these platforms , one may also need a flexible framework 
 for developing their own novel tools for analyzing md data .
jgromacs is a lightweight java library supporting simple and fast 
 development of analytical tools for data sets produced with the commonly 
 used md software gromacs .
the objective of our project is to create 
 a framework for implementing increasingly complex analytical routines 
 that can be used through simple user interfaces . since in research 

the goal is not always to develop ready - made applications but to experiment 
 with new ideas as quickly as possible , simplicity of the package was 
 of utmost importance .
while jgromacs also contains a standard 
 analysis toolkit , its main 
 advantage is that it provides an object - oriented framework for novel 
 tool development .
the programmers can easily build up their own algorithms 
 and applications based on the basic jgromacs classes and analytical 
 routines already implemented in the package .
furthermore , the library 
 provides options for integrating java and gromacs analysis tools . a detailed documentation ( including quick start guide , examples 
 and description of all subpackages , classes , and methods ) , javadoc 
 ( html ) documentation , a comprehensive junit test suite , a library 
 of executable example codes , and an example data set are available 
 on the project web site : http://sbcb.bioch.ox.ac.uk / jgromacs/.
 in this paper , we introduce jgromacs , a java api ( application 
 programming 
 interface ) that facilitates the development of cross - platform data 
 analysis applications for molecular dynamics ( md ) simulations . 
 the 
 api supports parsing and writing file formats applied by gromacs ( groningen 
 machine for chemical simulations ) , one of the most widely used md 
 simulation packages . 
 jgromacs builds on the strengths of object - oriented 
 programming in java by providing a multilevel object - oriented representation 
 of simulation data to integrate and interconvert sequence , structure , 
 and dynamics information . 
 the easy - to - learn , easy - to - use , and easy - to - extend 
 framework is intended to simplify and accelerate the implementation 
 and development of complex data analysis algorithms . 
 furthermore , 
 a basic analysis toolkit is included in the package . 
 the programmer 
 is also provided with simple tools ( e.g. , xml - based configuration ) 
 to create applications with a user interface resembling the command - line 
 interface of gromacs applications . 
 availability : jgromacs 
 and detailed documentation is freely available from http://sbcb.bioch.ox.ac.uk/jgromacs 
 under a gplv3 license . 
Introduction
Structure and Features of the API
An Example: Dynamical Networks
Conclusions