This script allows you to color two structures by distance displacement between an Open and Closed form of a protein, as calculated by PyMol's internal distance command. The pairwise distance is calculated between all-atoms. The distance displacement values are stored as B-factors of these residues, which are colored by a rainbow color spectrum, with blue specifying minimum and red indicating maximum.
Do keep in mind, all original B-factors values are overwritten!
There exist one version.
ColorByDisplacementAll is between All atoms in residues and is quite slow => 3-5 mins for a run. Ideal for sticks representation.
You have to specify which residues should be used in the alignment procedure, or it will take all residues as standard
V.2 is implemented the 2011.01.06 - Due to a bug in coloring.
Bug in code
A bug in the boolean operator of ..→