From Wikipedia, the free encyclopedia
Jump to: navigation, search
BALL project
Ballview 1pma raytraced.png
Developer(s) BALL project team
Stable release 1.4.2 / 28 January 2013; 2 years ago (2013-01-28)
Preview release 1.4.79 / 7 August 2014; 9 months ago (2014-08-07)
Written in C++, Python
Operating system Linux/Unix, Windows, OS X
Type library or framework and 3D molecular modelling application
License Lesser GNU Public License (LGPL)

The open source project BALL consists of the versatile C++ class framework BALL (Biochemical Algorithms Library), a library of algorithms and data structures targeting molecular modelling and computational structural bioinformatics, a Python interface to this library and the open source graphical interface to BALL, the molecular viewer BALLView (also open source).

BALL has been ported to the operating systems Linux, Solaris, Microsoft Windows and Mac OS X. BALLview uses Qt as well as OpenGL. BALL has evolved from a commercial product into a free-of-charge, open source software licensed under the GNU Lesser General Public License (LGPL).

Its molecular viewer BALLView is developed by the ball project team as well and allows for the three-dimensional visualization as well as direct application of the algorithms of the BALL library via its graphical user interface.

BALLView uses OpenGL and the real-time ray tracer RTFact as render back ends. For both, BALLView offers stereoscopic visualization in several different modes.

BALLView is a C++ application of BALL and is available under the GPL license for Linux, Solaris, Microsoft Windows, and Mac OS X.

The BALL project is developed and maintained by groups at Saarland University, Mainz University, and University of Tübingen. Both the library and the viewer are heavily used for education and research alike. BALL packages have been made available in the Debian project in April 2010.

Key features[edit]

  • Interactive molecular drawing and conformational editing (+)
  • Reading and writing of molecular file formats (PDB, MOL2, MOL, HIN, XYZ, KCF, SD, AC)
  • Reading secondary data sources e.g. (DCD, DSN6, GAMESS, JCAMP, SCWRL, TRR)
  • Generating molecules from and matching of SMILES- and SMARTS expressions to molecules
  • Geometry optimization
  • Minimizer and molecular dynamics classes
  • Support for force fields (MMFF94, AMBER, CHARMM) for scoring and energy minimization
  • Python Interface and scripting functionality
  • Plugin infrastructure (3D Space-Navigator, WII-based head tracking*, OpenSim*)
  • Molecular graphics (3D, stereoscopic viewing, ray tracing*)(+)
  • comprehensive documentation (Wiki, code snipets, online class documentation, bug tracker)
  • comprehensive regression tests
  • BALL project format for presentations and collaborative data exchange (+)
  • QSAR*
  • NMR
  • editable shortcuts (+)

(*) Experimental functionality of the next version

(+) functionality of BALLView

BALL library[edit]

The Biochemical Algorithms Library BALL is a comprehensive rapid application development framework for structural bioinformatics. BALL has been carefully designed to address programming experts as well as novices. Users can take advantage of BALL's rich functionality while being offered an extensive framework of C++ data structures and algorithms. A variety of standard structural bioinformatics algorithms are offered and new algorithms can be easily added.

Using BALL as a programming toolbox does not only allow to greatly reduce application development times but also helps in ensuring stability and correctness by avoiding the error-prone reimplementation of complex algorithms and replacing them with calls into the library that has been well-tested by a large number of developers.

File Import/Export

BALL supports a rich variety of molecular file formats like PDB, MOL2, MOL, HIN, XYZ, KCF, SD, AC as well as secondary data sources like DCD, DSN6, GAMESS, JCAMP, SCWRL, and TRR. Molecules can also be created using BALL’s peptide builder or based on SMILES expressions.

General Structure Analysis

Further preparation and structure validation is enabled by, e.g., Kekuliser-, Aromaticity-, Bondorder-, HBond-, and Secondary Structure processors. A Fragment Library automatically infers missing information, e.g., a protein’s hydrogens or bonds. A Rotamer Library allows determining, assigning, and switching between a protein’s most likely side chain conformations. BALL’s Transformation processors guide generation of valid 3D structures. Its selection mechanism enables to specify parts of a molecule by simple expressions (SMILES, SMARTS, element types). This selection can be used by all modeling classes like the processors or force fields.

Molecular Mechanics

Fast and stable implementations of the popular force fields CHARMM, Amber, and MMFF94 can be combined with BALL’s minimizer and simulation classes (steepest descent, conjugate gradient, L-BFGS, and shifted L-VMM).

A variety of standard structural bioinformatics algorithms are offered and new algorithms can be easily added.


The following program reads a PDB file, adds missing information like bonds and hydrogens, optimizes the hydrogen positions using the AMBER force field, and writes the resulting molecule into a second pdb file.

 using namespace std;
 using namespace BALL;
 int main() 
   // read a PDB file
   PDBFile file("test.pdb");
   System S;
   file >> S;
   // add missing information
   // e.g. hydrogens and bonds
   FragmentDB fragment_db("");
   // check for charges, bond lengths,
   // and missing atoms
   ResidueChecker checker(fragment_db);
   // create an AMBER force field
   AmberFF FF;
   Selector selector("element(H)");
   // optimize the hydrogen's positions
   ConjugateGradientMinimizer minimizer;
   // write a PDB File"test_out.pdb", ios::out);
   file << S;

Python Interface[edit]

SIP is used to automatically create python classes for all relevant C++ classes in the BALL library to allow for the same class interfaces. The Python classes have the same name as the C++ classes, so porting code that uses BALL from C++ to Python (and vice versa) is usually a trivial task.

For instance, the above C++ code translates to

# Example
file = PDBFile("test.pdb")
system = System()
# add missing information
# e.g. hydrogens and bonds
fragment_db = FragmentDB("")
# check for charges, bond lengths,
# and missing atoms
checker = ResidueChecker(fragment_db)
# create an AMBER force field
FF = AmberFF()
selector = Selector("element(H)")
# optimize the hydrogen's positions
minimizer = ConjugateGradientMinimizer()
# write a PDB File
outfile = PDBFile("test_out.pdb",  File.MODE_OUT)

The python interface is fully integrated into the viewer application BALLView and thus allows for direct visualization of results computed by python scripts. In addition, BALLView can be operated from the scripting interface and recurring tasks can be automated.


BALLView is BALL’s standalone molecular modeling and visualization application. Furthermore, it is also a framework for developing molecular visualization functionality.

BALLView offers standard visualization models for atoms, bonds, and surfaces as well as grid based visualization of e.g. electrostatic potentials. BALLView allows to load a number of molecules at the same time and all representations can be hidden or shown at will. A large part of the functionality of the library BALL can be applied directly to the loaded molecule in BALLView.

BALLView supports a number of modern visualization and input methods like, e.g., different stereo modes, space navigator, and VRPN-supported Input devices.

At CEBIT 2009, BALLView was prominently presented as the first complete integration of real-time ray tracing technology into a molecular viewer and modelling tool.[1]

See also[edit]


Further reading[edit]

  • Hildebrandt, Andreas; Dehof, Anna Katharina; Rurainski, Alexander; Bertsch, Andreas; Schumann, Marcel; Toussaint, Nora C; Moll, Andreas; Stockel, Daniel; Nickels, Stefan; Mueller, Sabine C; Lenhof, Hans-Peter; Kohlbacher, Oliver (2010). "BALL - Biochemical Algorithms Library 1.3". BMC Bioinformatics 11: 531ff. doi:10.1186/1471-2105-11-531. 
  • Kohlbacher, Oliver; Lenhof, Hans-Peter (2000). "BALL—rapid software prototyping in computational molecular biology". Bioinformatics 16 (9): 815–24. doi:10.1093/bioinformatics/16.9.815. PMID 11108704. 
  • Moll, Andreas; Hildebrandt, Andreas; Lenhof, Hans-Peter; Kohlbacher, Oliver (2005). "BALLView: a tool for research and education in molecular modeling". Bioinformatics 22 (3): 365–6. doi:10.1093/bioinformatics/bti818. PMID 16332707. 
  • Moll, Andreas; Hildebrandt, Andreas; Lenhof, Hans-Peter; Kohlbacher, Oliver (2006). "BALLView: an object-oriented molecular visualization and modeling framework". Journal of Computer-Aided Molecular Design 19 (11): 791–800. doi:10.1007/s10822-005-9027-x. PMID 16470421. 

External links[edit]