I would like to obtain the 3D charge density of a water molecule for plotting purposes (i.e. not necessarily super-accurate). I know this is a tough problem, but I'd like to give it a try. Since I'm currently using python, I've identified PyQuante and PySCF, and gather that I should learn how to run density functional theory (DFT) calculations. Before I do that, I'd like to find out if there is something else out there I should use instead. Multiple suggestions are welcome.

I've installed PyQuante, which according to it's README.txt may be more accessible to understanding.

For example, the color plots in this answer give a hint of what I'm talking about, though I'll ultimately plot the field strength contours and some electric field lines.

I'd like to obtain a large table of values (or expressions/expansions?), so I can create and work with surfaces and field line plots myself.

Additionally is it possible that there exist supplementary data in published articles. Where I might find that? Although this is about existing data, I actually do plan on putting in the time to have at least a minimal understanding of the calculation itself. If DFT is it, then I will be spending time studying that.

  • $\begingroup$ I somehow fail to see what you actually try to accomplish. If you want a large table, what should be in that table? Please be specific about what you need for your plot. What do you mean with field strength contours and electric field lines? Maybe you could add a sketch to illustrate what your goal is. There are many quantum chemistry packages out there, some of them even come with a documentation. Basically, what you need is only a mapping of the electron density or wave function... $\endgroup$ – Martin - マーチン May 7 '15 at 5:19

In pyscf, we are routinely running molden.py to generate molden file and plot the orbital surface with Jmol. It should not be too hard to write small script to generate density or other charge surface then plot the surface with Jmol. The basic functions you probably needed should be very close to the functions used by dft module, such as eval_ao, eval_rho.

In the recent Pyscf alpha 2 release, a script pyscf/tools/cubegen.py has been added to generate the Gaussian cube file format. In my linux box, the density looks fine in Jmol. You can use it as an example to generate other Jmol formats.

  • $\begingroup$ OK I will take a look @qiming-sun. Does it currently do DFT (as well as HF?) It may be over my head - when I saw mol.light_speed = 137.035989 (1/fine structure) in the documentation I decided it might be for people who are already experienced. $\endgroup$ – uhoh Jul 4 '15 at 15:16
  • $\begingroup$ I should mention that what I want is the charge distribution, (or the fields) so that I can do my own plotting. @qiming-sun, I need the physics part - I want to do the graphics/display part myself. Thanks! $\endgroup$ – uhoh Jul 5 '15 at 6:18
  • $\begingroup$ DFT is available. The package assumes the user has basic knowledge of computational chemistry. It provides many fundamental functions to achieve basic operations like integration, basis evaluation in real space etc. The default settings should be enough for most cases, and you don't have to modify anything to do regular computation, eg DFT. The script cubegen.py is an example about how to calculate charge density on cubic meshgrid with two lines of dft functions. You still need consider your own data format to record the rest informations, eg the molecular geometry. $\endgroup$ – Qiming Sun Jul 5 '15 at 17:06

Two suggestions: MolCalc: Calculate Properties > Polarity and Solvation gives you a 3D surface plot with the electrostatic potential superimposed.

Another suggestion is Avogadro/GAMESS/MacMolPlt. See for example here

  • $\begingroup$ Thanks! I've added some edits to my question. Looks like these won't help. $\endgroup$ – uhoh May 6 '15 at 11:35

If you are not looking to actually learn these calculations and just need the contour plots, you can use Arguslab.

This will give you illustrative plots of orbitals as well as total electron density. They won't be super-accurate but they will be quick.

  • $\begingroup$ Thanks! I've added some edits to my question. Looks like this won't help. $\endgroup$ – uhoh May 6 '15 at 11:28

You need (some) background knowledge and the tools to

  • generate an input file with the coordinates of your molecule and commands which calculations to perform

  • run the calculation

  • postprocess the results

All tools are out there! Unless you have access to the commercially available suites through your institution, I suggest to use those that are free (as in free beer and free speech). Actually, some of these free tools are a good choice in any case!

  • Input files can be generated using Avogadro, Molden, Gabedit, or wxmacmolplt

  • You can perform your calculations using NWChem, MPQC (both are in the repositories of every recent Linux distribution) or GAMESS-US, which can be downloaded after registration. In addition, there are pyscf and PyQuante, which you mentioned in your question.

  • Most of the tools used to generate the input files can be used for postprocessing too.

To quote the slogan of a shoe company:

Just do it!

  • $\begingroup$ wow! That's exactly what I needed! This will keep me very busy now. I appreciate you taking the time to give me the "big picture" of what is available. $\endgroup$ – uhoh May 9 '15 at 2:25

If you only need the electron density distribution of a water molecule, it doesn't make much sense for you to leanr DFT method. Although I don't think there will be such data out there, it's pretty easy to run such a calculation for people who do DFT calculation regularly. It will take several minutes. My suggestion is that you find someone to help you with the calculation. The calculation could give you the data describing electron density in the 3D space. Then you can play with the data by yourself.

  • $\begingroup$ Welcome to chemistry.SE! I think your answer shrinks down to "My suggestion is that you find someone to help you with the calculation." I'm not into DFT, so I leave it to others to decide if this should be a comment or not. $\endgroup$ – It's Over May 6 '15 at 14:42
  • $\begingroup$ Hi @Pu Zhang, thanks for your comment. I think it always makes sense to learn new things. Though I appreciate your point, and no doubt it takes a serious investment of time to really learn DFT, I'll feel funny using the output without at least a cursory understanding. $\endgroup$ – uhoh May 6 '15 at 22:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.