wpron
1
Hi all,

I use Python and want to obtain the localized orbitals from the restricted Hartree Fock calculation

```
psi4.set_options({'reference': 'rhf'})
eng, wfn = psi4.energy('scf/sto-3G', return_wfn=True)
```

How can I obtain the localized orbitals for a given basis set using a given orbital localization method?

Thanks in advance,

wpron

You can get them using the following code.

```
psi4.set_options({'reference': 'rhf'})
eng, wfn = psi4.energy('scf/sto-3G', return_wfn=True)
basis_ = wfn.basisset()
C_occ = wfn.Ca_subset("AO", "OCC") # canonical C_occ coefficients
Local = psi4.core.Localizer.build("PIPEK_MEZEY", basis_, C_occ) # Pipek-Mezey Localization
#Local = psi4.core.Localizer.build("BOYS", basis_, C_occ) # Boys Localization
Local.localize()
new_C_occ = Local.L # local C_occ coefficients
```

Let me know if anything is unclear.