VMD-L Mailing List
From: Maxim Belkin (mbelkin_at_ks.uiuc.edu)
Date: Fri Feb 13 2015 - 05:33:27 CST
- Next message: John Stone: "Re: Feature request: read environment to set FreeVR lib, include paths"
- Previous message: Sourav Ray: "Extracting coordinates from DCD file to a single PDB file"
- In reply to: Sourav Ray: "Extracting coordinates from DCD file to a single PDB file"
- Next in thread: Sourav Ray: "Re: Extracting coordinates from DCD file to a single PDB file"
- Reply: Sourav Ray: "Re: Extracting coordinates from DCD file to a single PDB file"
- Maybe reply: Sourav Ray: "Re: Extracting coordinates from DCD file to a single PDB file"
- Maybe reply: Sourav Ray: "Re: Extracting coordinates from DCD file to a single PDB file"
- Maybe reply: Sourav Ray: "Re: Extracting coordinates from DCD file to a single PDB file"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
set nf [molinfo top get numframes]
set sel [atomselect top "protein"]
for {set i 0} {$i < $nf} {incr i} {
$sel frame $i
$sel writepdb “protein-$i.pdb”
}
$sel delete
mol delete top
If there are multiple proteins use more specific selection text, e.g. use resids or something else.
Maxim
> On Feb 13, 2015, at 04:09, Sourav Ray <souravray90_at_gmail.com> wrote:
>
> Hello
>
> I have been trying to extract all the frames of a protein into a single PDB file. There is a code available currently in a thread here for extracting each frame in different PDB files:
>
> set nf [molinfo top get numframes]
>
> for { set i 0 } {$i < $nf } { incr i } {
> set sel [atomselect top protein frame $i]
> $sel writepdb $i.pdb
> }
>
> Can someone please suggest a modification that works? Also, what if there are multiple proteins? Can we extract each one separately?
>
> Regards
> Sourav
- Next message: John Stone: "Re: Feature request: read environment to set FreeVR lib, include paths"
- Previous message: Sourav Ray: "Extracting coordinates from DCD file to a single PDB file"
- In reply to: Sourav Ray: "Extracting coordinates from DCD file to a single PDB file"
- Next in thread: Sourav Ray: "Re: Extracting coordinates from DCD file to a single PDB file"
- Reply: Sourav Ray: "Re: Extracting coordinates from DCD file to a single PDB file"
- Maybe reply: Sourav Ray: "Re: Extracting coordinates from DCD file to a single PDB file"
- Maybe reply: Sourav Ray: "Re: Extracting coordinates from DCD file to a single PDB file"
- Maybe reply: Sourav Ray: "Re: Extracting coordinates from DCD file to a single PDB file"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]