From: Christian Simon (christian.simon_at_ppce.jussieu.fr)
Date: Mon Mar 25 2002 - 08:06:27 CST

Dear VMD-list,

I am a beginner with Tcl language, and Zhanwu's script
seems very complicated to me.
There are many point I would like to maker clearer.
Since I wrote a script to achieve the "almost" same goal,
I am now thinking that maybe my method is wrong or inefficient.

> # This procedure move more quickly because is do not operate individua
> atoms.

How many atoms do you have in your box to make this a critical point ?

> # Used as the first step
> proc rapidwrap { x y z } {
> set minx [expr [expr 0 - $x ]/2]
> set maxx [expr $x/2]
> set miny [expr [expr 0 - $y ]/2]
> set maxy [expr $y/2]
> set minz [expr [expr 0 - $z ]/2]
> set maxz [expr $z/2]

Why do you use such nested expressions ?
(you also write in the "slow" wrap proc:
> set vecz [expr $z * [expr 0- [expr int([expr $atomz /
> $maxz])]]]

I would have used :
set minx [expr -$x/2]

and

set vecz [expr -int($atomz/$maxz)*$z]

This seems to work. Is the reason that it is slower ? Or is there some
structure/type problem I do not see ?
(furtermore, I would have use "round" and not "int". Am I wrong ?)

The permutation method seems very complicated to me.
Maybe could you comment it a little ? (what it does is understandable;
my question is rather explain why you proceed that way ?).

-- 
Christian SIMON
The Center for Molecular Modeling  (CMM, Rm. 141A)
University of Pennsylvania,        Tel: (215)-898-1583
Department of Chemistry, Box 127   Fax: (215)-573-6233
231 S. 34th St.
Philadelphia, PA 19104-6323 USA