From: John Stone (
Date: Wed Feb 23 2011 - 13:55:38 CST

Hi guys,
  I took a close look at this, and I think I've found what's going wrong
with the -masscenter case:
  double mscale = totalq / (totalm * sel->selected);

This is dividing by both total mass and by the number of selected
atoms, I believe it should only be dividing by total mass:
  double mscale = totalq / totalm;

This should account for the difference between the Tcl proc Stephane
wrote vs. the output from "measure dipole" with -masscenter.
I will double check this and commit the fix if I didn't miss something here.


On Wed, Feb 23, 2011 at 05:30:36PM +0100, Stéphane Pezennec wrote:
> Le mercredi 23 février à 10h12 (-0500), Axel Kohlmeyer a écrit :
> > would you mind checking if this behavior still occurs in the latest
> > beta version of VMD?
> Thank you Axel for your reply. I just installed version 1.9beta1 and
> made a quick test: as you presumed, the 'measure dipole -masscenter'
> behave the same way as in version 1.8.7 and generates position-dependent
> dipole values.
> Regards,
> --
> Stephane

NIH Resource for Macromolecular Modeling and Bioinformatics
Beckman Institute for Advanced Science and Technology
University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
Email:                 Phone: 217-244-3349
  WWW:      Fax: 217-244-6078