5
In[1]:= H*first try to construct a general formuls for Irot for arbitrary distribution of point masses *L Clear@Irot, delD; del@j_,k_D := If@j k, 1, 0DH*delta kroneker *L Irot@j_,k_, list_D := Sum@m@iD Hr@iD.r@iD del@j, kD - r@iD@@jDD r@iD@@kDDL, 8i, Length @listD<D In[4]:= H*"list" will be a List HnestedL of type 88m1,r1<, 8m2,r2<...< with m1, r1, etc. being masses and position vectors, respectively *L In[5]:= m@i_D := list@@i, 1DD In[6]:= r@i_D := list@@i, 2DD In[7]:= H*check for a dumbell - "Hydrogen molecule"*L In[8]:= list = 88M, 80, 0, a 2<<, 8M, 80, 0, -a 2<<<; In[9]:= II = Table@Irot@j, k, listD, 8j, 3<, 8k, 3<D; In[10]:= II MatrixForm H*looks ok*L Out[10]//MatrixForm= a 2 M 2 00 0 a 2 M 2 0 0 00 In[11]:= H*now tetrahedron*L In[12]:= p = Pi - ArcCos @1 3D; In[13]:= list = 88M, 8Sin@pD, 0, Cos@pD<<, 8M, 8Sin@pD Cos@2 Pi 3D, Sin@pD Sin@2 Pi 3D, Cos@pD<<, 8M, 8Sin@pD Cos@2 Pi 3D, -Sin@pD Sin@2 Pi 3D, Cos@pD<<, 8M, 80, 0, 1<<<; In[14]:= H*let us check that all distances between atoms are the same, Sqrt @83D*L In[15]:= Table@8j, k, Hr@jD - r@kDL.Hr@jD - r@kDL<, 8j, 4<, 8k, 4<D Simplify Out[15]= ::81, 1, 0<, :1, 2, 8 3 >, :1, 3, 8 3 >, :1, 4, 8 3 >>, ::2, 1, 8 3 >, 82, 2, 0<, :2, 3, 8 3 >, :2, 4, 8 3 >>, ::3, 1, 8 3 >, :3, 2, 8 3 >, 83, 3, 0<, :3, 4, 8 3 >>, ::4, 1, 8 3 >, :4, 2, 8 3 >, :4, 3, 8 3 >, 84, 4, 0<>> In[16]:= H*looks ok*L In[17]:= H*also check that the distances from center are 1*L In[18]:= Table@Hr@jDL.Hr@jDL, 8j, 4<D H*ok*L Out[18]= 81, 1, 1, 1< In[19]:= H*now plot a picture, first single sphere, then full molecule *L In[20]:= sph@R_,r_ListD := ParametricPlot3D @r + R 8Sin@tD Cos@pD, Sin@tD Sin@pD, Cos@tD<, 8t, -Pi, Pi<, 8p, 0, 2 Pi<D

H firsttrytoconstructageneralformuls L D DH L D H D D@@ DD ...vitaly/688/688_rot.pdf · In[55]:=R=1;Show@Table@sph@R,Sqrt@3’2D*r@iDD,8i,4

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: H firsttrytoconstructageneralformuls L D DH L D H D D@@ DD ...vitaly/688/688_rot.pdf · In[55]:=R=1;Show@Table@sph@R,Sqrt@3’2D*r@iDD,8i,4

In[1]:= H*first try to construct a general formuls

for Irot for arbitrary distribution of point masses *LClear@Irot, delD;del@j_, k_D := If@j � k, 1, 0DH*delta kroneker*LIrot@j_, k_, list_D := Sum@m@iD [email protected]@iD del@j, kD - r@iD@@jDD r@iD@@kDDL, 8i, Length@listD<D

In[4]:= H*"list" will be a List HnestedL of type 88m1,r1<, 8m2,r2<...< with m1,

r1, etc. being masses and position vectors, respectively*L

In[5]:= m@i_D := list@@i, 1DD

In[6]:= r@i_D := list@@i, 2DD

In[7]:= H*check for a dumbell- "Hydrogen molecule"*L

In[8]:= list = 88M, 80, 0, a�2<<, 8M, 80, 0, -a�2<<<;

In[9]:= II = Table@Irot@j, k, listD, 8j, 3<, 8k, 3<D;

In[10]:= II �� MatrixFormH*looks ok*L

Out[10]//MatrixForm=a2 M

20 0

0 a2 M

20

0 0 0

In[11]:=

H*now tetrahedron*L

In[12]:= p = Pi - ArcCos@1�3D;

In[13]:= list = 88M, 8Sin@pD, 0, Cos@pD<<, 8M, 8Sin@pD Cos@2 Pi�3D, Sin@pD Sin@2 Pi�3D, Cos@pD<<,8M, 8Sin@pD Cos@2 Pi�3D, -Sin@pD Sin@2 Pi�3D, Cos@pD<<, 8M, 80, 0, 1<<<;

In[14]:= H*let us check that all distances between atoms are the same, Sqrt@8�3D*L

In[15]:= Table@8j, k, Hr@jD - [email protected]@jD - r@kDL<, 8j, 4<, 8k, 4<D �� Simplify

Out[15]= ::81, 1, 0<, :1, 2,8

3>, :1, 3,

8

3>, :1, 4,

8

3>>, ::2, 1,

8

3>, 82, 2, 0<, :2, 3,

8

3>, :2, 4,

8

3>>,

::3, 1,8

3>, :3, 2,

8

3>, 83, 3, 0<, :3, 4,

8

3>>, ::4, 1,

8

3>, :4, 2,

8

3>, :4, 3,

8

3>, 84, 4, 0<>>

In[16]:= H*looks ok*L

In[17]:= H*also check that the distances from center are 1*L

In[18]:= Table@[email protected]@jDL, 8j, 4<D H*ok*L

Out[18]= 81, 1, 1, 1<

In[19]:= H*now plot a picture, first single sphere, then full molecule*L

In[20]:= sph@R_, r_ListD :=

ParametricPlot3D@r + R 8Sin@tD Cos@pD, Sin@tD Sin@pD, Cos@tD<, 8t, -Pi, Pi<, 8p, 0, 2 Pi<D

Page 2: H firsttrytoconstructageneralformuls L D DH L D H D D@@ DD ...vitaly/688/688_rot.pdf · In[55]:=R=1;Show@Table@sph@R,Sqrt@3’2D*r@iDD,8i,4

In[21]:= sph@1, 80, 0, 0<D

Out[21]=

-1.0

-0.5

0.0

0.5

1.0

-1.0

-0.5

0.0

0.5

1.0

-1.0

-0.5

0.0

0.5

1.0

In[39]:= sph@R_, r_ListD := ParametricPlot3D@r + R 8Sin@tD Cos@pD, Sin@tD Sin@pD, Cos@tD<,8t, -Pi, Pi<, 8p, 0, 2 Pi<, PlotPoints® 824, 12<D

H*we reduced the number of points to save memory and do not show intermediate plots*L

2 688_rot.nb

Page 3: H firsttrytoconstructageneralformuls L D DH L D H D D@@ DD ...vitaly/688/688_rot.pdf · In[55]:=R=1;Show@Table@sph@R,Sqrt@3’2D*r@iDD,8i,4

In[55]:= R = 1; Show@Table@sph@R, Sqrt@3�2D *r@iDD, 8i, 4<D,PlotRange® 88-2.5, 2.5<, 8-2.5, 2.5<, 8-2.5, 2.5<<D

Out[55]=

-2

0

2

-2

0

2

-2

0

2

In[24]:= II = Table@Irot@j, k, listD, 8j, 3<, 8k, 3<D;

In[25]:= II �� MatrixForm

Out[25]//MatrixForm=8 M

30 0

0 8 M

30

0 0 8 M

3

In[26]:= H*now consider if one atom has a different mass -"isotope"*L

In[27]:= list = 881.1 M, 8Sin@pD, 0, Cos@pD<<, 8M, 8Sin@pD Cos@2 Pi�3D, Sin@pD Sin@2 Pi�3D, Cos@pD<<,8M, 8Sin@pD Cos@2 Pi�3D, -Sin@pD Sin@2 Pi�3D, Cos@pD<<, 8M, 80, 0, 1<<<;

In[28]:= II = Table@Irot@j, k, listD, 8j, 3<, 8k, 3<D �� N;

In[29]:= II �� MatrixForm H*note off-diagonal elements*LOut[29]//MatrixForm=

2.67778 M 0. 0.031427 M

0. 2.76667 M 0.

0.031427 M 0. 2.75556 M

In[30]:= Eigenvalues@IID

Out[30]= 82.66667 M, 2.76667 M, 2.76667 M<

In[31]:= H*the 1st remains 8�3, others are changed*L

688_rot.nb 3

Page 4: H firsttrytoconstructageneralformuls L D DH L D H D D@@ DD ...vitaly/688/688_rot.pdf · In[55]:=R=1;Show@Table@sph@R,Sqrt@3’2D*r@iDD,8i,4

In[32]:= M = 1; X = Eigenvectors@IID

Out[32]= 880.333333, 0., 0.942809<, 80., -1., 0.<, 8-0.942809, 0., 0.333333<<

In[33]:= X = Transpose@XD; H*to make columns*L X �� MatrixForm

Out[33]//MatrixForm=

0.333333 0. -0.942809

0. -1. 0.

0.942809 0. 0.333333

In[34]:= Inverse@XD .II.X �� Chop

Out[34]= 882.76667, 0, 0<, 80, 2.76667, 0<, 80, 0, 2.66667<<

In[35]:= % �� MatrixForm

Out[35]//MatrixForm=

2.76667 0 0

0 2.76667 0

0 0 2.66667

In[36]:= H*indeed diagonal with eigenvalues on diagonal*L

In[37]:= X@@1DD.X@@2DD

Out[37]= 0.

In[56]:= ?Sphere

Sphere@8x, y, z<, rD represents a sphere of radius r centered at Hx, y, zL.Sphere@8x, y, z<D represents a sphere of radius 1. �

In[57]:=

4 688_rot.nb

Page 5: H firsttrytoconstructageneralformuls L D DH L D H D D@@ DD ...vitaly/688/688_rot.pdf · In[55]:=R=1;Show@Table@sph@R,Sqrt@3’2D*r@iDD,8i,4

In[58]:= Show@Graphics3D@Table@Sphere@Sqrt@3�2D *r@iDD, 8i, 4<DDD

Out[58]=

688_rot.nb 5