Advertisement
Original software publication| Volume 12, 100301, May 2022

Counting molecules: Python based scheme for automated enumeration and categorization of molecules in scanning tunneling microscopy images

  • Jack Hellerstedt
    Correspondence
    Corresponding author at: Institute of Physics of the Czech Academy of Sciences, v.v.i., Cukrovarnická 10, 162 00 Praha 6, Czech Republic.
    Affiliations
    Institute of Physics of the Czech Academy of Sciences, v.v.i., Cukrovarnická 10, 162 00 Praha 6, Czech Republic

    Regional Centre of Advanced Technologies and Materials, Palacký University, Šlechtitelů 27, 78371 Olomouc, Czech Republic
    Search for articles by this author
  • Aleš Cahlík
    Affiliations
    Institute of Physics of the Czech Academy of Sciences, v.v.i., Cukrovarnická 10, 162 00 Praha 6, Czech Republic

    Regional Centre of Advanced Technologies and Materials, Palacký University, Šlechtitelů 27, 78371 Olomouc, Czech Republic
    Search for articles by this author
  • Martin Švec
    Affiliations
    Institute of Physics of the Czech Academy of Sciences, v.v.i., Cukrovarnická 10, 162 00 Praha 6, Czech Republic

    Regional Centre of Advanced Technologies and Materials, Palacký University, Šlechtitelů 27, 78371 Olomouc, Czech Republic
    Search for articles by this author
  • Oleksandr Stetsovych
    Affiliations
    Institute of Physics of the Czech Academy of Sciences, v.v.i., Cukrovarnická 10, 162 00 Praha 6, Czech Republic
    Search for articles by this author
  • Tyler Hennen
    Affiliations
    Institut für Werkstoffe der Elektrotechnik II, RWTH Aachen University, Sommerfeldstraße 24, 52056 Aachen, Germany
    Search for articles by this author
Open AccessPublished:April 30, 2022DOI:https://doi.org/10.1016/j.simpa.2022.100301

      Highlights

      • Feature extraction and sorting specifically tailored to scanning tunneling microscopy images.
      • Modular construction includes single function call defaults and examples for tailoring to image data.
      • Discussion of computer vision approach in manuscript to inform further development.

      Abstract

      Scanning tunneling and atomic force microscopies (STM/nc-AFM) are rapidly progressing to offer unprecedented spatial resolution of a diverse array of chemical species. In particular, they are employed to characterize on-surface chemical reactions by directly examining precursors and products. Chiral effects and self-assembled structures can also be investigated. This open source, modular, python based scheme automates the categorization of a variety of molecules present in medium sized (10 × 10 to 100 × 100 nm) scanned probe images.

      Keywords

      Code metadata
      Tabled 1
      Current code versionv0.1.0
      Permanent link to code/repository used for this code versionhttps://github.com/SoftwareImpacts/SIMPAC-2022-53
      Permanent link to reproducible capsulehttps://codeocean.com/capsule/4233471/tree/v1
      Legal Code LicenseMIT License.
      Code versioning system usedgit
      Software code languages, tools, and services usedpython 3+
      Compilation requirements, operating environments & dependencies
      If available Link to developer documentation/manualhttps://github.com/thennen/counting-molecules/wiki
      Support email for questions[email protected]

      1. Motivation and significance

      Scanned probe techniques such as scanning tunneling microscopy (STM) and non-contact atomic force microscopy (nc-AFM) have now made direct investigation of on-surface reactions a routine experimental technique [
      • Barth J.V.
      Molecular architectonic on metal surfaces.
      ,
      • Jelínek P.
      High resolution SPM imaging of organic molecules with functionalized tips.
      ]. As the diverse ecosystem of organic molecules accessible by these techniques continues to grow so does the need for more sophisticated tools to extract quantitative information from larger and more complicated datasets of molecule imaging.
      Extracting statistics from STM images is often done by hand [
      • Capsoni M.C.
      On-surface self-assembly and characterization of a macromolecular charge transfer complex by scanning tunneling microscopy and spectroscopy.
      ,
      • Prinz J.
      • Gröning O.
      • Brune H.
      • Widmer R.
      Highly enantioselective adsorption of small prochiral molecules on a chiral intermetallic compound.
      ,
      • Stetsovych O.
      • Švec M.
      • Vacek J.
      • Chocholoušová J.V.
      • Jančařík A.
      • Rybáček J.
      • Kosmider K.
      • Stará I.G.
      • Jelínek P.
      • Starý I.
      From helical to planar chirality by on-surface chemistry.
      ,
      • Goll F.D.
      • Taubmann G.
      • Ziener U.
      Static scanning tunneling microscopy images reveal the mechanism of supramolecular polymerization of an Oligopyridine on graphite.
      ]. This necessarily limits the size and complexity of statistical problems that can be tackled using these datasets. To address this limitation in extracting and categorizing molecules in STM images, we developed an automated scheme utilizing existing image processing libraries written using the Python programming language.
      The existing widely used programs for the analysis of scanned probe data (WSxM [
      • Horcas I.
      • Fernandez R.
      • Gomez-Rodriguez J.M.
      • Colchero J.
      • Gomez-Herrero J.
      • Baro A.M.
      WSXM: A Software for scanning probe microscopy and a tool for nanotechnology.
      ] and Gwyddion [
      • Nečas D.
      • Klapetek P.
      Gwyddion: An open-source software for SPM data analysis.
      ]) do not presently incorporate tools for automated image processing and feature extraction. ImageJ [
      • Rueden C.T.
      • Schindelin J.
      • Hiner M.C.
      • DeZonia B.E.
      • Walter A.E.
      • Arena E.T.
      • Eliceiri K.W.
      ImageJ2: ImageJ for the next generation of scientific image data.
      ] is a powerful and widely used piece of software in the biology community, but lacks compatibility and relevance for the datasets this package is designed to address. Another hindrance is that these image processing tools for biology applications are often written using commercial, closed source MATLAB code. Digital Surf has feature categorization tools but is also commercial and closed source [
      • Cognard M.
      Digital surf.
      ].
      There has been recent progress in developing machine-learning based tools for the automated assignment of atomic structure and defect information from scanned probe datasets, [
      • Scherbela M.
      • Hörmann L.
      • Jeindl A.
      • Obersteiner V.
      • Hofmann O.T.
      Charting the energy landscape of metal/organic interfaces via machine learning.
      ,
      • Ziatdinov M.
      • Dyck O.
      • Maksov A.
      • Li X.
      • Sang X.
      • Xiao K.
      • Unocic R.R.
      • Vasudevan R.
      • Jesse S.
      • Kalinin S.V.
      Deep learning of atomically resolved scanning transmission electron microscopy images: Chemical identification and tracking local transformations.
      ,
      • Li J.
      • Telychko M.
      • Yin J.
      • Zhu Y.
      • Li G.
      • Song S.
      • Yang H.
      • Li J.
      • Wu J.
      • Lu J.
      • Wang X.
      Machine vision automated Chiral molecule detection and classification in molecular imaging.
      ] as well as automated routines for improving the probe condition in STM [
      • Rashidi M.
      • Wolkow R.A.
      Autonomous scanning probe microscopy in Situ tip conditioning through machine learning.
      ,
      • Krull A.
      • Hirsch P.
      • Rother C.
      • Schiffrin A.
      • Krull C.
      Artificial-intelligence-driven scanning probe microscopy.
      ]. However these solutions address comparatively homogeneous datasets of more simple structures compared the present case, or require the computational resources and data (real or artificial) to train a convolutional neural network [
      • Li J.
      • Telychko M.
      • Yin J.
      • Zhu Y.
      • Li G.
      • Song S.
      • Yang H.
      • Li J.
      • Wu J.
      • Lu J.
      • Wang X.
      Machine vision automated Chiral molecule detection and classification in molecular imaging.
      ,
      • Krull A.
      • Hirsch P.
      • Rother C.
      • Schiffrin A.
      • Krull C.
      Artificial-intelligence-driven scanning probe microscopy.
      ]. We wanted to avoid this approach and instead develop a lightweight tool to quickly identify statistical trends in a large number of STM images with a diverse manifold of initially unknown molecular species; the functions offered in this package were used to prepare Fig. 3 in Hellerstedt et al. [
      • Hellerstedt J.
      • Cahlík A.
      • Stetsovych O.
      • Švec M.
      • Shimizu T.K.
      • Mutombo P.
      • Klívar J.
      • Stará I.G.
      • Jelínek P.
      • Starý I.
      Aromatic Azide transformation on the Ag(111) surface studied by scanning probe microscopy.
      ].
      Figure thumbnail gr1
      Fig. 1Architecture and usage of main functions. Yellow boxes indicate optional user input parameters, blue boxes are visual outputs of the program. (For interpretation of the references to color in this figure legend, the reader is referred to the web version of this article.)
      Our approach addresses some specific obstacles. There are practical limitations to the data resolution versus the number of species sampled. The sorting method needs to account for different adsorption configurations of the same species (e.g., rotations and chirality). While explicit pairwise template matching has advantages in robustness, it suffers from the computational demands scaling in quadrature with the number of molecules to be sorted.
      Our solution to these problems relies on the Zernike polynomial basis set to provide a “fingerprint” of coefficients representing every molecule [
      • Khotanzad A.
      • Hong Y.H.
      Invariant image recognition by Zernike moments.
      ,
      • Coelho L.P.
      Mahotas: Open source software for scriptable computer vision.
      ]. These coefficients are robust in response to rotations and noise in the data. In conjunction with other physically motivated coefficients, they provide the input to clustering algorithms for sorting the molecules. There are many different algorithms that can be applied to this type of data for the purposes of grouping like kinds of molecules together. We discuss some of the approaches we applied and their relative efficacy.

      2. Software description

      This package consists of a set of functions written using the Python libraries Numpy [
      • Oliphant T.E.
      Python for scientific computing.
      ], scikit-image [
      • van der Walt S.
      • Schönberger J.L.
      • Nunez-Iglesias J.
      • Boulogne F.
      • Warner J.D.
      • Yager N.
      • Gouillart E.
      • Yu T.
      Scikit-image: image processing in Python.
      ], scikit-learn [
      • Pedregosa F.
      • Varoquaux G.
      • Gramfort A.
      • Michel V.
      • Thirion B.
      • Grisel O.
      • Blondel M.
      • Prettenhofer P.
      • Weiss R.
      • Dubourg V.
      • Vanderplas J.
      • Passos A.
      • Cournapeau D.
      • Brucher M.
      • Perrot M.
      • Duchesnay E.
      Scikit-learn: Machine learning in Python.
      ], Mahotas [
      • Coelho L.P.
      Mahotas: Open source software for scriptable computer vision.
      ] and Matplotlib [
      • Hunter J.D.
      Matplotlib: A 2D graphics environment.
      ]. In practice, it is a series of functions called sequentially as shown in Fig. 1. We developed the current implementation to be useful ‘out-of-the-box’ with only minimum skill prerequisites required (e.g., installing a python distribution and necessary packages). The modular nature of the data processing flow allows for a great deal of flexibility to address different datasets. The open source, repository based distribution of this package allows for further customization, and the possibility for community based development and improvement on these core functionalities.

      2.1 Software architecture

      We first read in the image data and apply filters to make the image suitable for molecule template extraction using an adaptive threshold. After identifying closed contours corresponding to the perimeters of each molecule, we use the interior data of each contour as a representative template image. We then extract numerical features from each molecule, consisting of the calculated Zernike moments [
      • Khotanzad A.
      • Hong Y.H.
      Invariant image recognition by Zernike moments.
      ,
      • Coelho L.P.
      Mahotas: Open source software for scriptable computer vision.
      ] of the template images as well as the maximum topographic heights and the contour perimeter lengths. Finally, we use clustering algorithms [
      • Pedregosa F.
      • Varoquaux G.
      • Gramfort A.
      • Michel V.
      • Thirion B.
      • Grisel O.
      • Blondel M.
      • Prettenhofer P.
      • Weiss R.
      • Dubourg V.
      • Vanderplas J.
      • Passos A.
      • Cournapeau D.
      • Brucher M.
      • Perrot M.
      • Duchesnay E.
      Scikit-learn: Machine learning in Python.
      ] to categorize these features. Further functionality is provided to visualize the sorted categories, and make manual corrections.
      Fig. 1 shows the typical use of the provided functions. We rely on the Nanonispy library to read in data from one of the prevalent formats (Nanonis SXM files). This generates an array of pixel data and the rescaling factors to convert to real-space distances.

      2.2 Software functionalities

      The default filtering function provided performs a Gaussian filter and plane fit subtraction of the image data. We calculate the global Otsu threshold [
      • Otsu N.
      A threshold selection method from gray-level histograms.
      ] and use that to scale the offset value for feature extraction using a local thresholding method. We include diagnostic functions that can plot the filtered image data with the extracted contours, labeled by number, as well as a grid view of all the extracted molecule templates.
      Zernike moments are the coefficients for representing an image decomposed into the orthogonal Zernike polynomial basis set [
      • Khotanzad A.
      • Hong Y.H.
      Invariant image recognition by Zernike moments.
      ]. This method has attracted attention and effort in the computer vision community for being rotationally invariant. This property is particularly useful in the context of our application because we wish to match molecules regardless of how they are absorbed on the sample surface. We utilize the Mahotas library for calculating the Zernike moments for each molecule template [
      • Coelho L.P.
      Mahotas: Open source software for scriptable computer vision.
      ]. We set the median template diagonal length as the default value of the Zernike radius input, an assumption that could fail depending on the homogeneity of the templates.
      In addition to rotational invariance, these moments are insensitive to translation, mirroring, and rescaling. To account for differences in the real space footprint of each molecule, we additionally calculate the length, as well as the maximum pixel value within each contour.
      With these characteristic moments and physical length scales, we perform a clustering analysis using the algorithms available in the Scikit-learn library [
      • Pedregosa F.
      • Varoquaux G.
      • Gramfort A.
      • Michel V.
      • Thirion B.
      • Grisel O.
      • Blondel M.
      • Prettenhofer P.
      • Weiss R.
      • Dubourg V.
      • Vanderplas J.
      • Passos A.
      • Cournapeau D.
      • Brucher M.
      • Perrot M.
      • Duchesnay E.
      Scikit-learn: Machine learning in Python.
      ]. For the datasets studied in this work, we found the Birch algorithm [
      • Zhang T.
      • Ramakrishnan R.
      • Livny M.
      BIRCH: An efficient data clustering method for very large databases.
      ] with a threshold factor between 0.1 to 0.4 to be most effective at sorting images with no a priori knowledge of the number of categories. When the number of sorting categories is known, hierarchical clustering was found to be more accurate. The most effective sorting was accomplished using affinity propagation, where the cluster center preferences were defined using a hand-selected set of exemplar molecules.
      The invariance of the Zernike moments to mirror symmetry in particular, makes them insensitive to differentiating between chiral molecules. Absolute quantifications of chirality are surprisingly difficult to define [
      • Buda A.B.
      • der Heyde T.A.
      • Mislow K.
      On quantifying chirality.
      ]. We developed a function to do a pairwise comparison of molecules within each sorted category. By comparing each molecule and its mirror image, they can be sorted into right- and left-handed categories.
      All these image, contour, correlations, and categorization data can be exported/ saved for later use. Also included is a function using the interactive features of Matplotlib to manually categorize all the molecules.

      3. Illustrative examples

      Representative outputs for the three example datasets from hand-selected exemplar molecules are shown in Fig. 2, Fig. 3, Fig. 4. The work on the 9-azidophenanthrene system which was the source of the data in Fig. 2, Fig. 3 provided the original impetus to develop this package [
      • Hellerstedt J.
      • Cahlík A.
      • Stetsovych O.
      • Švec M.
      • Shimizu T.K.
      • Mutombo P.
      • Klívar J.
      • Stará I.G.
      • Jelínek P.
      • Starý I.
      Aromatic Azide transformation on the Ag(111) surface studied by scanning probe microscopy.
      ]. The helicene data shown in Fig. 4 has been previously described in the literature [
      • Stetsovych O.
      • Švec M.
      • Vacek J.
      • Chocholoušová J.V.
      • Jančařík A.
      • Rybáček J.
      • Kosmider K.
      • Stará I.G.
      • Jelínek P.
      • Starý I.
      From helical to planar chirality by on-surface chemistry.
      ]. These data were acquired via scanning tunneling microscopy at low temperature (5 K), with a pixel density of 10 nm−1 to 13 nm−1.
      Figure thumbnail gr2
      Fig. 29-azidophenanthrene molecules on Ag(111) sorted into 6 groups using hand-selected exemplars. 80×80 nm, 1024×1024 pixels.
      Figure thumbnail gr3
      Fig. 39-azidophenanthrene molecules on Ag(111) sorted into 9 groups using hand-selected exemplars. 50×50 nm, 512×512 pixels.
      Figure thumbnail gr4
      Fig. 4Helicene data sorted using hand-selected exemplars. The dimers (categories 1 and 4) were subsequently sorted by chirality. 80×80 nm, 1024×1024 pixels. Compare to Fig. 4 of Stetsovych et al. .

      4. Expected impact

      This is the first effort to our knowledge to create an open source scheme to automate the task of counting and sorting hundreds of molecules, specifically tailored for scanning probe microscopy datasets. We expect this package (available on github [
      • Hellerstedt J.
      • Hennen T.
      ]; all Figure example data hosted on figshare [

      J. Hellerstedt, A. Cahlik, M. Svec, O. Stetsovych, T. Hennen, counting molecules examples dataset, Figshare, http://dx.doi.org/10.6084/m9.figshare.19217556.

      ]), to be immediately useful for anyone tasked with extracting population statistics from images comparable to those included as examples. This tool has already proven useful by making it easy to quickly extract and visualize population statistics in image datasets [
      • Hellerstedt J.
      • Cahlík A.
      • Stetsovych O.
      • Švec M.
      • Shimizu T.K.
      • Mutombo P.
      • Klívar J.
      • Stará I.G.
      • Jelínek P.
      • Starý I.
      Aromatic Azide transformation on the Ag(111) surface studied by scanning probe microscopy.
      ]. In principle this could be applied to video on a frame-by-frame basis but the intended use is for single, static images. By scaling the statistics and quantitative information that can be extracted from these types of datasets, we anticipate that this will facilitate the ability to answer novel and more nuanced questions about how chemical processes unfold on a surface. We hope to reveal and address limitations by having this set of functions applied to the increasingly diverse ecosystem of on-surface chemistry being explored by the greater scanning probe community.

      5. Conclusions

      Here we have presented our efforts to automate the counting and sorting of molecules in topographic images acquired with a scanning tunneling microscope. The example datasets, images with several hundred molecules, can be sorted on a personal computer in seconds. The python based, open source, modular design of the components strives to be immediately accessible to a non-expert user, and allow for significant modification/ customization to suit individual needs. We hope that use and feedback from the wider community will allow this tool to continue to be developed and provide utility for advancing the understanding of on-surface chemistry experiments.

      Declaration of Competing Interest

      The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.

      Acknowledgments

      S. Edalatmanesh and A. Caparrós provided useful discussion in developing the solution to the chirality sorting problem. We thank Dr. Karthäuser for critical reading of this manuscript. J.H. acknowledges the support of the CIES/ Czech Fulbright commission during the development of this package.

      References

        • Barth J.V.
        Molecular architectonic on metal surfaces.
        Ann. Rev. Phys. Chem. 2007; 58 (URL http://www.annualreviews.org/doi/abs/10.1146/annurev.physchem.56.092503.141259): 375-407https://doi.org/10.1146/annurev.physchem.56.092503.141259
        • Jelínek P.
        High resolution SPM imaging of organic molecules with functionalized tips.
        J. Phys.: Condens. Matter. 2017; 29 (URL http://stacks.iop.org/0953-8984/29/i=34/a=343002?key=crossref.eee0848de87e9b5c6b61380d39a7cee4)343002https://doi.org/10.1088/1361-648X/aa76c7
        • Capsoni M.C.
        On-surface self-assembly and characterization of a macromolecular charge transfer complex by scanning tunneling microscopy and spectroscopy.
        (Ph.D. thesis) University of British Columbia, 2016https://doi.org/10.14288/1.0305019 (URL https://open.library.ubc.ca/cIRcle/collections/ubctheses/24/items/1.0305019)
        • Prinz J.
        • Gröning O.
        • Brune H.
        • Widmer R.
        Highly enantioselective adsorption of small prochiral molecules on a chiral intermetallic compound.
        Angew. Chem. Int. Edn. 2015; 54: 3902-3906https://doi.org/10.1002/anie.201410107
        • Stetsovych O.
        • Švec M.
        • Vacek J.
        • Chocholoušová J.V.
        • Jančařík A.
        • Rybáček J.
        • Kosmider K.
        • Stará I.G.
        • Jelínek P.
        • Starý I.
        From helical to planar chirality by on-surface chemistry.
        Nature Chem. 2016; 9 (URL http://www.nature.com/doifinder/10.1038/nchem.2662): 213-218https://doi.org/10.1038/nchem.2662
        • Goll F.D.
        • Taubmann G.
        • Ziener U.
        Static scanning tunneling microscopy images reveal the mechanism of supramolecular polymerization of an Oligopyridine on graphite.
        Angew. Chem. Int. Ed. 2022; (URL https://onlinelibrary.wiley.com/doi/10.1002/anie.202117580)https://doi.org/10.1002/anie.202117580
        • Horcas I.
        • Fernandez R.
        • Gomez-Rodriguez J.M.
        • Colchero J.
        • Gomez-Herrero J.
        • Baro A.M.
        WSXM: A Software for scanning probe microscopy and a tool for nanotechnology.
        Rev. Sci. Instrum. 2007; 78 (URL http://scitation.aip.org/content/aip/journal/rsi/78/1/10.1063/1.2432410)013705https://doi.org/10.1063/1.2432410
        • Nečas D.
        • Klapetek P.
        Gwyddion: An open-source software for SPM data analysis.
        Cent. Eur. J. Phys. 2012; 10: 181-188https://doi.org/10.2478/s11534-011-0096-2
        • Rueden C.T.
        • Schindelin J.
        • Hiner M.C.
        • DeZonia B.E.
        • Walter A.E.
        • Arena E.T.
        • Eliceiri K.W.
        ImageJ2: ImageJ for the next generation of scientific image data.
        BMC Bioinformatics. 2017; 18: 1-26https://doi.org/10.1186/s12859-017-1934-z
        • Cognard M.
        Digital surf.
        2020 (https://perma.cc/4K5V-JQRE,https://www.digitalsurf.com/news/perform-a-particle-analysis-on-microscopy-images/)
        • Scherbela M.
        • Hörmann L.
        • Jeindl A.
        • Obersteiner V.
        • Hofmann O.T.
        Charting the energy landscape of metal/organic interfaces via machine learning.
        Phys. Rev. Mater. 2018; 2 (http://arxiv.org/abs/1709.05417, https://link.aps.org/doi/10.1103/PhysRevMaterials.2.043803)043803https://doi.org/10.1103/PhysRevMaterials.2.043803
        • Ziatdinov M.
        • Dyck O.
        • Maksov A.
        • Li X.
        • Sang X.
        • Xiao K.
        • Unocic R.R.
        • Vasudevan R.
        • Jesse S.
        • Kalinin S.V.
        Deep learning of atomically resolved scanning transmission electron microscopy images: Chemical identification and tracking local transformations.
        ACS Nano. 2017; 11 (URL http://pubs.acs.org/doi/10.1021/acsnano.7b07504): 12742-12752https://doi.org/10.1021/acsnano.7b07504
        • Li J.
        • Telychko M.
        • Yin J.
        • Zhu Y.
        • Li G.
        • Song S.
        • Yang H.
        • Li J.
        • Wu J.
        • Lu J.
        • Wang X.
        Machine vision automated Chiral molecule detection and classification in molecular imaging.
        J. Am. Chem. Soc. 2021; 143 (URL https://pubs.acs.org/doi/10.1021/jacs.1c03091): 10177-10188https://doi.org/10.1021/jacs.1c03091
        • Rashidi M.
        • Wolkow R.A.
        Autonomous scanning probe microscopy in Situ tip conditioning through machine learning.
        ACS Nano. 2018; (acsnano.8b02208)https://doi.org/10.1021/acsnano.8b02208
        • Krull A.
        • Hirsch P.
        • Rother C.
        • Schiffrin A.
        • Krull C.
        Artificial-intelligence-driven scanning probe microscopy.
        Commun. Phys. 2020; 3 (http://www.nature.com/articles/s42005-020-0317-3): 54https://doi.org/10.1038/s42005-020-0317-3
        • Hellerstedt J.
        • Cahlík A.
        • Stetsovych O.
        • Švec M.
        • Shimizu T.K.
        • Mutombo P.
        • Klívar J.
        • Stará I.G.
        • Jelínek P.
        • Starý I.
        Aromatic Azide transformation on the Ag(111) surface studied by scanning probe microscopy.
        Angew. Chem. Int. Ed. 2019; 58 (URL http://doi.wiley.com/10.1002/anie.201812334): 2266-2271https://doi.org/10.1002/anie.201812334
        • Khotanzad A.
        • Hong Y.H.
        Invariant image recognition by Zernike moments.
        Ann. Oper. Res. Pattern Anal. Machine Intell. IEEE Trans. Pattern Anal. Machine Intell. J . Robot. Res. J . Robot. Res. J . ACM Netw. I . J . Stoker. 1990; 12: 13-118https://doi.org/10.1109/34.55109
        • Coelho L.P.
        Mahotas: Open source software for scriptable computer vision.
        J. Open Res. Softw. 2013; 1 (URL http://openresearchsoftware.metajnl.com/articles/10.5334/jors.ac/)e3https://doi.org/10.5334/jors.ac
        • Oliphant T.E.
        Python for scientific computing.
        Comput. Sci. Eng. 2007; 9 (URL http://ieeexplore.ieee.org/document/4160250/): 10-20https://doi.org/10.1109/MCSE.2007.58
        • van der Walt S.
        • Schönberger J.L.
        • Nunez-Iglesias J.
        • Boulogne F.
        • Warner J.D.
        • Yager N.
        • Gouillart E.
        • Yu T.
        Scikit-image: image processing in Python.
        PeerJ. 2014; 2 (URL https://peerj.com/articles/453)e453https://doi.org/10.7717/peerj.453
        • Pedregosa F.
        • Varoquaux G.
        • Gramfort A.
        • Michel V.
        • Thirion B.
        • Grisel O.
        • Blondel M.
        • Prettenhofer P.
        • Weiss R.
        • Dubourg V.
        • Vanderplas J.
        • Passos A.
        • Cournapeau D.
        • Brucher M.
        • Perrot M.
        • Duchesnay E.
        Scikit-learn: Machine learning in Python.
        J. Mach. Learn. Res. 2011; 12: 2825-2830
        • Hunter J.D.
        Matplotlib: A 2D graphics environment.
        Comput. Sci. Eng. 2007; 9 (URL http://ieeexplore.ieee.org/document/4160265/): 90-95https://doi.org/10.1109/MCSE.2007.55
        • Otsu N.
        A threshold selection method from gray-level histograms.
        IEEE Trans. Syst. Man Cybern. 1979; 9 (URL http://ieeexplore.ieee.org/document/4310076/): 62-66https://doi.org/10.1109/TSMC.1979.4310076
        • Zhang T.
        • Ramakrishnan R.
        • Livny M.
        BIRCH: An efficient data clustering method for very large databases.
        ACM SIGMOD Rec. 1996; 25 (URL http://portal.acm.org/citation.cfm?doid=235968.233324): 103-114https://doi.org/10.1145/235968.233324
        • Buda A.B.
        • der Heyde T.A.
        • Mislow K.
        On quantifying chirality.
        Angew. Chem. Int. Ed. English. 1992; 31 (URL http://doi.wiley.com/10.1002/anie.199209891): 989-1007https://doi.org/10.1002/anie.199209891
        • Hellerstedt J.
        • Hennen T.
        Counting-molecules.
        2022https://doi.org/10.5281/zenodo.6324850
      1. J. Hellerstedt, A. Cahlik, M. Svec, O. Stetsovych, T. Hennen, counting molecules examples dataset, Figshare, http://dx.doi.org/10.6084/m9.figshare.19217556.