BioAFMviewer: An interactive interface for simulated AFM scanning of biomolecular structures and dynamics

We provide a stand-alone software, the BioAFMviewer, which transforms biomolecular structures into the graphical representation corresponding to the outcome of atomic force microscopy (AFM) experiments. The AFM graphics is obtained by performing simulated scanning over the molecular structure encoded in the corresponding PDB file. A versatile molecular viewer integrates the visualization of PDB structures and control over their orientation, while synchronized simulated scanning with variable spatial resolution and tip-shape geometry produces the corresponding AFM graphics. We demonstrate the applicability of the BioAFMviewer by comparing simulated AFM graphics to high-speed AFM observations of proteins. The software can furthermore process molecular movies of conformational motions, e.g. those obtained from servers which model functional transitions within a protein, and produce the corresponding simulated AFM movie. The BioAFMviewer software provides the platform to employ the plethora of structural and dynamical data of proteins in order to help in the interpretation of biomolecular AFM experiments.


PDB structures and scanning parameters
For the illustration of simulated scanning in Fig 1 we have used the crystal structure of the DNA polymerase III sliding clamp (PDB 3P16, chains A and B). Scanning parameters were a = 0.3nm, α = 10 • and R = 0.5nm.
For the video demonstration of the BioAFMviewer we have used the cryo-EM structure of the SARS-CoV-2 RNA polymerase (PDB 6M71) and the crystal structure of the GroEL-GroES chaperone complex (PDB 1SX4). The scanning parameters were a = 0.5nm, α = 10 • and R = 0.8nm, and a = 1nm, α = 10 • and R = 1nm, respectively. In both video examples the variable scale mode of color encoding was employed (see Manual for further explanations).
To demonstrate the effect of tip-shapes on the simulated AFM images we have used the electron microscopy structure of the muscle acto-myosin complex (PDB 1M8Q). Only a single myosin protein was considered (chains P,Q,R). The scanning parameters are given in the main text figure caption.
For comparison to the ∆N-TClpB hs-AFM image, we have simulated an image of the cryo-EM structure of the homologue Hsp104 in the ATP state (PDB 5KNE). From the initial conformation, the N-terminal domains have been truncated. Scanning parameters were a = 0.4nm, α = 10 • and R = 1nm. The color window corresponded to 6 − 11nm. In the case of the Cas9-RNA-DNA experimental hs-AFM image, we have used the crystal structure of the Cas9-RNA-DNA complex (PDB 4OO8, chain A; guide RNA and target DNA has been omitted) to produce the simulated AFM image. Scanning parameters were a = 0.35nm, α = 10 • and R = 1nm. The selected color window corresponded to 0 − 7.8nm. For the rotorless F1-ATPase hs-AFM case, we have used the crystal structure of the nucleotide-free ring (PDB 1SKY, ring assembly) and the crystal structure of the F1 ring with bound nucleotides (PDB 1BMF, without the rotor γ-subunit) to generate simulated images. Scanning parameters were a = 0.3nm, α = 10 • and R = 1nm. The selected color window corresponded to 7.5 − 10nm, and 7.5 − 9.7nm, respectively.
For the simulated AFM movie of the GroEL functional transition (Video 3) the scanning parameters were a = 0.5nm, α = 10 • and R = 1nm. For the side-view perspective the colorbar was customized to the range between 0 − 14nm; that for the top-view perspective was between 0 − 9nm. It should be noted that for the GroEL case the molecular movie contained only the alpha-carbon atoms of amino acid residues. Therefore, only a coarse-grained molecular structure could be considered in simulated scanning.

Comparison of simulated and experimental AFM graphics
The similarity between a simulated and an experimental AFM image can be quantified by analyzing pixel intensities of both images and computing the correlation (1) Here, the summation is performed over all image pixels. I sim i j (I exp i j ) is the intensity value of the pixel at position (i, j) in the simulated (experimental) image, andĪ sim (Ī exp ) denote average pixel intensities.

Software availability
The BioAFMviewer software is currently available for the Windows operation system. A compilation for Linux and the Mac OS system is under preparation. The package is available for download at the www.bioafmviewer.com website. A manual with detailed step-by-step instructions on how to efficiently use the BioAFMviewer is available. It also explains how the obtained results can be conveniently exported as image files and movies.
A) The cone-shaped tip with its geometric parameters and the tip-structure hard collision method to generate simulated AFM images are illustrated. The molecular structure is shown in the VdW representation and the virtual sample surface determined for the given scanning orientation is indicated by the dark gray bar. B) The size of the scanning area for a given scanning orientation is shown. The step size along the scanning grid is denoted by a.

Shape of the tip
The tip is composed of a cone characterized by a cone half-angle α and a sphere of radius r. The sphere is placed into the cone in such a way that the centre S of the sphere is aligned to the vertex V of the cone and that the sphere intersects with the cone along a circle (see Figure 1). The cone region below the sphere (see shaded area in Figure 1) does not contribute to the tip shape. To calculate the collision between the tip and a spherical atom, we calculate both the collision between the spherical part of the tip and the sphere of the atom, and the collision between the conic part of the tip and the spherical atom. In the latter case, however, we discard collisions with the shaded region and the atom sphere. To determine the height of the atomic structure needed to generate simulated AFM images, we have to compute the hard collision of the tip shape with the atom spheres.

Collision between a cone and a sphere
We consider a cone with a vertex V = (x V , y V , z V ) and a sphere of centre S = (x S , y S , z S ) and radius r (see Figure 2). A point (x, y, z) on the surface of the cone is separated by a distance a from the central axis. The projection of this point to this axis is separated by a distance c from the vertex. We have c = z V − z and a = (z V − z) tan (α). A point (x, y, z) on the surface of the sphere is separated by a distance b from the central axis and the projection of this point to this axis is separated by a distance d from the centre. We have d = (z S − z) and b = r 2 − (z S − z) 2 . We also consider the two dimensional distance f between the vertex V and the centre S, f = (x V − x S ) 2 + (y V − y S ) 2 . For the collision point I = (x, y, z), the collision condition is fulfilled (see Figure   1 Mathematical aspects of tip-sample collision We which leads to a second-order polynomial equation in z: (1 + tan 2 (α))z 2 + (−2z V tan 2 (α) + 2f tan (α) − 2z S )z   This corresponds to the vanishing discriminant ∆ of the polynomial in equation (2), which will determine z V . This gives a second order polynomial equation in z V (− tan 2 (α))z 2 V + (2z S tan 2 (α) + 2f tan (α))z V + (−2f z S tan (α) − f 2 + r 2 + r 2 tan 2 (α) − z 2 S tan 2 (α)) = 0. (3) The discriminant of the corresponding polynomial is ∆ 2 = 4r 2 tan 2 (α)(tan 2 (α)+ 1) > 0.
Then, equation (3) has always two solutions. It means there are two positions of the vertex for which the equation (2) has a unique solution. They are shown in Figure 3 and Figure 5. The smaller solution z V is taken.

Collision between two spheres
A sphere S = (x S , y S , z S ) of radius r collides with a sphere P = (x P , y P , z) of radius r P (the probe sphere) if the sum of their radii is equal to the distance between their centres.
The collision condition is This given a second-order polynomial equation in z, z 2 − 2z s z + (f 2 − (r + r P ) 2 + z 2 S ) = 0.
The solutions are z = z S ± (r + r P ) 2 − f 2 . The smaller solution is taken.