Recently @fmkz___ san updated psikit and uploaded nice example code. URL is below.
It is very nice example to MO rendering in pymol.
I implemented cube file generator for molecular orbital rendering before. But the code has a bug and not user convenient… So I fix the bug and added new function which can communicate pymol and render the MO on pymol.
Current psikit generates molecular geometry string with ‘no_reorient’ and ‘no_com’ options. It is necessary to keep original orientation of query molecule. I did not know that. Thank you for psi4 community to give such as a nice suggestion.
Following code is example of new function named ‘view_on_pymol’. I added some additional code for drawing MO on ligand-receptor complex.
To run the code, I launch pymol with server mode. ‘$pymol -R’
With -R option, I can communicate pymol with xmlrpc.
Next I load target pdb which is p38-BIRB796 complex. Then select ligand, add hydrogen and save ligand as mol format.
To use xmlrpc it is easy to do these process.
After extracted the ligand, pass the ligand to psikit and generate HOMO/LUMO cube file with getMOview function.
Finally call veiw_on_pymol make ligand MO view on pymol.
Next load original pdb file on the same session, I can get PDB-ligand complex with MO.
Now, Psikit can integrate psi4/quantum chemistry, chemoinformactics/rdkit and visualization/pymol and open source. It seems nice I think.
Any suggestions and advices will be greatly appreciated.