In situ electron microscopy study of structural transformations in 2D CoSe2

Thermally induced structural transformation of 2D materials opens unique avenues for generating other 2D materials by physical methods. Imaging these transitions in real time provides insight into synthesis routes and property tuning. We have used in situ transmission electron microscopy (TEM) to follow thermally induced structural transformations in layered CoSe2. Three transformation processes are observed: orthorhombic to cubic-CoSe2, cubic-CoSe2 to hexagonal-CoSe, and hexagonal to tetragonal-CoSe. In particular, the unit-cell-thick orthorhombic structure of CoSe2 transforms into cubic-CoSe2 via rearrangement of lattice atoms. Cubic-CoSe2 transforms to hexagonal-CoSe at elevated temperatures through the removal of chalcogen atoms. All nanosheets transform to basal-plane-oriented hexagonal 2D CoSe. Finally, the hexagonal to tetragonal transformation in CoSe is a rapid process wherein the layered morphology of hexagonal-CoSe is broken and islands of tetragonal-CoSe are formed. Our results provide nanoscopic insights into the transformation processes of 2D CoSe2 which can be used to generate these intriguing 2D materials and to tune their properties by modifying their structures for electro-catalytic and electronic applications.


INTRODUCTION
Two-dimensional transition metal dichalcogenides (2D TMDs) have attracted intense interest recently due to their layer dependent physical and chemical properties and their potential applications in various fields [1][2][3][4] . Many TMDs can adopt different crystal structures exhibiting diverse electronic and magnetic properties. Tuning the structures of these TMDs through various modes is an interesting topic in 2D materials [5][6][7] . As an example, single-layered MoS 2 has two different symmetries depending on the position of sulfur atoms, semiconducting trigonal prismatic (2H) and metallic octahedral (1T). The structural transition between these two phases has been observed through in situ microscopy 8 . Various other materials can be interconverted by numerous stimuli, such as substitutional doping 9,10 , applying pressure 11 , electron irradiation 8,12 , etc. Layered metal chalcogenides show several stable phases with different stoichiometry. Layered CoSe 2 also possesses multiple stable phases with distinct properties and stoichiometries. Orthorhombic marcasite (o-CoSe 2 ) is one of these structures, and is catalytically active for the hydrogen evolution reaction (HER) in the context of water splitting 13,14 . CoSe 2 can also be found in the cubic phase (c-CoSe 2 ) which belongs to the pyritetype structures with Se 2 2− dumbbells and with Co 2+ in an octahedral coordination 15 . Recently, c-CoSe 2 has been investigated as a promising candidate for HER as well 14,[16][17][18] . The transformation from orthorhombic to cubic in CoSe 2 has been reported also by other studies 15,19,20 . Ex situ heating experiments confirmed the transformation of orthorhombic to the cubic structure of CoSe 2 21 . Cobalt selenide in the different stoichiometry of monochalcogenide CoSe also exhibits two different structures with distinct properties: the hexagonal phase and the tetragonal phase 22,23 . The hexagonal form exhibits a non-layered structure 23 while the tetragonal form exhibits a layered structure 24,25 . Hexagonal-CoSe nanoparticles are explored as promising catalysts in various fields 26,27 .
In this work, we studied the thermal evolution by in situ heating in a transmission electron microscope (TEM), which permits realtime imaging of transforming nanostructures at atomic resolution 28 . Our findings provide understanding of the structural transformation mechanisms in 2D CoSe 2 and 2D CoSe. This is useful for tuning the structure-property relationships of the material by controlling process conditions, in the present case, by means of heating. Figure 1 shows plan-view TEM and high-resolution TEM (HR-TEM) images of few-layers-thick o-CoSe 2 nanoflakes (Fig. 1a, b), exfoliated, and deposited onto a SiN support membrane. The HR-TEM image in Fig. 1b (Fig. 1c, d) confirm the orthorhombic configuration. Energy-dispersive X-ray spectrometry (EDS) elemental mapping images (Fig. 1g, h) confirm the homogeneous distribution of Co (indicated by red) and Se (indicated by green) in the flakes. The EDS spectrum (Supplementary Fig. 2) reveals that Co and Se are the only the elements in the prepared sample with a 1:2 ratio for Co/Se. Atomic force microscopy (AFM) imaging of a monolayer of o-CoSe 2 (Fig. 1j) confirms the single unit cell thickness of~0.6 nm. Vertically oriented o-CoSe 2 nanoflakes on carbon fiber were used to exfoliate ultrathin nanosheets as shown in the scanning electron microscopy image in Fig. 1k. Few-layered (4-5 layers) thick o-CoSe 2 nanosheets were used as starting materials to investigate thermally induced structural transformations. Experimental details are provided in the "Methods" section.

Heating-induced transformations monitored by in situ TEM
We performed many in situ experiments, which all showed a similar sequence of structural transformations. Here we provide a detailed overview of the successive transformations and show several highlights of transformation events, while a selection of additional in situ observations and corresponding analysis are shown in Supplementary Figs. 3-19 of the Supplementary Information (SI). The transformations took place everywhere, also in areas not previously exposed to the electron beam, as discussed also in the Supplementary Text in the SI.
The first transformation is the orthorhombic to cubic transformation of CoSe 2 . Figure 2 shows a single area where the thermal evolution could be monitored over multiple transformations. Crystallographic details and lattice parameters of the CoSe 2 and CoSe phases can be found in Supplementary Tables 2 and 3 of the SI. The TEM image of Fig. 2a shows the starting point of o-CoSe 2 , in a [100] zone axis (ZA) projection. As is also clear from the FFT (Fig. 2a′), the structure is orthorhombic and this was the best orientation to investigate any heating-induced structural changes. The o-CoSe 2 nanosheets were heated in the TEM from room temperature to 1100°C in steps of 20°C. The orthorhombic structure of CoSe 2 remains stable during the increase in temperature up to 580°C without showing any significant structural changes. This can be observed from the HR-TEM image in Fig. 2a which was recorded at 580°C. The corresponding FFT pattern is shown in Fig. 2a′ and the spots indicate the crystal structure of the orthorhombic phase projected along the [100] axis. Monitoring the change to the cubic phase is not trivial as during this change the stoichiometry and approximate mass density of the material is retained, so that the phases can only be distinguished by inspection of atomic lattice fringes. Movies capturing various stages of the evolution were recorded while increasing the temperature. The transition from the orthorhombic to cubic phase goes through one intermediate stage where both phases can be distinguished in Fig. 2b and in the FFT pattern shown in Fig. 2b′. This transition stage suggests a rearrangement of Co and Se lattice atoms while retaining the CoSe 2 stoichiometry. The metal dichalcogenides exist in orthorhombic marcasite-type or cubic pyrite-type structures in which the metal atoms are octahedrally bonded to adjacent chalcogen atoms. The structural difference is mainly related to the octahedral linkage as the octahedra are edge-shared in marcasite and corner-shared in pyrite 20,29,30 . The transformations from marcasite to pyrite structures involve rotation of metal-chalcogen chains in marcasite that produces disordered pyrite structures 20 . This explains how the orthorhombic (marcasite type) structure converts to cubic (pyrite type) while retaining the same stoichiometry. The o-CoSe 2 and c-CoSe 2 phases have a similarity in structure with a small lattice mismatch, and there are reports of easy epitaxial growth between them 30,31 .
The full conversion of the orthorhombic phase to the cubic structure was observed after increasing the temperature to 740°C. At this temperature the entire nanocrystal of o-CoSe 2 had completely converted into cubic-CoSe 2 , as can be seen from the TEM image in Fig. 2c. The corresponding FFT pattern in Fig. 2c′ confirms the cubic structure where a few new spots can be seen that were absent for o-CoSe 2 . Increasing the temperature further makes c-CoSe 2 unstable and undergo a subsequent structural transition ending in the hexagonal-CoSe phase (h-CoSe) at 860°C. This second structural transformation took place via an intermediate transition phase where the presence of both cubic and hexagonal domains of CoSe 2 and CoSe were seen ( Fig. 2d-f). Details on both of these transition processes are discussed in the following sections.  Supplementary Fig.  3d′, where new spots in the FFT appeared and correspond to the cubic phase. The transitionary phase occured in the temperature window of 660-740°C, after which a pure cubic phase was observed at 740°C, as shown in Supplementary Fig. 3e, f. We inspected other areas on the heating chip to confirm this transition at 740°C and found that the transformation process is uniform over the entire region on the heating chip. This confirms a very low or negligible effect of the electron beam on the process at these high temperatures. To investigate the change in shape and size of the nanosheet under observation, we plotted timelabeled contours of the nanosheet area ( Supplementary Fig. 3g), which indicates a minor change in the shape and size of that area. The plot shows a change in area of~1 nm 2 , which is negligible and suggests no loss of either Co or Se atoms. To investigate the stoichiometry of the transformed cubic phase we employed EDS elemental mapping as shown in Supplementary Fig. 4 and found the results to be in agreement with a 1:2 ratio for Co/Se. As shown in Supplementary Video 1, we observed this structural transformation at identical temperature conditions (740°C) on another TEM microscope as well, where a lower acceleration voltage of 200 kV was used (see "Methods" for details). It shows a smooth transition from the orthorhombic to the cubic phase in a slightly thicker, lath-shaped nanosheet of CoSe 2 . Supplementary Figure 5 shows stills from the recorded movie (Supplementary Video 1) of the transformation with initial, midway, and final structures. The initial structure is orthorhombic oriented along the [010] ZA with (200) and (002) lattice fringes ( Supplementary  Fig. 6a′). The transformed cubic structure oriented along 111 Â Ã ZA is shown in Supplementary Fig. 6b with corresponding FFT pattern in Supplementary Fig. 6b′. According to mechanical alloying theory 32 , thermal displacement of Co and/or Se atoms to the nearest neighboring sites produces disorder and instability in the orthorhombic structure. This instability results in the partial conversion to a cubic structure and the appearance of coexistence of both structures, followed by a further diminishing of the orthorhombic structure and the transformation of all crystals to the cubic structure.
The second transition from c-CoSe 2 to h-CoSe also involves one intermediate phase that can be seen in Supplementary Fig. 7. This transition process was observed in the temperature range of 740-860°C, where the cubic structure continuously went through small changes. The transition process starts at 760°C at which the cubic structure starts to convert into an unknown intermediate phase. This pathway is likely initiated by the removal of Se atoms from the CoSe 2 lattice after increasing the temperature to 760°C. For other TMDs it was previously observed that chalcogen atoms can be removed due to thermal and electron irradiation effects 33 . This removal of Se atoms changes the c-CoSe 2 configuration with a Co:Se stoichiometry of 1:2, to CoSe with stoichiometry of 1:1. EDS elemental mapping of the transformed structure shown in Supplementary Fig. 8 shows a 1:1 ratio of Co and Se in the h-CoSe structure. Local thinning of the area during the transition process can be observed from the TEM images in Supplementary Fig. 7a-f, and could be the result of the removal of Se atoms.
Changes in shape and reduction in size is another noticeable modification during this transition. This can be seen from the TEM images in Supplementary Fig. 7a-f. Time-labeled contours of this area are shown in Supplementary Fig. 9g. The change during this transformation is much more pronounced as the decrease in area against time (Supplementary Fig. 9h) is nearly 10 times greater than in the case of the orthorhombic to cubic transition. This could be the result of thinning of the flakes and change of shape due to the removal of Se atoms along with the rearrangement of Co and Se atoms into a non-layered hexagonal-CoSe lattice structure. At 860°C, the h-CoSe phase has a small area compared to the initial area of the cubic phase of CoSe 2 at 740°C, and becomes thinner as well, as can be seen in Supplementary Fig. 7a, f. As shown in Supplementary Fig. 9a- Fig. 10) undergoes a relaxation process, which ends with the stable h-CoSe structure. We have observed movement and rearrangement of Co atomic columns during this transition process, as can also be seen from the movie recordings (Supplementary Video 2). According to mechanical alloying theory 32 , an increase in the concentration of defects in the cubic structure (in our case, removal of chalcogen atoms (Se atoms) from the unit cell thick nanosheets) increases the Gibbs free energy, which favors movement of Co and/ or Se atoms to the nearest neighboring sites and increases the instability. Further increase in the concentration of defects leads to a critical value of the Gibbs free energy, after which the cubic structure collapses and transforms to the stable hexagonal-CoSe structure 32 . Further increasing the temperature (above 900°C) results in another transition process in which the hexagonal structure of CoSe transforms into a tetragonal structure. The layers of hexagonal-CoSe break into islands of tetragonal-CoSe. During this transition, hexagonal layers were found to etch away slowly and form islands of tetragonal-CoSe; these islands were found to be stable at 900-1000°C.
The detailed analysis of the structures before and after transformation, from orthorhombic to cubic-CoSe 2 , to hexagonal-CoSe, and to tetragonal-CoSe, is shown in Fig. 3. We started with the orthorhombic structure of CoSe 2 , and the analysis of its structural details is described in Fig. 3a-d. A part of a nanoflake with an orthorhombic structure is shown in Fig. 3a. This nanocrystal undergoes a structural transformation upon heating and obtains a stable cubic structure at the respective temperature (740°C). Figure 3e shows the HR-TEM image of a transformed structure and agrees well with the cubic structure for CoSe 2 . The experimental image shows a square pattern as the contrast from the Co atoms (that are in a square pattern in this projection, see the atomic model shown in Fig. 3h) is much stronger than the contrast from the Se atoms, as was also confirmed by HR-TEM imaging simulations provided in Supplementary Fig. 19 of the SI. The FFT analysis in Fig. 3f shows (220), 220 À Á , and (400) atomic lattice fringes, corresponding to interplanar distances of 0.207 and 0.146 nm, respectively, and indexed along the [001] ZA. As the correct identification of the transformation from orthorhombic to cubic is critical, measurements of interplanar distances played an important role in distinguishing the structures. In the next transition process, cubic-CoSe 2 transforms into hexagonal-CoSe. As CoSe has two different structures, non-layered hexagonal and layered tetragonal, it is of importance to verify the structure of the transformation product. The features of the formed CoSe agree well with the hexagonal structure as shown in Fig. 3i, where the basal-plane oriented structure can be seen. The FFT analysis (Fig.  3j) of this structure clearly indicates that the cubic-CoSe 2 completely transformed into hexagonal-CoSe. The filtered image (Fig. 3k) shows the hexagonal nature of the flake which matches well with the schematic atomic model (Fig. 3l) for h-CoSe (CIF IDs for all the structures are given in Supplementary Table 3 in SI). The hexagonal-CoSe structure has a hexagonal unit cell with P6 3 /mmc space group where each Co atom is surrounded by six Se atoms (Fig. 3l). The unmasked FFTs for all the structures along with the HR-TEM images are shown in Supplementary Fig. 15.
After increasing the temperature above 900°C, yet another phase, tetragonal-CoSe, was formed. This transformation was observed to take place rapidly where the nanosheets of hexagonal-CoSe break up into islands of tetragonal-CoSe (Fig. 3m) no longer displaying a layered structure. Analyis of the FFT pattern (Fig. 3n) confirms the aforementioned observations with atomic lattice fringes (110), 110 À Á , and (020) with the crystal oriented along the [001] ZA. It can be seen from the Fourierfiltered image (Fig. 3o) and the schematic atomic model (Fig. 3p) that the observed structure is tetragonal-CoSe. Tetragonal-CoSe has a tetragonal unit cell in P 4 /nmm space group in which each Co atom is surrounded by four Se atoms (Fig. 3p). Structural details of the four phases can be found in Supplementary Tables 2 and 3.
Among the two different structures of CoSe, the hexagonal structure is of great scientific importance because of its applications in particular in catalysis 26,27 and it is of interest to investigate its observed structure through lattice resolved TEM images. Figure  4 shows a detailed description of hexagonal-CoSe with the help of HR-TEM images, interplanar distance measurements, and a schematic atomic model. Figure 4a shows a layered structure of the basal-plane-oriented hexagonal-CoSe. Though hexagonal-CoSe has a non-layered structure 23 , the transformation process results in a layered structure with a unit cell thickness of hexagonal-CoSe. The atomic model in Fig. 4c mimics the filtered image in Fig. 4b. It shows how the hexagonal structure of CoSe consists of Co and Se atoms forming a hexagon. The interplanar distances found in the HR-TEM image (Fig. 4a, b) of 0.35 and 0.18 nm agree very well with the interplanar distances of the (100) and (110) planes, respectively, of the hexagonal-CoSe structure. Vertically oriented layers of hexagonal-CoSe are shown and described in Supplementary Fig.  13 ( Supplementary Fig. 14 shows more details on t-CoSe). While mainly observing basal-plane-oriented layers of hexagonal-CoSe, some of the edges rolled up and can be seen as vertically oriented layers. This helped to perform interlayer measurements, where the layers were found to be separated by approximately 0.5 nm from each other ( Supplementary Fig. 13d, e). The ball and stick model used to mimick the HR-TEM image of edges through [010] ZA agrees with the observed results and confirms the layered structure of hexagonal-CoSe. Figure 5 shows yet another illustrative example of subsequent transformations that were monitored in situ in the same area of the same heating chip, confirming the generally observed transformation sequence. Furthermore, the structural transformations are observed at the different windows of the heating chip in a single experiment which suggests that these transitions occurred everywhere and not only at those areas previously illuminated by the electron beam (see Supplementary Figs. 16-18 for more details). TEM imaging simulations were carried out based on the structures refined by means of the density functional theory (DFT) calculations, and are shown in Supplementary Fig. 19, agreeing well with the experimental results.  38 . The structures were also evaluated using a van der Waals density functional (optB88-vdW) 39,40 . Computational details are provided in the "Methods" section. Figure 6a provides an overview of the crystal structures of all phases involved in the transformations. Transformation (1) where the orthorhombic-CoSe 2 phase transforms into the cubic-CoSe 2 phase was already described above, and can be explained from rotations of metal-chalcogen chains 20 . The subsequent transformation (2), from c-CoSe 2 to h-CoSe, and transformation (3), from h-CoSe to t-CoSe, are experimentally observed in the present work. The intermediate phase that was observed during transformation (2) may correspond to the Co 3 Se 4 structure 41 and we have included this phase in the computations. The sequence ends with the tetragonal t-CoSe phase which clearly consists of 2D atomic planes that are stacked along the c-axis. The experimental value of its c lattice parameter is 5.25 Å (Supplementary Table 2). This value was strongly overestimated when using the standard GGA-PBE functional because of the neglect of van der Waals interactions, while better agreement was found when using the optB88-vdW functional (Supplementary Table 4). For this reason, we show in Fig. 6b the relative stability of all phases calculated using opB88-vdW. The formation energies of all phases are listed in Supplementary Table 4 and the DFT-optimized crystal structures are provided as Supplementary Data as well.
The formation energies displayed in Fig. 6b were calculated as where all energies are expressed in eV/atom; E(Co x Se y ) is the energy of the particular compound, and E(Co) and E(Se) are the energies of the elemental phases of Co and Se, respectively. All formation energies displayed in Fig. 6b are thus defined with respect to the elemental phases, and are plotted as a function of their composition. The black line is the common tangent line connecting the most favorable phases. It is clear that the transformation sequence displayed in Fig. 6a is feasible from the point of view of the total energies: The o-CoSe 2 and c-CoSe 2 formation energies are on or close to the tangent line and differ only slightly in magnitude, implying that they are of similar thermodynamic stability. Both c-CoSe 2 and hexagonal-CoSe are quite close to the tangent line, rendering them both relatively stable at their respective compositions. The monoclinic Co 3 Se 4 phase is compositionally and energetically positioned in between c-CoSe 2 and h-CoSe, and is also close to the tangent line. The Co 3 Se 4 phase exhibits both cubic and hexagonal structural features as visualized in Supplementary Fig. 20. Finally, the last transformation from h-CoSe to tetragonal t-CoSe is clearly energetically unfavorable according to the phase stability diagram of Fig. 6b. It is very likely, however, that the planar-like structure of t-CoSe can well accommodate phonons, rendering it a more stable phase at elevated temperatures (the DFT calculations are valid only for a temperature of 0 K and phonon energies are not included). Figure 6c shows the strong similarly between the 1100 À Á atomic planes of the h-CoSe phase and the (001) atomic planes of the t-CoSe phase. Exactly these planes are experimentally observed on-edge at the left-hand side of Fig. 4a, where 1100 À Á layers are peeling off from the hexagonal-CoSe to form the (001) layers of tetragonal-CoSe. As is clear from the perspective views of these {CoSe} layers at the bottom of panel c in Figure 6, the Co sublattice in both layers is simple square (exactly square in the c-plane of t-CoSe, and approximately square in the 1100 À Á plane of h-CoSe). The main difference is that in the h-CoSe structure, the up/down alternation of the Se atoms is only in one direction (along the c-axis), while the up/down alternation of the Se atoms in the t-CoSe structure is in both directions. However, a change in buckling of the Se atoms around the Co plane can very likely be induced by thermal excitations, resulting in these layers to be peeled off from the h-CoSe phase as observed in Fig. 4a, and leading to the formation of the t-CoSe phase.
In conclusion, we used in situ electron microscopy to investigate the heat-induced structural transformation in 2D CoSe 2 nanosheets. Transformations from the orthorhombic to the cubic structure of CoSe 2 , from cubic-CoSe 2 to hexagonal-CoSe, and from hexagonal-CoSe to tetragonal-CoSe, were observed in real time in the TEM. Different pathways for distinct transformations produced layered structures of cubic-CoSe 2 and hexagonal-CoSe. The initial transformation process to cubic-CoSe 2 is driven by heat-induced transitions with rearrangement of atoms in the lattice. The subsequent transformation is driven by a loss of chalcogen atom due to heating at elevated temperatures, and leads to a mix of di-and monochalcogenides, followed by the complete transformation to hexagonal-CoSe. By using and intentionally applying these heating-induced transformations to orthorhombic-CoSe 2 nanosheets, high-quality ultrathin layers of  the other phases (cubic-CoSe 2 , hexagonal-CoSe, and tetragonal-CoSe) can be prepared. Furthermore, the formation of welldefined CoSe 2 /CoSe heterostructures may be explored by precise tuning of the processing conditions. The transformation mechanisms elucidated here help understanding and controlling the conversion of layered cobalt chalcogenides and other layered materials exhibiting different stable structures with various stoichiometries, where transformations are driven by thermal effects and removal of chalcogen atoms.

Synthesis of o-CoSe 2 nanosheets
The o-CoSe 2 nanosheets were prepared by the hydrothermal method. Lamellar hybrid CoSe 2 /DETA (diethylenetriamine) intermediates were synthesized as described in the existing literature 42 . As prepared samples were further exfoliated into fairly thin nanosheets using a probe sonicator. In this procedure, 10 mg of CoSe 2 was dispersed in 20 ml of ethanol and then ultrasonicated for 6 h. After ultrasonic treatment, the resultant dispersions were centrifuged at 3000 r.p.m. for 10 min to remove the unexfoliated component. This procedure yielded very thin nanosheets of CoSe 2 as shown in Fig. 1. If the ultrasonication was performed for a shorter period of time, slightly thicker nanosheets such as the lath-shaped nanosheets shown in Supplementary Fig. 5 were found in the dispersion as well.

TEM details and settings
The in situ TEM study of orthorhombic-CoSe 2 nanosheets converting to hexagonal-CoSe nanosheets was performed on a Cs-corrected TEM (FEI Titan 80-300) operating at an acceleration voltage of 300 kV. Where mentioned, experiments were conducted on a FEI Talos F200X TEM operating at 200 kV, as well. All EDS chemical mapping experiments were performed on the Talos F200X TEM equipped with a Chemi-STEM elemental analysis setup. CoSe 2 samples for in situ heating experiments were prepared by drop casting it directly onto MEMS chips with SiN membranes, which were mounted on a DENSsolutions heating holder. The temperature was increased from room temperature to 1100°C in steps of 20°C. A Direct Electron camera on the FEI Titan TEM was used to record movies (frame rate 25 frames/s) and images for observing dynamical structural transformations in HR-TEM mode. The total screen current (fluscreen) was typically 5 nA and the beam exposure on the DE camera was limited to 4000 electrons per frame. Scanning TEM (STEM) imaging on the Talos F200X was conducted using a probe current of 30 pA and a dwell time per pixel of 4.0 μs. For all the filtered images in this article, the contrast was improved between the material and amorphous region in the background by applying a mask on the amorphous region followed by the inverse fast Fourier transformation (IFFT) for better display purposes. The TEM imaging simulations (Supplementary Fig. 19) were performed using QSTEM. The simulated images were generated with the following settings: accelerating voltage: 200 kV, objective aperture: 15 mrad, convergence angle: 1 mrad, focal spread: 2 nm, defocus: 71, 10, 26, and 20 nm for orthorhombic, cubic, hexagonal, and tetragonal structures, respectively.

Atomic force microscopy
AFM measurements were performed on a JPK Nanowizard II with a Nikon Eclipse Ti-U inverted microscope. The machine was placed on top of an active vibration isolation table together with a Halcyonics Active Vibration Isolation Unit. The whole setup was placed inside a large acoustic vibration box to further isolate the setup from external vibrations. We have used Bruker OTESPA-R3 AFM tips.

DFT calculations
The energy cutoff and the density of the k-meshes were tested to ensure that the energies converged to well within 0.5 meV/atom. The cutoff energies of the wave functions and augmentation functions were 500 and 700 eV, respectively, and the wave functions were sampled in k-space using the method by Monkhorst and Pack. The cubic c-CoSe 2 structure was sampled on a 12 × 12 × 12 k-mesh corresponding to a linear reciprocal spacing of 0.014 Å −1 . All other structures were evaluated with k-meshes that were at least equally dense. Both non-magnetic and magnetic (ferromagnetic and antiferromagnetic) input configurations were considered. All magnetic solutions that were found, were not energetically more favorable than the non-magnetic solutions within the accuracy of the method, and here we report only the non-magnetic solutions. Full relaxation with respect to cell dimensions and atomic coordinates was applied to find lower-energy configurations. Zero-point vibration contributions are neglected and the calculations are valid for a temperature of 0 K and a pressure of 0 Pa. The optB88-vdW optimized structure files (POSCAR files) are included as Supplementary Data.

DATA AVAILABILITY
Most of the data generated and analyzed during this study is included in this Article and in the Supplementary Information file. DFT-calculated structure files are provided as Supplementary Data. Raw experimental data and calculation data will be stored in the Data Repository of Utrecht University, and are available from the authors upon request.