From: Axel Kohlmeyer (akohlmey_at_gmail.com)
Date: Fri Oct 21 2011 - 13:07:16 CDT

On Fri, Oct 21, 2011 at 1:10 PM, bio lab <biolabcs_at_gmail.com> wrote:
> Thanks a lot!!!
>
> The flag "order" is exactly what I was looking for, and indeed it is
> documented in the manual. My bad.
>
> I still consider a bug the fact that three unaligned atoms are not
> sufficient for a precise rototranslation (from a mathematical point of view,

they do and VMD's measure fit code has special case
treatment for 1-atom (simple translation) and 2/3 atom
alignments, for anything lager a different algorithm is
used that requires at least 4 atoms.

cheers,
   axel.

> they should), but this definitely can be worked around with little effort.
> Your suggestion about using three virtual atoms is also useful in the
> general case, although in my specific example it wouldn't make any practical
> difference.
>
> Thanks again and all the best.
>
>
> P.S. Sorry for the double mail to JCG, I was under the impression that he
> replied me only in private.
>
>
>
> 2011/10/21 JC Gumbart <gumbart_at_ks.uiuc.edu>
>>
>> I think three atoms are not enough for a fit.  Maybe using fictitious
>> atoms is a sufficient solution, although I would add one additional atom for
>> each of the three (so six in total) to properly weight it.
>>
>>  Also, VMD uses the indices to pair atoms in a fit, meaning that C4 - C5 -
>> C6 would be made to match with CAT-CBA-CAU, as you have found.  To
>> circumvent this, you need to use the flag "order" with the measure fit
>> command.  I believe this is documented in the VMD manual.
>>
>> On Oct 20, 2011, at 6:25 AM, bio lab wrote:
>>
>> > I am having trouble performing a very simple task in VMD: superimposing
>> > two molecules (hereafter called Label-capric and Capric) so that three atoms
>> > of the first molecule (called CAU CBA CAT) will correspond with three atoms
>> > of the second molecule (called C4 C5 C6).
>> >
>> > Both molecules are given below as pdb files (the first one is a
>> > spin-labeled capric acid created with Prodrg, the second one is a capric
>> > acid in all-trans conformation). The script I am using to superimpose them
>> > is also given below, and run in TK console with the command "source
>> > script.txt".
>> >
>> > 1. The first problem I see is that the script reported below *does not*
>> > superimpose the two groups of three atoms. I know that I could not expect
>> > the two groups to be exactly clashing, but I cannot believe that it is not
>> > possible to having them closer than several angstroms apart. Both CAU CBA
>> > CAT and C4 C5 C6 atoms are not aligned (i.e., there is no linear dependence
>> > in their positions) and their geometry is very similar, so they should end
>> > up being almost coinciding. I suspect there is a bug somewhere in VMD in
>> > superimposing groups of three atoms each.
>> >
>> > 2. Applying again and again the *same* script does not give again the
>> > same result. The two molecules end up being in different reciprocal
>> > positions, and usually very far away from each other. This is clearly a bug,
>> > and probably a different manifestation of the bug above. One way to
>> > workaround it (I do it, and VMD could do it internally as well) is to add in
>> > Label-capric a fictitious atom XXX with the same position as CBA and in
>> > Capric a fictitious atom YYY with the same position as C5. So now the
>> > superposition will be among *four* atoms ("name CAU CBA CAT XXX" and "name
>> > C4 C5 C6 YYY") and will make the two groups coincide almost exactly. But
>> > this lead to the last bug...
>> >
>> > 3. After running the script the two groups coincide as a whole, but
>> > there is no *direct* correspondence among the atoms. In other words, what is
>> > obtained is *not* a superposition CAU<->C4, CBA<->C5, CAT<->C6 (and
>> > XXX<->YYY). Instead, what is obtained is CAU<->C6, CBA<->C5, CAT<->C4. There
>> > is no way for me to change it, even selecting the atoms in a different order
>> > ("name CAU CBA CAT XXX" and "name C6 C5 C4 YYY" gives the same result). So I
>> > think this is a second (or maybe third) bug, and I cannot workaround it in
>> > any way.
>> >
>> > Any suggestion? Thanks in advance for your attention.
>> >
>> >
>> >
>> >
>> > ----- Label-capric.pdb -----
>> > HETATM    9  CAN DRG     1       5.910  20.490  -9.640  1.00 20.00
>> >       C
>> > HETATM   10  CAO DRG     1       5.520  19.360 -10.610  1.00 20.00
>> >       C
>> > HETATM   11  CAP DRG     1       4.840  18.140  -9.950  1.00 20.00
>> >       C
>> > HETATM   12  CAQ DRG     1       3.410  18.340  -9.450  1.00 20.00
>> >       C
>> > HETATM   13  CAT DRG     1       2.400  18.610 -10.580  1.00 20.00
>> >       C
>> > HETATM   14  CBA DRG     1       0.930  18.760 -10.120  1.00 20.00
>> >       C
>> > HETATM   15  CAU DRG     1       0.440  17.420  -9.520  1.00 20.00
>> >       C
>> > HETATM   16  CAR DRG     1      -0.980  17.380  -8.950  1.00 20.00
>> >       C
>> > HETATM   17  CAS DRG     1      -2.040  17.070 -10.010  1.00 20.00
>> >       C
>> > HETATM   18  CAX DRG     1      -3.450  17.240  -9.440  1.00 20.00
>> >       C
>> > HETATM   19  OAF DRG     1      -4.020  16.210  -9.010  1.00 20.00
>> >       O
>> > HETATM   20  OAD DRG     1      -3.920  18.400  -9.440  1.00 20.00
>> >       O
>> > HETATM   21  OAW DRG     1       0.790  19.820  -9.130  1.00 20.00
>> >       O
>> > HETATM   22  CAV DRG     1       0.660  21.050  -9.890  1.00 20.00
>> >       C
>> > HETATM   23  CAZ DRG     1      -0.270  20.680 -11.030  1.00 20.00
>> >       C
>> > HETATM   24  CAB DRG     1      -1.730  20.860 -10.630  1.00 20.00
>> >       C
>> > HETATM   25  CAC DRG     1       0.070  21.540 -12.250  1.00 20.00
>> >       C
>> > HETATM   26  NAY DRG     1       0.110  19.260 -11.250  1.00 20.00
>> >       N
>> > HETATM   27  OAE DRG     1      -0.270  18.480 -12.380  1.00 20.00
>> >       O
>> > -----
>> > ----- Capric.pdb -----
>> > HETATM    1  C1  STE     1     -10.027   1.729   0.294
>> > HETATM    2  O1  STE     1     -11.344   1.353   0.296
>> > HETATM    3  O2  STE     1      -9.683   3.095   0.360
>> > HETATM    4  C2  STE     1      -8.931   0.669   0.221
>> > HETATM    5  C3  STE     1      -7.565   1.348   0.234
>> > HETATM    6  C4  STE     1      -6.469   0.288   0.160
>> > HETATM    7  C5  STE     1      -5.103   0.967   0.174
>> > HETATM    8  C6  STE     1      -4.007  -0.092   0.100
>> > HETATM    9  C7  STE     1      -2.641   0.587   0.114
>> > HETATM   10  C8  STE     1      -1.545  -0.473   0.040
>> > HETATM   11  C9  STE     1      -0.179   0.206   0.053
>> > HETATM   12  C10 STE     1       0.917  -0.854  -0.020
>> > -----
>> > ----- script.txt -----
>> > set atomsel0 [atomselect 0 "name CAU CBA CAT"]
>> > set atomsel1 [atomselect 1 "name C4 C5 C6"]
>> > set M1 [measure fit $atomsel1 $atomsel0]
>> > set move1 [atomselect 1 "all"]
>> > $move1 move $M1
>> > -----
>> >
>>
>
>

-- 
Dr. Axel Kohlmeyer
akohlmey_at_gmail.com  http://goo.gl/1wk0
Institute for Computational Molecular Science
Temple University, Philadelphia PA, USA.