Pteros
2.0
Molecular modeling library for human beings!
|
Pteros is a C++ library for molecular modeling with the Python bindings. It is designed to simplify the development of custom programs and scripts for molecular modeling, analysis of molecular dynamics trajectories and implementing new simulation and analysis algorithms. Pteros provides facilities, which are routinely used in all molecular analysis programs, namely input/output of popular file formats, powerful and flexible atom selections, geometry transformations, RMSD fitting and alignment, etc. Pteros also contains powerful facilities for parsing command-line arguments in custom programs and for running several analysis tasks in parallel, utilizing the power of modern multi-core processors.
Pteros supports writing analysis programs in either C++ or Python programming languages.
Any work, which uses Pteros, should cite the following papers:
Pteros library is for you if:
Pteros is not for you if:
Some less widely used features:
Pteros is a mature but evolving library. The librray is stable, but API (especially in the part of Python bindings) is still subject to small changes. There are bugs here and there, error reporting is still incomplete and many features are not implemented yet. You are wellcome to participate in pteros development - there are a lot of things to do!
The sources of all these libraries are included into the source tree of Pteros, so you don't need to install them separately.
In order to develop you own programs with Pteros you need to know C++ reasonably well. However, you don't need to be a guru. Here is the basic list of things, which you should understand:
In addition you should be familiar with Eigen vector/matrix library. Fortunately, it has an excelent documentation.
In order to modify internals of Pteros you should also be familiar with some Boost libraries.
So, why yet another molecular modeling library? First of all because I didn't find any C++ library for molecular modeling which satisfies my needs. Existing libraries are either too complicated or has clumsy and counterintuitive API. Of course all this is the matter of personal preference, but I have a feeling that many other researchers also desperately look for simple and clear library, which can simplify tedious routine tasks in molecular modeling.
There are several molecular modeling programs, which could be controlled by the scripting languages. Such scripting is often used to perform non-standard analysis tasks. This is perfectly acceptable if the execution time is not an issue, however any computationally intensive algorithm will run ridiculously slow in the scripting language like Python or TCL. Pteros is designed as a replacement of such scripting extentions to existing molecular modeling software. With Pteros one can easily write very fast compiled programs in C++ using the same high-level concepts, which are provided by the scripting extentions.
Pteros contains bindings for Python language. They come handy when one need small throw-away program or in prototyping new algorithms.
We compared performance of three small test programs in Pteros and VMD. The first program fits all trajectory frames to the reference structure and computes their RMSD with the reference. The second program finds atoms in two selections, with the distance between their centers less then 0.25 nm. The third program creates atom selections for each residue in the system on each loaded frame, which gives good estimate of the raw speed of selection parsing. In VMD the bigdcd script was used to process frames one by one without loading the whole trajectory into the memory. The MD trajectory of human tyrosyl-tRNA sinthetase, which contains 10744 atoms was used. First 1000 frames of trajectory where analyzed. Results of comparison are shown below:
Table 1. Execution time (in seconds) of three benchmark programs in Pteros and VMD.
# | Benchmark | Pteros | VMD | Ratio VMD/Pteros |
1 | Fitting and RMSD calculation | 1.6 | 5.1 | 3.18 |
2 | Finding contacting atoms | 3.9 | 7.4 | 1.9 |
3 | Creating selections for each residue | 63.1 | 2900.0 | 45.9 |
Since VMD scripts for these benchmarks are very simple and call low-level built-in routines for the most of their work, the overhead of the TCL interpreter is rather minimal in our test. Any larger script, which performs complex computations and data manipulations, will have much larger overhead in comparison to compiled code. However, even these small scripts run significantly slower then compiled programs, which use Pteros. The parsing of atom selections in VMD is dramatically (46 times) slower then in Pteros, despite almost identical selection syntax. This introduces large performance penalty for any code in VMD, which creates many selections in the course of execution. Due to parallel execution of analysis tasks in Pteros running them simultaneously increases execution time only by few percent, while in VMD the execution time of all tasks is summed up (data not shown). Source code of the benchmark programs is included into the Pteros distribution and located in “examples” directory.
More benchmars are available in the recent paper on Pteros 2.0.