VMD-L Mailing List
From: Albert (mailmd2011_at_gmail.com)
Date: Thu Nov 19 2015 - 01:46:40 CST
- Next message: Morgan, Brittany: "RE: extract certain part of atoms into separate file"
- Previous message: Lela Vukovic: "Re: loading a several structures in the same time"
- In reply to: Ryan McGreevy: "Re: extract certain part of atoms into separate file"
- Next in thread: Morgan, Brittany: "RE: extract certain part of atoms into separate file"
- Reply: Morgan, Brittany: "RE: extract certain part of atoms into separate file"
- Reply: Ryan McGreevy: "Re: extract certain part of atoms into separate file"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Thanks a lot for the advice.
I tried:
proc split_multi_frame_structure { whichmol workdir } {
set allsel [atomselect $whichmol "all"]
set numframes [molinfo $whichmol get numframes]
for {set i 0} {$i < $numframes} {incr i} {
set allframe [atomselect top "sidechain and resid 390 386 358 361
362 368 200 203 120 121 199 116 117 189 113"]
$allsel frame $i
set filename [format "%s/%03d.pdb" $workdir $i]
file delete $filename
$allsel writepdb $filename
mol new $filename
}
}
It export everything to each .pdb file instead of atoms I selected....
Thanks again
On 11/18/2015 05:26 PM, Ryan McGreevy wrote:
> Your problem is in the line:
>
> $allsel frame $i and get [atomselect top "resname UNK or sidechain
> and resid 390 386 358 361 362 368 200 203 120 121 199 116 117 189 113"]
>
> I assume you are trying to make an atom selection for the current
> frame ($i). In that case, you need to do the following:
>
> set allframe [atomselect top "resname UNK or sidechain
> and resid 390 386 358 361 362 368 200 203 120 121 199 116 117 189 113"]
> $allsel frame $i
>
- Next message: Morgan, Brittany: "RE: extract certain part of atoms into separate file"
- Previous message: Lela Vukovic: "Re: loading a several structures in the same time"
- In reply to: Ryan McGreevy: "Re: extract certain part of atoms into separate file"
- Next in thread: Morgan, Brittany: "RE: extract certain part of atoms into separate file"
- Reply: Morgan, Brittany: "RE: extract certain part of atoms into separate file"
- Reply: Ryan McGreevy: "Re: extract certain part of atoms into separate file"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]