From: Axel Kohlmeyer (
Date: Fri Oct 24 2008 - 10:31:13 CDT

On Fri, 24 Oct 2008, Maxim Paliy wrote:

MP> Dear VMD experts,
MP> I have a question about the command "measure gofr selection1 selection2
MP> .. etc"
MP> that calculates g(r) for all the pairs between two selections..
MP> I need to calculate g(r) e.g for all the pairs like <(index,
MP> index+n)>, where n integer.

hmmm... this kind of description does not allow to give a good
recommendation, since you describe only _how_ you want to implement
something and not _what_.
MP> is there a way to accomplish this with "selection1 selection2" ?

no. the two selections know nothing about each other and never will.

MP> Alternatively, is there a way to supply "measure gofr" with my own pair
MP> list?

only if you program it into it. it is in TclMeasure.C and Measure.C.

MP> or better yet, is there a tcl analog of measure gofr to modify it easily
MP> (at least without recompliing VMD)?

programming a gofr code is a frequent assignment for beginners in
molecular dynamics or statistical mechanics. VMD has a complete tcl
and python interpreter implemented.

measure gofr exists in its current form only because in the regular
case of dense liquid systems, it can take a _lot_ of time to loop over
all atoms. the current beta version has been multi-threaded as well
and a GPGPU accelerated version is in the works, too.


MP> Thanks in advance for any hints,
MP> Maxim

Axel Kohlmeyer
   Center for Molecular Modeling   --   University of Pennsylvania
Department of Chemistry, 231 S.34th Street, Philadelphia, PA 19104-6323
tel: 1-215-898-1582,  fax: 1-215-573-6233,  office-tel: 1-215-898-5425
If you make something idiot-proof, the universe creates a better idiot.