home *** CD-ROM | disk | FTP | other *** search
/ GEMini Atari / GEMini_Atari_CD-ROM_Walnut_Creek_December_1993.iso / zip / graphics / utility / ms074.lzh / MS074 / MLS.TXT < prev    next >
Text File  |  1992-09-17  |  4KB  |  128 lines

  1. MolSys molecular model file format -------------------------------------------
  2.  
  3. This is the format of .MLS molecule fragment files produced by MolSys. It
  4. will be primarily of interest to those who wish to convert molecule files
  5. to and from MLS format. 
  6. The format describes type #6 MLS files only. This is the format used by
  7. the current version of MolSys.
  8.  
  9. The file format :
  10.  
  11. (13 bytes) "MolSys XXXXX" terminated with a zero byte.
  12. Only the first 6 bytes are checked by MolSys to determine if the file 
  13. is correct. "XXXXX" depends on the source of the file. Files saved from
  14. MolSys will have "vX.YZ" where X.YZ if the version of MolSys which produced
  15. the file.
  16. e.g. "MolSys v0.74\0"
  17.  
  18. (At least 2 bytes) String containing the name of the fragment terminated by a
  19. line feed ($0A) and a zero byte.
  20. e.g. "Cyclohexane\n\0"
  21.  
  22. (1 word) Number of atoms in the fragment, in Motorola format.
  23.  
  24. (1 byte) $06, denoting a type 6 molecule file.
  25.  
  26. Then, for each atom, repeated for the number of atoms:
  27.  
  28. (1 byte) The atom type, see table below.
  29.  
  30. (3 * 8 bytes) The X, Y and Z co-ordinates of the atom, in nanometers, 
  31. in a fixed point format (see below).
  32.  
  33. (1 word) The number of the 1st atom to which this atom is bonded.
  34. (1 word) The number of the 2nd atom to which this atom is bonded.
  35. (1 word) The number of the 3rd atom to which this atom is bonded.
  36. (1 word) The number of the 4th atom to which this atom is bonded.
  37. A maximum of 4 atoms may be bonded to each atom. If less than 4 bonds
  38. are needed, the unused words are set to -1. Atom numbering starts at 0 and
  39. is given by the position of the atom in the file.
  40.  
  41. (4 bytes) 4 bytes reflecting the types of the bonds above. 1=single,
  42. 2=double, 3=triple, 0=unbonded.
  43.  
  44. (1 byte) $4D, indicating end of atom. MolSys checks this byte after reading
  45. each atom to ensure that the file has not become corrupt.
  46.  
  47. ------------------------------------------------------------------------------ 
  48.  
  49. The atom types:
  50. Type no.    Symbol        No. of bonds    Atom
  51. 0        0        1        Site type 0
  52. 1        1        1        Site type 1
  53. 2        2        1        Site type 2
  54. 3        3        1        Site type 3
  55. 4        C        4        Carbon >C<
  56. 5        C        3        Carbon >C=
  57. 6        C        2        Carbon ≡C-
  58. 7        C        2        Carbon =C=
  59. 8        O        2        Oxygen -O-
  60. 9        O        1        Oxygen =O
  61. 10        O        1        Oxygen -O¯
  62. 11        N        3        Nitrogen -N<
  63. 12        N        2        Nitrogen -N=
  64. 13        N        1        Nitrogen ≡N
  65. 14        N        4        Nitrogen >N+<
  66. 15        P        4        Phosphorus =P≤
  67. 16        S        2        Sulphur -S-
  68. 17        S        4        Sulphur >S«
  69. 18        H        1        Hydrogen -H
  70. 19        F        1        Fluorine -F
  71. 20        Cl        1        Chlorine -Cl
  72. 21        Br        1        Bromine -Br
  73. 22        I        1        Iodine -I
  74.  
  75. Fixed point format:
  76. This format represents a fixed point number in 8 bytes and is used for
  77. the atom co-ordinates. The bit layout is:
  78. Bit 63:        Sign bit, 0 +ve, 1 -ve
  79. Bits 62-0:    Absolute value of the co-ordinate, with an implicit
  80.         binary point between bits 47 and 48.
  81.          
  82. Thus co-ordinates are stored such that the maximum possible size of
  83. the molecule is 65536 nm (about the size of a human chromosome) and to
  84. a resolution of about 4e-15 nm.
  85.  
  86. Example file:
  87. The example given is that of a molecule of water, consisting of 3 atoms
  88. in a file of 143 bytes.
  89.  
  90. Hex:                    Description:
  91. 4D6F 6C53 7973 2076 302E 3734 00    "MolSys v0.74\0"
  92. 5761 7465 7220 2848 324F 290A 00    "Water (H2O)\n\0"
  93. 0003                    3 atoms in fragment
  94. 06                    Type #6 file
  95. ----------------------------------------Start of atom 0:
  96. 08                    Type 8 atom (Oxygen -O-, 2 bonds)
  97. XXXX XXXX XXXX XXXX            X-coord
  98. YYYY YYYY YYYY YYYY            Y-coord
  99. ZZZZ ZZZZ ZZZZ ZZZZ            Z-coord
  100. 0002 0001 FFFF FFFF            Bonded to atoms 2 and 1 
  101. 01 01 00 00                2 single bonds, 2 unused bonds
  102. 4D                    End of atom marker
  103. ----------------------------------------Start of atom 1:
  104. 12                    Type 18 ($12) atom (Hydrogen -H, 1 bond)
  105. XXXX XXXX XXXX XXXX            X-coord
  106. YYYY YYYY YYYY YYYY            Y-coord
  107. ZZZZ ZZZZ ZZZZ ZZZZ            Z-coord
  108. 0000 FFFF FFFF FFFF            Bonded to atom 0
  109. 01 00 00 00                One single bond
  110. 4D                    End of atom marker 
  111. ----------------------------------------Start of atom 2:
  112. 12                    Type 18 ($12) atom (Hydrogen -H, 1 bond)
  113. XXXX XXXX XXXX XXXX            X-coord
  114. YYYY YYYY YYYY YYYY            Y-coord
  115. ZZZZ ZZZZ ZZZZ ZZZZ            Z-coord
  116. 0000 FFFF FFFF FFFF            Bonded to atom 0
  117. 01 00 00 00                One single bond
  118. 4D                    End of atom marker
  119.  
  120.  
  121. This is the format of type #6 MLS files, as used by v0.74 of MolSys.
  122. Previous versions of MolSys used a slightly different format with the
  123. atom co-ordinates stored as floating point numbers. These new files are
  124. designed to be more portable to the PC version of MolSys, PMS.
  125.  
  126. R.M.    16/09/92
  127.  
  128.