Step-by-step installation instructions

Bendix is written in tcl and works on most operating systems, including Windows, Linux and Mac. To run Bendix, please download the software, decompress the files and follow the instructions below. You may also run Bendix without installing it, but please note that you will miss out on a couple of Help-features. It is recommended that you install Bendix.

  • Integrate Bendix into VMD's native plugin directory (may require root/administrator priviliges)
  • Integrate Bendix with VMD using a path of your choice
  • Run Bendix from VMD's terminal


  • Technical detail

    This section provides an overview of how the bendix source code is structured, and the algorithms used. For more detail, please refer to the code itself, which is commented.

    bendix.tcl is approximately 6,000 lines long (circa 150 A4 pages) and consists of 39 functions (procedures). It is written in Tcl with a user interface implemented in Tcl's graphical user interface extension, the Tk toolkit.

    Code structure

  • Procedures are grouped according to utility into the following sections:

  • Graphical User Interface setup and maintenance
  • Load and save files
  • User help and acknowledgements
  • Draw non-bendices
  • 2D and 3D helix analysis (whereof scatter plots are generated by Multiplot)
  • Trajectory and molecule ID detection
  • Particle and subset validation
  • Informative error messages
  • Hide, erase and reset visuals
  • Main bendix procedure:
  • Input verification
  • Obtain user-assigned or automated helicity (latter by STRIDE or input file text-mining)
  • Coordinate retrieval
  • Generate helix axis (see Sugeta and Miyasawa (1967) and discussion below)
  • Extend the axis peripherally to reclaim length lost to the axis generating algorithm
  • Apply Hermite spline to the axis according to user settings
  • Retrieve user settings for screen output (heatmap, material, resolution et.c.)
  • Draw to screen
  • Calculate and store data for 2D and 3D helix analysis
  • Reset variables to enable rerun

  • The code is modulated to speed up operation and avoid unnecessary calculations. Where possible, protein atom indices are stored for fast coordinate retrieval while drawing trajectories to the screen.

    Helix axis generation

  • Bendix' helix axis generation is a Tcl implementation of the C language algorithm used by Dalton et al., 2003. This algorithm is also used by Bansal et al., 2000 and was originally presented by Sugeta and Miyazawa (1967). This algorithm calculates a helix axis coordinate using vector algebra on four consequitive backbone C-alphas. This window slides along the length of the helix in steps of one C alpha.

    Special circumstances at the ends of helices
  • The Sugeta and Miyazawa algorithm generates a helix axis that is two residues short of the original helix length. To remedy this, Bendix computes the local helix vector at the ends of the helix, and extends the helix by one residue's worth in each direction. Both length and direction of each extension is based on averaged end axis coordinates.

  • References
  • Bansal M, Kumar S and Velavan R (2000) HELANAL - A program to characterise helix geometry in proteins. J Biomol Struct Dyn. 17(5):811-819
  • Dalton JA, Michalopoulos I and Westhead DR (2003) Calculation of helix packing angles in protein structures. Bioinformatics 19(10):1298-1299.
  • Sugeta H and Miyazawa T (1967) General Method for Calculating Helical Parameters of Polymer Chains from Bond Lengths, Bond Angles, and Internal-Rotation Angles. Biopolymers 5(7):673-679

    The Hermite spline

  • A spline inputs coordinates and generates an averaged, smooth curve through them, using third degree polynomials. The Hermite spline moves through input coordinates (the helix axis, in this case) using a four-point window, generating a smooth curve between the middle points. The peripheral points gives the gradient at which the spline interpolates the middle points. Bendix uses the Catmull-Rom definition of the gradient with the constant set to 0.5.
  • The spline 4-point-window shortens the helix axis. However, Bendix generates Phantom knots, artificial axis extensions, prior to spline-calculation, to overcome this issue. This way the helix axis length is preserved.
  • Use every [N] residues: the spline's control point interval
  • The input coordinates used to generate a spline curve are called control points. In Bendix, each C alpha gives rise to a corresponding control point that is located on the helix axis. This allows us to refer to axis control points by their respective residues, and to choose to use more or less of these to generate a spline. The Hermite spline curve goes through each selected control point, so if you, for example, use every 4 residues' control points, the output Hermite spline curve follows the Sugeta and Miyazawa helix axis less closely than if you would use every 2 residues. This generates a smoother, more global approximation of the axis.
  • Measure local or global helix geometry

    The helix geometry algorithm uses a triangle with side length in units of residues. At low resolution, the helix axis is only sparsely populated by spline points, so the exact angle length is difficult to obtain. Increase your resolution to ensure that your chosen angle side length is executed precisely. A large angle side measures a global angle, whereas a small angle side measures more local angles. Adjust the Side setting to reflect what you wish to analyse.

  • Angle-values for helix ends are standardised
  • Angles can't be evaluated for peripheral axis points that are located smaller than one Side's distance from a helix end. Instead, the nearest calculatable angle is evaluated, and angle measurements along helix ends are made to increase linearly from 0 at the tip to the first calculatable angle. As a result, a linear rise in angle can be seen in 2D and 3D plots within one angle side's worth of helix ends. These angle values should be ignored, and were only implemented to denote the real length of the helix, to orient the user.

  • Q&A

  • Q: Bendix doesn't appear under VMD Extensions > Analysis, or doesn't run.
  • A: Here are four ways to troubleshoot:
    1. Check what version of VMD you're running. Bendix is written in Tcl and requires tcl 8.5 or above, which comes with the latest VMD versions (Bendix was developed using VMD 1.9). If you have an old VMD version, consider upgrading.
    2. If your VMD version is up to date, VMD might not have found vmdrc, the tcl startup file that you edited to point VMD in Bendix' direction. VMD looks for vmdrc in three directories; first your current directory, then your home directory and lastly where you installed VMD, and uses the first vmdrc file that it finds. Launch VMD and type
    pwd
    in the vmd terminal that opens by VMD startup. VMD will definitely search that directory, so try saving vmdrc there.
    3. If neither of the above works, verify that the downloaded, unzipped Bendix package contains the following files: pkgIndex.tcl bendix.tcl Monsieur_Bendix_smaller_still.gif GUI-tips.gif
    4. Check that the variable pck_pkdir points to the directory where you keep the bendix1.1 folder.
    New! Bendix will ship as part of VMD 1.9.2, so you will soon be able to load it from VMD Main > Extensions.

  • Q: I tried Bendix on a coarse-grained protein file, but I get the error-message 'No helices? Bendix could not detect any helicity in your protein...'. What should I do?
  • A: Because software does not currently exist for prediction of secondary structure for coarse-grained proteins, Bendix text-mines your input file for particle types, and uses these to tell what secondary structure to depict. This will, of course, only work if the particle type reveals the local secondary structure, which the MARTINI coarse-grain particles do. There are therefore three possible reasons for this error message:
    1. Your protein does not feature helices!
    2. Your input file does not feature the MARTINI force field. You can supply helicity for your protein using the "Helices:" field under the Helix features box, that you reach by clicking the Settings button. Either type in your own helicity, working your way through your protein, or draw bendices for the original atomistic protein or a MARTINI version, and save this helicity (under File > Save helix assignment...). Reload it for your coarse-grained protein to generate helices (under File > Load helix assignment...).
    3. Your MARTINI input file has insufficient space for particle names, or particle names have become scrambled (some MD software do this). If this is the case, Bendix can't work on your file. Bendix mines your file for particle names that start with BH, BBh, BE or BBe. Check that your file contains these. If it does not, load an alternate file that does. Bendix users that use GROMACS say that any sort of MD treatment to your system, where you use the MARTINI forcefield to generate a .gro file (e.g. a very short energy minimisation) will correct the input file.

  • Q: I have a coarse-grained system and ERROR> messages appear in the VMD terminal. What is wrong?
  • A: Nothing is wrong - do not worry. VMD runs STRIDE behind the scenes to generate secondary structure for your protein. When STRIDE attempts to decipher your protein, it fails, as it was not built to analyse CG proteins. No STRIDE output file is created, and you receive an error message from the VMD script that expects this file. This does not affect the operating of Bendix, which is autonomous from STRIDE when it deals with CG input.

  • Q: I have heatmap-coloured my helix and want to analyse a loaded trajectory, but I get the error message "No trajectory loaded? bendix does not detect frames!..". How can I fix this?
  • A: Bendix saves axis coordinates as you play your trajectory, and erase this data every time you reach the end of your trajectory and it restarts on the first frame. Therefore, in order to analyse a complete trajectory, you need to Play it from the start to the very last frame, without allowing it to go back to the first frame again.

  • Q: I'm in the Surf module and hit Surf, and I think that it is done drawing, but I see nothing on my screen! Where is my surf graph?
  • A: If this happens, the first thing to try is to display the graph axes. To do this, tick the 'Show axes' box. The axes will give you a good idea about the surf graph. It might be evident now that you need to zoom in or out to see your graph (click 's' in the VMD Display window and scale by click-and-dragging your mouse), or rotate the scene a bit to get a better angle. If you are still struggling to see anything, the graph may be occluded by VMD's default Depth Cueing (the fog that lets you distinguish between near and far objects) or it may be poorly resolved against your VMD background colour. To disable Depth Cueing, go to VMD Main > Display and untick Depth Cueing. To change the VMD Display background colour, go to VMD Main > Graphics > Colors... and choose Category Display, Name Background and a new Color. For clarity, we suggest white.

  • Q: The surf graph of my trajectory is uneven (high resolution for some frames and low resolution elsewhere), or data is only displayed for some frames. Why is this?
  • A: As mentioned in the Answer above, Bendix records helix data as you play your trajectory. If your surf graph resolution is uneven, you have jumped through your trajectory either manually using the scrollbar, or using a Play step higher than 1. Exit the surf window and replay your trajectory using step 1.

  • Q: Bendix takes a lot of time drawing my surf graph! Why does this happen?
  • A: The surf graphs are made of many, many graphics primitives, all of which needs to be drawn to the screen. If you want your data to be drawn faster, consider reducing the resolution or graphing every, say, 10th frame. Since Bendix only saves data for played frames, you can graph every 10th frame by putting step 10 in the VMD Main Window. Alternatively you can export the data (File > Save surf data...) to a dedicated graphing suite such as MatLab, without first drawing it in Bendix.

  • Q: I tried the Surf analysis tool and my protein disappeared! How do I get it back?
  • A: Your protein is still there, but Bendix temporarily hid it so that the Surf graph could be displayed without interfering with your protein. Your protein will automatically be revealed and the perspective shifted back to your 'pre-surf' perspective when you hit Return in the Surf module.

  • Q: New! My protein travelled across the periodic boundary of the box, and now its bendices are drawn across the box length. How do I fix this?
  • A: You get around this issue by preprocessing your trajectory. A single protein can be centered in the box, so that it never reaches the edges. To do this in VMD, go to VMD Main > Extensions > Tk Console. Replacing protein with your selection of interest, type
    pbc wrap -all -center com -centersel "protein"
    and hit Enter. For several independent proteins, you will need to unwrap the trajectory coordinates prior to loading them into VMD.

  • Q: I use Bendix for my paper. How do I cite you?
  • A: We're pleased to hear that Bendix is useful to you! If Bendix contributes towards your publication, please use the following reference:
  • Dahl ACE, Chavent M and Sansom MSP (2012) Bendix: intuitive helix geometry analysis and abstraction. Bioinformatics 28 (16): 2193-2194

    The paper can be found here.



  • More help is available from Bendix under the Help menu. Alternatively contact us.