From: Maxim Belkin (mbelkin_at_ks.uiuc.edu)
Date: Mon Feb 08 2016 - 10:05:36 CST

Please post the relevant part of the script you use. You are apparently making a mistake in there and it’s hard to help you without knowing what exactly you are doing.

The error message says that you are trying to do something like:

mol delete $variable

where variable = molnum$molnum

However, you should be doing:

mol delete $molnum

where molnum is 0, 1, 2, 3... and not molnum0, molnum1, molnum2,...

> On Feb 8, 2016, at 09:55, Irem Altan <irem.altan_at_duke.edu> wrote:
>
> Thanks for the answer. I can create the variables and load molecular data just fine, but when I do mol delete $molnum, I get the error "can't read “molnum1": no such variable”. mol delete 0, however, works.
>
>> On Feb 8, 2016, at 10:34 AM, Maxim Belkin <mbelkin_at_ks.uiuc.edu> wrote:
>>
>> set molnum [mol new]
>> ...
>> mol delete $molnum
>>
>>
>> On 02/08/2016 09:02 AM, Irem Altan wrote:
>>> Hi,
>>>
>>> I am reading data into molecules via a .tcl script, and then I eventually remove them:
>>>
>>> mol new
>>> …
>>> mol delete 0
>>>
>>> Now if I want to read in an extra molecule, its number becomes 1, despite the fact that 0 doesn’t exist anymore. Is there a way for me to set the number to 0? If not, how can I check within my script automatically what the next number will be?
>>>
>>> Best,
>>> Irem
>>
>