VMD-L Mailing List
From: Thomas Evangelidis (tevang3_at_gmail.com)
Date: Mon Nov 19 2012 - 09:04:07 CST
- Next message: Pietro Amodeo: "Re: MD very slow on a 8400M GS laptop (but not on a GT230M one) after NVidia driver update to 304.64 or 310.14"
- Previous message: Bjørnar Jensen: "Re: how to measure the distance of two atoms in 1000 conformations?"
- In reply to: Bjørnar Jensen: "Re: how to measure the distance of two atoms in 1000 conformations?"
- Next in thread: Martin, Erik W: "VMD QMTool"
- Reply: Martin, Erik W: "VMD QMTool"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
What about Timeline plugin?
http://www.ks.uiuc.edu/Research/vmd/plugins/timeline/
read section 15.
On 19 November 2012 15:05, Bjørnar Jensen <bje076_at_ift.uib.no> wrote:
> Hello,
>
> a quick untested script:
> ---------------------------------------------------------------------------
> //Selection for the two atoms of choice
> set A [atomselect top "index xxx"]
> set B [atomselect top "index yyy"]
>
> //Get number of frames loaded into top molecule
> set numframes [molinfo top get numframes]
>
> //Open file for writing output
> set output [open "Distance.dat" w]
> //Write a short header to the file
> puts $output "Frame\tDistance"
>
> //Loop over all frames
> for {set i 0} {$i < $numframes} {incr i} {
> //Advance to frame $i
> animate goto $i
> //Get the positions, find the vector from B to A, calculate the length
> of vector
> set distance [veclength [vecsub [lindex [$A get {x y z}] 0] [lindex
> [$B get {x y z}] 0] ]
> //Write the frame number and distance to file. Separated by a
> 'tabulator'
> puts $output "$i\t$distance"
> }
> //Close and clean up everything
> $output close
> $A delete
> $B delete
> unset numframes
> unset output
> --------------------------------------------------------------------------
>
> This is likely to contain a bug or two and may be inefficient.
> It should, at least, get you started.
>
> The whole "how do I write a script" is found in the user guide and in
> several tutorials. If you are using VMD on a day to day basis learning
> to write scripts for VMD should be mandatory.
>
>
> Best regards,
> Bjørnar Jensen
>
> On 2012-11-17 14:33, 肖富贵 wrote:
>
> Hi guys,
> I have 1000 conformations of a protein, and i want to measure the distance
> between two atoms in this protein.
> I know the "measure bond" command can measure the disance of two atoms.
> However, i have 1000 conformations, and i cannot measure each one by one,
> so can anyone tell me how to write a script?
> Best wishes
> Xiao Fugui
>
>
>
>
-- ====================================================================== Thomas Evangelidis PhD student University of Athens Faculty of Pharmacy Department of Pharmaceutical Chemistry Panepistimioupoli-Zografou 157 71 Athens GREECE email: tevang_at_pharm.uoa.gr tevang3_at_gmail.com website: https://sites.google.com/site/thomasevangelidishomepage/
- Next message: Pietro Amodeo: "Re: MD very slow on a 8400M GS laptop (but not on a GT230M one) after NVidia driver update to 304.64 or 310.14"
- Previous message: Bjørnar Jensen: "Re: how to measure the distance of two atoms in 1000 conformations?"
- In reply to: Bjørnar Jensen: "Re: how to measure the distance of two atoms in 1000 conformations?"
- Next in thread: Martin, Erik W: "VMD QMTool"
- Reply: Martin, Erik W: "VMD QMTool"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]