Creating a plot of bondlength


This tutorial will walk you through the steps needed to color bonds in a molecular plot with the bond length. First open the cube file with the Walker plugin.

Then create a standard Molecule plot of 'element'.

Now, we will create a derived expression for bondlength. First bring up the Control->Expressions window. Create a new variable called 'bondlength' of type 'Scalar Mesh Variable'. Enter the formula for bondlength as min_edge_length(atoms). You can enter this exactly or choose from a drop-down menu for 'Mesh Quality'. Hit 'Apply'.

Create another Molecule Plot, but this time of 'bondlength'. Choose the 'Create Bonds' operator; enter appropriate bonds between elements and their min/max distances. Choose the 'Defer Expressions' operator, enter 'bondlength' as the variable for this operator. It is important to note to match the plot and operator sequence as shown in the figure on the left. Hit 'Draw', you should see different bonds of variable length colored differently.