Now I and @fmkz___ are developing a thin wrapper library for Psi4 and RDKit named psikit.
Today I added new function for viewing molecular orbital HOMO and LUMO with pymol. Psi4 has the function which can output cube format file of MO named ‘cubeprop’. So I try to implement the function in to psikit.
By using the library, you can get HOMO/LUMO cube file easily.
Example is below.
from rdkit import Chem from rdkit.Chem import Draw from rdkit.Chem import AllChem from rdkit.Chem.Draw import IPythonConsole from psikit import Psikit smi = 'COc1cccnc1' mol = Chem.MolFromSmiles(smi) AllChem.Compute2DCoords(mol) mol
Just call ‘getMOview’ after optimization. It took a little bit long time on my PC.
pk = Psikit() pk.read_from_smiles(smi) %time pk.optimize() >Optimizer: Optimization complete! >CPU times: user 1min 54s, sys: 3.97 s, total: 1min 58s >Wall time: 31.5 s >-360.58490537900167 # get MO view! pk.getMOview()
After executing the method, psikit makes 5 files named target.mol, Psi_a_n_n-A.cube, Psi_b_n_n-A.cube, Psi_a_n+1_n+1-A.cube, Psi_b_n+1_n+1-A.cube. First file is mol file. Second and third is information of its HOMO and forth, fifth is information of LUMO.
Then load all files from pymol. Change HOMO/LUMO object show setting as dot. I could get following image.
The function and pymol seem to work fine. But I want to compare data between this result and another QM’s result.
Current version of psikit is still under development and some bugs. I would like to fix and tune the code.