VMD-L Mailing List
From: Maxim Belkin (mbelkin_at_ks.uiuc.edu)
Date: Tue Nov 11 2014 - 01:34:04 CST
- Next message: Norman Geist: "AW: Selecting atoms based on the charges"
- Previous message: M K: "Re: Selecting atoms based on the charges"
- In reply to: M K: "Re: Selecting atoms based on the charges"
- Next in thread: Norman Geist: "AW: Selecting atoms based on the charges"
- Reply: Norman Geist: "AW: Selecting atoms based on the charges"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
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 <mahyar.karimi20_at_gmail.com> 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 <mbelkin_at_ks.uiuc.edu <mailto:mbelkin_at_ks.uiuc.edu>> wrote:
> How about "charge == -whatever" (without quotations)? It involves a couple of extra symbols, but it works.
>
> Maxim
>
>
>
> On Sep 23, 2014, at 9:08 AM, Josh Vermaas <vermaas2_at_illinois.edu <mailto:vermaas2_at_illinois.edu>> 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:
>>> Hi,
>>>
>>> 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.
>>
>
>
- Next message: Norman Geist: "AW: Selecting atoms based on the charges"
- Previous message: M K: "Re: Selecting atoms based on the charges"
- In reply to: M K: "Re: Selecting atoms based on the charges"
- Next in thread: Norman Geist: "AW: Selecting atoms based on the charges"
- Reply: Norman Geist: "AW: Selecting atoms based on the charges"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]