Re: Loops in tclForcesScript

From: BIN ZHANG (zhngbn_at_gmail.com)
Date: Thu Dec 11 2008 - 14:45:38 CST

>
> set oneatom [atomselect top "index 1"]

I don't think you can do this in the tclForce script.
One thing you can do is get the index list in VMD, and paste it in tcl
script.
Or, you can read your targeted atoms from pdb file, which is
documented in the "User-Defined Forces in NAMD" tutorial here:

http://ftp.ks.uiuc.edu/Training/Tutorials/

>
>
> The thing is that I want to read the forces only for heavy atoms,
> not hydrogens, so I need to use atomselect no select noh atoms.
>
> Lee
> ________________________________________
> $B4s7o<T(B: BIN ZHANG [zhngbn_at_gmail.com]
> $B4s7oF|4|(B: 2008$BG/(B12$B7n(B12$BF|(B $B>e8a(B 03:37
> $BZ_at_7o<T(B: Yang, Lee Wei
> $B<g;](B: Re: namd-l: Loops in tclForcesScript
>
> You need a space before the last bracket "{"
>
> try it like this:
> for {set i 1} {$i<1247} {incr i} {
>
> Bin
>
> On Dec 11, 2008, at 10:01 AM, Yang, Lee Wei wrote:
>
>> Dear NAMD users,
>>
>> Is there a way to do loops in the tclForcesScript {}?
>> I can't seem to do simple things such as
>>
>> for {set i 1}{$i<1247}{incr i}{
>> addatom $i
>> }
>>
>> in the tclForcesScript {}.
>>
>> Do I miss something here?
>>
>> Lee
>>
>
>
>
>
>
>
>
>
>
> -------------------------------------------------------------
> The tree of liberty must be refreshed from time to time with the blood
> of patriots and tyrants.

-------------------------------------------------------------
The tree of liberty must be refreshed from time to time with the blood
of patriots and tyrants.

This archive was generated by hypermail 2.1.6 : Wed Feb 29 2012 - 05:21:35 CST