From: Josh Vermaas (
Date: Tue Mar 04 2014 - 13:01:17 CST

Hi Dawid,

I'm assuming you want the whole structure to be aligned based on a
subset. So you'd have 3 selections:
ref = atomselection of the part of the reference molecule you want to do
the alignment based on
sel = atomselection of the part of the new molecule that is comparable
to ref
all = atomselection of the whole new molecule (since you move the whole
molecule, not just a small part of it.)
So you'd do the movement on the all selection, ie:
set all [atomselect top "all"]
$all move [measure fit $sel $ref] ; #Does the movement.


On 03/04/2014 11:31 AM, Dawid das wrote:
> Hi Josh,
> Firstly, thank you all for clues. I really appreciate it.
> However I don't know if I understood Josh correctly. I made an
> atomselections
> for reference and sel easily but I have no idea how to make atomselection
> for all molecules (except for reference one), because that is what I
> actually
> want to do and this is what you explained, right?
> 2014-03-03 23:27 GMT+01:00 Josh Vermaas <
> <>>:
> Hi Dawid,
> Sure. Just write a script/use the RMSD trajectory tool. Since you
> are dealing with 50 structures, and loading them by hand is a
> pain, I'd use the Tcl scripting interface (it will save you alot
> of trouble later on). The script would:
> Load the reference structure
> Make some atomselection that will be your reference (ref)
> Make a loop over the 50 others{
> Load the new structure
> Make an atomselection that is the same size as the reference
> selection (sel)
> Make an atomselection that includes the whole structure (all)
> $all move [measure fit $sel $ref] ; #Does the movement.
> Save the new coordinates to a new file
> Cleanup (delete atomselections made inside the loop, possibly
> delete the molecule too)
> }
> Be happy.
> To implement this, you should familiarize yourself with the "mol"
> and "atomselect" commands
> (, the
> exact structure and contents of which will change depending on how
> you setup the files/what features of the system are interesting to
> you.
> Good luck!
> -Josh Vermaas
> On 03/03/2014 03:25 PM, Dawid das wrote:
>> Dear vmd specialists,
>> I want to do following thing.
>> Let's say I have a reference structure and 50 others.
>> Now I want to align those 50 on the reference structure.
>> When I do it I want to save new xyz coordinates for 50
>> transformed structures. Is it possible at all?
>> How do I specify that my first structure is actually the
>> reference one?
>> Thanks in advance,
>> Dawid Grabarek