Molecular spintronics is an emerging field of research that combines spintronics and molecular electronics[@b1]. Using molecules is advantageous because their electronic and magnetic properties can be manipulated under specific conditions. However, we have to have control of the spin switching and the electric-conductance variation for the realization of molecular spintronics[@b2][@b3].

For such a requirement, the selections of the magnetic molecule and the control mechanism of the conductance are crucial. The molecules of single-molecule magnet (SMM) are attractive, because their spin relaxation is slow and they can hold the spin information for a long time[@b4]. The Kondo effect has attracted attention as the conductance control mechanism, which has been observed in single atoms[@b5][@b6][@b7][@b8][@b9][@b10], single molecules[@b11][@b12][@b13][@b14][@b15] and quantum dots[@b16]. The phenomenon occurs because of the interaction between conducting electrons and a localized spin[@b17], and causes a change in conductance. The ability to tune the Kondo effect of SMMs would be useful for the conductance control with the use of the spin[@b4][@b18]. In addition, the detection of a Kondo state by using scanning tunnelling microscope (STM) should contribute to the understanding of localized spins. However, despite extensive experimental and theoretical studies[@b19][@b20], little is known about the Kondo effect in SMMs.

In this study, we modified the spin in a single molecule by switching on and off the localized magnetic moment of a molecular orbital. We used a double-decker bis(phthalocyaninato)terbium(III) (TbPc~2~) molecule, which is a SMM with a high \'blocking\' temperature of several tens of Kelvin, below which the relaxation of the magnetization becomes slow[@b21][@b22][@b23]. A spin of the molecule was detected by a clear Kondo resonance in d*I*/d*V* spectra of the tunnelling current of the STM. The Kondo effect originates from an unpaired spin in a π-orbital of the [phthalocyaninato](#annotation-75){ref-type="annotation"} ([Pc](#annotation-74){ref-type="annotation"}) ligands rather than from the local magnetic moment of the metal ion. We manipulated the spin by rotating the [Pc](#annotation-73){ref-type="annotation"} ligand of a single TbPc~2~ molecule by applying a current from an STM, which caused the Kondo peak to disappear. Our calculations showed that the ligand spin was quenched by a change in energy of the frontier molecular orbitals. This molecular manipulation was reversible, making it possible to switch the spin of TbPc~2~ on and off as desired. In this way, we can code information in a single molecule by applying an electric current.

Results
=======

Preparation and characterization of the adsorbed molecules
----------------------------------------------------------

TbPc~2~, which has been shown to have SMM properties, was synthesized by using a previously reported procedure with slight modifications. The complexes were deposited on a clean [Au](#annotation-72){ref-type="annotation"}(111) surface kept at room temperature by using a sublimation method in ultra-high vacuum. The sample was then transferred to the STM head, which was cooled to \~4.7 K[@b24][@b25].

An STM image of an isolated TbPc~2~ molecule adsorbed on [Au](#annotation-71){ref-type="annotation"}(111) is shown in [Figure 1a](#f1){ref-type="fig"}. The height of the molecule was determined to be \~0.40 nm, and eight bright lobes were visible at the perimeter of the molecule. To explain the image, we developed a model and simulated an STM image for TbPc~2~ adsorbed on [Au](#annotation-70){ref-type="annotation"}(111) surface. In TbPc~2~, two [Pc](#annotation-69){ref-type="annotation"} ligands sandwich a Tb ion. [Figure 1b](#f1){ref-type="fig"} shows a top view of the molecule, in which upper and lower [Pc](#annotation-68){ref-type="annotation"} ligands are coloured in blue and silver, respectively, with an azimuthal rotational angle (*θ*) between the two [Pc](#annotation-67){ref-type="annotation"} ligands of 45°. The two [Pc](#annotation-66){ref-type="annotation"} ligands adopt a bent configuration with respect to each other, as shown in [Figure 1c](#f1){ref-type="fig"}.

Structures of TbPc~2~ adsorbed on [Au](#annotation-65){ref-type="annotation"}(111) surface were elucidated using density functional theory (DFT). A simulated STM image of the TbPc~2~ molecule on [Au](#annotation-64){ref-type="annotation"}(111) is shown in [Figure 1d](#f1){ref-type="fig"}. The eight protrusions in the simulated STM image are from the upper [Pc](#annotation-63){ref-type="annotation"} ligand. The lower [Pc](#annotation-62){ref-type="annotation"} ligand does not contribute directly to the image.

An STM image of a monolayer film of TbPc~2~ molecules obtained with a sample bias (*V*~sample~) of −0.8 V is shown in [Figure 1e](#f1){ref-type="fig"}. Nine full molecules, which make a pseudo-square lattice, were visible in the image. The image showed a checkerboard contrast pattern, which is depicted on the right hand side of [Figure 1e](#f1){ref-type="fig"}. The bright molecules (b) and the dark molecules (d) are shown in yellow and brown, respectively.

Magnified images of two neighbouring molecules are shown in [Figure 1f](#f1){ref-type="fig"}, in which the top and bottom molecules correspond to b and d, respectively. Eight lobes were clearly observed for b, which are marked as 1--8. However, in the image of d, we observed four tiny lobes (marked 2, 4, 6 and 8), and the four other lobes (1, 3, 5 and 7) were either shadowed or shared by bright lobes of the neighbouring b.

The b and d molecules were rotated with respect to each other, which can be clarified by drawing lines connecting the bright lobes. Lobes 2 and 6 or 4 and 8 were used because they were clearly observed for both b and d. The lines connecting lobes 2 and 6 of b and d were rotated by 15° with respect to each other. As described in the Methods section, the bottom [Pc](#annotation-61){ref-type="annotation"} ligand of each molecule was aligned in the same direction, and the upper [Pc](#annotation-60){ref-type="annotation"} ligand was aligned such that *θ*≈45° for b and 30° for d (see [Fig. 1g](#f1){ref-type="fig"}). The values of *θ* alternate because of the steric repulsion between the upper [Pc](#annotation-59){ref-type="annotation"} ligands. If *θ*≈45° for every molecule, the phenyl rings would interfere with each other.

Kondo resonance detected by tunnelling spectroscopy
---------------------------------------------------

[Figure 2](#f2){ref-type="fig"} shows the analysis of tunnelling conductance (d*I*/d*V*) on a TbPc~2~ molecule. The zero-bias peak (ZBP) was assigned to a Kondo resonance. We observed clear Kondo features for the molecules with *θ*≈45° when the tip was positioned over one of the lobes of b (labelled I in [Fig. 2a,b](#f2){ref-type="fig"}). However, when the tip was placed over the centre of the molecule, only a small feature was observed (mark II in [Fig. 2a,b](#f2){ref-type="fig"}). A sample temperature of 4.3 K and a modulation voltage of 1 mV, corresponding to an estimated resolution of 3 meV[@b26] were used.

In [Figure 2b](#f2){ref-type="fig"}, spectrum I was obtained by subtracting a smooth background. In the spectra shown hereafter, the conductance of the background curve at the Fermi level (zero bias) was calibrated to 1.2×10^−9^ (A/V), which is equivalent to 3.2×10^−5^ (e^2^ h^−1^). We observed a large ZBP and two small side peaks, which were fitted as shown in spectrum I.

[Figure 2c](#f2){ref-type="fig"} shows the changes in the d*I*/d*V* spectra near the Fermi level (upper panel) as the tip was moved along the symmetry line of TbPc~2~ shown in the lower panel. A Kondo peak was observed only when the tip was positioned over the bright spots, and no peak was observed when the tip was over the centre of the ligand. The site dependence of the Kondo peak is different from previous reports involving metal--Pc complexes, such as [FePc](#annotation-58){ref-type="annotation"} and [CoPc](#annotation-57){ref-type="annotation"}, which only show a Kondo peak when the tunnelling electrons are injected in the centre of the molecule[@b11][@b12][@b27]. This suggests that the mechanism for the appearance of the Kondo resonance in TbPc~2~ is different from that for MPc, and that the [Pc](#annotation-56){ref-type="annotation"} ligand and its spin have an important role in the TbPc~2~ case.

To prove that the Kondo resonance is the origin of the ZBP, we examined the changes in the peak width and height in relation to both the sample temperature and the presence of a magnetic field. The dependence on the temperature is shown in [Figure 3a](#f3){ref-type="fig"}, with fitted curves for *T*=4.7 K and 21 K superimposed as dotted lines. The ZBP broadened, and the height decreased as the temperature increased, as shown in [Figure 3b,c](#f3){ref-type="fig"}.

Nagaoka *et al*.[@b28] introduced a formula for the temperature dependence of the Kondo-peak width on temperature (*Γ*(*T*)) using Fermi-liquid theory: where *k*~B~ is the Boltzmann constant and *T*~K~ is the Kondo temperature. The observed data (solid circles) were fitted using this formula, and the fitted curve is shown in [Figure 3b](#f3){ref-type="fig"} as a solid line. *T*~K~ was determined to be \~31 K. This temperature is very low compared with other reported values: *T*~K~\>200 K for [CoPc](#annotation-55){ref-type="annotation"}[@b11], *T*~K~=357 and 598 K for [FePc](#annotation-54){ref-type="annotation"} with different bonding configurations[@b27], and *T*~K~=105 and 170 K for different conformations of TBrPP-Co[@b12].

Furthermore, the decrease in height of ZBP with an increase in the temperature is the evidence for a Kondo resonance. An empirical relation for the temperature dependence of the Kondo-induced conductance, *G*, was used to characterize the Kondo resonance[@b29]: *G*(*T*)=*G*~0~(*T*′^2^~K~/*T*^2^+*T*′^2^~K~)s, where *G*~*0*~ is the *G* value at zero temperature and . Thus, *G*(*T*~K~)is equal to *G*~0~/2. The decay behaviour observed in [Figure 3c](#f3){ref-type="fig"} could be reproduced using a *T*~K~ of 31 K and an empirical parameter *s* of 0.2.

The behaviour of ZBP in relation to an applied magnetic field was studied. The Kondo resonance splits when a magnetic field was applied, and this splitting is two times larger than the ordinary Zeeman splitting[@b30]. [Figure 3d](#f3){ref-type="fig"} shows a comparison of the d*I*/d*V* spectra in magnetic fields of *B*=0 and 8 T. When B=8 T, the spectrum is broader by \~2 meV.

Although clear splitting of the Kondo peak in the presence of the magnetic field has been reported previously[@b31], it was not clear in [Figure 3d](#f3){ref-type="fig"}. We simulated the changes in the peak by convoluting two Lorentzian peaks with *Γ*=6.5 meV and separated by 1.8 meV (two times the Zeeman splitting energy at 8 T) around the Fermi level into a single peak (see [Fig. 3e](#f3){ref-type="fig"}). Because of the original peak width when *B*=0 T, the splitting was not obvious except for a slight broadening of \~1 meV. This simulation supports our assignment of the peak to be a Kondo resonance.

To further investigate the mechanism of the appearance of the Kondo feature, we acquired d*I*/d*V* spectra of double-decker YPc~2~ and triple-decker Y~2~Pc~3~, as shown in [Figure 4](#f4){ref-type="fig"}. We prepared the non-SMM double-decker complex YPc~2~ and the non-SMM triple-decker complex Y~2~Pc~3~[@b32]. A sharp Kondo feature appeared for YPc~2~, whereas there was no Kondo peak for Y~2~Pc~3~. Below, we discuss the mechanism of the presence/absence of the Kondo feature in terms of the spins of the metal atoms and the electronic configuration of the ligands.

Spin control by molecular structure manipulation
------------------------------------------------

The configuration of the π-electrons has an important role in the appearance of Kondo peaks, and its manipulation should make it possible to control Kondo states. To determine if this is possible, we rotated the upper [Pc](#annotation-53){ref-type="annotation"} ligand by injecting enough current via the STM tip to overcome the activation barrier for the conformation change. [Figure 5a,b](#f5){ref-type="fig"} shows an STM image, in which the centre molecule was converted from b ([Fig. 5a](#f5){ref-type="fig"}) to d ([Fig. 5b](#f5){ref-type="fig"}) by applying a pulse *V*~sample~ to the molecule. We believe that the lower [Pc](#annotation-52){ref-type="annotation"} ligand does not move, and rotation of the upper [Pc](#annotation-51){ref-type="annotation"} ligand changes *θ*.

Rotation of a molecule can be monitored by the tunnelling current change, helping to understand the mechanism of the rotation. [Figure 5c](#f5){ref-type="fig"} shows changes in the current during injection of a current pulse with *V*~sample~=−2.0 V. The high and low states of the tunnelling current correspond to b and d, respectively. The sharp changes in the current indicate when rotation occurs. We rotated the upper [Pc](#annotation-50){ref-type="annotation"} ligand of more than 50 molecules and obtained an average rate[@b33] of rotation (*R*) from b to d as a function of the current (*I*). The results are summarized in [Figure 5d](#f5){ref-type="fig"} for *V*~sample~=−2.0 V. Least squares analysis of a plot of log(*R*) versus log(*I*) yielded a slope of \~1.09. Thus, the reaction order *n* in the relation *RI*^*n*^ should be close to 1. This suggests that the current-induced rotation is a one-electron phenomenon.

Various surface manipulations have been performed with a similar mechanism[@b34]. In the present case, the injected electron provided enough energy to turn the upper [Pc](#annotation-49){ref-type="annotation"} ligand. Once the molecule switches to the other state by the pulse current, it stays there for hours, allowing us to image and characterize the new conformation in subsequent STM studies. The Kondo peaks, which were obtained at the bright spots, dramatically changed after the application of the pulse, as shown in [Figure 5e](#f5){ref-type="fig"}. In fact, the sharp Kondo feature disappeared when d formed (see for example [Fig. 5b](#f5){ref-type="fig"}).

Discussion
==========

Our data show that an unpaired electron in a π-orbital of the upper [Pc](#annotation-48){ref-type="annotation"} ligand is responsible for the appearance of the Kondo peak for TbPc~2~. As TbPc~2~ is neutral, there must be a +1 π-radical because the molecule is composed of a Tb^+3^ ion and two Pc^−2^ ligands (totally −4)[@b23]. Thus, one of the ligands should have an unpaired electron in a π-orbital[@b35].

The correlation between the appearance of the Kondo peak and the presence of an unpaired electron in a π-orbital can be seen more clearly in the comparison between double-decker YPc~2~ and triple-decker Y~2~Pc~3~ (see [Fig. 4](#f4){ref-type="fig"}). Both molecules contain a Y ion in a +3 oxidation state. Thus, in the double-decker complex, there is a single unpaired electron in the π-orbital of the [Pc](#annotation-47){ref-type="annotation"} ligand and no spin on the Y ion. In the triple-decker molecule, the two Y ions have a total oxidation state of +6 with no d or f spin, and the sum of the oxidation states of the three [Pc](#annotation-46){ref-type="annotation"} ligands is −6, which means that Y~2~Pc~3~ is neutral and has no spin system. We observed a sharp Kondo feature for YPc~2~, whereas no Kondo peak was observed for Y~2~Pc~3~. In other words, the Kondo feature occurs because of an unpaired π-electron in a ligand orbital instead of a metal orbital.

The Kondo state is formed in the presence of degenerate spin states. In the case of TbPc~2~, there are two spin systems: one spin system involves the central Tb ion (4f electrons, *J*=*L*+*S*=±6) and the other involves one unpaired electron in a π-orbital. In the present case, the large magnetic anisotropy on the Tb ion leads to a loss of the spin degeneracy and effectively hampers the formation of a Kondo state. However, the two degenerate spin states (*S*=1/2) of the π-electron together with its sizable coupling to the substrate lead to the measurable Kondo peak mentioned above.

We demonstrated that the Kondo feature can be switched on and off by changing *θ*, as shown in [Figure 5](#f5){ref-type="fig"}. To understand the change in the Kondo resonance with respect to *θ*, we examined the changes in the π-orbitals in relation to *θ* by using spin-resolved DFT calculations. When *θ*=45°, the [Pc](#annotation-45){ref-type="annotation"} ligand of the molecule on a [Au](#annotation-44){ref-type="annotation"}(111) surface had an *S*=1/2 spin. Vitali *et al*. have reported similar calculations[@b35]. However, they only observed a spin in the π-orbitals of isolated molecules and none in those of molecules adsorbed on a [Cu](#annotation-43){ref-type="annotation"}(111) surface. This is due to charge transfer from the [Cu](#annotation-42){ref-type="annotation"} surface to the molecule, causing the electron in the π-orbitals of the ligand to pair up. In our case, TbPc~2~ does not interact strongly with the [Au](#annotation-41){ref-type="annotation"}(111) surface leading to a smaller degree of charge transfer. In other words, an unpaired spin remains in the π-orbitals after adsorption.

It is important to determine the spatial distribution of the unpaired π-electron both in the fundamental understanding of the Kondo resonance and in the control of the spin. However, it is not easy to do solely by the STM measurement. Alternatively, we visualized the spin polarization by calculating the difference of the density of the up-spin and the down-spin (see [Supplementary Fig. S1](#S1){ref-type="supplementary-material"}). The result indicates that the higher spin-polarization sites are accumulated only in the upper [Pc](#annotation-40){ref-type="annotation"}. This is because, upon adsorption on the [Au](#annotation-39){ref-type="annotation"} surface, the upper and lower [Pc](#annotation-38){ref-type="annotation"} are not equivalent, which is the effect of the metallic surface to create a dipole that localizes the electronic charge in the molecule.

As the upper [Pc](#annotation-37){ref-type="annotation"} plane rotates from *θ*=45°, the energy levels of both the singly occupied molecular orbital (SOMO) and the highest occupied molecular orbital (HOMO) change. We computed these changes for an isolated molecule, and the peak positions of the SOMO and HOMO levels for the minority spin are plotted in [Figure 6a](#f6){ref-type="fig"}. As *θ* changed from 45°, the SOMO and HOMO levels became closer in energy. This can be clearly understood if we consider the level crossing of the two levels. We calculated molecular orbitals for SOMO and HOMO for *θ*=0° (see [Fig. 6b](#f6){ref-type="fig"}). The difference in SOMO and HOMO is the phase in the upper and lower [Pc](#annotation-36){ref-type="annotation"} ligand; they are in-phase for HOMO and 180 ° anti-phase for SOMO, which can be clearly seen by the bonding between the two [Pc](#annotation-35){ref-type="annotation"} in the inner circle of the HOMO states. This is reasonable because the HOMO state should be energetically more stable than the SOMO state. The bonding is mainly formed in the inner circle, which is due to the bent configuration of the molecule that makes the distance between the upper and lower lobes of the inner circles smaller than that of the outer. When we rotated by 45°, the lobes in the inner circles change their phase completely. They become in-phase for SOMO state and anti-phase for HOMO state. According to the definition that the HOMO is more stable than the SOMO, the HOMO state at *θ*=0° now becomes SOMO at *θ*=45°. This is how the level crossing occurs at *θ* between 0° and 45°.

Finally, in the presence of the [Au](#annotation-34){ref-type="annotation"}(111) surface, the SOMO became doubly occupied near *θ*=30° due to charge transfer from the surface, quenching the molecular spin and hence the Kondo state.

In conclusion, by using controlled current pulses, we rotated the upper [Pc](#annotation-33){ref-type="annotation"} ligand in TbPc~2~, which led to the disappearance of the π-orbital spin. This is due to charge transfer from the substrate to the SOMO level, as the SOMO level decreases in energy, approaching the Fermi energy, upon ligand rotation. The π-orbital spin, which is localized on the upper ligand, appeared as a Kondo peak in electronic conductance spectra. The large magnetic moment of the metal ion does not produce a Kondo signal because the intrinsic molecular anisotropy impedes the formation of a degenerate state needed for the Kondo spin flip to occur. Hence, TbPc~2~ on [Au](#annotation-32){ref-type="annotation"}(111) is a spin one-half Kondo system because of the ligand spin. The upper ligand could be rotated in a controlled manner, switching on and off the spin. Thus, information can be encoded on the single-molecule level by controlling the molecular spin via an electric current.

Methods
=======

Synthesis of double- and triple-decker molecules
------------------------------------------------

All reagents were purchased from Wako or Aldrich and used without further purification. The compounds were prepared following reported procedures with slight modifications[@b21][@b36]. A mixture of [1,2-dicyanobenzene](#annotation-31){ref-type="annotation"} (62.7 mmol), M(OAc)~3~·4H~2~O (M=Tb, Dy and Y; 3.92 mmol) and [1,8-diazabicyclo\[5,4,0\]undec-7-ene](#annotation-30){ref-type="annotation"} (33.5 mmol) in 200 ml of [1-hexanol](#annotation-29){ref-type="annotation"} was refluxed for 1.5 days. The solution was allowed to cool to room temperature and then filtered. The precipitate was washed with acetic anhydride, cold acetone and *n*-pentane. Then, the precipitate was dried in air. The crude purple product was extracted with ten 200 ml portions of CHCl~3~. The green extracts were combined and concentrated, and column chromatography (C-200 silica gel, Wako) was used to isolate the product with 98:2 CH~2~Cl~2~/MeOH as the eluent. The green fraction, which was also the first fraction, was collected while being careful not to contaminate with the fraction containing the \[MPc~2~\]^−1^ complex, which was the second fraction (blue-green). The green fraction was concentrated, and *n*-hexane was added until the compound got precipitated. The green precipitate was filtered and dried *in vacuo*. In general, the yield was 2--5%.

Preparation of substrate and molecule deposition
------------------------------------------------

The substrate was a single crystal [Au](#annotation-28){ref-type="annotation"}(111) surface, which was prepared in a ultra high vacuum by repeated sputtering with Ar^+^ and annealing at 900 K. The molecule was deposited on the [Au](#annotation-27){ref-type="annotation"}(111) surface by evaporation from a Ta boat after prolonged degassing. X-ray photoemission spectroscopy was performed using non-monochromatized X-ray source of Al Kα (XSAM 800pci, Kratos) to check the composition of the deposited molecules. TbPc~2~, YPc~2~ and Y~2~Pc~3~ were deposited at a flux rate of \~0.1 monolayer per minute, with the [Au](#annotation-26){ref-type="annotation"} substrate at room temperature. No subsequent annealing was executed after the deposition.

The substrate cleaning, molecule deposition and low-temperature STM observations were done in ultra high vacuum chambers connected by metal valves. The sample could be transferred between them without exposure to air. The STM head was placed in a tube-like stainless chamber, which was inserted into a He dewar. The He dewar was attached to an air-suspended table and was located below floor level. The assembly comprised of the tube scanner, STM tip and sample holder, and inertia slider for coarse motion of the tip was suspended by springs to isolate it from vibration. Scanning tunneling spectroscopy (STS) spectra were obtained using a lock-in amplifier in which a modulation voltage of 1 mV was superimposed onto the tunnelling bias voltage.

Model of the TbPc~2~ film and configuration of TbPc~2~ molecule
---------------------------------------------------------------

The lattice of the TbPc~2~ film can be expressed with the two vectors of **b1** and **b2** (see [Supplementary Fig. S2](#S1){ref-type="supplementary-material"}), in which **b1** is parallel to with a length of 5*a* (*a* is the nearest neighbour distance of [Au](#annotation-25){ref-type="annotation"} atoms, *a*\~0.288 nm) and **b2** is parallel to with a length of . Similar structures have been reported for [FePc](#annotation-24){ref-type="annotation"}[@b27] and [CoPc](#annotation-23){ref-type="annotation"}[@b37] molecules adsorbed on the [Au](#annotation-22){ref-type="annotation"}(111) surface.

We assume that the bonding configuration of the bottom [Pc](#annotation-21){ref-type="annotation"} is same as that of the [FePc](#annotation-20){ref-type="annotation"}[@b27] and [CoPc](#annotation-19){ref-type="annotation"}[@b37] molecules adsorbed on the [Au](#annotation-18){ref-type="annotation"}(111) surface, in which the azimuthal rotation is aligned such that the line connecting the centres of the diagonal phenyl rings is parallel to the direction, which is rotated 60° from the direction (see [Supplementary Fig. S2](#S1){ref-type="supplementary-material"}).

Furthermore, we consider the azimuthal rotation of the upper and lower [Pc](#annotation-17){ref-type="annotation"} of each TbPc~2~ molecule. In our model (see [Supplementary Fig. S3a](#S1){ref-type="supplementary-material"}), the upper [Pc](#annotation-16){ref-type="annotation"} (red) is rotated 45° with respect to the lower [Pc](#annotation-15){ref-type="annotation"} (blue). We chose this twist angle as it is close to the angle observed in the bulk crystal (\~42°). As the lower [Pc](#annotation-14){ref-type="annotation"} is aligned in the direction, the symmetry line connecting the two phenyl groups of the upper [Pc](#annotation-13){ref-type="annotation"}, s, makes an angle of *φ*=75° from the vertical line, v.

We calculated the distribution of HOMO orbital by Vienna ab-initio simulation program (VASP) (see [Supplementary Fig. S3b](#S1){ref-type="supplementary-material"}). The symmetry line of s defined in [Supplementary Figure S3a](#S1){ref-type="supplementary-material"} is also illustrated.

In [Supplementary Figure S3c](#S1){ref-type="supplementary-material"}, the bright (upper) and dark (lower) molecules were magnified in the STM image. The two molecules are aligned in the direction and are placed parallel to the vertical direction of the figure. In a similar manner as shown in [Supplementary Figure S3b](#S1){ref-type="supplementary-material"}, we draw the symmetry line s for the bright molecule. The measured angle between s and v was \~75°, which coincides with the model of [Supplementary Figure S3a](#S1){ref-type="supplementary-material"}. Thus, we believe that the assumption of the azimuthal angle of lower [Pc](#annotation-12){ref-type="annotation"} and the rotation angle of 45° of the upper [Pc](#annotation-11){ref-type="annotation"} can reproduce the distribution of the observed lobes of the TbPc~2~ molecules well. The rotation of angle of the dark molecule was explained in the main manuscript.

HOMO state STS spectra of TbPc~2~
---------------------------------

We showed an example of the change of the HOMO and SOMO energy with the rotation of the azimuthal angle of the upper and lower [Pc](#annotation-10){ref-type="annotation"} in the [Figure 6](#f6){ref-type="fig"}, change of which was \~0.1 eV. We further claimed that the molecular spin is altered because the number of electrons that occupy the SOMO state changes. One of the conditions required for this discussion is that the state is sharp enough such that the energy level change of \~0.1 eV can significantly modify the number of the electrons occupied in the state.

To see whether the electronic states of the molecule satisfy this condition, we measured STS spectra obtained on the molecule (see [Supplementary Fig. S4](#S1){ref-type="supplementary-material"}). We see a sharp peak at the energy of \~100 meV in the occupied state, and the full-width at half-maximum of the peak is \~40 meV. This indicates that the broadening of the molecule\'s electronic state is limited, and the \~0.1 eV change in the electronic state should have a meaningful change for the electron-occupancy of the molecule.

DFT calculation
---------------

First-principle calculations were performed by using VASP code, employing a plane wave basis set and projector augmented wave (PAW) potentials to describe the behaviour of valence electrons[@b38][@b39]. A generalized gradient Perdew Burke Ernzerhof exchange-correlation potential[@b40] was used. The structures were relaxed until the forces were smaller than 0.05 eV Å^−1^. Because of the absence of dispersion forces in the local and semilocal exchange-correlation approximations, the molecule-surface distance was only an estimate. Therefore, little can be said on the charge transfer from the substrate to the molecule. As first approximation, free molecules were used to discuss the electronic structure. However, the simulations of the STM images included the [gold](#annotation-9){ref-type="annotation"} surface, which was modelled as a five-atom-thick slab, and were based on the lateral arrangement of TbPc~2~ molecules described in the results. The Tersoff and Hamman theory[@b41] was used to compute the STM images using a previously reported method[@b42].

Author contributions
====================

T.K. and M.Y. designed and planned the experiments. H.I., J.L., Y.-F.Z. and T.K. measured and analysed the scanning tunnelling microscope and spectroscopy data. K.K., B.K.B. and M.Y. synthesized the molecules. N.L. and T.K. conducted the theoretical calculation and analysis. T.K., N.L. and B.K.B. did the main part of the preparation of the manuscript.

Additional information
======================

**How to cite this article:** Komeda, T. *et al*. Observation and electric current control of a local spin in a single-molecule magnet. *Nat. Commun.* 2:217 doi: 10.1038/ncomms1210 (2011).

Supplementary Material {#S1}
======================

###### Supplementary Information

Supplementary Figures S1-S4

phthalocyaninato

:   compound

    IKAWFROWTJCXLV-UHFFFAOYSA-N

    4426440

    3626584

phthalocyaninato

:   compound

    IKAWFROWTJCXLV-UHFFFAOYSA-N

    4426440

    3626584

phthalocyaninato

:   compound

    IKAWFROWTJCXLV-UHFFFAOYSA-N

    4426440

    3626584

phthalocyaninato

:   compound

    IKAWFROWTJCXLV-UHFFFAOYSA-N

    4426440

    3626584

phthalocyaninato

:   compound

    IKAWFROWTJCXLV-UHFFFAOYSA-N

    4426440

    3626584

phthalocyaninato

:   compound

    IKAWFROWTJCXLV-UHFFFAOYSA-N

    4426440

    3626584

gold

:   compound

    PCHJSUWPFVWCPO-UHFFFAOYSA-N

    23985

    22421

gold

:   compound

    PCHJSUWPFVWCPO-UHFFFAOYSA-N

    23985

    22421

phthalocyaninato

:   compound

    IKAWFROWTJCXLV-UHFFFAOYSA-N

    4426440

    3626584

phthalocyaninato

:   compound

    IKAWFROWTJCXLV-UHFFFAOYSA-N

    4426440

    3626584

phthalocyaninato

:   compound

    IKAWFROWTJCXLV-UHFFFAOYSA-N

    4426440

    3626584

phthalocyaninato

:   compound

    IKAWFROWTJCXLV-UHFFFAOYSA-N

    4426440

    3626584

phthalocyaninato

:   compound

    IKAWFROWTJCXLV-UHFFFAOYSA-N

    4426440

    3626584

phthalocyaninato

:   compound

    IKAWFROWTJCXLV-UHFFFAOYSA-N

    4426440

    3626584

phthalocyaninato

:   compound

    IKAWFROWTJCXLV-UHFFFAOYSA-N

    4426440

    3626584

phthalocyaninato

:   compound

    IKAWFROWTJCXLV-UHFFFAOYSA-N

    4426440

    3626584

gold

:   compound

    PCHJSUWPFVWCPO-UHFFFAOYSA-N

    23985

    22421

cobalt phthalocyanine

:   compound

    MPMSMUBQXQALQI-UHFFFAOYSA-N

    520606

    21241748

ferric phthalocyanine

:   compound

    MIINHRNQLVVCEW-UHFFFAOYSA-N

    2735065

    21170918

phthalocyaninato

:   compound

    IKAWFROWTJCXLV-UHFFFAOYSA-N

    4426440

    3626584

gold

:   compound

    PCHJSUWPFVWCPO-UHFFFAOYSA-N

    23985

    22421

cobalt phthalocyanine

:   compound

    MPMSMUBQXQALQI-UHFFFAOYSA-N

    520606

    21241748

ferric phthalocyanine

:   compound

    MIINHRNQLVVCEW-UHFFFAOYSA-N

    2735065

    21170918

gold

:   compound

    PCHJSUWPFVWCPO-UHFFFAOYSA-N

    23985

    22421

gold

:   compound

    PCHJSUWPFVWCPO-UHFFFAOYSA-N

    23985

    22421

gold

:   compound

    PCHJSUWPFVWCPO-UHFFFAOYSA-N

    23985

    22421

gold

:   compound

    PCHJSUWPFVWCPO-UHFFFAOYSA-N

    23985

    22421

1-hexanol

:   compound

    ZSIAUFGUXNUGDI-UHFFFAOYSA-N

    8103

    7812

1,8-diazabicyclo\[5,4,0\]undec-7-ene

:   compound

    GQHTUMJGOHRCHB-UHFFFAOYSA-N

    81184

    73246

1,2-dicyanobenzene

:   compound

    XQZYPMVTSDWCCE-UHFFFAOYSA-N

    7042

    6775

gold

:   compound

    PCHJSUWPFVWCPO-UHFFFAOYSA-N

    23985

    22421

phthalocyaninato

:   compound

    IKAWFROWTJCXLV-UHFFFAOYSA-N

    4426440

    3626584

gold

:   compound

    PCHJSUWPFVWCPO-UHFFFAOYSA-N

    23985

    22421

phthalocyaninato

:   compound

    IKAWFROWTJCXLV-UHFFFAOYSA-N

    4426440

    3626584

phthalocyaninato

:   compound

    IKAWFROWTJCXLV-UHFFFAOYSA-N

    4426440

    3626584

phthalocyaninato

:   compound

    IKAWFROWTJCXLV-UHFFFAOYSA-N

    4426440

    3626584

phthalocyaninato

:   compound

    IKAWFROWTJCXLV-UHFFFAOYSA-N

    4426440

    3626584

gold

:   compound

    PCHJSUWPFVWCPO-UHFFFAOYSA-N

    23985

    22421

phthalocyaninato

:   compound

    IKAWFROWTJCXLV-UHFFFAOYSA-N

    4426440

    3626584

gold

:   compound

    PCHJSUWPFVWCPO-UHFFFAOYSA-N

    23985

    22421

copper

:   compound

    RYGMFSIKBFXOCR-UHFFFAOYSA-N

    23978

    22414

copper

:   compound

    RYGMFSIKBFXOCR-UHFFFAOYSA-N

    23978

    22414

gold

:   compound

    PCHJSUWPFVWCPO-UHFFFAOYSA-N

    23985

    22421

phthalocyaninato

:   compound

    IKAWFROWTJCXLV-UHFFFAOYSA-N

    4426440

    3626584

phthalocyaninato

:   compound

    IKAWFROWTJCXLV-UHFFFAOYSA-N

    4426440

    3626584

phthalocyaninato

:   compound

    IKAWFROWTJCXLV-UHFFFAOYSA-N

    4426440

    3626584

phthalocyaninato

:   compound

    IKAWFROWTJCXLV-UHFFFAOYSA-N

    4426440

    3626584

phthalocyaninato

:   compound

    IKAWFROWTJCXLV-UHFFFAOYSA-N

    4426440

    3626584

phthalocyaninato

:   compound

    IKAWFROWTJCXLV-UHFFFAOYSA-N

    4426440

    3626584

phthalocyaninato

:   compound

    IKAWFROWTJCXLV-UHFFFAOYSA-N

    4426440

    3626584

phthalocyaninato

:   compound

    IKAWFROWTJCXLV-UHFFFAOYSA-N

    4426440

    3626584

phthalocyaninato

:   compound

    IKAWFROWTJCXLV-UHFFFAOYSA-N

    4426440

    3626584

ferric phthalocyanine

:   compound

    MIINHRNQLVVCEW-UHFFFAOYSA-N

    2735065

    21170918

cobalt phthalocyanine

:   compound

    MPMSMUBQXQALQI-UHFFFAOYSA-N

    520606

    21241748

phthalocyaninato

:   compound

    IKAWFROWTJCXLV-UHFFFAOYSA-N

    4426440

    3626584

cobalt phthalocyanine

:   compound

    MPMSMUBQXQALQI-UHFFFAOYSA-N

    520606

    21241748

ferric phthalocyanine

:   compound

    MIINHRNQLVVCEW-UHFFFAOYSA-N

    2735065

    21170918

phthalocyaninato

:   compound

    IKAWFROWTJCXLV-UHFFFAOYSA-N

    4426440

    3626584

phthalocyaninato

:   compound

    IKAWFROWTJCXLV-UHFFFAOYSA-N

    4426440

    3626584

phthalocyaninato

:   compound

    IKAWFROWTJCXLV-UHFFFAOYSA-N

    4426440

    3626584

phthalocyaninato

:   compound

    IKAWFROWTJCXLV-UHFFFAOYSA-N

    4426440

    3626584

phthalocyaninato

:   compound

    IKAWFROWTJCXLV-UHFFFAOYSA-N

    4426440

    3626584

gold

:   compound

    PCHJSUWPFVWCPO-UHFFFAOYSA-N

    23985

    22421

gold

:   compound

    PCHJSUWPFVWCPO-UHFFFAOYSA-N

    23985

    22421

phthalocyaninato

:   compound

    IKAWFROWTJCXLV-UHFFFAOYSA-N

    4426440

    3626584

phthalocyaninato

:   compound

    IKAWFROWTJCXLV-UHFFFAOYSA-N

    4426440

    3626584

phthalocyaninato

:   compound

    IKAWFROWTJCXLV-UHFFFAOYSA-N

    4426440

    3626584

phthalocyaninato

:   compound

    IKAWFROWTJCXLV-UHFFFAOYSA-N

    4426440

    3626584

gold

:   compound

    PCHJSUWPFVWCPO-UHFFFAOYSA-N

    23985

    22421

gold

:   compound

    PCHJSUWPFVWCPO-UHFFFAOYSA-N

    23985

    22421

gold

:   compound

    PCHJSUWPFVWCPO-UHFFFAOYSA-N

    23985

    22421

phthalocyaninato

:   compound

    IKAWFROWTJCXLV-UHFFFAOYSA-N

    4426440

    3626584

phthalocyaninato

:   compound

    IKAWFROWTJCXLV-UHFFFAOYSA-N

    4426440

    3626584

phthalocyaninato

:   compound

    IKAWFROWTJCXLV-UHFFFAOYSA-N

    4426440

    3626584

phthalocyaninato

:   compound

    IKAWFROWTJCXLV-UHFFFAOYSA-N

    4426440

    3626584

phthalocyaninato

:   compound

    IKAWFROWTJCXLV-UHFFFAOYSA-N

    4426440

    3626584

phthalocyaninato

:   compound

    IKAWFROWTJCXLV-UHFFFAOYSA-N

    4426440

    3626584

gold

:   compound

    PCHJSUWPFVWCPO-UHFFFAOYSA-N

    23985

    22421

T.K. and N.L. acknowledge the support from KAKENHI (22241026) and \'R&D promotion scheme funding International joint research\' promoted by NICT (National Institute of Information and Communication Technology), Japan. N.L. acknowledges support from the Spanish MICINN FIS2009-12721-C04-01

![Adsorption configuration of TbPc~2~ on Au(111).\
(**a**) STM image of an isolated molecule of TbPc~2~ on [Au](#annotation-8){ref-type="annotation"}(111). (**b**) A schematic model of the double-decker TbPc~2~ molecule. The upper (lower) [Pc](#annotation-7){ref-type="annotation"} is coloured in blue (silver). (**c**) Side view of the TbPc~2~ molecule after structural optimization by using DFT calculations. (**d**) A simulated STM image of the TbPc~2~ molecule by DFT calculations. (**e**) Film of TbPc~2~. An alternating contrast pattern of nine molecules is shown on the right hand side with brighter molecules in yellow and darker molecules in brown. (STM images of **a** and **e** were obtained with *V*~sample~=−0.8 V and *I*~tunnel~=0.3 nA. Bars correspond to 1 nm). (**f**) A magnified image of bright (upper) and dark (lower) molecules. The black (green) line connects lobes 2 and 6 of bright and dark molecules. The two lines are rotated 15° with respect to each other. (**g**) A tentative model of the adsorption configuration of TbPc~2~ film, corresponding to the image in **e**. Bright (*θ*=45°) and dark (*θ*=30°) molecules form a pseudo-square lattice, and the red and blue [Pc](#annotation-6){ref-type="annotation"} ligands correspond to vacuum- and substrate-side [Pc](#annotation-5){ref-type="annotation"} ligands, respectively.](ncomms1210-f1){#f1}

![STS measurement of TbPc~2~ near Fermi level.\
(**a**) STS detection positions on the film together with a model of the upper [Pc](#annotation-4){ref-type="annotation"} plane. (**b**) d*I*/d*V* spectra at I and II in **a**. (**c**) Change in the Kondo peak height when the tip position was moved along the blue line in the STM topography panel. The different colours correspond to the d*I*/d*V* intensity, described below the figure.](ncomms1210-f2){#f2}

![Proving the assignment of the ZBP to the Kondo feature.\
(**a**) Temperature dependence of the peaks measured in the region of 4.7--66 K. Background curves were subtracted. (**b**, **c**) Peak width (**b**) and peak height (**c**) changes versus temperature for the peak near the Fermi level. The dotted curves indicate the fitted curves mentioned in the text. The error bars correspond to the distribution of the measured data of more than ten samplings. (**d**, **e**) Peak changes in the presence of a magnetic field of 8 T; **d** is experimental (exp.) data and **e** is a simulation (simul.) of two convoluted peaks separated by two times the Zeeman splitting for the Kondo effect (see text).](ncomms1210-f3){#f3}

![Kondo peaks in related molecules.\
Comparison of the d*I*/d*V* curves for I YPc~2~ and II Y~2~Pc~3~. Corresponding STM images are shown in the right hand side (*V*~sample~=0.8 V and *I*~tunnel~=0.3 nA). A side view of Y~2~Pc~3~ is superimposed.](ncomms1210-f4){#f4}

![Molecular manipulation and control of Kondo feature.\
(**a**, **b**) Conversion of the centre molecule from b (*θ*=45°) to d (*θ*=30°) by applying a current pulse. The target molecule is marked by an arrow, and magnified images are shown in the bottom panel. Changes in the contrast and the top view of the centre molecule are schematically illustrated. (**c**) Current during a −2.0 V voltage pulse over a TbPc~2~ molecule initially in the b state; the tip remained fixed over a lobe position with the feedback loop open. Each jump in the current indicates the moment of rotation of the molecule and the low state corresponds to the d state. (**d**) Rotations per electron as a function of tunnelling current for *V*=−2.0 V. Both axes are in log scale. More than 50 molecules similar to the one in **a** were sampled. Data shown are for rotation from b to d. The red line corresponds to a least squares fit. (**e**) Comparison of the Kondo peaks before I and after II the application of the pulse.](ncomms1210-f5){#f5}

![Energy level and level crossing of SOMO and HOMO.\
(**a**) Change in the peak positions of the SOMO and HOMO levels versus *θ* determined by using DFT calculations. (**b**) Molecular orbitals for SOMO and HOMO for *θ*=0° Top view shows eight lobes both for outer circles and inner circles of the molecule. In the side view, a bonding between the two [Pc](#annotation-3){ref-type="annotation"} can be seen in HOMO. Note the phase difference of the upper and lower [Pc](#annotation-2){ref-type="annotation"} of SOMO and HOMO.](ncomms1210-f6){#f6}
