I've been spending some time comparing my force spectroscopy data with Marisa's, and the main problem has been normalizing the data collected using different systems. Marisa runs experiments using some home-grown LabVIEW software, which saves the data in IGOR binary wave (IBW) files. From my point of view, this is not the best approach, but it has been stable over the time we've been running experiments.

I run my own experiments using my own code based on pyafm, saving the data in HDF5 files. I think this approach is much stronger, but it has been a bit of a moving target, and I've spent a good deal of my time working on the framework instead of running experiments.

Both approaches save the digitized voltages that we read/write during an experiment, but other constants and calibration terms are not always recorded. My pyafm-based software has been gradually getting better in this regard, especially since I moved to h5config-based initialization. Anyhow, here's a quick runthough of all the important terms.

For the TL;DR crowd, crunch.py is my Python module that crunches your input and prints out all the intermediate constants discussed below. To use it on your own data, you'll probably have to tweak the bits that read in the data to use your own format.

# Calibrating the piezo

## Calibration grid

We control the surface-tip distance by driving a piezo tube. We want to know the correspondence between the driving voltage and the piezo position, so we calibrate the piezo by imaging a sample with square pits of a known depth.

In this trace, I swept the $x$ position across most of the range of my 16-bit DAC. For each $x$ position, I adjusted the $z$ position until the measured cantilever deflection $d$ crossed a setpoint. This gives the $z$ voltage required to reach the surface as a function of $x$. You can see the 200 nm deep square pits, as well as a reasonable amount of $x$/$z$ crosstalk.

Sometimes grid calibrations are even less convincing than the example shown above. For example, I have traces with odd shoulders on the sides of the pits:

This is one of the better piezo calibration images I aquired for the piezo used in the pull below, so I'll use numbers from the funky imaging for the remainder of this analysis. This piezo has less $x$/$y$ range than the one used to measure the first calibration trace, which is why I was unable to aquire a full pit (or pits).

The calibration constant ${\alpha }_{z}$ is the number of $z$ bits per depth meter:

(1)${\alpha }_{z}=\frac{\text{grid piezo bits}}{\text{grid depth}}=\frac{2779±87\text{bits}}{200\text{nm}}=\left(1.39±0.04\right)\cdot {10}^{10}\text{bits/m}\phantom{\rule{thickmathspace}{0ex}}.$

Related conversion factors are

(2)$\begin{array}{rl}{\gamma }_{z}& =\frac{\text{piezo volts}}{\text{piezo bits}}=\frac{20\text{piezo volts}}{\text{output volts}}\cdot \frac{10\text{output volts}}{{2}^{15}\text{piezo bits}}=6.10\cdot {10}^{-3}\text{V/bit}\\ {\sigma }_{z}& =\frac{\text{grid piezo volts}}{\text{grid depth}}={\gamma }_{z}{\alpha }_{z}=8.48\cdot {10}^{7}\text{V/m}\phantom{\rule{thickmathspace}{0ex}}.\end{array}$

This is roughly in the ballpark of our piezo (serial number 2253E) which is spec'd at 8.96 nm/V along the $z$ axis, which comes out to $1.12\cdot {10}^{8}$ V/m.

## Laser interference

Another way to ballpark a piezo calibration that is much closer to a force spectroscopy pull is to use the laser interference pattern as a standard length. The laser for our microscope has a wavelength of 670 nm. We'll assume a geometric gain of

(3)${g}_{\lambda }=\frac{\text{increased laser path}}{\text{piezo displacement}}\approx 2\phantom{\rule{thickmathspace}{0ex}}.$

Measuring the length of an interference wave in bits then gives a standard equivalent to the known-depth pits of the calibration grid.

(4)$\begin{array}{rl}{\alpha }_{z}& =\frac{\text{interference piezo bits}}{\text{interference depth}}=\frac{{g}_{\lambda }}{\lambda }\cdot \text{interference piezo bits}\\ & =\frac{2}{670\cdot {10}^{-9}\text{m}}\cdot \left(28935-23721\right)\text{bits}=1.56\cdot {10}^{10}\text{bits/m}\phantom{\rule{thickmathspace}{0ex}}.\end{array}$

The other piezo calibration parameters are found exactly as in the calibration grid case.

(5)${\sigma }_{z}={\gamma }_{z}{\alpha }_{z}=9.52\cdot {10}^{7}\text{V/m}\phantom{\rule{thickmathspace}{0ex}}.$

which is fairly close to both the spec'd value and grid calibration values.

# Calibrating the photodiode

During experiments, we measure cantilever deflection via the top and bottom segments of a photodiode. We need to convert this deflection voltage into a deflection distance, so we'll use the already-calibrated piezo. When the tip is in contact with the surface, we can move the surface a known distance (using the piezo) and record the change in deflection.

The calibration constant ${\alpha }_{d}$ is the number of diode bits per piezo bit.

(6)${\alpha }_{d}=\frac{\text{bump diode bits}}{\text{bump piezo bits}}=2.24\text{diode bits/piezo bits}\phantom{\rule{thickmathspace}{0ex}}.$

Related conversion factors are

(7)$\begin{array}{rl}{\gamma }_{d}& =\frac{\text{diode volts}}{\text{diode bits}}=\frac{10\text{input volts}}{{2}^{15}\text{diode bits}}\cdot \frac{\text{diode volts}}{1\text{input volts}}=3.05\cdot {10}^{-4}\text{V/bit}\\ {\sigma }_{d}& =\frac{\text{bump diode volts}}{\text{bump tip position}}={\gamma }_{d}{\alpha }_{d}{\alpha }_{z}=9.52\cdot {10}^{6}\text{V/m}\phantom{\rule{thickmathspace}{0ex}}.\end{array}$

# Calibrating the cantilever spring constant

To convert cantilever tip deflection to force, we need to know the spring constant of the cantilever. After bumping the surface, we move away from the surface and measure the cantilever's thermal vibration. We use the vibration data to calculate the spring constant using the equipartition theorem.

The deflection variance $⟨{d}^{2}⟩$ is measured in frequency space, where the power spectral density (PSD) is fitted to the expected PSD of a damped harmonic oscillator.

(8)$\begin{array}{rl}{\mathrm{PSD}}_{f}& =\frac{{G}_{1f}}{\left({f}_{0}^{2}-{f}^{2}{\right)}^{2}+{\beta }_{f}^{2}{f}^{2}}\\ ⟨{d}^{2}⟩& =\frac{\pi {G}_{1f}}{2{\beta }_{f}{f}_{0}^{2}}\\ \kappa & =\frac{2{\beta }_{f}{f}_{0}^{2}}{\pi {G}_{1f}}\left({\alpha }_{d}{\alpha }_{z}{\right)}^{2}{k}_{B}T=\frac{2\cdot \left(4.17\cdot {10}^{3}\text{Hz}\right)\cdot \left(8.14\cdot {10}^{3}\text{Hz}{\right)}^{2}}{\pi \cdot 3.10\cdot {10}^{13}{\text{bit}}^{2}\cdot {\text{Hz}}^{3}}\cdot \left(2.24\cdot 1.39\cdot {10}^{10}\text{bit/m}{\right)}^{2}\cdot \left(1.38\cdot {10}^{-23}\text{J/K}\right)\cdot \left(294\text{K}\right)=22.4\cdot {10}^{-3}\text{N/m}\end{array}$

# Analyzing a velocity-clamp pull

The raw data from a velocity-clamp pull is an array of output voltages used to sweep the piezo (moving the surface away from the cantilever tip) and an array of input voltages from the photodiode (measuring cantilever deflection). There are a number of interesting questions you can ask about such data, so I'll break this up into a few steps. Lets call the raw piezo data (in bits) ${\alpha }_{v}$, with the contact-kink located at ${\alpha }_{v0}$. Call the raw deflection data (also in bits) ${\alpha }_{F}$, with the contact-kink located at ${\alpha }_{F0}$.

## Piezo displacement

Using the piezo calibration parameters, we can calculate the raw piezo position using

(9)${z}_{\text{piezo}}=\frac{{\alpha }_{v}-{\alpha }_{v0}}{{\alpha }_{z}}\phantom{\rule{thickmathspace}{0ex}},$

measured in meters.

## Surface contact region

During the initial portion of a velocity clamp pull, the cantilever tip is still in contact with the surface. This allows you to repeat the photodiode calibration, avoiding problems due to drift in laser alignment or other geometric issues. This gives a new set of diode calibration parameters ${\alpha }_{d}\prime$ and ${\sigma }_{d}\prime$ (it is unlikely that ${\gamma }_{d}$ has changed, but it's easy to rework the following arguments to include ${\gamma }_{d}\prime$ if you feel that it might have changed).

## Tension

We can use the new photodiode calibration and the cantilever's spring constant to calculate the force from the Hookean cantilever:

(10)$F=\frac{{\alpha }_{F}-{\alpha }_{F0}}{{\alpha }_{d}\prime {\alpha }_{z}}\cdot \kappa =\left({\alpha }_{F}-{\alpha }_{F0}\right)\cdot \frac{2{\beta }_{f}{f}_{0}^{2}}{\pi {G}_{1f}}\cdot \frac{{\alpha }_{d}^{2}{\alpha }_{z}}{{\alpha }_{d}\prime }\cdot {k}_{B}T\phantom{\rule{thickmathspace}{0ex}}.$

## Protein extension

As the piezo pulls on the cantilever/protein system, some of the increased extension is due to protein extension and the rest is due to cantilever extension. We can use Hooke's law to remove the cantilever extension, leaving only protein extension:

(11)${z}_{\text{protein}}={z}_{\text{piezo}}-\frac{F}{\kappa }=\frac{1}{{\alpha }_{z}}\left({\alpha }_{v}-{\alpha }_{v0}-\frac{{\alpha }_{F}-{\alpha }_{F0}}{{\alpha }_{d}\prime }\right)$

## Contour-space

In order to confirm the piezo calibration, we look at changes in the unfolded contour length due to domain unfolding ($\Delta L$). There have been a number of studies of titin I27, starting with Carrion-Vazquez et al., that show an contour length increase of 28.1 ± 0.17 nm. Rather than fitting each loading region with a worm-like chain (WLC) or other polymer model, it is easier to calculate $\Delta L$ by converting the abscissa to contour-length space (following Puchner et al.). While the WLC is commonly used, Puchner gets better fits using the freely rotating chain (FRC) model.

In crunch.py, I use either Bustamante's formula (WLC) or Livadaru's equation 49 (FRC) to calculate the contour length of a particular force/distance pair.

As you can see from the figure, my curves are spaced a bit too far appart. Because the contour length depends $F$ as well as ${z}_{\text{protein}}$, it depends on the cantilever calibration (via ${\beta }_{f}$, ${f}_{0}$, ${G}_{1f}$ and ${\alpha }_{d}$) as well as the piezo calibration (via ${\alpha }_{z}$). This makes adjusting calibration parameters in an attempt to match your $\Delta L$ with previously determined values a bit awkward. However, it is likely that my cantilever calibration is too blame. If we use the value of ${\alpha }_{z}$ from the interference measurement we get

Which is still a bit too wide, but is much closer.