Experimental geometries to Z-matrix



Dear Netters,
 I enclose 2 short programs which I found useful in converting
 experimental geometries to Z-matrix. They relate to my previous posting.
 You  will have to draw a picture to follow my variable names. Cut them and use
 them if you need them, or change them back to C if you did not buy the
 overpriced Fortran Compiler for your workstation (or use a CRAY, it always has
 FORTRAN, -:)   )
 The two short programs are followed by the example.
 I will put them in Comp.Chem.List archives as methyl.f and amino.f
 ============= PROGRAM METHYL ==============
 C   Jan Labanowski, Aug 13, 1992
 C   This "program" calculates geometrical parameters of the methyl
 group rotor
 C   suitable for constructing Z-matrix
 C   The experimental data from microwave spectroscopy for CH3--something
 C   are frequently given as a C--H bond lengths and H--C--H angle for
 C   an equilateral methyl piramid (idealized), and the deviation of the
 C   the C--something bond from the rotation axis of the CH3 (so called
 C   methyl group tilt). These data have to be converted to other parameters
 C   to be used in construction of the Z-matrix for the molecule.
 C
 C   Input:
 C   d = C--H bond length and  theta = angle H--C--H
 C
 C   Output:
 C   a = distance H....H (the side of the equilateral triangle formed by 3 H's)
 C   h = the height of the equilateral triangle formed by 3 H atoms
 C   v = height of the isosceles H--C--H
 C   alpha = angle between the C--H bond and the height of the CH3 pyramid
 C   Hp = the height of the pyramid formed by CH3
 C   beta = angle between height of the H--C--H isosceles (v) and the
 C          height of pyramid (Hp)
 C   Sorry for FORTRAN ugliness, but it is a translation of the C original
        PROGRAM METHYL
        DOUBLE PRECISION d, theta, alpha, h, Hp, a, v, deg, beta
        WRITE(*,*)
      1 ' Enter C--H bond length and H--C--H angle (in deg):'
        READ(*,*)d,theta
        WRITE(*,*)
        deg = 3.1415926536D0/180.0D0
        a = 2.0D0*d*dsin(0.5D0*theta*deg)
        v = d*dcos(0.5D0*theta*deg)
        h = 0.5D0*a*dsqrt(3.0D0)
        Hp = dsqrt(d*d - a*a/3.0D0)
        alpha = dacos(Hp/d)/deg
        beta = dacos(Hp/v)/deg
 100    FORMAT(1X,A,F10.5)
        WRITE(*,100) 'C--H bond length = ', d
        WRITE(*,100) 'H--C--H angle = ', theta
        WRITE(*,100) 'Height of the H--C--H isosceles =', v
        WRITE(*,100) 'H....H distance = ', a
        WRITE(*,100) 'Height of pyramid base (h)= ', h
        h = 2.0D0*h/3.0D0
        WRITE(*,100) '2/3*h = ',h
        WRITE(*,100) 'Angle between C--H bond and pyramid height = ',
      1              alpha
        WRITE(*,100) 'Pyramid height = ', Hp
        WRITE(*,100) 'Angle between wall height and pyramid height =',
      1              beta
        STOP
        END
 ================= end of methyl.f ============
 =================beginning of amino.f =========
 C   Jan Labanowski, Aug 13, 1992
 C   This "program" calculates geometrical parameters of the amino
 group
 C   suitable for constructing Z-matrix
 C   The experimental data from microwave spectroscopy for something-C-NH2
 C   are frequently given as a N--H bond lenth, C--N--H angle and H--N--H
 C   angle. Depending where you start, you need some dummy atoms to build
 C   the molecule. This programs gives you a few parameters you might use.
 C
 C   Input:
 C   d = N--H bond length, thCNH angle C--N--H, thHNH angle H--N--H
 C
 C   Output:
 C   a = distance H....H (the base of the H--N--H isosceles)
 C   v = the height of the H--N--H isosceles (i.e., v is the bisector of
 C       the H--N--H angle). It starts at C and ends at point Y. Point Y
 C       is located half way between H atoms.
 C   l = distance N--X (X is the projection of Y on the line passing through
 C        C--N). l is a projection of v on the C--N line.
 C   h = is the distance from Y to X. (h and l are perpendicular,
 C       h is a bisector of the H--X--H angle).
 C   b = H--X distance, i.e. distance of the point half way between H atoms
 C       and C--N line
 C   alpha = C--N--Y angle (angle between C--N bond and v).
 C   beta = half of H--X--H angle, i.e. half of the dihedral angle between
 C          two CNH planes, i.e., H--X--Y angle.
        PROGRAM AMINO
        DOUBLE PRECISION d, thCNH, thHNH, alpha, h, l, a, v, deg, beta
        WRITE(*,*)
      1 ' Enter N--H bond length, C--N--H angle, H--N--H angle (in deg):'
        READ(*,*)d,thCNH,thHNH
        WRITE(*,*)
        deg = 3.1415926536D0/180.0D0
        a = 2.0D0*d*dsin(0.5D0*thHNH*deg)
 C       v = d*dcos(0.5D0*thHNH*deg)
        v = dsqrt(d*d - a*a/4.0D0)
        b = d*dsin((180.0D0-thCNH)*deg)
        h = dsqrt(b*b - a*a/4.0D0)
        l = dsqrt(v*v - h*h)
        alpha = 180.0D0 - dasin(h/v)/deg
        beta = acos(h/b)/deg
 100    FORMAT(1X,A,F10.5)
        WRITE(*,100) 'N--H bond length = ', d
        WRITE(*,100) 'C--N--H angle = ', thCNH
        WRITE(*,100) 'H--N--H angle = ', thHNH
        WRITE(*,100) 'Height of the H--N--H isosceles =', v
        WRITE(*,100) 'H...H distance = ', a
        WRITE(*,100)
      1 'Projection of H--N--H bisector on the C--N line = ', l
        WRITE(*,100)
      1 'Distance between H...H midpoint and C--N line = ', h
        WRITE(*,100)
      1 'Angle between C--N bond and bisector of H--N--H = ', alpha
        WRITE(*,100)
      1 'Half of dihedral angle between C--N--H planes = ',beta
        WRITE(*,100)
      1 'Distance between H atom and C--N line = ', b
        STOP
        END
 ====================== end of amino.f =========
 Now I ran them for experimental data for CH3NH2 from Landolt-Boernstein,
 Group II, Vol. 7, Neue Serie. They were:
 dNH=1.0096 dCN=1.4714 dCH=1.0987
 aHCN=108.0  aHCN=110.3  aHNH=107.1
 Methyl group tilt was 2.9
 The results were of methyl were:
 ---------------------
  Enter C--H bond length and H--C--H angle (in deg):
 1.0987 108.0
  C--H bond length =    1.09870
  H--C--H angle =  108.00000
  Height of the H--C--H isosceles =   0.64580
  H....H distance =    1.77773
  Height of pyramid base (h)=    1.53956
  2/3*h =    1.02638
  Angle between C--H bond and pyramid height =   69.09484
  Pyramid height =    0.39204
  Angle between wall height and pyramid height =  52.62263
 Results of amino were:
 ----------------
  Enter N--H bond length, C--N--H angle, H--N--H angle (in deg):
 1.0096  110.3  107.1
  N--H bond length =    1.00960
  C--N--H angle =  110.30000
  H--N--H angle =  107.10000
  Height of the H--N--H isosceles =   0.59982
  H...H distance =    1.62420
  Projection of H--N--H bisector on the C--N line =    0.35027
  Distance between H...H midpoint and C--N line =    0.48693
  Angle between C--N bond and bisector of H--N--H =  125.72869
  Half of dihedral angle between C--N--H planes =   59.05317
  Distance between H atom and C--N line =    0.94689
 ===============================================================
 Based on these, I made a Z-matrix for CH3NH2 for G9X. It is not meant to
 be used for geometry optimization. I needed it to measure angles and
 such. You could probably make a better Z-matrix for CH3NH2
 ----------
 %chk=something
 # HF/STO-3G
 Methylamine Geometry from Landolt-Bornstein
 0 1
 X
 C 1  dCX
 H 2  dCH 1   aHCX
 H 2  dCH 1   aHCX 3  t120
 H 2  dCH 1   aHCX 4  t120
 X 2  dCV 1   aVCX 3  t180
 N 2  dCN 1   aNCH 3  t180
 X 7  dNY 2   aCNY 3  t0
 H 7  dNH 2   aCNH 8  tYXH
 H 7  dNH 2   aCNH 8  tmYXH
 dCX=0.39204
 dCH=1.09870
 dCN=1.4714
 dCV=0.64580
 dNH=1.00960
 dNY=0.59982
 aHCX=69.09484
 aVCX=52.62263
 aNCH=177.1
 aCNH=110.3
 aCNY=125.72869
 t120=120.0
 t180=180.0
 t0=0.0
 tYXH=59.05317
 tmYXH=-59.05317
 ===================
 I converted it to cartesians using xmol program which was announced on the
 list on 92/06/03 (it is a really nice piece of software, use it, when it
 is still available...).
 10
 Methylamine Geometry from Landolt-Bornstein
         X       0.000000        0.000000        0.000000
         C       0.392040        0.000000        0.000000
         H      -0.000000        1.026375        0.000000
         H      -0.000000       -0.513188        0.888867
         H      -0.000000       -0.513188       -0.888867
         X      -0.000001       -0.513188       -0.000000
         N       1.861556       -0.074442       -0.000000
         X       2.236006        0.394142       -0.000000
         H       2.236009        0.394145        0.812098
         H       2.236009        0.394145       -0.812098
 Sorry for the long message, but if someone have sent me this a week ago,
 I would be younger...
 Jan Labanowski
 Ohio Supercomputer Center
 jkl' at \`ccl.net