Re: [NAMD] Using as collective variable the minimum of a set of distances

From: The Cromicus Productions (
Date: Mon Jan 30 2017 - 16:53:34 CST

Thanks for your reply, Jerome. I'm not sure I understood your answer. I have
a DNA molecule formed by two strands, each one with 100 atoms. These atoms
can be considered as groups of 10, so I have in each strand 10 groups of 10
let's call these groups {A1,A2,... A10} and {B1, B2,... B10}.
I want to study the minimum distance between adjacent groups: {A1,B1},
{A2,B2}, ... and {A10, B10}.
I cannot use the average of these distances because that can make {A1,B1}
be constant
and I want the two strands to separate perfectly, without getting glued in
any position.
That's why I want to do min{d(A1,B1),d(A2,B2),...,d(A10,B10)}.
I guess that makes distanceInv not an option, right? Can I do this using
scripted functions?

On Sun, Jan 29, 2017 at 11:25 AM, Jérôme Hénin <> wrote:

> Hi Sebastian,
> You could use distanceInv to define the minimum distance between the
> groups (12 3 4) and (5 6 7 8). If that does not work for you, you can write
> a similar average using a scripted function of distance components. That
> is, define a colvar having as components d(1,5), d(2,6), d(3,7) and d(4,8),
> and a Tcl scripted variable (
> colvars-refman-namd/colvars-refman-namd.html#x1-530005.5) implementing
> this expression :
> refman-namd.html#x1-250005.1.6
> and its derivatives.
> Best,
> Jerome
> On 29 January 2017 at 00:07, The Cromicus Productions <
>> wrote:
>> Hi everyone,
>> I'm interested in studying the separation of two strands of DNA
>> and to do this I want to define as collective variable
>> the minimum of the distances between the strands. That is,
>> if the DNA is
>> 1 2 3 4
>> 5 6 7 8
>> I want to define my variable as the minimum of d(1,5), d(2,6), d(3,7) and
>> d(4,8).
>> Any idea if this is possible and how to do it?
>> I tried before to work with the center of mass but I don't know why
>> the tips of the molecule don't separate from each other.
>> Thanks a lot!
>> Sebastian

This archive was generated by hypermail 2.1.6 : Sun Dec 31 2017 - 23:21:02 CST