From: Norman Geist (
Date: Tue Nov 11 2014 - 03:32:24 CST

One can select ranges of charges aswell like „charge > 1.5 and charge < 1.6“, btw.


Norman Geist.


Von: [] Im Auftrag von Maxim Belkin
Gesendet: Dienstag, 11. November 2014 08:34
An: M K
Cc: Josh Vermaas;
Betreff: Re: vmd-l: Selecting atoms based on the charges


That’s because charge is not exactly -0.699000

To see the actual value of a charge do the following with your selection:


set sel [atomselect top “charge \”-0.699000\””]

puts “[lsort -unique [$sel get charge]]”


The value you get here is actual charge and can be used in “charge = -whatever” condition.




On Nov 10, 2014, at 18:55, M K <> wrote:


Thank you for your responses.

charge "-0.699000" ===> worked

charge == -0.699000 ===> didn't work

Thanks :)


On Wed, Sep 24, 2014 at 12:38 AM, Maxim Belkin <> wrote:

How about "charge == -whatever" (without quotations)? It involves a couple of extra symbols, but it works.






On Sep 23, 2014, at 9:08 AM, Josh Vermaas <> wrote:

The negative sign. If you use charge "-0.7982", it'll work. John can probably be more enlightening about the details of WHY this is the case (I ran into this problem with negative resids, and I couldn't figure out why this was a problem), but the negative sign screws up the atomselection parser somehow unless its put in quotations. Note that negative numbers are allowed as math operands, so if you wanted charge > -0.8 and charge < -0.79, there the negative signs are handled correctly.

-Josh Vermaas

On 09/22/2014 09:25 PM, M Karim wrote:


I have different atom types in the structure, and found the easiest way to select them by their charges. In the selection menu, I can easily select atom types with positive charges. However, atoms with negative charges are not selected and I get this error:

Unable to parse this atom selection.

I, for example, use this command in the Selected Atoms area:

charge -0.798200

The command window also shows:

ERROR) syntax error


What is the problem with the syntax?

Thank you.





Diese E-Mail ist frei von Viren und Malware, denn der avast! Antivirus Schutz ist aktiv.