From: Blake Charlebois (bdc_at_mie.utoronto.ca)
Date: Fri May 13 2005 - 17:28:41 CDT

Hi,

I usually use something like the following. I don't know of a simpler
approach.

set everyone [atomselect top all]
set protein [atomselect top protein]
puts " TOTAL CHARGE ON THE SYSTEM: [eval vecadd [$everyone get charge]]"
puts "TOTAL CHARGE ON THE PROTEIN: [eval vecadd [$protein get charge]]"
$everyone delete
$protein delete

Blake

-----Original Message-----
From: owner-vmd-l_at_ks.uiuc.edu [mailto:owner-vmd-l_at_ks.uiuc.edu] On Behalf Of
Chang, Christopher
Sent: May 13, 2005 2:32 PM
To: vmd-l_at_ks.uiuc.edu
Subject: vmd-l: Total charge query?

Hi,

   Is there a simple command like "molinfo top get charge" available to get
the total charge for a molecule, or "measure charge $selection" for a
selection in VMD?

Thanks,

Chris

Christopher H. Chang, Ph.D.
Research Associate
National Renewable Energy Laboratory
1617 Cole Blvd., Mail Stop 1608
Golden, CO 80401
Phone (303) 275-3751
Fax (303) 275-4007