6.1.2.4. MDAnalysis topology tables
The module contains static lookup tables for atom typing etc. The tables are dictionaries that are indexed by the element.
- MDAnalysis.guesser.tables.atomelements = {'AC': 'C', 'BC': 'C', 'BR': 'BR', 'C0': 'CA', 'CA2+': 'CA', 'CAL': 'CA', 'CES': 'CS', 'CL': 'CL', 'CL-': 'CL', 'CLA': 'CL', 'CLAL': 'CL', 'CS': 'CS', 'CS+': 'CS', 'CU': 'CU', 'FE': 'FE', 'FE2': 'FE', 'IOD': 'I', 'K': 'K', 'K+': 'K', 'LI': 'LI', 'LI+': 'LI', 'LIT': 'LI', 'MG': 'MG', 'MG2+': 'MG', 'MW': 'DUMMY', 'NA': 'NA', 'NA+': 'NA', 'POT': 'K', 'QC': 'CE', 'QK': 'K', 'QL': 'LI', 'QN': 'NA', 'QR': 'RB', 'RB': 'RB', 'SOD': 'NA', 'ZN': 'ZN'}
Dictionary with hard-coded special atom names, used for guessing atom types with
MDAnalysis.topology.core.guess_atom_type()
.
- MDAnalysis.guesser.tables.masses = {'Ac': 227.028, 'Ag': 107.8682, 'Al': 26.981539, 'Am': 243.0, 'Ar': 39.948, 'As': 74.92159, 'At': 210.0, 'Au': 196.96654, 'B': 10.811, 'BR': 79.904, 'Ba': 137.327, 'Be': 9.012182, 'Bh': 264.0, 'Bi': 208.98037, 'Bk': 247.0, 'C': 12.011, 'CA': 40.08, 'CL': 35.45, 'CS': 132.9, 'CU': 63.546, 'Cd': 112.411, 'Ce': 140.116, 'Cf': 251.0, 'Cm': 247.0, 'Co': 58.9332, 'Cr': 51.9961, 'DUMMY': 0.0, 'Db': 262.0, 'Dy': 162.5, 'Er': 167.26, 'Es': 252.0, 'Eu': 151.965, 'F': 18.998, 'FE': 55.847, 'Fm': 257.0, 'Fr': 223.0, 'Ga': 69.723, 'Gd': 157.25, 'Ge': 72.61, 'H': 1.008, 'HE': 4.0026, 'Hf': 178.49, 'Hg': 200.59, 'Ho': 164.93032, 'Hs': 265.0, 'I': 126.9045, 'In': 114.82, 'Ir': 192.22, 'K': 39.102, 'Kr': 83.8, 'La': 138.9055, 'Li': 6.941, 'Lr': 262.0, 'Lu': 174.967, 'MG': 24.305, 'Md': 258.0, 'Mn': 54.93805, 'Mo': 95.94, 'Mt': 266.0, 'N': 14.007, 'NA': 22.98977, 'NE': 20.1797, 'Na': 22.989768, 'Nb': 92.90638, 'Nd': 144.24, 'Ni': 58.6934, 'No': 259.0, 'Np': 237.048, 'O': 15.999, 'Os': 190.2, 'P': 30.974, 'Pa': 231.0359, 'Pb': 207.2, 'Pd': 106.42, 'Pm': 145.0, 'Po': 209.0, 'Pr': 140.90765, 'Pt': 195.08, 'Pu': 244.0, 'RB': 85.4678, 'Ra': 226.025, 'Re': 186.207, 'Rf': 261.0, 'Rh': 102.9055, 'Rn': 222.0, 'Ru': 101.07, 'S': 32.06, 'Sb': 121.757, 'Sc': 44.95591, 'Se': 78.96, 'Sg': 263.0, 'Si': 28.0855, 'Sm': 150.36, 'Sn': 118.71, 'Sr': 87.62, 'Ta': 180.9479, 'Tb': 158.92534, 'Tc': 98.0, 'Te': 127.6, 'Th': 232.0381, 'Ti': 47.88, 'Tl': 204.3833, 'Tm': 168.93421, 'U': 238.0289, 'V': 50.9415, 'W': 183.85, 'Xe': 131.29, 'Y': 88.90585, 'Yb': 173.04, 'ZN': 65.37, 'Zr': 91.224}
Dictionary table with atomic masses in u, indexed by the element from
atomelements
.
- MDAnalysis.guesser.tables.vdwradii = {'AA': 1.85, 'AG': 1.72, 'AL': 1.84, 'AR': 1.88, 'AT': 2.02, 'AU': 1.66, 'B': 1.92, 'BA': 2.68, 'BE': 1.53, 'BI': 2.07, 'BR': 1.85, 'C': 1.7, 'CA': 2.31, 'CD': 1.58, 'CL': 1.75, 'CS': 3.43, 'CU': 1.4, 'F': 1.47, 'FR': 3.48, 'GA': 1.87, 'GE': 2.11, 'H': 1.1, 'HE': 1.4, 'HH': 1.55, 'I': 1.98, 'IN': 1.93, 'K': 2.75, 'KR': 2.02, 'LI': 1.82, 'MG': 1.73, 'N': 1.55, 'NA': 2.27, 'NE': 1.54, 'NI': 1.63, 'O': 1.52, 'P': 1.8, 'PB': 2.02, 'PD': 1.63, 'PO': 1.97, 'PT': 1.75, 'RA': 2.83, 'RN': 2.2, 'RR': 3.03, 'S': 1.8, 'SB': 2.06, 'SE': 1.9, 'SI': 2.1, 'SN': 2.17, 'SR': 2.49, 'TE': 2.06, 'TL': 1.96, 'U': 1.86, 'XE': 2.16, 'ZN': 1.39}
Dictionary table with vdw radii, indexed by the element from
atomelements
. .. SeeAlso::MDAnalysis.topology.core.guess_bonds()
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.guesser.tables.kv2dict(s, convertor: ~typing.Any = <class 'str'>)[source]
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 areint()
(for integers) orfloat()
for floating point numbers.
The raw tables are stored in the strings
- MDAnalysis.guesser.tables.TABLE_ATOMELEMENTS = '\n# translation of atomnames to types/element\n# based on CHARMM and AMBER usage with a little bit of GROMOS (and PROPKA)\n# NOTE: CL might be ambiguous and is interpreted as chloride!\n\n# --------- ------------------\n# atomname element\n# --------- ------------------\n\n# Bromide\nBR BR\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# Iodide\nIOD I\n\n# Iron\nFE FE\nFE2 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\nK K\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# dummy atom types\nMW DUMMY\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.guesser.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 264\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\nDUMMY 0.0\n'
Plain-text table with atomic masses in u.
- MDAnalysis.guesser.tables.TABLE_VDWRADII = '\n# Van der Waals radii taken from\n# [1] Bondi, A. (1964). "Van der Waals Volumes and Radii".\n# J. Phys. Chem. 68 (3): 441-451. doi:10.1021/j100785a001.\n# [2] Rowland and Taylor (1996). "Intermolecular Nonbonded Contact Distances in Organic Crystal Structures:\n# Comparison with Distances Expected from van der Waals Radii".\n# J. Phys. Chem., 1996, 100 (18), 7384.7391. doi:10.1021/jp953141+.\n# [3] Mantina, et al. (2009). "Consistent van der Waals Radii for the Whole Main Group".\n# J. Phys. Chem. A, 2009, 113 (19), 5806-5812. doi:10.1021/jp8111556.\n#------------ -----------\n# atomtype r_vdw\n#------------ -----------\nH 1.10\nHE 1.40\nLI 1.82\nBE 1.53\nB 1.92\nC 1.70\nN 1.55\nO 1.52\nF 1.47\nNE 1.54\nNA 2.27\nMG 1.73\nAL 1.84\nSI 2.10\nP 1.80\nS 1.80\nCL 1.75\nAR 1.88\nK 2.75\nCA 2.31\nNI 1.63\nCU 1.40\nZN 1.39\nGA 1.87\nGE 2.11\nAA 1.85\nSE 1.90\nBR 1.85\nKR 2.02\nRR 3.03\nSR 2.49\nPD 1.63\nAG 1.72\nCD 1.58\nIN 1.93\nSN 2.17\nSB 2.06\nTE 2.06\nI 1.98\nXE 2.16\nCS 3.43\nBA 2.68\nPT 1.75\nAU 1.66\nHH 1.55\nTL 1.96\nPB 2.02\nBI 2.07\nPO 1.97\nAT 2.02\nRN 2.20\nFR 3.48\nRA 2.83\nU 1.86\n'
Plain-text table with vdw radii.