How to plot orbitals from fragment orbitals? #295
-
Curious how to plot the fragment + bath orbitals from a DMET decomposition, like y'all do for the H10 example in the DMET notebook? It would be helpful for selecting frozen core and ensuring the active orbitals are what I expect. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi Joshua! For plotting the DMET orbitals, we use the coefficients embedded in the from pyscf import tools
for i in range(dmet_solver.orbitals.localized_mo.shape[1]):
tools.cubegen.orbital(dmet_solver.orbitals.mol_full, f"M{i+1}.cube", dmet_solver.orbitals.localized_mo[:,i]) Note: to get the bath orbitals, we can switch If you want specific MOs, the minimum and maximum MO indices for each fragment are listed in the For the visualization step, I personally use VMD. Here is a useful link (in section 2) for the basic steps. |
Beta Was this translation helpful? Give feedback.
Hi Joshua! For plotting the DMET orbitals, we use the coefficients embedded in the
dmet_solver.orbitals.localized_mo
andbath_orb
variables (dmet_solver
is aDMETProblemDecomposition
object). Then, we loop through those to get thecube
files:Note: to get the bath orbitals, we can switch
dmet_solver.orbitals.localized_mo
tobath_orb
. At this moment, the bath orbitals are not saved in thedmet_solver
object (so a little hack is necessary).If you want specific MOs, the minimum and maximum MO indi…