VMD-L Mailing List
From: Ajasja Ljubetič (ajasja.ljubetic_at_gmail.com)
Date: Wed Feb 16 2011 - 03:00:01 CST
- Next message: Ajasja Ljubetič: "Re: PBC & Solvate Tool in VMD"
- Previous message: Sharlene Denos: "PBC & Solvate Tool in VMD"
- In reply to: dhacademic: "bring z-axis along a new vector"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Hi Hao,
I use VMDs orient<http://www.ks.uiuc.edu/Research/vmd/script_library/scripts/orient/>plugin
to align my system along a certain axis. Unless I'm missing
something, it should not mater if you align the axis along the vector or the
vector to the axis.
The orient command should be able to do this. Use it like this
"orient *selection* *vector-to-align* *target-axis"*
best regards,
Ajasja
Below is a full example:
#load some plugins
lappend auto_path {E:\Projekti\VMD\Principal_axes\la1.0}
lappend auto_path {E:\Projekti\VMD\Principal_axes\orient}
package require Orient
namespace import Orient::orient
#load the peptide
set protmol [mol load pdb A35_raw.pdb]
set prot [atomselect $protmol protein]
#center the protein
$prot moveby [vecinvert [measure center $prot]]
#align the principle axis to the z axis
set I [Orient::calc_principalaxes $prot];
#orietn z
set A [orient $prot [lindex $I 2] {0 0 1}]
$prot move $A
set I [Orient::calc_principalaxes $prot]
#orient x
set A [orient $prot [lindex $I 1] {0 1 0}]
$prot move $A
#set I [draw principalaxes $prot]
#graphics $protmol delete all
$prot writepdb L35.pdb
On Tue, Feb 15, 2011 at 21:39, dhacademic <dhacademic_at_gmail.com> wrote:
> Hi all,
>
> The "transvec" can be used to bring the x-axis along a new vector V. I want
> to know how to bring y-axis (or z-axis) to a new vector V. Many thanks.
>
> Best,
> Hao
>
- Next message: Ajasja Ljubetič: "Re: PBC & Solvate Tool in VMD"
- Previous message: Sharlene Denos: "PBC & Solvate Tool in VMD"
- In reply to: dhacademic: "bring z-axis along a new vector"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]