VMD-L Mailing List
From: l.spitzer_at_fr.fournierpharma.com
Date: Thu Nov 17 2005 - 04:50:45 CST
- Next message: rossi_at_york.cuny.edu: "Use VMD Primitives to Construct Stilized Cyclodextrins"
- Previous message: Nuno R. L. Ferreira: "Re: Re: Réf. : calculate rmsd in a loop:feedback [sorry if you get it twice]"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Re-Hi! :-p
You should add quotes after your "puts" command (like puts "RMSD of $i $j
is $rmsd" ).
Then I just saw a little problem you may have : the first molecule loaded
in VMD has number 0, and you begin your sel1 with [atomselect $i
"backbone"] where i=1...so the first RMSD cannot be calculated, as you do
your selection with an un-existing protein...(it begins with [atomselect 1
"backbone"] and the molecule 1 doesn't exist...the first loaded molecule is
molecule 0!) do you see what I mean?
So you should begin your loop with set i 0...if you have a pro_0.pdb that
exists!!
At last, for your "set j i+1" you should better do something like "set j
[expr $i+1]" as it is a arithmetic expression.
Hope it will help you,
Regards,
Luc
andrea spitaleri
<spitaleri.andrea Pour : vmd-l_at_ks.uiuc.edu
@hsr.it> cc :
Envoyé par : Objet : vmd-l: Re: Réf. : vmd-l: calculate rmsd in a loop:feedback [sorry if you get
owner-vmd-l_at_ks.ui it twice]
uc.edu
17/11/2005 11:14
Hi all,
thanks for your quick replies. Yes Luc, you are right! I forgot some $.
I changed in :
proc calculate_rmsd {}{
for { set i 1 } { $i < 100 } { incr i } {
# pro is the root of the name of my structures
mol load pdb pro_$i.pdb
set sel1 [atomselect $i "backbone"]
for { set j i+1 } { $j < 100 } { incr j } {
mol load pdb pro_$j.pdb
set sel2 [atomselect $j "backbone"]
set rmsd [measure rmsd $sel1 $sel2]
puts RMSD of $i $j is $rmsd
}
}
}
and it loops but it doesn't print the rms, just info>. At the end it says:
invalid command name "}"
not clear where...at least to me :)
I am not quite convinced on the lines set sel1 [atomselect $j "backbone"]
Regards,
andrea
l.spitzer_at_fr.fournierpharma.com wrote:
Hi Andrea!
I am not a specialist in vmd-tcl programming but I think there are a
few
problem in your script :
first, this line : mol load pdb pro_i.pdb shouldn't you add a "$"
before
"i"?
Then, when you do your first selection ($sel1), you don't precise the
name
of the molecule on which you do the selection (set sel1 [atomselect
"backbone"]).
Then, when you initialize your "sel2" variable, what do you use as a
protein? I mean, you have : "set sel2 [atomselect j "backbone"]", it
means
you select atoms from "j" where j is a number, not a molecule!
shouldn't
you first load the molecule "pro_$j.pdb" as you do with your "sel1" ?
Do
you understand what I mean?
To answer your question, I think you may use VMD without the GUI to
launch
your script, using command "vmd -dispdev text" in your shell, so you
won't
have the GUI.
I hope this will help you,
Regards,
Luc SPITZER
andrea spitaleri
<spitaleri.andrea Pour :
vmd-l_at_ks.uiuc.edu
@hsr.it> cc :
Envoyé par : Objet : vmd-l:
calculate rmsd in a loop:feedback [sorry if you get it twice]
owner-vmd-l_at_ks.ui
uc.edu
17/11/2005 09:50
Hi all,
first this is my first script in tcl/vmd and I need of course
feedback.
I have 100 structures and I want to calculate the rmsd in a such way:
structure_1 structure_2 rmsd
1 2 rmsd12
1 3 rmsd13
1 4 rmsd14
.......
1 100 rmsd1100
2 3 rmsd23
2 4 rmsd24
.....
and so on.
Below there is a script but it does not work properly. Could someone
help me to understand what is wrong in it. Second, to run it, do I
need
to run in vmd console or can I run in a shell like vmd -script
script,without gui ?
proc calculate_rmsd {}{
for { set i 1 } { $i < 100 } { incr i } {
# pro is the root of the name of my structures
mol load pdb pro_i.pdb
set sel1 [atomselect "backbone"]
for { set j i+1 } { $j < 100 } { incr j } {
set sel2 [atomselect j "backbone"]
set rmsd [measure rmsd $sel1 $sel2]
puts RMSD of $i $j is $rmsd
}
Thanks
Regards,
andrea
--
-------------------------------
Andrea Spitaleri
Dulbecco Telethon Institute
c/o DIBIT Scientific Institute
Biomolecular NMR, 1B4
Via Olgettina 58
20132 Milano (Italy)
Get Firefox!
-------------------------------
-- ------------------------------- Andrea Spitaleri Dulbecco Telethon Institute c/o DIBIT Scientific Institute Biomolecular NMR, 1B4 Via Olgettina 58 20132 Milano (Italy) Get Firefox! -------------------------------
- Next message: rossi_at_york.cuny.edu: "Use VMD Primitives to Construct Stilized Cyclodextrins"
- Previous message: Nuno R. L. Ferreira: "Re: Re: Réf. : calculate rmsd in a loop:feedback [sorry if you get it twice]"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]