Skip to content

Instantly share code, notes, and snippets.

@bskinn
Last active April 12, 2023 03:44
Show Gist options
  • Save bskinn/59fedd365a74346576b8a7b6d4e768b2 to your computer and use it in GitHub Desktop.
Save bskinn/59fedd365a74346576b8a7b6d4e768b2 to your computer and use it in GitHub Desktop.
Method for generating NCI plots using ORCA, MultiWFN, and VMD

Start with basename.gbw from an ORCA computation. This method has only been tested on Windows 7, primarily because MultiWFN is challenging to execute on Linux and Mac.

  1. Convert to MOLDEN format via orca_2mkl basename -molden

  2. Rename basename.molden.input to basename.molden (this is so MultiWFN will recognize it properly)

  3. Run MultiWFN; load basename.molden

  4. Export the reduced density gradient and "sign(lambda_2)*rho" to CUBE using the following MultiWFN commands:
    a. 5 (output property in spatial region)
    b. 13 (RDG)
    c. 3 (high grid over entire system -- can enter custom grid for better isosurface resolution)
    d. 2 (export CUBE)
    e. 0 (return to main menu)
    f. 5 (output property in spatial region)
    g. 15 (sign(lambda_2) * rho)
    h. 3 (high grid over entire system -- again, can enter custom grid here)
    i. 2 (export CUBE)

  5. Exit MultiWFN

  6. Find the exported CUBE files and move them to a more convenient location

  7. Load VMD

  8. In the main window, select File > New Molecule

  9. Browse... to and select the desired basename.xyz file

  10. Click Load to import the geometry.

  11. Still in the "Molecule File Browser" window, make sure basename.xyz is still selected in Load files for:

  12. Browse... to the RDG CUBE file and click Load

  13. Again ensure basename.xyz in still selected in Load files for:

  14. Browse... to the "sign(lambda_2)*rho" CUBE file and click Load

  15. Close the "Molecule File Browser" window

  16. In the main VMD window, select Graphics > Representations...

  17. Under Drawing Method select CPK (or whatever desired representation)

  18. Bump up the Sphere Resolution and Bond Resolution if needed, and adjust Sphere Scale and Bond Radius to taste

  19. Click Create Rep to create a new graphical representation

  20. Change Drawing Method to Isosurface

  21. In the Vol drop-down, select the RDG CUBE

  22. Set the Isovalue to the appropriate value (0.6?) and press Enter (must press Enter to have the value actually change)

  23. Change Draw to Solid Surface, and Show to Isosurface

  24. Change Coloring Method to Volume and select the "sign(lambda_2)*rho" CUBE from the drop-down that appears

  25. In the main VMD window, select Graphics > Colors...

  26. Change to the Color Scale tab and change the Method setting until the NCI plot colors are suitable

I've not ever used this approach to make "production quality" graphs, and in particular I'm not completely certain about the final plot properly capturing the coloring of opposite signs of "sign(lambda)*rho", or scaling properly with the magnitude of "rho". (I can't find the paper I used at the time, but I think the coloration was based on a scale of
-0.02 <= sign(lambda_2)*rho <= 0.02.

So, anyways, feedback is welcome!

@Shivanand-M
Copy link

Hai, thanks for this helpful post. I am trying to plot nci rdg isosurface for hydrogen bonded molecule using vmd software (following the steps as described above). I was able to change the background color from black to white by representation>color>display (background > white). but for the isosurface I am unable to plot with three colors ( however, isosurfaces are shown by only one color).I also tried to vary the color scale data range in the trajectory tab, but no any improvements. I may be missing one or two steps which I couldn't rectify myself. can you please tell me briefly, how to plot three coloured isosurface. thanks.

@prasanta13
Copy link

You will get only one green color unless you tweak a bit.
At step 20, VMD isosurfaces, there is a trajectory tab. The range is default -5.00<range<5.00. Decrease the range, and you will get multi color isosurfaces.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment