VMD-L Mailing List
From: Udit Aswal (udit0000_at_gmail.com)
Date: Thu Apr 06 2017 - 00:54:35 CDT
- Next message: Harish Srinivasan: "psfgen giving wrong structure in the autopdb file"
- Previous message: John Stone: "Re: Regarding membrane thickness"
- In reply to: Chitrak Gupta: "Re:"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Hi Chitrak,
Thanks! The command was really helpful.
Regards
Udit
On Wed, Apr 5, 2017 at 9:13 PM, Chitrak Gupta <chgupta_at_mix.wvu.edu> wrote:
> Hi Udit,
>
> For one, I strongly recommend you define the atomselection outside the
> loop and update it inside, otherwise you might encounter memory leaking
> problems.
>
> Second, if you are only interested in the resid of the lipids, you could
> do "set DPPC [lsort -unique [$sel get resid]]". That would avoid printing
> duplicate resids.
>
> Third and finally, you could always run a loop over your resids (however,
> this would bring back the memory leak problem associated with overwriting
> atomselections inside a loop). For example, if you have 40 residues in your
> protein, you could do something like this:
>
> for {set res 1 } {$res <= 40} {incr res 1} {
> set sel [atomselect top "lipids and same residue as within 15 of resid
> $res"]
> for { set i 0 } { $i < $n } { incr i } {
> $sel frame $i
> $sel update
> set DPPC [lsort -unique [$sel get resid]]
> puts $file "$i $DPPC"
> }
>
> # This is important to aboid overwriting of the selection
> $sel delete
> }
>
>
>
> Note that this is a very rudimentary way, you could always modify it to
> format your data file in a specific way.
>
>
> Hope this helps,
> Chitrak.
>
> On Wed, Apr 5, 2017 at 10:36 AM, <udit0000_at_gmail.com> wrote:
>
>> Hello,
>>
>> I am trying to find number of lipids around residues of my protein. The
>> command I am giving is
>> “ for { set i 0 } { $i < $n } { incr i } {
>>
>> set sel [atomselect top "lipids and same residue as within
>> 15 of resid 20" frame $i]
>>
>> set DPPC [$sel get resid]
>>
>> puts $file "$i $DPPC"
>>
>> } “
>> But this command is valid for only 1 protein residue at a time.
>> So, it would be really helpful if someone could tell me a way to do it
>> for >1 residue(s) at once.
>>
>> Regards
>>
>> Udit
>>
>>
>>
>> Sent from Mail <https://go.microsoft.com/fwlink/?LinkId=550986> for
>> Windows 10
>>
>>
>>
>
>
- Next message: Harish Srinivasan: "psfgen giving wrong structure in the autopdb file"
- Previous message: John Stone: "Re: Regarding membrane thickness"
- In reply to: Chitrak Gupta: "Re:"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]