From the start of its development in 1996, BALL's design principles have been wide functionality, ease of use, openness, and robustness.
To demonstrate BALL's rich functionality, we describe a typical application - namely docking - and point out how BALL simplifies its implementation. In this case, a large amount of time and code is devoted to the problem of importing the docking partners into suitable structural representations and preparing them for further use. Typically, this preparation consists in reading the molecules from diverse file formats, checking their content, adding missing information, running the actual docking algorithm, and, finally, analysing its result.
Reading the data doubtlessly belongs to the most recurring tasks in molecular software development. BALL supports a rich variety of molecular structure formats. While the previously published version  only supported the molecular file formats PDB and MOL2, version 1.3 additionally reads and writes MOL, HIN, XYZ, KCF, and SD files. Besides molecular files, it also supports a variety of other data sources, like DCD, DSN6, GAMESS, JCAMP, SCWRL, and TRR. Export to most of these formats is possible as well. Apart from importing molecules from external sources, the new version also offers rich functionality for generating and editing molecules. For instance, given only the amino acid sequence and the corresponding torsion angles, BALL's PeptideBuilder creates a 3D structure of that peptide. More general molecular structures, e.g., of ligands, can be generated from SMILES-expressions or programmatically by explicitly inserting atoms and bonds.
The next step - not only in docking but in all applications processing molecular structures - is to validate the structures and to prepare the data for the following tasks. Some atoms, in particular, hydrogens, are often missing, and structural information such as connectivity or bond orders are often incorrect or even missing. For proteins, DNA, and RNA, BALL can automatically infer much of the missing information from an extensible fragment database. This can also be used for validating given structures. A rotamer library allows the user to easily determine a protein's most likely side-chain conformations or to easily switch between several rotameric states. Both, fragment database and rotamer library have been significantly improved since BALL's first publication. Other molecules with a more diverse chemistry, such as ligands, require more sophisticated approaches to infer missing structural information. BALL's new BondOrderAssigner heuristically determines all possible bond order assignments for a given ligand sorted by their probability. Favorable 3D conformations can be achieved by employing BALL's new QuickOptimizer, a randomized MDSimulator/Minimizer in combination with several force fields (see below). Also among the new features are a kekulizer and an aromaticity processor.
Once the input has been prepared, the two core problems in protein docking are the generation of docking poses and their evaluation. For both tasks, BALL offers rich functionality. The first is facilitated by the preparation functionality (as described above) and BALL's transformation processors. Here, BALL's selection mechanisms also simplify matters by allowing, for instance, the selection of certain parts of the molecule through easily formulated expressions. Via a selector class, certain predicates like element type can be used as a selection filter. Additionally, BALL now provides an expression class which allows selecting subsets of objects by given SMILES and SMARTS strings as well as by BALL predicates.
The second task often amounts to energy evaluations and/or the checking of certain criteria. The former version of BALL provided the force field classes CHARMM  and AMBER . In the current version, an implementation of the Merck Molecular Force Field (MMFF94) , a fully parameterized force field that allows handling of virtually all kinds of organic molecules, has been added as well as some non-differentiable scoring functions.
Force fields can not only be used for scoring: BALL's minimizer and molecular dynamics classes can be combined with all of the implemented force fields. Minimizers and simulation classes also support selection, allowing the user to freely specify a set of movable atoms from all atoms used for force field computation. This is useful in a variety of contexts, e.g. when estimated hydrogen positions have to be reoptimized. Since the last version, we have greatly extended the minimization capabilities , now offering standard (steepest descent, conjugate gradient) and the best currently known methods (L-BFGS and shifted L-VMM).
In addition to the features described above, version 1.3 has been greatly extended with further functionality. For instance, secondary structure prediction and hydrogen-bond detection  are now available.
In summary, BALL has developed into a powerful tool for RAD covering fundamental functionality as well as complex applications like molecular docking and drug design. Due to its modular architecture, all classes and algorithms can be combined in a building block manner to easily implement even complex methods.
Ease of use
One measure of the usefulness of an RAD platform is the time it saves compared to developing the functionality from scratch. Hence, ease of use and a shallow learning curve are important goals for any large-scale framework. On the other hand, after some time of familiarization with the library, users will usually want to fine-tune the methods, choose detailed parameters, or even exchange parts of the algorithms. Supporting these advanced users bears the risk of conflicting with the ease-of-use principle, for instance, by confusing the user with a wide array of tuneable options. BALL has been very carefully designed to address both groups of users, experts and novices alike, simultaneously. For example, most algorithms implemented in BALL accept a wide range of options to fine-tune their behavior, but all of these come with sensible defaults. In this way, a novice user can just instantiate a class and use it successfully, while experts can adapt the options to their individual needs. Similarly, the versatile Python interface offered by BALL appeals to both groups of users, albeit in different ways: while novice users and non-programming experts can profit from the easy-to-learn scripting languages, experts can use it to create powerful scripts.
SIP is used to automatically create python classes for all relevant C++ classes to allow for the same class interfaces. The Python class has the same name as the C++ class, so porting code that uses BALL from C++ to Python (and vice versa) is usually a trivial task. For instance, the following C++ code
// read a PDB file
PDBFile file (" test . pdb");
file >> S;
file . close ( );
// add missing information
// e . g . hydrogens and bonds
FragmentDB fragment_db (" ");
S . apply (fragment_db . normalize_names);
S . apply (fragment_db . add_hydrogens);
S . apply (fragment_db . build_bonds);
// check for charges, bond lengths ,
// and missing atoms
ResidueChecker checker (fragment_db);
S . apply (checker);
// create an AMBER force field
S . deselect ( );
FF . setup (S);
Selector selector (" element (H) ");
S . apply (selector);
// optimize the hydrogen ' s positions
minimizer . setup (FF);
minimizer . setEnergyOutputFrequency (1);
minimizer . minimize (50);
// write a PDB File
file . open (" test_out . pdb", ios : : out);
file << S;
file . close ( );
# read a PDB file
file = PDBFile (" test . pdb")
system = System ( )
file . read (system)
file . close ( )
# add missing information
# e . g . hydrogens and bonds
Fragment_db = FragmentDB(" ")
system . apply (fragment_db . normalize_names)
system . apply (fragment_db . add_hydrogens)
system . apply (fragment_db . build_bonds)
# check for charges, bond lengths ,
# and missing atoms
checker = ResidueChecker (fragment_db)
system . apply (checker)
# create an AMBER force field
FF = AmberFF( )
system . deselect ( )
FF . setup (system)
selector = Selector (" element (H) ")
system . apply (selector)
# optimize the hydrogen ' s positions
minimizer = ConjugateGradientMinimizer ( )
minimizer . setup (FF)
minimizer . setEnergyOutputFrequency (1)
minimizer . minimize (50)
# write a PDB File
outfile = PDBFile (" test_out . pdb", File .MODE_OUT)
outfile . write (system).
outfile . close ( )
Since the Python interface is fully integrated into the molecular viewer and modeling tool BALLView , the effects of the scripts can be visualized directly. Also, the interface provides a simple way to automatize BALLView's behaviour.
Finally, a number of tutorials guide inexperienced users through the writing of their first applications.
These tutorials are provided with BALL's extensive documentation and have recently been supplemented with a code library for recurring tasks on our wiki http://ball-trac.bioinf.uni-sb.de/wiki.
Apart from substantially simplifying the creation of applications, the use of RAD frameworks can also help greatly in ensuring their correctness and improving their robustness, since the code in the library has often been used and tested in a variety of situations by a large number of people. To improve robustness, BALL employs a large number of regression tests that are regularly executed on a number of different platforms. In this way, it is easy to determine whether a change in some part of the code will lead to a regression in another part, or whether a new compiler release, for instance, will result in different behavior.