The Bsoft package grew out of my efforts to write programs dealing with image and molecular objects for electron microscopy specifically and structural biology in general. The key underlying philosophy in Bsoft is that the functionality should be as general as possible and empower the user to do many operations without being hampered with issues such as the multiple file formats and poor flexibility in processing. On the programming side I aimed at making the development cycle as simple as possible while using a sophisticated object-oriented approach. Bsoft is a package that evolves with consideration of the effectiveness, efficiency and manageability of the code.
Here are some specific design features:
Bsoft is written in standard C with some C++ features, defining objects and managing dynamic memory efficiently.
All machine-specific features in C are avoided, so that it compiles with no modification on many platforms (various flavours of Unix, as well as VMS).
The modules in Bsoft are functions, each forming a completely defined and independent unit. All information needed by a function is specified in the argument list. All return values are specified in the returned object, or (rarely) associated with a pointer in the argument list. The only globals allowed are package-wide and required for user output control (verbose) and memory management (memory).
Bsoft is an object-oriented package with objects such as images and molecules encapsulated in C structs. Geometric objects such as vectors, rotation matrices and quaternions have been developed into full C++ classes to facilitate writing code and execution of geometric processing. Central to the package is the philosophy of a unified and standardized description of information, regardless of the source. Images are accessed within a single conceptual structure, regardless of file format or content (providing for 1D, 2D and 3D data, including structure factors). Similarly, the single concept of a molecule is used to encapsulate both sequence data and atomic structure.
Dynamic memory management is tracked through one global variable (memory) to be able to locate and eliminate memory leaks.
Documentation is embedded in the source code and automatically extracted using perl scripts.
Bsoft offers access to a large number of image file formats and some molecular file formats.
Bsoft has data base-like facilities for dealing with large amounts of parametric data. Persistence of data is achieved through tag-based parametric files, currently only available in the STAR (Self-referencing Text Archiving and Retrieval) format.
Conventions are explicitly stated and supported by an extensive list of functions for geometric operations.
For the programmer, Bsoft offers a good software development platform. Programs can be written outside the package, linking in the Bsoft library on compilation. The coding-testing cycle is compressed, allowing fast debugging and code production.