Re: [ccp4bb] Method to calculate the axis of an alpha helix

2010-09-14 Thread Ian Tickle
Yuan,

On Mon, Sep 13, 2010 at 6:12 PM, 商元 shangyuan5...@gmail.com wrote:
 Thanks, lan.

 For quaternions, it needs w^2+x^2+y^2+z^2=1, thus reduces variables to 3.

The number of degrees of freedom is of course reduced to 3 but the
number of variables is still to all intents and purposes 4, since no
useful simplification is achieved by eliminating one of the variables
using the above constraint (normalisation) equation.  If you wanted to
do an optimisation using quaternions as variables you would almost
certainly use constrained optimisation with 4 variables/quaternion.
All the standard formulae that involve quaternions are in terms of the
4 variables (w,x,y,z).

 But fortunately,(x,y,z) here only represents a direction of the rotation
 angle, and the absolute value of them are not that important.
 I think a rotation vector and the rotation angle could be a very good
 representation of any rotation in 3D space, and that's more directviewing
 than the rotation Matrix which is a Matrix, or Euler Angles, which need
 three rotation angles.

How appropriate a particular representation is obviously depends on
the purpose for which you are using it.  I accept that the quaternion
representation may well be the most appropriate one for your
particular problem.  The article I sent discusses the pros and cons of
each (and they all have both pros and cons!).

 The Exponential Map, it's too complicated, so many mathematics

Complicated?  I didn't think it could get any simpler!  Here's a comparison:

 Quaternion (q)
   Exp. map (v)

No of variables   4
 3
Constraint w^2+x^2+y^2+z^2=1  -
Angle of rotation (A)  2 cos^(-1)(w/|q|) |v|
Axis vector (x,y,z)/(|q|sin(A/2))  v/A

where q is the quaternion before normalisation.

 the definition of q = e^v, I think they are identical. and the direction of
 v is identical to (x,y,z) in the quaternion.

Not exactly identical: the expressions for angle  axis vector are
quite different as can be seen from the above definitions.  However
for a given rotation they clearly must have the same value (by
definition!) if that's what you mean.

Cheers

-- Ian

 Regards,

 Yuan SHANG

 On Tue, Sep 14, 2010 at 12:09 AM, Ian Tickle ianj...@gmail.com wrote:

 Hi Yuan

 You might want to look at the 'exponential map' as an alternative to
 quaternions.  This article evaluates all the various representations
 of rotations, including Eulerian angles, polar angles, rotation
 matrices, quaternions etc:

 http://webhome.cs.uvic.ca/~blob/courses/485c/notes/pdf/expmap.pdf

 The advantage of the exponential map representation is that only 3
 variables are used, which, as for the Eulerian  polar angle
 representations, is exactly the number that are needed to represent an
 arbitrary rotation in 3-D so it's an optimally parsimonious
 representation.  However it doesn't suffer from the well-known
 singularities as Eulerian  polar angles (it suffers from different
 singularities but it's possible to sweep them under the carpet).
 Quaternions, as you say, require 4 variables but a constraint is
 needed (i.e. normalisation of the vector) to reduce it back to 3.

 Cheers

 -- Ian

 On Mon, Sep 13, 2010 at 4:21 PM, 商元 shangyuan5...@gmail.com wrote:
  Dear CCP4 members,
      I have finally used Eleanor's idea, and it works very well. After
  applying SSM, we can get a rotation matrix(M), and a displacement vector
  N:
   (Xnew,Ynew,Znew)'=M*(X,Y,Z)'+N
  Then, from the rotation matrix M, we can get its another representative
  format-quaternion number.  The quaternion number has 4 elements, the
  first element(w) of which represents the cosine value of half of the
  rotation anger, and the next 3 elements(x0,y0,z0) represent the rotation
  vector. That means the molecule rotates an angle of acos(w)*2*180/pi
  degrees
  around the vector (x0,y0,z0).
     The attached file is the matlab program i wrote to translate M into a
  quaternion number. That should be very easy to be translated into other
  language formats.
 
  Best  regards,
  Yuan SHANG
 
 
 
  On Thu, Aug 19, 2010 at 7:34 PM, Frances C. Bernstein
  f...@bernstein-plus-sons.com wrote:
 
  Pete Artymiuk wrote:
  ---
  I have an old badly-written Fortran program (I wrote it for a Vax, but
  it
  still compiles and runs in g95 - isn't Fortran wonderful?)  that takes
  Arnott  Dover's polar coordinates and converts them to a helix of any
  required length* in PDB (or Diamond!) format.
  ---
 
  Wow, that is an old program!
 
  For everyone under the ago of 60 reading this list, Diamond
  format was the very first PDB format, used for the first 100
  or so entries that we had.  It was based on the output format
  of the Diamond real-space refinement program and each line was
  132 characters long.  Long lines were awkward, in 

Re: [ccp4bb] Method to calculate the axis of an alpha helix

2010-09-13 Thread 商元
Dear CCP4 members,
I have finally used Eleanor's idea, and it works very well. After
applying SSM, we can get a rotation matrix(M), and a displacement vector N:
 (Xnew,Ynew,Znew)'=M*(X,Y,Z)'+N
Then, from the rotation matrix M, we can get its another representative
format-*quaternion number.  *The quaternion number has 4 elements, the
first element(w) of which represents the cosine value of half of the
rotation anger, and the next 3 elements(x0,y0,z0) represent the rotation
vector. That means the molecule rotates an angle of acos(w)*2*180/pi degrees
around the vector (x0,y0,z0).
   The attached file is the matlab program i wrote to translate M into a
quaternion number. That should be very easy to be translated into other
language formats.

Best  regards,
Yuan SHANG



On Thu, Aug 19, 2010 at 7:34 PM, Frances C. Bernstein 
f...@bernstein-plus-sons.com wrote:

 Pete Artymiuk wrote:
 ---

 I have an old badly-written Fortran program (I wrote it for a Vax, but it
 still compiles and runs in g95 - isn't Fortran wonderful?)  that takes
 Arnott  Dover's polar coordinates and converts them to a helix of any
 required length* in PDB (or Diamond!) format.
 ---

 Wow, that is an old program!

 For everyone under the ago of 60 reading this list, Diamond
 format was the very first PDB format, used for the first 100
 or so entries that we had.  It was based on the output format
 of the Diamond real-space refinement program and each line was
 132 characters long.  Long lines were awkward, in some ways,
 to handle on computers of that time so we designed what is
 now known as PDB format.  If you want to know more, you can
 look at page 9 of the September 1974 PDB Newsletter (available
 on the RCSB web site if you start at

 http://www.rcsb.org/pdb/static.do?p=general_information/news_publications/newsletters/newsletter.html#pre1999)
 for the format of coordinate records in the original format.

 The reason that I know that there were about 100 entries
 released in the original format is that I was the one who had
 to convert them all into the new PDB format in 1976.

   Frances Bernstein

 =
 Bernstein + Sons
 *   *   Information Systems Consultants
 5 Brewster Lane, Bellport, NY 11713-2803
 *   * ***
  *Frances C. Bernstein
  *   ***  f...@bernstein-plus-sons.com
  *** *
  *   *** 1-631-286-1339FAX: 1-631-286-1999
 =

function V=Matrix2Quat(M)
tq(1)=1+M(1,1)+M(2,2)+M(3,3);
tq(2)=1+M(1,1)-M(2,2)-M(3,3);
tq(3)=1-M(1,1)+M(2,2)-M(3,3);
tq(4)=1-M(1,1)-M(2,2)+M(3,3);
j=1;
QW=0;
QX=0;
QY=0;
QZ=0;
for i=1:4
if(tq(i)tq(j))
j=i;
end
end
% check the diagonal
if (j==1)
%/* perform instant calculation */
QW = tq(j);
QX = M(2,3)-M(3,2);
QY = M(3,1)-M(1,3);
QZ = M(1,2)-M(2,1);
elseif (j==2)
QW = M(2,3)-M(3,2);
QX = tq(j);
QY = M(1,2)+M(2,1);
QZ = M(1,3)+M(1,3);
elseif (j==3) 
QW = M(3,1)-M(1,3);
QX = M(1,2)+M(2,1);
QY = tq(j);
QZ = M(2,3)+M(3,2);
else 
QW = M(1,2)-M(2,1);
QX = M(3,1)+M(1,3);
QY = M(2,3)+M(3,2);
QZ = tq(j);
end

 s = sqrt(0.25/tq(j));
 QW =  QW*s;
 QX = QX*s;
 QY = QY*s;
 QZ = QZ*s;
 V(1,1)=QX;
 V(2,1)=QY;
 V(3,1)=QZ;
 V(4,1)=QW;
 V(5,1)=acos(QW)*2*180/pi;

Re: [ccp4bb] Method to calculate the axis of an alpha helix

2010-09-13 Thread Ian Tickle
Hi Yuan

You might want to look at the 'exponential map' as an alternative to
quaternions.  This article evaluates all the various representations
of rotations, including Eulerian angles, polar angles, rotation
matrices, quaternions etc:

http://webhome.cs.uvic.ca/~blob/courses/485c/notes/pdf/expmap.pdf

The advantage of the exponential map representation is that only 3
variables are used, which, as for the Eulerian  polar angle
representations, is exactly the number that are needed to represent an
arbitrary rotation in 3-D so it's an optimally parsimonious
representation.  However it doesn't suffer from the well-known
singularities as Eulerian  polar angles (it suffers from different
singularities but it's possible to sweep them under the carpet).
Quaternions, as you say, require 4 variables but a constraint is
needed (i.e. normalisation of the vector) to reduce it back to 3.

Cheers

-- Ian

On Mon, Sep 13, 2010 at 4:21 PM, 商元 shangyuan5...@gmail.com wrote:
 Dear CCP4 members,
     I have finally used Eleanor's idea, and it works very well. After
 applying SSM, we can get a rotation matrix(M), and a displacement vector N:
  (Xnew,Ynew,Znew)'=M*(X,Y,Z)'+N
 Then, from the rotation matrix M, we can get its another representative
 format-quaternion number.  The quaternion number has 4 elements, the
 first element(w) of which represents the cosine value of half of the
 rotation anger, and the next 3 elements(x0,y0,z0) represent the rotation
 vector. That means the molecule rotates an angle of acos(w)*2*180/pi degrees
 around the vector (x0,y0,z0).
    The attached file is the matlab program i wrote to translate M into a
 quaternion number. That should be very easy to be translated into other
 language formats.

 Best  regards,
 Yuan SHANG



 On Thu, Aug 19, 2010 at 7:34 PM, Frances C. Bernstein
 f...@bernstein-plus-sons.com wrote:

 Pete Artymiuk wrote:
 ---
 I have an old badly-written Fortran program (I wrote it for a Vax, but it
 still compiles and runs in g95 - isn't Fortran wonderful?)  that takes
 Arnott  Dover's polar coordinates and converts them to a helix of any
 required length* in PDB (or Diamond!) format.
 ---

 Wow, that is an old program!

 For everyone under the ago of 60 reading this list, Diamond
 format was the very first PDB format, used for the first 100
 or so entries that we had.  It was based on the output format
 of the Diamond real-space refinement program and each line was
 132 characters long.  Long lines were awkward, in some ways,
 to handle on computers of that time so we designed what is
 now known as PDB format.  If you want to know more, you can
 look at page 9 of the September 1974 PDB Newsletter (available
 on the RCSB web site if you start at

 http://www.rcsb.org/pdb/static.do?p=general_information/news_publications/newsletters/newsletter.html#pre1999)
 for the format of coordinate records in the original format.

 The reason that I know that there were about 100 entries
 released in the original format is that I was the one who had
 to convert them all into the new PDB format in 1976.

                       Frances Bernstein

 =
                 Bernstein + Sons
 *   *       Information Systems Consultants
     5 Brewster Lane, Bellport, NY 11713-2803
 *   * ***
  *            Frances C. Bernstein
  *   ***      ...@bernstein-plus-sons.com
  ***     *
  *   *** 1-631-286-1339    FAX: 1-631-286-1999
 =




Re: [ccp4bb] Method to calculate the axis of an alpha helix

2010-09-13 Thread 商元
Thanks, lan.

For quaternions, it needs w^2+x^2+y^2+z^2=1, thus reduces variables to 3.
But fortunately,(x,y,z) here only represents a direction of the rotation
angle, and the absolute value of them are not that important.
I think a rotation vector and the rotation angle could be a very good
representation of any rotation in 3D space, and that's more directviewing
than the rotation Matrix which is a Matrix, or Euler Angles, which need
three rotation angles.
The Exponential Map, it's too complicated, so many mathematicsBut, from
the definition of q = e^v, I think they are identical. and the direction of
v is identical to (x,y,z) in the quaternion.

Regards,

Yuan SHANG

On Tue, Sep 14, 2010 at 12:09 AM, Ian Tickle ianj...@gmail.com wrote:

 Hi Yuan

 You might want to look at the 'exponential map' as an alternative to
 quaternions.  This article evaluates all the various representations
 of rotations, including Eulerian angles, polar angles, rotation
 matrices, quaternions etc:

 http://webhome.cs.uvic.ca/~blob/courses/485c/notes/pdf/expmap.pdfhttp://webhome.cs.uvic.ca/%7Eblob/courses/485c/notes/pdf/expmap.pdf

 The advantage of the exponential map representation is that only 3
 variables are used, which, as for the Eulerian  polar angle
 representations, is exactly the number that are needed to represent an
 arbitrary rotation in 3-D so it's an optimally parsimonious
 representation.  However it doesn't suffer from the well-known
 singularities as Eulerian  polar angles (it suffers from different
 singularities but it's possible to sweep them under the carpet).
 Quaternions, as you say, require 4 variables but a constraint is
 needed (i.e. normalisation of the vector) to reduce it back to 3.

 Cheers

 -- Ian

 On Mon, Sep 13, 2010 at 4:21 PM, 商元 shangyuan5...@gmail.com wrote:
  Dear CCP4 members,
  I have finally used Eleanor's idea, and it works very well. After
  applying SSM, we can get a rotation matrix(M), and a displacement vector
 N:
   (Xnew,Ynew,Znew)'=M*(X,Y,Z)'+N
  Then, from the rotation matrix M, we can get its another representative
  format-quaternion number.  The quaternion number has 4 elements, the
  first element(w) of which represents the cosine value of half of the
  rotation anger, and the next 3 elements(x0,y0,z0) represent the rotation
  vector. That means the molecule rotates an angle of acos(w)*2*180/pi
 degrees
  around the vector (x0,y0,z0).
 The attached file is the matlab program i wrote to translate M into a
  quaternion number. That should be very easy to be translated into other
  language formats.
 
  Best  regards,
  Yuan SHANG
 
 
 
  On Thu, Aug 19, 2010 at 7:34 PM, Frances C. Bernstein
  f...@bernstein-plus-sons.com wrote:
 
  Pete Artymiuk wrote:
  ---
  I have an old badly-written Fortran program (I wrote it for a Vax, but
 it
  still compiles and runs in g95 - isn't Fortran wonderful?)  that takes
  Arnott  Dover's polar coordinates and converts them to a helix of any
  required length* in PDB (or Diamond!) format.
  ---
 
  Wow, that is an old program!
 
  For everyone under the ago of 60 reading this list, Diamond
  format was the very first PDB format, used for the first 100
  or so entries that we had.  It was based on the output format
  of the Diamond real-space refinement program and each line was
  132 characters long.  Long lines were awkward, in some ways,
  to handle on computers of that time so we designed what is
  now known as PDB format.  If you want to know more, you can
  look at page 9 of the September 1974 PDB Newsletter (available
  on the RCSB web site if you start at
 
 
 http://www.rcsb.org/pdb/static.do?p=general_information/news_publications/newsletters/newsletter.html#pre1999
 )
  for the format of coordinate records in the original format.
 
  The reason that I know that there were about 100 entries
  released in the original format is that I was the one who had
  to convert them all into the new PDB format in 1976.
 
Frances Bernstein
 
  =
  Bernstein + Sons
  *   *   Information Systems Consultants
  5 Brewster Lane, Bellport, NY 11713-2803
  *   * ***
   *Frances C. Bernstein
   *   ***  f...@bernstein-plus-sons.com
   *** *
   *   *** 1-631-286-1339FAX: 1-631-286-1999
  =
 
 



Re: [ccp4bb] Method to calculate the axis of an alpha helix

2010-08-19 Thread Frances C. Bernstein

Pete Artymiuk wrote:
---
I have an old badly-written Fortran program (I wrote it for a Vax, but it 
still compiles and runs in g95 - isn't Fortran wonderful?)  that takes 
Arnott  Dover's polar coordinates and converts them to a helix of any 
required length* in PDB (or Diamond!) format.

---

Wow, that is an old program!

For everyone under the ago of 60 reading this list, Diamond
format was the very first PDB format, used for the first 100
or so entries that we had.  It was based on the output format
of the Diamond real-space refinement program and each line was
132 characters long.  Long lines were awkward, in some ways,
to handle on computers of that time so we designed what is
now known as PDB format.  If you want to know more, you can
look at page 9 of the September 1974 PDB Newsletter (available
on the RCSB web site if you start at
http://www.rcsb.org/pdb/static.do?p=general_information/news_publications/newsletters/newsletter.html#pre1999) 
for the format of coordinate records in the original format.


The reason that I know that there were about 100 entries
released in the original format is that I was the one who had
to convert them all into the new PDB format in 1976.

   Frances Bernstein

=
Bernstein + Sons
*   *   Information Systems Consultants
5 Brewster Lane, Bellport, NY 11713-2803
*   * ***
 *Frances C. Bernstein
  *   ***  f...@bernstein-plus-sons.com
 *** *
  *   *** 1-631-286-1339FAX: 1-631-286-1999
=


Re: [ccp4bb] Method to calculate the axis of an alpha helix

2010-08-17 Thread Tom Oldfield

Yuan SHANG

1) DIY
The way that has been used is to calculate the inertia tensor matrix for 
helix (or
any other secondary structure element).  You can chose backbone atoms or 
just
the CA atoms.  Then calculate the eigen vectors and values from this and 
the largest
eigen vector will be the best fit vector to the helix - and its lambda 
will define its

length.  For a strand or sheet you can use this method too.
This was the standard way from molecular simulation work to look at
simplified dynamics of proteins.

2) The program Squid
http://www.ebi.ac.uk/~oldfield/squid/  (1992, 1998)
has lots of different analysis methods for proteins including calculating
vectors for helices, the angles between helices (torsion/distance/opening)
and other things.
You only problem is that it is very old (1988) and written in Fortran 
and requires
a little effort to install - sorry - I no longer  support it.  There is 
a pre

compiled  linux-32 bit
version and I still do all my structure analysis with it.
http://www.ebi.ac.uk/~oldfield/xsquid -   though this requires installation
data too.


Tom


Fitting a helix is not trivial.

If you have access to windows and mathematica, then you might try 
helfit. (Otherwise, you could implement the algorithm yourself and 
then share your code with the rest of us ;-)



http://dx.doi.org/10.1016/j.compbiolchem.2008.03.012


James


On Aug 15, 2010, at 12:29 AM, 商元 wrote:


Dear all,
   I want to compare the conformational change of two similar 
structures, using one alpha helix as the reference. Then, how can I 
get a vector that can represent both the position and direction of 
the helix? Is there any well-known software can do this?
   Or, should I build a cylinder model, with parameters 
[radius,bottom center(x1,y1,z1),top center(x1,y2,z2)], using the 
coordinates of C,C(alpha) and N to fit these parameters?

Thanks for any suggestions

Regards,
Yuan SHANG


Re: [ccp4bb] Method to calculate the axis of an alpha helix

2010-08-17 Thread Phil Evans
I've put a couple of example programs that do this sort of thing (using the 
clipper libraries) in

ftp://ftp.mrc-lmb.cam.ac.uk/pub/pre/helixanglethings.tar.gz


Phil

1) helixangle.cpp

 Calculate angle beween two helices

  Superimpose standard helix on two specified chains  ranges,
 then calculate angle between them


2)  kinky.cpp

 Analyse change of helix axis directions between 2 structures


On 17 Aug 2010, at 09:49, Tom Oldfield wrote:

 Yuan SHANG
 
 1) DIY
 The way that has been used is to calculate the inertia tensor matrix for 
 helix (or
 any other secondary structure element).  You can chose backbone atoms or just
 the CA atoms.  Then calculate the eigen vectors and values from this and the 
 largest
 eigen vector will be the best fit vector to the helix - and its lambda will 
 define its
 length.  For a strand or sheet you can use this method too.
 This was the standard way from molecular simulation work to look at
 simplified dynamics of proteins.
 
 2) The program Squid
 http://www.ebi.ac.uk/~oldfield/squid/  (1992, 1998)
 has lots of different analysis methods for proteins including calculating
 vectors for helices, the angles between helices (torsion/distance/opening)
 and other things.
 You only problem is that it is very old (1988) and written in Fortran and 
 requires
 a little effort to install - sorry - I no longer  support it.  There is a pre
 compiled  linux-32 bit
 version and I still do all my structure analysis with it.
 http://www.ebi.ac.uk/~oldfield/xsquid -   though this requires installation
 data too.
 
 
 Tom
 
 Fitting a helix is not trivial.
 
 If you have access to windows and mathematica, then you might try helfit. 
 (Otherwise, you could implement the algorithm yourself and then share your 
 code with the rest of us ;-)
 
 
 http://dx.doi.org/10.1016/j.compbiolchem.2008.03.012
 
 
 James
 
 
 On Aug 15, 2010, at 12:29 AM, 商元 wrote:
 
 Dear all,
   I want to compare the conformational change of two similar structures, 
 using one alpha helix as the reference. Then, how can I get a vector that 
 can represent both the position and direction of the helix? Is there any 
 well-known software can do this?
   Or, should I build a cylinder model, with parameters [radius,bottom 
 center(x1,y1,z1),top center(x1,y2,z2)], using the coordinates of C,C(alpha) 
 and N to fit these parameters?
 Thanks for any suggestions
 
 Regards,
 Yuan SHANG


Re: [ccp4bb] Method to calculate the axis of an alpha helix

2010-08-17 Thread Francois Berenger

Hello,

Is there some C or C++ code out there doing what you described in 1).

If not, is there a very detailed explanation of this procedure 
somewhere, detailed enough in order to implement it (just getting

the best fit vector and its length, no other parameters)?

Thanks a lot,
Francois.

Tom Oldfield wrote:

Yuan SHANG

1) DIY
The way that has been used is to calculate the inertia tensor matrix for 
helix (or
any other secondary structure element).  You can chose backbone atoms or 
just
the CA atoms.  Then calculate the eigen vectors and values from this and 
the largest
eigen vector will be the best fit vector to the helix - and its lambda 
will define its

length.  For a strand or sheet you can use this method too.
This was the standard way from molecular simulation work to look at
simplified dynamics of proteins.

2) The program Squid
http://www.ebi.ac.uk/~oldfield/squid/  (1992, 1998)
has lots of different analysis methods for proteins including calculating
vectors for helices, the angles between helices (torsion/distance/opening)
and other things.
You only problem is that it is very old (1988) and written in Fortran 
and requires
a little effort to install - sorry - I no longer  support it.  There is 
a pre

compiled  linux-32 bit
version and I still do all my structure analysis with it.
http://www.ebi.ac.uk/~oldfield/xsquid -   though this requires installation
data too.


Tom


Fitting a helix is not trivial.

If you have access to windows and mathematica, then you might try 
helfit. (Otherwise, you could implement the algorithm yourself and 
then share your code with the rest of us ;-)



http://dx.doi.org/10.1016/j.compbiolchem.2008.03.012


James


On Aug 15, 2010, at 12:29 AM, 商元 wrote:


Dear all,
   I want to compare the conformational change of two similar 
structures, using one alpha helix as the reference. Then, how can I 
get a vector that can represent both the position and direction of 
the helix? Is there any well-known software can do this?
   Or, should I build a cylinder model, with parameters 
[radius,bottom center(x1,y1,z1),top center(x1,y2,z2)], using the 
coordinates of C,C(alpha) and N to fit these parameters?

Thanks for any suggestions

Regards,
Yuan SHANG


Re: [ccp4bb] Method to calculate the axis of an alpha helix

2010-08-17 Thread Phil Evans
The problem with the inertial matrix approach is that it is very sensitive to 
end effects on the helix, ie a helix is not a perfect cylinder. So 
superimposing an ideal helix is more reliable
Phil


On 17 Aug 2010, at 10:17, Francois Berenger wrote:

 Hello,
 
 Is there some C or C++ code out there doing what you described in 1).
 
 If not, is there a very detailed explanation of this procedure somewhere, 
 detailed enough in order to implement it (just getting
 the best fit vector and its length, no other parameters)?
 
 Thanks a lot,
 Francois.
 
 Tom Oldfield wrote:
 Yuan SHANG
 1) DIY
 The way that has been used is to calculate the inertia tensor matrix for 
 helix (or
 any other secondary structure element).  You can chose backbone atoms or just
 the CA atoms.  Then calculate the eigen vectors and values from this and the 
 largest
 eigen vector will be the best fit vector to the helix - and its lambda will 
 define its
 length.  For a strand or sheet you can use this method too.
 This was the standard way from molecular simulation work to look at
 simplified dynamics of proteins.
 2) The program Squid
 http://www.ebi.ac.uk/~oldfield/squid/  (1992, 1998)
 has lots of different analysis methods for proteins including calculating
 vectors for helices, the angles between helices (torsion/distance/opening)
 and other things.
 You only problem is that it is very old (1988) and written in Fortran and 
 requires
 a little effort to install - sorry - I no longer  support it.  There is a pre
 compiled  linux-32 bit
 version and I still do all my structure analysis with it.
 http://www.ebi.ac.uk/~oldfield/xsquid -   though this requires installation
 data too.
 Tom
 Fitting a helix is not trivial.
 
 If you have access to windows and mathematica, then you might try helfit. 
 (Otherwise, you could implement the algorithm yourself and then share your 
 code with the rest of us ;-)
 
 
 http://dx.doi.org/10.1016/j.compbiolchem.2008.03.012
 
 
 James
 
 
 On Aug 15, 2010, at 12:29 AM, 商元 wrote:
 
 Dear all,
   I want to compare the conformational change of two similar structures, 
 using one alpha helix as the reference. Then, how can I get a vector that 
 can represent both the position and direction of the helix? Is there any 
 well-known software can do this?
   Or, should I build a cylinder model, with parameters [radius,bottom 
 center(x1,y1,z1),top center(x1,y2,z2)], using the coordinates of 
 C,C(alpha) and N to fit these parameters?
 Thanks for any suggestions
 
 Regards,
 Yuan SHANG


Re: [ccp4bb] Method to calculate the axis of an alpha helix

2010-08-17 Thread Phil Evans
When I started doing various analyses of conformational changes in AP2 (bending 
of helical solenoids, see supp data fig S2 for Jackson et al, Cell 141, 
1220-1229 (2010)) I was first going to do lots of scripting around this sort of 
thing, but Kevin Cowtan persuaded me that it was easier to program exactly what 
you want to do, and that his clipper libraries made it very easy (in C++). The 
couple of example programs I posted show a framework that I've used in a series 
of little programs to do such analyses, and I've found it easier just to hack 
the programs within such a framework rather than to try to write some entirely 
general and flexible system. Clipper lets you select coordinate range, 
superimpose them, extract vectors (or indeed inertial tensors if you want: I 
found that didn't work well) in a reasonably straightforward way.

I'm sure there are other ways to do it, but this suits me

Phil


On 17 Aug 2010, at 10:53, Eleanor Dodson wrote:

 As someone said - this is quite hard unless you have a very long helix - any 
 ragged end bits can dominate the fit of one feature to another.
 
 
 In your case I think I would use SSM to superpose the two similar structures 
 , then LSQKAB to fit any feature to its related one using the original 
 molecule, plus the second one after the SSM overlap.
 
 LSQKAB will give you the relative rotation of any feature to its partner - 
 look the the polar angles to get a estimate of rotation, and the translation 
 to find how far apart the 2 features are.
 
 This is different to getting the direction of the helix. Centre of mas is 
 easy LSQKAB gives you that, but the vector is easisest found with a bit of 
 arithmetic.
 Find COM of residues 1-3 say and  COM of residues n to n-3,
 vector connects these two COMs - direction cosines are
 xv/(sqrt(xv*xv +yv*yv +zv*zv) yv/(sqrt(xv*xv +yv*yv +zv*zv ..
 
 length is a function of number of residues
 
 The $CLIBD/fraglib/theor-helix-70.pdb suggests ~ 14.8A per 10 residues..
 Eleanor
 
 
 Phil Evans wrote:
 The problem with the inertial matrix approach is that it is very sensitive 
 to end effects on the helix, ie a helix is not a perfect cylinder. So 
 superimposing an ideal helix is more reliable
 Phil
 On 17 Aug 2010, at 10:17, Francois Berenger wrote:
 Hello,
 
 Is there some C or C++ code out there doing what you described in 1).
 
 If not, is there a very detailed explanation of this procedure somewhere, 
 detailed enough in order to implement it (just getting
 the best fit vector and its length, no other parameters)?
 
 Thanks a lot,
 Francois.
 
 Tom Oldfield wrote:
 Yuan SHANG
 1) DIY
 The way that has been used is to calculate the inertia tensor matrix for 
 helix (or
 any other secondary structure element).  You can chose backbone atoms or 
 just
 the CA atoms.  Then calculate the eigen vectors and values from this and 
 the largest
 eigen vector will be the best fit vector to the helix - and its lambda 
 will define its
 length.  For a strand or sheet you can use this method too.
 This was the standard way from molecular simulation work to look at
 simplified dynamics of proteins.
 2) The program Squid
 http://www.ebi.ac.uk/~oldfield/squid/  (1992, 1998)
 has lots of different analysis methods for proteins including calculating
 vectors for helices, the angles between helices (torsion/distance/opening)
 and other things.
 You only problem is that it is very old (1988) and written in Fortran and 
 requires
 a little effort to install - sorry - I no longer  support it.  There is a 
 pre
 compiled  linux-32 bit
 version and I still do all my structure analysis with it.
 http://www.ebi.ac.uk/~oldfield/xsquid -   though this requires installation
 data too.
 Tom
 Fitting a helix is not trivial.
 
 If you have access to windows and mathematica, then you might try helfit. 
 (Otherwise, you could implement the algorithm yourself and then share 
 your code with the rest of us ;-)
 
 
 http://dx.doi.org/10.1016/j.compbiolchem.2008.03.012
 
 
 James
 
 
 On Aug 15, 2010, at 12:29 AM, 商元 wrote:
 
 Dear all,
  I want to compare the conformational change of two similar structures, 
 using one alpha helix as the reference. Then, how can I get a vector 
 that can represent both the position and direction of the helix? Is 
 there any well-known software can do this?
  Or, should I build a cylinder model, with parameters [radius,bottom 
 center(x1,y1,z1),top center(x1,y2,z2)], using the coordinates of 
 C,C(alpha) and N to fit these parameters?
 Thanks for any suggestions
 
 Regards,
 Yuan SHANG


Re: [ccp4bb] Method to calculate the axis of an alpha helix

2010-08-16 Thread James Stroud

Fitting a helix is not trivial.

If you have access to windows and mathematica, then you might try  
helfit. (Otherwise, you could implement the algorithm yourself and  
then share your code with the rest of us ;-)



http://dx.doi.org/10.1016/j.compbiolchem.2008.03.012


James


On Aug 15, 2010, at 12:29 AM, 商元 wrote:


Dear all,
   I want to compare the conformational change of two similar  
structures, using one alpha helix as the reference. Then, how can I  
get a vector that can represent both the position and direction of  
the helix? Is there any well-known software can do this?
   Or, should I build a cylinder model, with parameters  
[radius,bottom center(x1,y1,z1),top center(x1,y2,z2)], using the  
coordinates of C,C(alpha) and N to fit these parameters?

Thanks for any suggestions

Regards,
Yuan SHANG


Re: [ccp4bb] Method to calculate the axis of an alpha helix

2010-08-15 Thread Phil Evans
I don't know of any standard programs that do this, but I have a couple of 
programs that do this sort of thing, using a standard helix as a reference 
and the clipper libraries. I could send you the code if you like, though you'd 
probably have to hack them to do exactly what you want (I found that easier 
than trying to write a completely general program for doing every sort of 
comparison.

Phil

On 15 Aug 2010, at 08:29, 商元 wrote:

 Dear all,
I want to compare the conformational change of two similar structures, 
 using one alpha helix as the reference. Then, how can I get a vector that can 
 represent both the position and direction of the helix? Is there any 
 well-known software can do this?
Or, should I build a cylinder model, with parameters [radius,bottom 
 center(x1,y1,z1),top center(x1,y2,z2)], using the coordinates of C,C(alpha) 
 and N to fit these parameters?
 Thanks for any suggestions
 
 Regards,
 Yuan SHANG


Re: [ccp4bb] Method to calculate the axis of an alpha helix

2010-08-15 Thread Edwin Pozharski


Interhlx may be what you are looking for

http://nmr.uhnres.utoronto.ca/ikura/resources/data+sw/interhlx/


 Dear all,
I want to compare the conformational
change of two similar structures,
 using one alpha helix as the
reference. Then, how can I get a vector that
 can represent both
the position and direction of the helix? Is there any
 well-known
software can do thisï¼Yuml;
Or, should I build a
cylinder model, with parameters [radius,bottom

center(x1,y1,z1),top center(x1,y2,z2)], using the coordinates of

C,C(alpha)
 and N to fit these parameters?
 Thanks for
any suggestions
 
 Regards,
 Yuan SHANG
 


-- 
Edwin Pozharski, PhD
University of
Maryland, Baltimore