10
$\begingroup$

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.

$\endgroup$
2

5 Answers 5

7
$\begingroup$

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.

$\endgroup$
3
  • $\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, 2015 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, 2015 at 6:18
  • 1
    $\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, 2015 at 17:06
6
$\begingroup$

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!

$\endgroup$
1
  • $\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, 2015 at 2:25
6
$\begingroup$

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

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

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.

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

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.

$\endgroup$
2
  • $\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$
    – M.A.R.
    May 6, 2015 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, 2015 at 22:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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