Skip to content

How to plot orbitals from fragment orbitals? #295

Answered by alexfleury-sb
jjgoings asked this question in Q&A
Discussion options

You must be logged in to vote

Hi Joshua! For plotting the DMET orbitals, we use the coefficients embedded in the dmet_solver.orbitals.localized_mo and bath_orb variables (dmet_solver is a DMETProblemDecomposition object). Then, we loop through those to get the cube files:

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 dmet_solver.orbitals.localized_mo to bath_orb. At this moment, the bath orbitals are not saved in the dmet_solver object (so a little hack is necessary).

If you want specific MOs, the minimum and maximum MO indi…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by jjgoings
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants