I have the positions of a large number of charges (the strengths are known, but are also variables). Are there any tools that will allow me to visualize the electric field induced by these charges (or by a subset of these charges)? Are there such tools that are connected to visualization routines, so that these can be converted into figures for presentations or articles?

  • $\begingroup$ Are you in the presence of any conductors or dielectrics? $\endgroup$
    – Dan
    Commented Apr 16, 2012 at 16:34
  • $\begingroup$ Also, roughly how many charges are there? $\endgroup$
    – Dan
    Commented Apr 16, 2012 at 16:35
  • $\begingroup$ @Dan: Not really—this is for simulations based on molecular dynamics calculations, with no implicit solvent. The number of charges needs to be adaptable—anywhere from a few tens to a few thousands is possible here. $\endgroup$
    – aeismail
    Commented Apr 16, 2012 at 20:06
  • $\begingroup$ Where are the FEM guys? @aeismail is asking for a solution to the 3D poisson equation of a set of point charges. $\endgroup$ Commented Apr 16, 2012 at 22:50

2 Answers 2


-Short answer for small molecules
APBS + VMD (link)

enter image description here

-Longer answer
First, you need to get your molecules into PQR format. PQR is fairly straightforward and is whitespace delimited:

Field_name Atom_number Atom_name Residue_name Chain_ID Residue_number X Y Z Charge Radius

PQR is one line per atom. Field_name should always be ATOM. The next five fields all relate back to the residue naming scheme used by the older PDB format. If the only thing that you want to be able to do is to visualize the field, you can just use 0001 H DUM A 001 for those five fields for every atom, as long as you increment the Atom_number field by 1 on each line (0001, 0002, etc.). You'll want to pay special attention to the X Y Z fields, which are (obviously) the x y z coordinates of the atom, and to the Charge field, which (also obviously) is the partial charge of the atom. Since you have no implicit solvent, the Radius field is irrelevant and should probably be set to 0 for all atoms.

If you already have partial charges (I'm going to assume you already have coordinates), it should be straightforward to write a script that will create your PQR file. If you don't already have partial charges, or if your molecule happens to be in certain accepted formats (MOL2, PDB, or XML), you should probably figure out how to use the PDB2PQR tool in order to make your PQR file.

Install APBS and VMD, and then just follow the instructions here. One thing to note: since you have no implicit solvent, in step 3 of "Running the electrostatics calculation" you will need to set your solvent and solute dielectric constant equal to whatever dielectric constant you used in your MD simulation (if you don't know what it was, setting them both to 1 should be fine).

That should be it. If you have any questions, or if it doesn't work, please add some comments and I'll see what I can do to answer/fix it.

  • $\begingroup$ Actually, it's not a protein—they're primarily small molecules, but multiple of them. $\endgroup$
    – aeismail
    Commented Apr 16, 2012 at 21:30
  • $\begingroup$ @aeismail changed answer to a workflow that should be relevant to small molecules. $\endgroup$
    – tel
    Commented Apr 16, 2012 at 23:51

If the number of charges isn't too large, hand-coding the formula for the potential and then taking the derivative symbolically with Sage or Mathematica should be easy enough.

If you have an enormous number of charges (several tens or more, in a file to long to convert to something by hand), you could read the charges and their positions into a python list, calculate the potential for each of them separately, and then add all the potentials together.

  • 2
    $\begingroup$ To add to Dan's suggestion, it seems like Python + Mayavi might be a good open-source solution. This example of Mayavi + SciPy is particularly topical because it involves using Mayavi to plot a potential, forces associated with the gradient of the potential, and particle trajectories. $\endgroup$ Commented Apr 17, 2012 at 2:05

Your Answer

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

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