
DIMENSION XT(50),Y(50) C Program for rate constant of 1st order reactions via Least Squares WRITE(*,*) ' Program for rate constant of 1st order reactions' WRITE(*,*) ' ' WRITE(*,*) ' Enter the number of data points, N :' READ(*,*) N SUMX = 0.0 SUMY = 0.0 SUMXX = 0.0 SUMXY = 0.0 DO 11 I = 1,N,1 Write(*,*) ' Enter time t for Point No.:', I Read(*,*) XT(I) Write(*,*) ' Enter reactant conc. [A] for Point No.:', I Read(*,*) RECONC Y(I) = LOG10(RECONC) SUMX = SUMX + XT(I) SUMY = SUMY + Y(I) SUMXX = SUMXX + ( XT(I)**2 ) SUMXY = SUMXY + ( XT(I)*Y(I) ) 11 CONTINUE DENOM = (Float(N)*SUMXX - SUMX*SUMX) EM = (Float(N)*SUMXY - SUMX*SUMY)/DENOM RATECN = -2.303*EM WRITE(*,*) ' The value of rate constant is:' WRITE(*,*) RATECN STOP END DIMENSION XC(50),YA(50) C Program for Extinction Coeff. Detn. via Least Squares Fitting WRITE(*,*) ' Program for Extinction Coeff. Detn. via LSF' WRITE(*,*) ' ' WRITE(*,*) ' Enter the number of data points, n :' READ(*,*) N WRITE(*,*) ' Enter the cell width, l :' READ(*,*) EL SUMX = 0.0 SUMY = 0.0 SUMXX = 0.0 SUMXY = 0.0 DO 11 I = 1,N,1 Write(*,*) ' Enter the solute conc. c for Point No.:', I Read(*,*) XC(I) Write(*,*) ' Enter the absorbance A for Point No.:', I Read(*,*) YA(I) SUMX = SUMX + XC(I) SUMY = SUMY + YA(I) SUMXX = SUMXX + ( XC(I)**2 ) SUMXY = SUMXY + ( XC(I)*YA(I) ) 11 CONTINUE DENOM = (FLOAT(N)*SUMXX - SUMX*SUMX) EM = (FLOAT(N)*SUMXY - SUMX*SUMY)/DENOM EXTCOF = EM/EL WRITE(*,*) ' The value of extinction coefficient is:', EXTCOF STOP END DOUBLE PRECISION WPROD, FACTNI,G DIMENSION G(100),N(100) C Program for thermodynamic probability of m.p. distribution of a gas WRITE(*,*) ' Program for thermodynamic probability of a gas' WRITE(*,*) ' ' WRITE(*,*) ' Enter the number of occupied energy levels:' READ(*,*) NL WPROD = 1.0D+00 DO 11 I = 1,NL,1 WRITE(*,*) ' Enter degeneracy gi and population Ni of level:',I READ(*,*) G(I), N(I) NI = N(I) CALL FACTRL(NI,FACTNI) WPROD = WPROD*(G(I)**N(I)/FACTNI) 11 CONTINUE WRITE(*,14) WPROD 14 FORMAT(/2x,'The thermodynamic probability is:',E16.8) STOP END C The following subroutine calculates the factorial of aforesaid NI SUBROUTINE FACTRL(NM,FACTNM) DOUBLE PRECISION FACTNM FACTNM = 1.0D+00 DO 18 I = 1,NM,1 FACTNM = FACTNM*FLOAT(I) 18 CONTINUE RETURN END C Program to create an XYZ molecular-structure file from user inputs CHARACTER REM*75, ATOM*2 DIMENSION ATOM(99), X(99), Y(99), Z(99) WRITE(*,*) 'Reading the XYZ-file structure from user input ...' WRITE(*,*) ' ' WRITE(*,*) 'Enter the number of atoms present (2 to 100):' READ(*,*) NATOMS IF ((NATOMS .LT. 100) .AND. (NATOMS .GT. 1)) THEN WRITE(*,*) 'Enter a one-line remark for the 2nd line of file:' READ(*,10) REM 10 Format(A75) DO 15 I = 1, NATOMS, 1 WRITE(*,*) 'Enter Symbol & (x,y,z) coordinates for atom:', I READ(*,*) ATOM(I),X(I),Y(I),Z(I) 15 CONTINUE WRITE(*,*) 'Writing the structure to file XYZ_File.xyz ....' WRITE(*,*) ' ' OPEN (UNIT = 1, FILE = 'XYZ_File.xyz') CALL WRITEN(NATOMS) WRITE(1,21) REM 21 FORMAT(A75) DO 25 I = 1, NATOMS, 1 WRITE(1,24) ATOM(I),X(I),Y(I),Z(I) 24 FORMAT(A2,3F12.6) 25 CONTINUE WRITE(*,*) 'Output data got saved in file XYZ_File.xyz' ELSE WRITE(*,*) 'Too large or too small number of atoms!' ENDIF STOP END C Subroutine WriteN follows that properly writes NAtoms in file SUBROUTINE WRITEN(N) IF (N .LT. 10) THEN WRITE(1,27) N 27 FORMAT(I1) ELSE WRITE(1,28) N 28 FORMAT(I2) ENDIF RETURN END Drawing Molecular Models and Performing Computational Calculations on Them Using molecular modelling software such as ArgusLab, Avogadro or PCModel etc., the three- dimensional molecular model of the required molecule may be constructed. To do so with ArgusLab, we need to choose its ‘New Molecule’ option, take care to ensure that the ‘Add Atoms’ mode is set, then turn the ‘Automatic Bonds’ option on. Using appropriate distances (usually around 1.5 Å) and appropriate bond angles etc. for the covalent bonds connecting the non-hydrogen atoms, the molecular non-hydrogen nuclear framework may now be drawn, by making a right-click (with mouse) at the desired positions of the atoms. Note that while drawing an atom, at first the atom appears as a carbon atom, but it can be modified into any other atom later. Then the ‘Add Hydrogens’ option is used to fill in the missing hydrogen atoms. While drawing, the molecule image may be conveniently rotated in three dimensions to properly add the newly drawn atoms. The manually drawn structure may then be saved as a text file such as a XYZ (.xyz) file and then, finally, corrected in an automated way by ArgusLab to get the proper molecular geometry. The generated and finalized molecular model may then be finally saved (say, as .xyz file – see below) so as to contain specifications of its constituent nuclear positions. 6 Methanol in XYZ format specifying atoms and nuclear (x,y,z) values C -0.039459892 0.019729946 0.000000000 O 1.420556117 0.414328870 0.000000000 H -0.664467350 0.924918160 0.000000000 H -0.257906035 -0.576364125 0.898305711 H -0.257906035 -0.576364125 -0.898305711 H 1.639002280 1.010422940 -0.898305711 After getting such a molecular model file, a computational chemistry software package such as MOPAC, Gaussian, NWChem or Firefly (formerly called PC GAMESS) is used to perform computational chemistry calculations (of either quantum mechanics or molecular mechanics types) on that molecule. To do this, the aforesaid nuclear framework as well as the net molecular charge, spin multiplicity, level of QM or MM theory, basis sets etc. are to be specified. The computational software calculates the molecular electronic energy, dipole moments, moment of inertia etc. parameters. If asked, it may also correct (optimize) the molecular structure geometry further, providing a more correct structure. Even though performed in a computer, such computations may sometimes take several hours or even a few days, depending on the size of the molecular system and the complexity of the desired computations. .
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages3 Page
-
File Size-