From: John Stone (johns_at_ks.uiuc.edu)
Date: Tue Mar 27 2007 - 13:06:33 CDT

Kara,
  Are the atoms in the structure indexed in the same sequential ordering?
If not, you'll need to add an extra "order" parameter which corrects
the ordering so that the correct atoms are being aligned with each other.
Here's an extremely trivial example (sort of an "identity" matrix if you will,
since the indices were already in the correct order):
  set sel1 [atomselect 0 "index 0 1 2 3 4"]
  set sel2 [atomselect 1 "index 0 1 2 3 4"]
  measure fit $sel1 $sel2 order { 0 1 2 3 4 }

If your problem isn't due to atom ordering, let me know and I'll take a
closer look at what you're doing.

  John Stone
  vmd_at_ks.uiuc.edu

On Tue, Mar 27, 2007 at 10:30:06AM -0700, Kara Di Giorgio wrote:
> I've been trying to do the overlays for quite a few days and keep
> running into a problem.
>
> Good news: I'm entering everything correctly now, so I'm not having
> the same problem. It worked fine for my first structure.
> Bad News: it's overlaying, but 180 degrees from what I need on my
> second structure.
>
> Here's what I'm trying to do:
> I have a series of drug analogs that all have a phenyl ring attached
> (through a CH2) to the main structure. I've made a p-carborane with a
> CH2 attached. I'm trying to align the CH2, the first C of the phenyl
> ring (and one of the neighboring carbons) with the CH2, bottom C of the
> carborane (and a neighboring boron which is approximately in the same
> position as the C of the phenyl ring).
>
> My first analog aligned perfectly (once I got my technique working)
> using 4 atoms to align. My second analog moved the carborane to the
> rough location in space, but the top C of the carborane is where the
> attaching C of the phenyl ring is (ie it's rotated 180 degrees). I
> tried it with 5 atoms and it didn't help. I added an additional atom,
> and that didn't help.
>
> I'm defining the atoms in the [atomselect 1 "index ...."] portion in
> the same order for both molecules. I don't know what else to do.
>
> I know this process is pretty easy in Midas (using Match) however, I
> don't have access to Midas now.
>
> Can anyone help me with this problem? If not, is there any "shareware"
> (or other software free to academics) out there that would make this
> process easier that runs on a Macintosh G4?
>
> Thank you,
>
> Kara Di Giorgio
>
> On Mar 15, 2007, at 9:11 PM, John Stone wrote:
>
> >Yes, you can select atoms with a simple list like you had below.
> >Let us know if you need more help.
> >
> > John
> >
> >On Thu, Mar 15, 2007 at 09:09:28PM -0700, Kara Di Giorgio wrote:
> >>Thank you so much. I saved the coordinates of each as new pdb files
> >>and re-loaded them so I could look at them. Hitting the "=" would
> >>have
> >> been a lot easier.
> >>
> >>Quick question about selections: Can I choose 4-5 atoms by "index 2 3
> >>8 9" instead of a range? The program I'm trying to use next in the
> >>step gets upset if I change the order, which I did so I could get the
> >>atoms I wanted to match in the molecule to be in a continuous series.
> >>
> >>Thanks again.
> >>
> >>Kara Di Giorgio
> >>
> >>On Mar 15, 2007, at 8:50 PM, John Stone wrote:
> >>
> >>>Kara,
> >>> You can reset the display view by pressing the "=" key in the
> >>>OpenGL window, or by selecting Display->Reset view from the main
> >>>window. This should bring your aligned structures back if they moved
> >>>far away.
> >>>
> >>> John Stone
> >>> vmd_at_ks.uiuc.edu
> >>>
> >>>On Thu, Mar 15, 2007 at 08:46:47PM -0700, Kara Di Giorgio wrote:
> >>>>I think I ran into a common problem. I remember reading in another
> >>>>posting that VMD renumbers pdb files (and it had the reasons why).
> >>>>I
> >>>>saved the file as a pdb from VMD, and yep, the numbers had changed.
> >>>>When I used the corrected atom numbers, it didn't give me an error
> >>>>message.
> >>>>
> >>>>However, it moved both molecules out of the window. What is the
> >>>>command to change the viewing area to where the molecules are?
> >>>>
> >>>>Thanks,
> >>>>
> >>>>Kara Di Giorgio
> >>>>
> >>>>On Mar 15, 2007, at 8:16 PM, John Stone wrote:
> >>>>
> >>>>>Try using 5 atoms rather than 4 and let me know if you still
> >>>>>have the problem.
> >>>>>
> >>>>>Thanks,
> >>>>>John Stone
> >>>>>vmd_at_ks.uiuc.edu
> >>>>>
> >>>>>
> >>>>>On Thu, Mar 15, 2007 at 07:16:26PM -0700, Kara Di Giorgio wrote:
> >>>>>>I asked about using VMD to overlay two structures using several
> >>>>>>atoms
> >>>>>>in each molecule. I got a very nice reply from Mikolai Fajer. I
> >>>>>>really appreciated it. I got it to work at the time. However,
> >>>>>>I'm
> >>>>>>trying to use it now and I'm getting odd errors.
> >>>>>>
> >>>>>>I select 4 atoms on each molecule using: set base_original
> >>>>>>[atomselect
> >>>>>>0 "index 2645 to 2648"] and set base_new [atomselect 1 "index 2 to
> >>>>>>5"]
> >>>>>>
> >>>>>>I used set matrix [measure fit $base_new $base_original]
> >>>>>>
> >>>>>>and keep getting told: measure fit: selections must have the same
> >>>>>>number of atoms
> >>>>>>
> >>>>>>I tried to select the atoms one at a time "index 2 3 4 5" etc and
> >>>>>>get
> >>>>>>the same error.
> >>>>>>
> >>>>>>They do. I'm not sure what the problem is. Does anyone have any
> >>>>>>questions?
> >>>>>>
> >>>>>>Thanks
> >>>>>>
> >>>>>>Kara Di Giorgio
> >>>>>>
> >>>>>>p.s. I'm adding the tkconsole info from my attempt:
> >>>>>>
> >>>>>>loading history file ... 48 events added
> >>>>>>Main console display active (Tcl8.4.2 / Tk8.4.2)
> >>>>>>(research) 49 % set base_original [atomselect 0 "index 2645-2648"]
> >>>>>>atomselect: cannot parse selection text: index 2645-2648
> >>>>>>>Main< (research) 50 % set base_original [atomselect 0 "index 2645
> >>>>>>>to
> >>>>>>2648"]
> >>>>>>atomselect0
> >>>>>>>Main< (research) 51 % set base_new [atomselect 1 "index 2 to 5"]
> >>>>>>atomselect1
> >>>>>>>Main< (research) 52 % set matrix [measure fit $base_new
> >>>>>>>$base_original]
> >>>>>>measure fit: selections must have the same number of atoms
> >>>>>>>Main< (research) 53 % set base_ala [atomselect 0 "index 2645 2646
> >>>>>>>2647
> >>>>>>2648"]
> >>>>>>atomselect2
> >>>>>>>Main< (research) 54 % set base_pca [atomselect 1 "index 2 3 4 5"]
> >>>>>>atomselect3
> >>>>>>>Main< (research) 55 % set matrix [measure fit $base_ala
> >>>>>>>$base_pca]
> >>>>>>measure fit: selections must have the same number of atoms
> >>>>>>>Main< (research) 56 %
> >>>>>
> >>>>>--
> >>>>>NIH Resource for Macromolecular Modeling and Bioinformatics
> >>>>>Beckman Institute for Advanced Science and Technology
> >>>>>University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
> >>>>>Email: johns_at_ks.uiuc.edu Phone: 217-244-3349
> >>>>>WWW: http://www.ks.uiuc.edu/~johns/ Fax: 217-244-6078
> >>>>>
> >>>
> >>>--
> >>>NIH Resource for Macromolecular Modeling and Bioinformatics
> >>>Beckman Institute for Advanced Science and Technology
> >>>University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
> >>>Email: johns_at_ks.uiuc.edu Phone: 217-244-3349
> >>> WWW: http://www.ks.uiuc.edu/~johns/ Fax: 217-244-6078
> >>>
> >
> >--
> >NIH Resource for Macromolecular Modeling and Bioinformatics
> >Beckman Institute for Advanced Science and Technology
> >University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
> >Email: johns_at_ks.uiuc.edu Phone: 217-244-3349
> > WWW: http://www.ks.uiuc.edu/~johns/ Fax: 217-244-6078
> >

-- 
NIH Resource for Macromolecular Modeling and Bioinformatics
Beckman Institute for Advanced Science and Technology
University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
Email: johns_at_ks.uiuc.edu                 Phone: 217-244-3349
  WWW: http://www.ks.uiuc.edu/~johns/      Fax: 217-244-6078