VMD-L Mailing List
From: Peter Freddolino (petefred_at_ks.uiuc.edu)
Date: Tue Feb 06 2007 - 11:12:11 CST
- Next message: Esther Brugger: "H-Bond display in VMD"
- Previous message: namd vmd: "splitting segments"
- In reply to: namd vmd: "splitting segments"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
You can use a loop like the following:
set sel [atomselect top water]
set segnames [lsort -unique [$sel get segname]]
$sel delete
foreach segname $segnames {
set sel [atomselect top "segname $segname"]
$sel writepdb wat-$segname.pdb
$sel delete
}
Here you're getting a list of all the water segments, and then writing
each in turn.
Peter
namd vmd wrote:
> Hello !
>
> Solvation of my protein results in a large number of water segments.
> Can I write a pdb separately for each segment using some vmd commands
> (I do not want to use awk or grep)
>
> Thank you !
>
> Rose
>
- Next message: Esther Brugger: "H-Bond display in VMD"
- Previous message: namd vmd: "splitting segments"
- In reply to: namd vmd: "splitting segments"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]