From: Peter Mawanga (peter.mawanga.lagos_at_gmail.com)
Date: Wed Mar 21 2018 - 12:27:40 CDT

Hello Ashar

I think this problem (M^2=I) could be overcome if the rotations and
translations are done individually? I have posted another query in this
forum regarding the same. Please have a look as feasible.

On Wed, Mar 21, 2018 at 2:06 PM, Peter Mawanga <
peter.mawanga.lagos_at_gmail.com> wrote:

> Hello Ashar
>
> I was running the tests with "LFcin P-20" peptide. This time I used Hex
> program instead and docked the peptide to itself (i.e. both ligand and
> receptor are the same peptide with same conformation).
>
> The transformation matrix for ligand (receptor is fixed/stationary):
>
> -8.055069e-01 1.664229e-01 5.687372e-01 6.593901e+01
> 2.020147e-01 9.793824e-01 -4.700835e-04 -1.096723e+01
> -5.570895e-01 1.145146e-01 -8.225191e-01 -3.810996e+00
> 0.000000e+00 0.000000e+00 0.000000e+00 1.000000e+00
>
> This matrix could be obtained from VMD too with "measure fit" command and
> with backbones of the receptor and ligand selected.
>
> I would like to add the next monomer to the complex (after ligand) such
> that the receptor-ligand docking pattern propagates further, as shown in
> the paper. Most probably it would form a ring structure, as per the current
> docking observation.
>
> Please find the receptor, ligand and complex PDB coordinate files attached
> below.
>
> On Wed, Mar 21, 2018 at 11:46 AM, Ashar Malik <asharjm_at_gmail.com> wrote:
>
>> Hi Peter,
>>
>> I originally thought of writing a very long reply, but decided that it
>> would be easier to just ask you if you could give me the structure that you
>> are working with and how you want to "propagate" it and I will do it for
>> you and explain how I did it. The process is quite trivial and explaining
>> it is just going to exchange a lot of emails between us. So if you give me
>> the structure it will save time.
>>
>> Best,
>> /A
>>
>>
>> On Wed, Mar 21, 2018 at 7:22 AM, Peter Mawanga <
>> peter.mawanga.lagos_at_gmail.com> wrote:
>>
>>> Hello Ashar
>>>
>>> After docking the same peptide conformer to itself, the authors of the
>>> paper tried to add more copies of the conformer using the same (not sure
>>> about that!) rotational and translation parameters represented by the 3D
>>> matrix. I am getting the same exact values upon using "measure fit" command
>>> in VMD. The slight difference after second transformation might be an
>>> artefact of decimal precision (in my opinion).
>>>
>>> My aim was to get propagating amyloid fibrils as mentioned in the study.
>>> Maybe I am missing some matrix operation in between.
>>>
>>> On Tue, Mar 20, 2018 at 10:45 PM, Ashar Malik <asharjm_at_gmail.com> wrote:
>>>
>>>> So I did a quick test with the matrix you have provided. It turns out
>>>> that the matrix you have provided is supposed to give the result you are
>>>> getting.
>>>>
>>>> So the first time you multiply it, it will generate a transformation
>>>> ds1 and the second time it will take you back to the parent structure
>>>> (almost). It doesn't recover the exact structure but it is quite close.
>>>>
>>>> It is very likely that the program that generated this transformation
>>>> matrix did this on purpose (or it just happened by chance???) so the
>>>> operation would become order free (this is my thought and might be
>>>> completely wrong). Meaning it didn't matter which structure you applied the
>>>> matrix to, you would get the other structure. So e.g. if you had applied it
>>>> to the initial conformation you obtain the final one and applying it to the
>>>> final would return the initial.
>>>>
>>>> If you want the parent structure to undergo a certain transformation
>>>> and for all subsequent iterations to be replicas of that - you should
>>>> perhaps compute the transformation that does that (which the current one
>>>> doesn't).
>>>>
>>>> However, I think that is not what you want to do. Having a quick skim
>>>> of the paper attached, they applied the transformation to a structure just
>>>> once. It appears (i think) that they used different conformers 1 selected
>>>> from each of the clusters and applied the transformation once so that it
>>>> comes to a position next to the dimer (i think).
>>>>
>>>> You however are applying the same transformation twice? Why?
>>>>
>>>> On Wed, Mar 21, 2018 at 4:17 AM, Peter Mawanga <
>>>> peter.mawanga.lagos_at_gmail.com> wrote:
>>>>
>>>>> Hello Ashar
>>>>>
>>>>> Thanks for the quick revert. I am first doing rotation along three
>>>>> Euler angles (denoted by 3 x 3 matrix excluding the 4th row and column) and
>>>>> then applying the translation along xyz axes (4th column entries). Please
>>>>> find the matrix below.
>>>>>
>>>>> -8.260116e-01 -3.044969e-01 -4.743274e-01 5.280182e+01
>>>>> -3.042386e-01 -4.675523e-01 8.299601e-01 8.201990e+00
>>>>> -4.744932e-01 8.298653e-01 2.935639e-01 1.421723e+01
>>>>> 0.000000e+00 0.000000e+00 0.000000e+00 1.000000e+00
>>>>>
>>>>> The structure is a small peptide (20 residues long) used as a test. I
>>>>> got the transformation matrix by comparing the initial and final
>>>>> coordinates obtained from a docking server.
>>>>>
>>>>> Yes, I am still trying to perform the same operation i.e. do multiple
>>>>> transformations. I have attached a representative image below that denotes
>>>>> my objective.
>>>>>
>>>>>
>>>>> On Tue, Mar 20, 2018 at 8:30 PM, Ashar Malik <asharjm_at_gmail.com>
>>>>> wrote:
>>>>>
>>>>>> Your transformation matrix was calculated for a certain angle of
>>>>>> rotation. Right? What is that angle?
>>>>>> If the angle was say 180 degrees than 2 rotations will bring the
>>>>>> structure back to its starting point.
>>>>>>
>>>>>> What is the structure that you are working with? Is it a protein?
>>>>>> something symmetric?
>>>>>>
>>>>>> Are you still trying to do the same thing as before? By before I mean
>>>>>> when you question was originally answered?
>>>>>>
>>>>>> On Wed, Mar 21, 2018 at 3:29 AM, Peter Mawanga <
>>>>>> peter.mawanga.lagos_at_gmail.com> wrote:
>>>>>>
>>>>>>> Hello VMD users
>>>>>>>
>>>>>>> I want to apply a 4*4 Quaternion Transformation Matrix "M" to a set
>>>>>>> of PDB coordinates to get propagating structures.
>>>>>>>
>>>>>>> Upon applying the matrix M successively to the PDB coordinates, I
>>>>>>> don't get propagating structures. But instead get back to the starting
>>>>>>> coordinates after second successive transformation.
>>>>>>>
>>>>>>> The first transformation works well and gives me a dataset "ds2".
>>>>>>> However, upon applying the transformation matrix M to ds2, I get back to
>>>>>>> the original dataset "ds1", instead of a distinct dataset "ds3".
>>>>>>>
>>>>>>> Is there any way of escaping this? Please check the text and link
>>>>>>> given below:
>>>>>>>
>>>>>>> "Then we consecutively docked to each of the dimers additional
>>>>>>> copies of the centroid (one at a time) with docking rotation and
>>>>>>> translation parameters, as were used in the initial docking complex
>>>>>>> configuration selected by the Hex program, to extend the dimers. This
>>>>>>> procedure used three-dimensional (3D) transformation matrices that were
>>>>>>> preliminarily calculated for each of the starting dimers."
>>>>>>>
>>>>>>> https://content.iospress.com/download/journal-of-alzheimers-
>>>>>>> disease/jad131589?id=journal-of-alzheimers-disease%2Fjad131589
>>>>>>>
>>>>>>>
>>>>>>> Forwarded conversation
>>>>>>> Subject: vmd-l: Writing all transformed coordinates into single file
>>>>>>> ------------------------
>>>>>>>
>>>>>>> From: Peter Mawanga <peter.mawanga.lagos_at_gmail.com>
>>>>>>> Date: Thu, Mar 15, 2018 at 12:53 AM
>>>>>>> To: Vmd l <vmd-l_at_ks.uiuc.edu>
>>>>>>>
>>>>>>>
>>>>>>> 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
>>>>>>>
>>>>>>> ----------
>>>>>>> From: Vermaas, Joshua <Joshua.Vermaas_at_nrel.gov>
>>>>>>> Date: Thu, Mar 15, 2018 at 2:21 AM
>>>>>>> To: Peter Mawanga <peter.mawanga.lagos_at_gmail.com>, Vmd l <
>>>>>>> vmd-l_at_ks.uiuc.edu>
>>>>>>>
>>>>>>>
>>>>>>> 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
>>>>>>>
>>>>>>> ----------
>>>>>>> From: Peter Mawanga <peter.mawanga.lagos_at_gmail.com>
>>>>>>> Date: Thu, Mar 15, 2018 at 6:05 PM
>>>>>>> To: "Vermaas, Joshua" <Joshua.Vermaas_at_nrel.gov>
>>>>>>> Cc: Vmd l <vmd-l_at_ks.uiuc.edu>
>>>>>>>
>>>>>>>
>>>>>>> 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.
>>>>>>>
>>>>>>> --
>>>>>>> Cheers
>>>>>>> Peter
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Cheers
>>>>>>> Peter
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Best,
>>>>>> /A
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Cheers
>>>>> Peter
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Best,
>>>> /A
>>>>
>>>
>>>
>>>
>>> --
>>> Cheers
>>> Peter
>>>
>>
>>
>>
>> --
>> Best,
>> /A
>>
>
>
>
> --
> Cheers
> Peter
>

-- 
Cheers
Peter