VMD-L Mailing List
From: Ashar Malik (asharjm_at_gmail.com)
Date: Tue Dec 19 2017 - 06:20:48 CST
- Next message: Giacomo Fiorin: "Re: Using python interpreter with VMD"
- Previous message: 本村肇: "Re: How can I measure bond length with Q=80=9Cname_**_and_resid_**=22_in_scripts=3F?="
- In reply to: 本村肇: "Re: How can I measure bond length with Q=80=9Cname_**_and_resid_**=22_in_scripts=3F?="
- Next in thread: Vermaas, Joshua: "Re: Re: Re: How can I measure bond length with $B!H(Bname ** and resid **" in scripts?"
- Reply: Vermaas, Joshua: "Re: Re: Re: How can I measure bond length with $B!H(Bname ** and resid **" in scripts?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Now $sel1 and $sel2 are the selections. But the documentation of the
measure bond says:
The atoms are specified in form of a list of atom indexes
Not selections of atom themselves. So you need to get the index of the
atoms.
You can do this:
set seltext1 "name CG and resid 26"
set sel1 [[atomselect top "$seltext1"] get index]
set seltext2 "name CG and resid 30"
set sel2 [[atomselect top "$seltext2"] get index]
measure bond [list $sel1 $sel2]
I am not sure since I haven't tried this - but it shoudl theoretically
work.
On Tue, Dec 19, 2017 at 10:03 PM, 本村肇 <h-motomura_at_bioreg.kyushu-u.ac.jp>
wrote:
> I am sorry, I corrected my script.
>
> vmd > set seltext1 "name CG and resid 26"
> vmd > set sel1 [atomselect top "$seltext1"]
> vmd > set seltext2 "name CG and resid 30"
> vmd > set sel2 [atomselect top "$seltext2"]
> vmd > measure bond {$sel1 $sel2}
> expected integer but got "$sel1" measure bond: bad atom index
>
> > 2017/12/19 17:42、Ashar Malik <asharjm_at_gmail.com>のメール:
> >
> > I didn't have a detailed look at this but
> >
> > vmd > set seltext1 "name CG and resid 26”
> > vmd > set seltext2 "name CG and resid 30”
> > vmd > measure bond {$sel1 $sel2}
> >
> > what is $sel1 and $sel2???
> >
> > your selections are called seltext1 and seltext2 not sel1 and sel2.
> >
> > On Tue, Dec 19, 2017 at 8:56 PM, 本村肇 <h-motomura_at_bioreg.kyushu-u.ac.jp>
> wrote:
> > Dear all,
> >
> > I would like to measure bond length with “name ** and resid **” in
> scripts.
> >
> > vmd > set seltext1 "name CG and resid 26”
> > vmd > set seltext2 "name CG and resid 30”
> > vmd > measure bond {$sel1 $sel2}
> > expected integer but got "$sel1" measure bond: bad atom index
> >
> > However the following command succeed.
> > vmd > measure bond {113 140}
> > 11.772942543029785
> >
> > I configured that the above atoms existed.
> > How can I measure bond length with “name ** and resid **" in scripts?
> >
> > Sincerely,
> > Hajime Motomura
> >
> >
> >
> >
> > --
> > Best,
> > /A
>
>
>
-- Best, /A
- Next message: Giacomo Fiorin: "Re: Using python interpreter with VMD"
- Previous message: 本村肇: "Re: How can I measure bond length with Q=80=9Cname_**_and_resid_**=22_in_scripts=3F?="
- In reply to: 本村肇: "Re: How can I measure bond length with Q=80=9Cname_**_and_resid_**=22_in_scripts=3F?="
- Next in thread: Vermaas, Joshua: "Re: Re: Re: How can I measure bond length with $B!H(Bname ** and resid **" in scripts?"
- Reply: Vermaas, Joshua: "Re: Re: Re: How can I measure bond length with $B!H(Bname ** and resid **" in scripts?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]