VMD-L Mailing List
From: Petrica GASCA (petricag_at_gmail.com)
Date: Tue May 22 2007 - 04:32:36 CDT
- Next message: Axel Kohlmeyer: "Re: show atom number in xyz file"
- Previous message: Claw Isthelaw: "RE: Automatically shutting down VMD after NAMD terminates IMD connection"
- In reply to: John Stone: "Re: show atom number in xyz file"
- Next in thread: Axel Kohlmeyer: "Re: show atom number in xyz file"
- Reply: Axel Kohlmeyer: "Re: show atom number in xyz file"
- Reply: JC Gumbart: "Re: show atom number in xyz file"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Hello,
I am still in the learning phase of VMD, and I am not clear at all what does
it mean a script like you sent. I searched through the manuals to find some
relevant information, but there isn't.
How exactly can I introduce scripts in VMD? Can I save them as files
(where?), and call them by the file name, or do I have to type each line in
the console (which? vmd or tk?) ?
I would really appreciate a tutorial on the scripting possibilities of VMD,
or a few basic informations at least.
Thank you for the help.
On 5/11/07, John Stone <johns_at_ks.uiuc.edu> wrote:
>
>
> Hi,
> If I understand your question correctly, you wish to display the text
> labels
> for all atoms?
>
> If so, you can use a simple script like this one, to add labels
> for any selection you like:
>
> proc label_atoms { molid seltext } {
> set sel [atomselect $molid $seltext]
> set atomlist [$sel list]
> foreach {atom} $atomlist {
> set atomlabel [format "%d/%d" $molid $atom]
> label add Atoms $atomlabel
> }
> $sel delete
> }
>
> You'd call this with something like:
> set molid [molinfo top]
> label_atoms $molid "name CA"
>
> If you want to draw your own text labels for each of the atoms
> (rather than using the built-in labeling feature) you can also
> devise a script that does this, for example:
>
> proc show_partial_charge { selection } {
> set sel [atomselect top $selection]
> foreach q [$sel get charge] pos [$sel get {x y z}] {
> set qstr [format %4.3f $q]
> graphics 0 text $pos $qstr
> }
> }
>
> You'd call this with something like:
> show_partial_charge "residue 0"
>
> You can of course modify this to do anything you like.
>
> John Stone
> vmd_at_ks.uiuc.edu
>
> On Fri, May 11, 2007 at 01:49:10PM +0200, Petrica GASCA wrote:
> > Hello,
> >
> > I am a new user of VMD and I am trying to get used to it on a Linux
> machine.
> > What is really important for my work is to see atom numbers (the index
> field
> > from the Labels window).
> >
> > Is there any possibility to show them as atom labels the same way that
> we
> > can see the name of the atom when we select them manually?
> >
> > Thanks in advance.
>
> --
> NIH Resource for Macromolecular Modeling and Bioinformatics
> Beckman Institute for Advanced Science and Technology
> University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
> Email: johns_at_ks.uiuc.edu Phone: 217-244-3349
> WWW: http://www.ks.uiuc.edu/~johns/ <http://www.ks.uiuc.edu/%7Ejohns/> Fax:
> 217-244-6078
>
- Next message: Axel Kohlmeyer: "Re: show atom number in xyz file"
- Previous message: Claw Isthelaw: "RE: Automatically shutting down VMD after NAMD terminates IMD connection"
- In reply to: John Stone: "Re: show atom number in xyz file"
- Next in thread: Axel Kohlmeyer: "Re: show atom number in xyz file"
- Reply: Axel Kohlmeyer: "Re: show atom number in xyz file"
- Reply: JC Gumbart: "Re: show atom number in xyz file"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]