Calculating electrostatic force from NAMD trajectory

From: Ben Lowe (
Date: Mon Jul 03 2017 - 21:35:50 CDT

I'm interested in calculating the electrostatic-only force on an atom
within my system at every frame of a completed trajectory. The
application is calculating the electric field on a test charge.

The simulation was ran using PME for electrostatics with the EW3DC
correction applied via the 'extforces' module, so ideally the
resulting force would include both these, but a simple nearest
neighbor coulombic sum may also be acceptable as an approximation to

Does anyone know what would be an efficient way to calculate the
electrostatic-only force on an atom for many (i.e. several thousand)

I can imagine the brute force way would be to write out every frame
into a pdb/psf, and then run a separate NAMD 'minimisation' for every
frame with the following settings:

   cutoff 0.1 # essentially disable VDW interactions
   binaryoutput off ;
   run 0
   output onlyforces $outputname

But I'm sure there is a more efficient way; for example can tclforces
be used for this kind of post-processing

Or colvars maybe
 but this seems to be aimed at ABF calculations rather than this more
simple problem.

Thank for any suggestions,


This archive was generated by hypermail 2.1.6 : Mon Dec 31 2018 - 23:20:24 CST