VMD-L Mailing List
From: Axel Kohlmeyer (akohlmey_at_gmail.com)
Date: Tue Jul 05 2011 - 20:10:04 CDT
- Next message: Mark Cunningham: "RE: Distance between atoms in frame"
- Previous message: snoze pa: "Re: Distance between atoms in frame"
- In reply to: snoze pa: "Re: Distance between atoms in frame"
- Next in thread: sajad falsafi: "Re: Distance between atoms in frame"
- Reply: sajad falsafi: "Re: Distance between atoms in frame"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
On Tue, Jul 5, 2011 at 8:12 PM, snoze pa <snoze.pa_at_gmail.com> wrote:
> After many tweaks, the scripts start working. I will highly appreciate if
> you can find if it is fine to do this way. If yes then in case of multiple
> chains (chain A and chain B with same residue number) then how can I change
> ths script.
just figure out which index those atoms are
beforehand and then use a selection "index #"
this will certainly only get one atom.
since you your atom indices won't change,
you only have to do that once per system.
>
> Thank you.
>
> source bigdcd.tcl
>
> proc myrmsd { frame } {
> global ref sel all
> $all move [measure fit $sel $ref]
why this?? $sel and $ref and $all
are all the same molecule. thus the $all move
won't change the distance between $sel and $ref
> $sel frame $frame
> $ref frame $frame
if you update the frame here, the
measure fit from above will be for
the previous step.
> set com1 [measure center $sel weight mass]
> set com2 [measure center $ref weight mass]
why measure center for a single atom??
set coord1 [lindex [$sel get {x y z}] 0]
set coord2 [lindex [$ref get {x y z}] 0]
should do the same thing.
> set comdist [vecdist $com1 $com2]
> puts "$frame: $comdist"
> }
>
axel.
> set mol [mol new solvated_ionised.psf waitfor all]
> set all [atomselect $mol all]
> set ref [atomselect $mol "protein and resid 13 and name CA "]
> set sel [atomselect $mol "protein and resid 18 and name CA "]
>
> mol addfile solvated_ionised.pdb type pdb waitfor all
> bigdcd myrmsd dcd solvated_ionised4.dcd solvated_ionised5.dcd
> bigdcd_wait
> #quit
>
>
> On Tue, Jul 5, 2011 at 6:12 PM, snoze pa <snoze.pa_at_gmail.com> wrote:
>>
>> Dear VMD users,
>>
>> I need some help to calculate the distance between atoms. I am using
>> multiple large dcd files and would appreciate your help to get the corrected
>> distance between two CA atoms of residue 13 and 18 along trajectory. I want
>> to use bigdcd because large multiple dcd files. I am not expert in tcl
>> programming but trying hard to get it.
>>
>> Thank you.
>>
>>
>> source bigdcd.tcl
>>
>> proc myrmsd { frame } {
>> global ref sel all
>> $all move [measure fit $sel $ref]
>> puts "$frame: [measure bond [list [list $ind1 $mol] [list $ind2 $mol]]
>> frame all]"
>> }
>>
>> set mol [mol new solvated_ionised.psf waitfor all]
>> set all [atomselect $mol all]
>> set ref [atomselect $mol "protein and resid 13 and name CA"]
>> set sel [atomselect $mol "protein and resid 18 and name CA"]
>> set ind1 [join [$ref get index]]
>> set ind2 [join [$sel get index]]
>>
>>
>> mol addfile solvated_ionised.pdb type pdb waitfor all
>> bigdcd myrmsd dcd solvated_ionised4.dcd solvated_ionised5.dcd
>> bigdcd_wait
>> #quit
>>
>
>
-- Dr. Axel Kohlmeyer akohlmey_at_gmail.com http://goo.gl/1wk0 Institute for Computational Molecular Science Temple University, Philadelphia PA, USA.
- Next message: Mark Cunningham: "RE: Distance between atoms in frame"
- Previous message: snoze pa: "Re: Distance between atoms in frame"
- In reply to: snoze pa: "Re: Distance between atoms in frame"
- Next in thread: sajad falsafi: "Re: Distance between atoms in frame"
- Reply: sajad falsafi: "Re: Distance between atoms in frame"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]