VMD-L Mailing List
From: Peter Mawanga (peter.mawanga.lagos_at_gmail.com)
Date: Thu Mar 15 2018 - 07:35:36 CDT
- Next message: Giacomo Fiorin: "Re: Query for the VolMap plugin"
- Previous message: Saikat Pal: "Query for the VolMap plugin"
- In reply to: Vermaas, Joshua: "Re: Writing all transformed coordinates into single file"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Hello Josh
Thanks a lot! Yes what you have written is the case. I had never used "dup"
before. The above command works except:
animate dup frame [expr {$i-1}] top
Needs to be replaced with:
animate dup frame [expr {$i-1}] <molID>
I then replaced all the "END" keywords in the output PDB file with "TER";
as I want to view all of the transformations together.
On Thu, Mar 15, 2018 at 2:21 AM, Vermaas, Joshua <Joshua.Vermaas_at_nrel.gov>
wrote:
> Hi Peter,
>
> If I understand this correctly, you start from one molecule loaded with a
> single frame, apply a single transformation matrix n times, and end up with
> n+1 total frames written out to some file. If so, you just need to call
> "animate dup" at the appropriate time, making your script look like this:
>
>
> set sel [atomselect top all]
> set matrix {<4 * 4 transformation matrix>}
> set n {10}
>
> for {set i 1} {$i <= $n} {incr i} {
> animate dup frame [expr {$i-1}] top
> $sel frame $i
> $sel move $matrix
> }
> animate write pdb $i.pdb
> $sel delete
>
>
> The other (slower) alternative is to load your initial pdb multiple times
> until you have as many frames as you need, and then apply your
> transformation successively.
>
> -Josh
>
> On 03/14/2018 02:43 PM, Peter Mawanga wrote:
> Dear VMD users
>
> I am trying to apply a transformation matrix successively to a set of pdb
> coordinates and save the coordinates after each transformation into a
> single pdb file. I have been able to write the coordinates separately to
> multiple files though. My code (attempt) is given below:
>
> set sel [atomselect top all]
> set matrix {<4 * 4 transformation matrix>}
> set n {10}
>
> for {set i 0} {$i < $n} {incr i} {
> animate write pdb $i.pdb
> $sel move $matrix
> $sel update
> }
>
> $sel delete
>
> The "beg <first frame> end <last frame>" could not be applied in this
> case, since only one frame is involved. Kindly let me know your suggestions.
>
> --
> Cheers
> Peter
>
>
-- Cheers Peter
- Next message: Giacomo Fiorin: "Re: Query for the VolMap plugin"
- Previous message: Saikat Pal: "Query for the VolMap plugin"
- In reply to: Vermaas, Joshua: "Re: Writing all transformed coordinates into single file"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]