### Navigation

- index
- modules |
- next |
- previous |
- MDAnalysis 0.7.7 documentation »
- 4. Topology modules »

# 4.3. MDAnalysis topology tables

The module contains static lookup tables for atom typing etc. The tables are dictionaries that are indexed by the element.

`MDAnalysis.topology.tables.``atomelements` = {'BC': 'C', 'K+': 'K', 'AC': 'C', 'LIT': 'LI', 'CA2+': 'CA', 'FE': 'FE', 'CAL': 'CA', 'MG2+': 'MG', 'CL-': 'CL', 'CLAL': 'CL', 'SOD': 'NA', 'CS+': 'CS', 'NA': 'NA', 'POT': 'K', 'LI': 'LI', 'CES': 'CS', 'RB': 'RB', 'C0': 'CA', 'ZN': 'ZN', 'CL': 'CL', 'CLA': 'CL', 'CS': 'CS', 'CU': 'CU', 'MG': 'MG', 'QR': 'RB', 'NA+': 'NA', 'LI+': 'LI', 'QC': 'CE', 'QK': 'K', 'QL': 'LI', 'QN': 'NA'}

  Dictionary with hard-coded special atom names, used for guessing atom types with `MDAnalysis.topology.core.guess_atom_type()`.

`MDAnalysis.topology.tables.``masses` = {'Ru': 101.07, 'Yb': 173.04, 'Re': 186.207, 'Rf': 261.0, 'Ra': 226.025, 'BR': 79.904, 'Rn': 222.0, 'Rh': 102.9055, 'Be': 9.012182, 'Ba': 137.327, 'Bh': 262.0, 'Bi': 208.98037, 'Bk': 247.0, 'Se': 78.96, 'RB': 85.4678, 'H': 1.008, 'P': 30.974, 'Os': 190.2, 'Ge': 72.61, 'Gd': 157.25, 'Ga': 69.723, 'Pr': 140.90765, 'Pt': 195.08, 'Pu': 244.0, 'ZN': 65.37, 'Pb': 207.2, 'Pa': 231.0359, 'Pd': 106.42, 'Xe': 131.29, 'Po': 209.0, 'HE': 4.0026, 'Hs': 265.0, 'Ho': 164.93032, 'Hf': 178.49, 'Hg': 200.59, 'Md': 258.0, 'C': 12.011, 'K': 39.102, 'Mn': 54.93805, 'O': 15.999, 'Mt': 266.0, 'S': 32.06, 'W': 183.85, 'MG': 24.305, 'Eu': 151.965, 'Es': 252.0, 'Er': 167.26, 'Ni': 58.6934, 'No': 259.0, 'Na': 22.989768, 'Nb': 92.90638, 'Nd': 144.24, 'FE': 55.847, 'Np': 237.048, 'Fr': 223.0, 'NA': 22.98977, 'NE': 20.1797, 'Fm': 257.0, 'B': 10.811, 'F': 18.998, 'Sr': 87.62, 'CA': 40.08, 'N': 14.007, 'Kr': 83.8, 'Si': 28.0855, 'Sn': 118.71, 'Sm': 150.36, 'V': 50.9415, 'CS': 132.9, 'Sb': 121.757, 'Sg': 263.0, 'CU': 63.546, 'Co': 58.9332, 'Cm': 247.0, 'Cf': 251.0, 'Ce': 140.116, 'Cd': 112.411, 'Tm': 168.93421, 'Cr': 51.9961, 'La': 138.9055, 'Li': 6.941, 'Tl': 204.3833, 'Lu': 174.967, 'Lr': 262.0, 'Th': 232.0381, 'Ti': 47.88, 'Te': 127.6, 'Tb': 158.92534, 'Tc': 98.0, 'Ta': 180.9479, 'CL': 35.45, 'Db': 262.0, 'Zr': 91.224, 'Dy': 162.5, 'Pm': 145.0, 'I': 126.9045, 'U': 238.0289, 'Y': 88.90585, 'Sc': 44.95591, 'Ac': 227.028, 'Ag': 107.8682, 'Ir': 192.22, 'Am': 243.0, 'Al': 26.981539, 'As': 74.92159, 'Ar': 39.948, 'Au': 196.96654, 'At': 210.0, 'In': 114.82, 'Mo': 95.94}

  Dictionary table with atomic masses in u, indexed by the element from `atomelements`.

The original raw data are stored as multi-line strings that are translated into dictionaries with `kv2dict()`. In the future, these tables might be moved into external data files; see `kv2dict()` for explanation of the file format.

`MDAnalysis.topology.tables.``kv2dict`(s, convertor=<type 'str'>)

  Primitive ad-hoc parser of a key-value record list.

  - The string s should contain each key-value pair on a separate line (separated by newline). The first white space after the key separates key and value.
  - Empty lines are allowed.
  - Comment lines (starting with #) are allowed.
  - Leading whitespace is ignored.

  The convertor is a function that converts its single argument to a valid Python type. The default is `str()` but other possibilities are `int()` (for integers) or `float()` for floating point numbers.

The raw tables are stored in the strings

`MDAnalysis.topology.tables.``TABLE_ATOMELEMENTS` = '\n# translation of atomnames to types/element\n# based on CHARMM and AMBER usage with a little bit of GROMOS\n# NOTE: CL might be ambiguous and is interpreted as chloride!\n\n# --------- ------------------\n# atomname element\n# --------- ------------------\n\n# Calcium\nCAL CA\nC0 CA\nCA2+ CA\n\n# Cesium\nCES CS\n\n# Chloride\nCLA CL\nCLAL CL\nCL CL\nCL- CL\n\n# Iron\nFE FE\n\n# Lithium\nLIT LI\nLI LI\nLI+ LI\nQL LI\n\n# Magnesium\nMG MG\nMG2+ MG\n\n# Noble gases\n## XXX collides with NE, HE in Arg XXX\n## XXX so we remove the noble gases XXX\n##HE HE\n##NE NE\n\n# Potassium\nPOT K\nK+ K\nQK K\n\n# Sodium\nSOD NA\nNA NA\nNA+ NA\nQN NA\n\n# Zink\nZN ZN\n\n# Copper\nCU CU\n\n# Cesium\nCS CS\nCS+ CS\nCES CS\n\n# Cerium??\nQC CE\n\n# Rubidium\nRB RB\nQR RB\n\n# special carbons (Amber?)\nBC C\nAC C\n\n# other types are guessed from the name; see\n# topology.core.guess_atom_elements()\n'

  Table with hard-coded special atom names, used for guessing atom types with `MDAnalysis.topology.core.guess_atom_element()`.

`MDAnalysis.topology.tables.``TABLE_MASSES` = '\n# masses for elements in atomic units (u)\n# (taken from CHARMM and Gromacs atommass.dat)\n\n#------------ -----------\n# atomtype mass\n#------------ -----------\nAc 227.028\nAl 26.981539\nAm 243\nSb 121.757\nAr 39.948\nAs 74.92159\nAt 210\nBa 137.327\nBk 247\nBe 9.012182\nBi 208.98037\nBh 262\nB 10.811\nBR 79.90400\nCd 112.411\nCA 40.08000\nCf 251\nC 12.01100\nCe 140.11600\nCS 132.90000\nCL 35.45000\nCr 51.9961\nCo 58.9332\nCU 63.54600\nCm 247\nDb 262\nDy 162.5\nEs 252\nEr 167.26\nEu 151.965\nFm 257\nF 18.99800\nFr 223\nGd 157.25\nGa 69.723\nGe 72.61\nAu 196.96654\nHf 178.49\nHs 265\nHE 4.00260\nHo 164.93032\nH 1.00800\nIn 114.82\nI 126.90450\nIr 192.22\nFE 55.84700\nKr 83.8\nLa 138.9055\nLr 262\nPb 207.2\nLi 6.941\nLu 174.967\nMG 24.30500\nMn 54.93805\nMt 266\nMd 258\nHg 200.59\nMo 95.94\nN 14.00700\nNA 22.98977\nNd 144.24\nNE 20.17970\nNp 237.048\nNi 58.6934\nNb 92.90638\nNo 259\nOs 190.2\nO 15.99900\nPd 106.42\nP 30.97400\nPt 195.08\nPu 244\nPo 209\nK 39.10200\nPr 140.90765\nPm 145\nPa 231.0359\nRa 226.025\nRn 222\nRe 186.207\nRh 102.9055\nRB 85.46780\nRu 101.07\nRf 261\nSm 150.36\nSc 44.95591\nSg 263\nSe 78.96\nSi 28.0855\nAg 107.8682\nNa 22.989768\nSr 87.62\nS 32.06000\nTa 180.9479\nTc 98\nTe 127.6\nTb 158.92534\nTl 204.3833\nTh 232.0381\nTm 168.93421\nSn 118.71\nTi 47.88\nW 183.85\nU 238.0289\nV 50.9415\nXe 131.29\nYb 173.04\nY 88.90585\nZN 65.37000\nZr 91.224\n'

  Plain-text table with atomic masses in u.

### Navigation

- index
- modules |
- next |
- previous |
- MDAnalysis 0.7.7 documentation »
- 4. Topology modules »