VMD-L Mailing List
From: snoze pa (snoze.pa_at_gmail.com)
Date: Tue Jul 05 2011 - 19:12:47 CDT
- Next message: Axel Kohlmeyer: "Re: Distance between atoms in frame"
- Previous message: snoze pa: "Distance between atoms in frame"
- In reply to: snoze pa: "Distance between atoms in frame"
- Next in thread: Axel Kohlmeyer: "Re: Distance between atoms in frame"
- Reply: Axel Kohlmeyer: "Re: Distance between atoms in frame"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
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.
Thank you.
source bigdcd.tcl
proc myrmsd { frame } {
global ref sel all
$all move [measure fit $sel $ref]
$sel frame $frame
$ref frame $frame
set com1 [measure center $sel weight mass]
set com2 [measure center $ref weight mass]
set comdist [vecdist $com1 $com2]
puts "$frame: $comdist"
}
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
>
>
- Next message: Axel Kohlmeyer: "Re: Distance between atoms in frame"
- Previous message: snoze pa: "Distance between atoms in frame"
- In reply to: snoze pa: "Distance between atoms in frame"
- Next in thread: Axel Kohlmeyer: "Re: Distance between atoms in frame"
- Reply: Axel Kohlmeyer: "Re: Distance between atoms in frame"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]