From: Ben Lowe (ben.lowe.uk_at_googlemail.com)
Date: Fri Jul 07 2017 - 02:14:30 CDT
Ah thank you; the script generated by NAMD energy showed me how to do
what I wanted. I didn't realise NAMD itself can read .dcd files for
analysis.
For anyone interested, I've included the simple script below. Add the
following to the end of a NAMD .conf file and it will read in a .dcd
file, output a .force file (containing forces on all atoms) for every
frame.
binaryoutput off
coorfile open dcd namd-temp.dcd
set outfile [open "dcdforces.log" w]
while { ![coorfile read] } {
firstTimestep $ts
run 0
output onlyforces tmp
##Insert tcl script here to extract the force on the atom of
interest from "tmp.force"
incr ts 1
}
coorfile close
close $outfile
Kind Regards,
Ben
On 4 July 2017 at 11:42, sunyeping <sunyeping_at_aliyun.com> wrote:
> Hi,
>
> I use the vmd plugin "NAMD energy" to calculate the electrostatic force of
> the selected atoms. Do you think this is apt for your purpose?
>
> All the best.
>
> Yeping Sun
>
> ------------------------------------------------------------------
> From:Ben Lowe <ben.lowe.uk_at_googlemail.com>
> Time:2017 Jul 4 (Tue) 10:37
> To:namd-l <namd-l_at_ks.uiuc.edu>
> Subject:namd-l: Calculating electrostatic force from NAMD trajectory
>
> 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
> this.
>
> Does anyone know what would be an efficient way to calculate the
> electrostatic-only force on an atom for many (i.e. several thousand)
> frames?
>
> 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
> analysis?(http://www.ks.uiuc.edu/Research/namd/2.9/ug/node50.html)
>
> Or colvars maybe
> (http://www.ks.uiuc.edu/Research/namd/2.9/ug/node55.html#SECTION000132230000000000000)
> but this seems to be aimed at ABF calculations rather than this more
> simple problem.
>
> Thank for any suggestions,
>
> Ben
>
>
This archive was generated by hypermail 2.1.6 : Mon Dec 31 2018 - 23:20:25 CST