Repository: biopython/biopython

Issue:
Make relative accessibility normalization scales broadly accessible
As discussed in #3588, in `Bio.PDB.DSSP` there are multiple scales used to normalize absolute solvent accessibility values (ASA) to relative solvent accessibility (RSA): `residue_max_acc`. It would be nice to move these scales to a more accessible (no pun intended) location so that other modules (e.g. `Bio.PDB.SASA.py`) can use them more easily. The new `Bio.Data.PDBData` module introduced in #3985 might be a good candidate to store these scales.


Discussion:

Resolving patch:
diff --git a/Bio/Data/PDBData.py b/Bio/Data/PDBData.py
--- a/Bio/Data/PDBData.py
+++ b/Bio/Data/PDBData.py
@@ -290,3 +290,99 @@
     "45A": "A", "4U3": "C", "8AG": "G", "8AN": "A", "8BA": "A", "8FG": "G",
     "8MG": "G", "8OG": "G", "8PY": "G", "8AA": "G", "85Y": "U", "8OS": "G",
 }
+
+# Solvent accesibility scales
+residue_sasa_scales = {
+    # Ahmad: Ahmad et al. 2003 https://doi.org/10.1002/prot.10328
+    "Ahmad": {
+        "ALA": 110.2,
+        "ARG": 229.0,
+        "ASN": 146.4,
+        "ASP": 144.1,
+        "CYS": 140.4,
+        "GLN": 178.6,
+        "GLU": 174.7,
+        "GLY": 78.7,
+        "HIS": 181.9,
+        "ILE": 183.1,
+        "LEU": 164.0,
+        "LYS": 205.7,
+        "MET": 200.1,
+        "PHE": 200.7,
+        "PRO": 141.9,
+        "SER": 117.2,
+        "THR": 138.7,
+        "TRP": 240.5,
+        "TYR": 213.7,
+        "VAL": 153.7,
+    },
+    # Miller max acc: Miller et al. 1987 https://doi.org/10.1016/0022-2836(87)90038-6
+    "Miller": {
+        "ALA": 113.0,
+        "ARG": 241.0,
+        "ASN": 158.0,
+        "ASP": 151.0,
+        "CYS": 140.0,
+        "GLN": 189.0,
+        "GLU": 183.0,
+        "GLY": 85.0,
+        "HIS": 194.0,
+        "ILE": 182.0,
+        "LEU": 180.0,
+        "LYS": 211.0,
+        "MET": 204.0,
+        "PHE": 218.0,
+        "PRO": 143.0,
+        "SER": 122.0,
+        "THR": 146.0,
+        "TRP": 259.0,
+        "TYR": 229.0,
+        "VAL": 160.0,
+    },
+    # Sander: Sander & Rost 1994 https://doi.org/10.1002/prot.340200303
+    "Sander": {
+        "ALA": 106.0,
+        "ARG": 248.0,
+        "ASN": 157.0,
+        "ASP": 163.0,
+        "CYS": 135.0,
+        "GLN": 198.0,
+        "GLU": 194.0,
+        "GLY": 84.0,
+        "HIS": 184.0,
+        "ILE": 169.0,
+        "LEU": 164.0,
+        "LYS": 205.0,
+        "MET": 188.0,
+        "PHE": 197.0,
+        "PRO": 136.0,
+        "SER": 130.0,
+        "THR": 142.0,
+        "TRP": 227.0,
+        "TYR": 222.0,
+        "VAL": 142.0,
+    },
+    # Wilke: Tien et al. 2013 https://doi.org/10.1371/journal.pone.0080635
+    "Wilke": {
+        "ALA": 129.0,
+        "ARG": 274.0,
+        "ASN": 195.0,
+        "ASP": 193.0,
+        "CYS": 167.0,
+        "GLN": 225.0,
+        "GLU": 223.0,
+        "GLY": 104.0,
+        "HIS": 224.0,
+        "ILE": 197.0,
+        "LEU": 201.0,
+        "LYS": 236.0,
+        "MET": 224.0,
+        "PHE": 240.0,
+        "PRO": 159.0,
+        "SER": 155.0,
+        "THR": 172.0,
+        "TRP": 285.0,
+        "TYR": 263.0,
+        "VAL": 174.0,
+    }
+}
diff --git a/Bio/PDB/DSSP.py b/Bio/PDB/DSSP.py
--- a/Bio/PDB/DSSP.py
+++ b/Bio/PDB/DSSP.py
@@ -100,7 +100,7 @@
 from Bio.PDB.AbstractPropertyMap import AbstractResiduePropertyMap
 from Bio.PDB.PDBExceptions import PDBException
 from Bio.PDB.PDBParser import PDBParser
-from Bio.Data.PDBData import protein_letters_3to1
+from Bio.Data.PDBData import protein_letters_3to1, residue_sasa_scales
 from Bio.PDB.MMCIF2Dict import MMCIF2Dict
 
 # Match C in DSSP
@@ -108,101 +108,7 @@
 
 # Maximal ASA of amino acids
 # Used for relative accessibility
-
-residue_max_acc = {
-    # Miller max acc: Miller et al. 1987 https://doi.org/10.1016/0022-2836(87)90038-6
-    # Wilke: Tien et al. 2013 https://doi.org/10.1371/journal.pone.0080635
-    # Sander: Sander & Rost 1994 https://doi.org/10.1002/prot.340200303
-    # Ahmad: Ahmad et al. 2003 https://doi.org/10.1002/prot.10328
-    "Miller": {
-        "ALA": 113.0,
-        "ARG": 241.0,
-        "ASN": 158.0,
-        "ASP": 151.0,
-        "CYS": 140.0,
-        "GLN": 189.0,
-        "GLU": 183.0,
-        "GLY": 85.0,
-        "HIS": 194.0,
-        "ILE": 182.0,
-        "LEU": 180.0,
-        "LYS": 211.0,
-        "MET": 204.0,
-        "PHE": 218.0,
-        "PRO": 143.0,
-        "SER": 122.0,
-        "THR": 146.0,
-        "TRP": 259.0,
-        "TYR": 229.0,
-        "VAL": 160.0,
-    },
-    "Wilke": {
-        "ALA": 129.0,
-        "ARG": 274.0,
-        "ASN": 195.0,
-        "ASP": 193.0,
-        "CYS": 167.0,
-        "GLN": 225.0,
-        "GLU": 223.0,
-        "GLY": 104.0,
-        "HIS": 224.0,
-        "ILE": 197.0,
-        "LEU": 201.0,
-        "LYS": 236.0,
-        "MET": 224.0,
-        "PHE": 240.0,
-        "PRO": 159.0,
-        "SER": 155.0,
-        "THR": 172.0,
-        "TRP": 285.0,
-        "TYR": 263.0,
-        "VAL": 174.0,
-    },
-    "Sander": {
-        "ALA": 106.0,
-        "ARG": 248.0,
-        "ASN": 157.0,
-        "ASP": 163.0,
-        "CYS": 135.0,
-        "GLN": 198.0,
-        "GLU": 194.0,
-        "GLY": 84.0,
-        "HIS": 184.0,
-        "ILE": 169.0,
-        "LEU": 164.0,
-        "LYS": 205.0,
-        "MET": 188.0,
-        "PHE": 197.0,
-        "PRO": 136.0,
-        "SER": 130.0,
-        "THR": 142.0,
-        "TRP": 227.0,
-        "TYR": 222.0,
-        "VAL": 142.0,
-    },
-    "Ahmad": {
-        "ALA": 110.2,
-        "ARG": 229.0,
-        "ASN": 146.4,
-        "ASP": 144.1,
-        "CYS": 140.4,
-        "GLN": 178.6,
-        "GLU": 174.7,
-        "GLY": 78.7,
-        "HIS": 181.9,
-        "ILE": 183.1,
-        "LEU": 164.0,
-        "LYS": 205.7,
-        "MET": 200.1,
-        "PHE": 200.7,
-        "PRO": 141.9,
-        "SER": 117.2,
-        "THR": 138.7,
-        "TRP": 240.5,
-        "TYR": 213.7,
-        "VAL": 153.7,
-    },
-}
+residue_max_acc = residue_sasa_scales
 
 
 def version(version_string):


Test patch: