C+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ C C PMIFST - Calculation of P_rincipal M_oments of I_nertia F_rom C molecular ST_ructure C C This program takes CART definitions or Cartesians as input. It first C calculates moments of inertia and then graphically displays the C structure in several ways. The structure can be rotated and structural C parameters can be checked. The program also offers a route for C conversion from Cartesian to connectivity information and to high quality C graphics output via GLE. C C+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ C C NOTE: This is an IBM-PC bound program and it is tied to the graphics C package incorporated with Intel Visual Fortran C C - the molecule can have up to NATMAX atoms (currently set to 500) C C C ver. 12.III.2024 ----- Zbigniew KISIEL ----- C __________________________________________________ C | Institute of Physics, Polish Academy of Sciences | C | Al.Lotnikow 32/46, Warszawa, POLAND | C | kisiel@ifpan.edu.pl | C | http://info.ifpan.edu.pl/~kisiel/prospe.htm | C_________________________/-------------------------------------------------- C C Modification history: C C ?.?.76: First version written for the IBM-360 computer. The atoms were C positioned as characters on 132 column lineprinter output. These C could then be joined by manually drawn lines! C The atom definition scheme was lifted from the CART programme C 76-95: Intermediate versions for various machines, operating systems and C graphics, including PDP-11 and Sinclair ZX-Spectrum C 8.6.95: Addition of GLE copy of molecule in the displayed orientation C 17.11.95: Addition of atom labelling to GLE output C 10.10.97: Option of preserving input Cartesians for display C 12.03.98: Incremental mods to GLE output, graphics, input menu + output C 31.03.99: 3D masking of bonds and atom circles in GLE output C 7.09.99: Graphics compatibility taken up to the level in V32 C 26.03.00: Option of reversal of axes for plotting C 16.04.00: Debugging+mods to GLE output C 30.08.00: Sorting out of axes in GLE output C 7.03.01: More GLE C 22.01.02: Conversion to CVF6.6 C 9.02.02: Configuration file + debugging C 4.11.02: Debugging + mods (mainly to GLE output) C 30.12.02: switch to QWIN graphics C 14.08.03: sorting out Window frame-size compatibility problems C 6.04.06: tidying code and modified GLE output for planar molecules C 7.10.06: debugging + GLE mods C 3.01.10: port to IVF C 19.08.10: tweaks to GLE output C 18.11.11: signed dihedrals accounting also for reversal of axes directions C 23.12.11: reworked gle output: schemes C 20.01.12: defined CART entries saved to file C 13.03.12: support for the .xyz Cartesian file standard and reworking of C the most ancient parts of the code dating back to the 1970's C 30.08.12: H-bond detection and plotting C 22.10.12: Batch evaluation of structural parameters C 25.03.13: Hydrogen bond detection options c 3.06.15: Debugging C 16.02.16: CFOUR/Firefly/Gaussian input + enhancements + debugging C 25.07.17: Debugging the evaluation of bond-inertial axis angle C 28.07.22: Tidying up internals C 29.11.23: New I option and update of startg for IVF16 compatibility C 12.03.24: Correction to I option + small mods C C C---------------------------------------------------------------------------- C C CART definitions (the code is adapted from that in program CART written in C the E.B.Wilson group, while the coordinate scheme was defined in H.R.Thomson, C J.Chem.Phys. 47,3407-3410(1967)): C C 1. Atom N in the molecule is defined in terms of three other neighbouring C atoms: NA, NB, and NC, and a bond length R(N-NA), a bond angle C A(N-NA-NB) and a dihedral angle D(N-NA-NB-NC) C C 1a. Atoms are declared in sequence of increasing N (starting from N=1) C and the numbers of the defining atoms NA, NB, NC all have to be smaller C than N (and all different) C C 1b. For N=1 set NA,NB,NC, R,A,D to zero C For N=2 set NB,NC, A,D to zero C For N=3 set NC, D to zero C C 2. For a right handed coordinate system dihedral angles are defined C by viewing the configuration C i/ from the NC direction along the NB-NA axis if NC is bonded to NB C ii/ from the NC direction along the NA-NB axis if NC is bonded to NA C The angle is defined positive for a clockwise rotation C of atom NC into the plane N-NA-NB. C C 3. In the calculation of initial cartesian coordinates the atom N=1 C defines the origin, the line N=1 to N=2 defines the X axis and C atoms N=1, N=2, N=3 define the XY plane. C C C............................................................................. C C 12.C Atomic masses, isotopic abundances and spins: C C 1.H 1.00782503207 99.9885 1/2 C 2.H 2.0141017778 0.0115 1 C 3.H 3.0160492675 1/2 C 10.B 10.0129370 19.9 3 C 11.B 11.0093055 80.1 3/2 C 12.C 12. 98.93 0 C 13.C 13.0033548378 1.07 1/2 C 14.C 14.003241988 0 C 14.N 14.0030740052 99.632 1 C 15.N 15.0001088984 0.368 1/2 C 16.O 15.9949146221 99.757 0 C 17.O 16.99913150 0.038 5/2 C 18.O 17.9991604 0.205 0 C 19.F 18.99840320 100 1/2 C 20.Ne 19.9924405 90.92 (0) C 22.Ne 21.9913847 8.82 (0) C 28.Si 27.976929 92.21 (0) C 29.Si 28.976496 4.70 1/2 C 30.Si 29.973763 3.09 (0) C 31.P 30.973765 100 1/2 C 32.S 31.97207100 95 0 C 33.S 32.97145876 0.760 3/2 C 34.S 33.96786690 4.22 0 C 35.Cl 34.96885268 75.529 3/2 C 37.Cl 36.96590259 24.471 3/2 C 36.Ar 35.9675445 0.337 0 C 40.Ar 39.9623842 99.6 0 C 79.Br 78.918329 50.537 3/2 C 81.Br 80.916292 49.463 3/2 C 82.Kr 81.913482 11.56 0 C 83.Kr 82.9141314 11.55 9/2 C 84.Kr 83.9115034 56.90 0 C 86.Kr 85.9106159 17.37 0 C 127.I 126.904473 100 5/2 C C............................................................................. C C When a molecule is displayed under the rotation option, various actions C can be selected by the following keys: C C E,X - rotation about the horizontal axis C S,D - rotation about the vertical axis C W,R - rotation about the axis perpendicular to the plane of the screen C (the six keys above are case sensitive - lower case gives slow and C upper case fast rotation) C C N - toggle display of numbers of atoms C C A - toggle display of principal axes C C G - generate a GLE script of the current display C C P - parameter checks: display is switched to a mode allowing checks of C values of bond lengths and bond angles C In this mode: C C - B selects calculation of a bond length to be followed by two atom C numbers C C - A selects calculation of a bond angle to be followed by three atom C numbers, a,b or c can be input instead of the third number for C calculation of the angle between a bond and a principal axis C C - D selects calculation of a dihedral angle to be followed by C four atom numbers C C - C allows generation of CART definition lines, which are saved C to a file with the current name and extension .TEMP C This feature allows rapid generation of a connectivity type C declaration from Cartesian data C C - E exits back to previous screen C C ENTER - termination of the graphics display (has to be confirmed with Y) C C C----------------------------------------------------------------------------- C D I H E D R A L A N G L E S: C----------------------------------------------------------------------------- C C Dihedral angle (A.B.C.D) (=torsional angle ABCD) is returned in degrees in C the -180 to +180 range according to the convention in the IUPAC GoldBook, C C see: http://goldbook.iupac.org/T06406.html C C In summary, in the Newman projection of the bonds in question, the dihedral C angle will be positive for clockwise rotation from the foreground (proximal) C to the background (distal) bond, and negative for anticlockwise rotation. C C This definition is consistent with point 2 of the CART (=Thomson) system C definition given above. C C It is possible to create a CART input file from Cartesian coordinates C by reading off the necessary parameters with the 'P' option of the PMIFST C display. Note that the +ve direction of each inertial axis is arbitrary so C that the handedness of the principal axes system may switch depending on C diagonalisation conditions. The consequence is a change of signs in all C dihedral angles. If necessary, the handedness of the displayed axes can be C changed by changing the direction of any inertial axis by specifying, C for example, '1,-2' as the displayed inertial plane. This also allows C switching between two enantiomers of a chiral species. C C Marek Jaworski is thanked for tweaking the dihedral evaluation code. C C C----------------------------------------------------------------------------- C I N S T A L L A T I O N: C----------------------------------------------------------------------------- C C 1/ place PMIFST.EXE and PMIFST.CFG in directory C:\ROT C 2/ using Windows Explorer send a shortcut to PMIFST to the desktop C 3/ add C:\ROT to the PATH if it is planned to launch from the command C prompt C C C----------------------------------------------------------------------------- C P M I F S T A N D W I N D O W S: C----------------------------------------------------------------------------- C C Drag and drop operation is the preferred mode. This is possible on C all input file types, i.e. CART (.PMI) and Cartesians (.COR). C The file can be dragged onto the PMIFST icon on the desktop and, C once the file type option is set as necessary, C the dragged file will be read in and processed as required. C C All output files (data, .res, .gle, .dat) are written to the directory C from which the data file was read. C C PMIFST can be run by just clicking on its icon. In this case note that C the system remembers the last directory in which PMIFST was used and C assumes it as default. If this directory is no longer to be worked on C then it is necessary to navigate to the required directory using C the FileSelect box. C C It is also possible to launch PMIFST from the command prompt window, C although the system assumptions concerning the default input directory will C depend on the Windows version. C C C----------------------------------------------------------------------------- C P M I F S T A N D G L E: C----------------------------------------------------------------------------- C C The 'G' option of the display allows generation of a script for the GLE C graphics package. The GLE program can then generate the diagram in many C different formats including PDF,EPS, and JPG. C The GLE script can be reedited in any text editor. C C The preferred mode of operation is to generate the gle script and C open it in the QGLE graphical front end of GLE. You can then change C the GLE generation options in PMIFST and the effect will be automatically C updated in QGLE. C C C----------------------------------------------------------------------------- C C O M P I L A T I O N: C----------------------------------------------------------------------------- C C This version will only compile satisfactorily with C Intel Visual Fortran (and possibly with its immediately preceding C Compaq Visual Fortran) C C Compilation is for QWIN graphics - this necessitates explicit C programming out of several unnecessary frills, but results in smoother C launch of the program than is possible with the STANDARD graphics as used C previously. C C C---------------------------------------------------------------- C Visual Studio Net compilation for Intel Visual Fortran 9: C---------------------------------------------------------------- C C FORTRAN: /nologo /G5 /fpscomp:filesfromcmd /warn:unused C /Qsave /module:"Debug/" /object:"Debug/" /traceback C /libs:qwin /c C C LINK: /OUT:"Debug/pmifst.exe" /NOLOGO /SUBSYSTEM:WINDOWS C /MACHINE:IX86 kernel32.lib C C Note: the -Qsave compiler option is equivalent to the previous -static C compiler option for static variable allocation. The -static option C now has the meaning of preventing linking with shared libraries. C C C---------------------------------------------------------------- C Visual Studio compilation for Intel Visual Composer XE 2011: C (cleaned up after automatic conversion) C---------------------------------------------------------------- C C FORTRAN: /nologo /arch:IA32 /fpscomp:filesfromcmd /warn:unused C /Qsave /module:"Debug/" /object:"Debug/" /traceback C /libs:qwin /c C C LINK: /OUT:"Debug/pmifst.exe" /NOLOGO /MANIFEST:NO C /SUBSYSTEM:WINDOWS /MACHINE:IX86 kernel32.lib C C Note: the -arch:IA32 is now to be used instead of G5 for enforcing C backward Pentium processor compatibility C C_____________________________________________________________________________ C C Standard colours: C C 0 - black 4 - dark red 8 - dark grey 12 - red C 1 - dark blue 5 - dark purple 9 - blue 13 - purple C 2 - dirty green 6 - dirty yellow 10 - green 14 - yellow C 3 - blue/green 7 - grey 11 - light blue 15 - white C C/////////////////////////////////////////////////////////////////////////////