VMD-L Mailing List
From: Axel Kohlmeyer (akohlmey_at_gmail.com)
Date: Wed Mar 19 2014 - 02:34:23 CDT
- Next message: Norman Geist: "AW: Get num. of residues"
- Previous message: spandu K: "Get num. of residues"
- In reply to: spandu K: "Get num. of residues"
- Next in thread: Norman Geist: "AW: Get num. of residues"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
On Wed, Mar 19, 2014 at 2:38 AM, spandu K <spandana.kittiki_at_gmail.com> wrote:
> Dear VMD users,
>
>
> I am a novice reg. VMD. Can anyone help me in finding the total number of
> residues present in a given system.
>
>
> I have tried with molinfo and topo, but could not find anything helpful.
it is printed when you load the molecule. other than that you can
create a selection, retrieve the list of residue numbers and pass it
to lsort -unique and then the length of the list is the number of
residues in that selection, i.e. something like this:
set seltxt {all}
set nres [llength [lsort -unique -integer [[atomselect top $seltxt]
get residue]]]
puts "number of residues for selection '$seltxt' is $nres"
>
>
>
> Thanks
> Spandana
-- Dr. Axel Kohlmeyer akohlmey_at_gmail.com http://goo.gl/1wk0 College of Science & Technology, Temple University, Philadelphia PA, USA International Centre for Theoretical Physics, Trieste. Italy.
- Next message: Norman Geist: "AW: Get num. of residues"
- Previous message: spandu K: "Get num. of residues"
- In reply to: spandu K: "Get num. of residues"
- Next in thread: Norman Geist: "AW: Get num. of residues"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]