AW: TclForces and efficient PBC corrections

From: Norman Geist (norman.geist_at_uni-greifswald.de)
Date: Tue Nov 12 2013 - 01:55:16 CST

True. Thanks.

Norman Geist.

> -----Ursprüngliche Nachricht-----
> Von: Axel Kohlmeyer [mailto:akohlmey_at_gmail.com]
> Gesendet: Dienstag, 12. November 2013 08:32
> An: Norman Geist
> Cc: Morgan, Brittany; Namd Mailing List
> Betreff: Re: namd-l: TclForces and efficient PBC corrections
>
> On Tue, Nov 12, 2013 at 8:19 AM, Norman Geist
> <norman.geist_at_uni-greifswald.de> wrote:
> > 1. I don’t think so.
> >
> >
> >
> > 2. To get the clostest periodic distance between two atoms I
> usually
> > do (pseudo code):
> >
> >
> >
> > $xd = pmodulo($x1-$x2+$boxX/2,$boxX) - $boxX/2
> >
> > $yd = pmodulo($y1-$y2+$boxY/2,$boxY) - $boxY/2
> >
> > $zd = pmodulo($z1-$z2+$boxZ/2,$boxZ) - $boxZ/2
> >
> > $dist = sqrt(pow($xd,2) + pow($yd,2) + pow($zd,2))
>
> this last line is a *very* bad idea. pow() will be doing a call to
> exp() and log(), both of which are very expensive. $x*$x however is
> fast (like > 100x faster).
>
> axel.
> >
> >
> >
> > Make sure to use the pmodulo “positive arithmetic remainder”,
> standard
> > module can’t do negative numbers.
> >
> >
> >
> > 3. IMHO tcl don’t mind. Check if you can improve parts of your
> script.
> >
> >
> >
> > Norman Geist.
> >
> >
> >
> > Von: owner-namd-l_at_ks.uiuc.edu [mailto:owner-namd-l_at_ks.uiuc.edu] Im
> Auftrag
> > von Morgan, Brittany
> > Gesendet: Montag, 11. November 2013 19:03
> > An: namd-l_at_ks.uiuc.edu
> > Betreff: namd-l: TclForces and efficient PBC corrections
> >
> >
> >
> > Hi All,
> >
> >
> >
> > I use TclForces and I need to correct for periodic boundary
> conditions. I
> > have procedures which correct for PBC brute force, but I'm having
> serious
> > performance issues when I turn them on (the time required more than
> > doubles).
> >
> >
> >
> > Can anyone tell me if:
> >
> > 1. For the scalar distance, does "getbond <coor1> <coor2>" return a
> distance
> > corrected for periodic boundary conditions?
> >
> >
> >
> > 2. Is there a built-in way to obtain the vector distance between two
> > positions, corrected for periodic boundary conditions? Or does anyone
> know
> > of a resource for doing more efficient calculations in Tcl?
> >
> >
> >
> > 3. Is the IBVERBS version of charmrun faster when using TclForces?
> >
> > I didn't have serious performance issues with my PBC corrections
> previously,
> > but I've recently started working on a new cluster and this problem
> has
> > appeared. Previously, I was using NAMD 2.9b2, but IBVERBS is not
> currently
> > working on the new cluster. I've been using NAMD 2.9-multicore
> instead.
> >
> >
> >
> >
> >
> > Any suggestions would be much appreciated.
> >
> >
> >
> > Brittany Morgan
> >
> >
>
>
>
> --
> Dr. Axel Kohlmeyer akohlmey_at_gmail.com http://goo.gl/1wk0
> International Centre for Theoretical Physics, Trieste. Italy.

This archive was generated by hypermail 2.1.6 : Tue Dec 31 2013 - 23:23:59 CST