Repository: biopython/biopython

Issue:
Feature request: different DSSP ASA to RSA conversion values
At the moment Bio.PDB.DSSP offers three maximum solvent accessibility tables for converting Absolute and Relative solvent accessibilities (ASA and RSA).

There is another conversion table which is frequently used, for example by the state-of-the-art solvent accessibility predictor NetsurtfP-2.

The table is described in:
Ahmad,S., Gromiha,M. M., and Sarai,A. (2003-02) Real value prediction of solvent accessibility from amino acid sequence. Proteins: Structure, Function, and Bioinformatics, 50, 629–635. https://doi.org/10.1002/prot.340200303

It would be nice to be able to use also the aforementioned table directly from Biopython.
I paste here the values from that paper.

```
RESIDUE_MAX_ACC = {
    # this is the ASA for the residue in an extended Ala-X-Ala trypeptide
    # Values from Ahmad et al. 2003, https://doi.org/10.1002/prot.10328
    "A": 110.2,
    "R": 229.0,
    "N": 146.4,
    "D": 144.1,
    "C": 140.4,
    "Q": 178.6,
    "E": 174.7,
    "G": 78.70,
    "H": 181.9,
    "I": 183.1,
    "L": 164.0,
    "K": 205.7,
    "M": 200.1,
    "F": 200.7,
    "P": 141.9,
    "S": 117.2,
    "T": 138.7,
    "W": 240.5,
    "Y": 213.7,
    "V": 153.7,
}
```


Discussion:

Resolving patch:
diff --git a/Bio/PDB/DSSP.py b/Bio/PDB/DSSP.py
--- a/Bio/PDB/DSSP.py
+++ b/Bio/PDB/DSSP.py
@@ -13,6 +13,8 @@
 The following Accessible surface area (ASA) values can be used, defaulting
 to the Sander and Rost values:
 
+    Ahmad
+        Ahmad et al. 2003 https://doi.org/10.1002/prot.10328
     Miller
         Miller et al. 1987 https://doi.org/10.1016/0022-2836(87)90038-6
     Sander
@@ -111,6 +113,7 @@
     # 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,
@@ -177,6 +180,28 @@
         "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,
+    },
 }
 
 
@@ -409,8 +434,8 @@ def __init__(self, model, in_file, dssp="dssp", acc_array="Sander", file_type=""
             The dssp executable (ie. the argument to subprocess)
         acc_array : string
             Accessible surface area (ASA) from either Miller et al. (1987),
-            Sander & Rost (1994), or Wilke: Tien et al. 2013, as string
-            Sander/Wilke/Miller. Defaults to Sander.
+            Sander & Rost (1994), Wilke: Tien et al. 2013, or Ahmad et al.
+            (2003) as string Sander/Wilke/Miller/Ahmad. Defaults to Sander.
         file_type: string
             File type switch: either PDB, MMCIF or DSSP. Inferred from the
             file extension by default.


Test patch:
diff --git a/Tests/PDB/Ahmad_RASA.txt b/Tests/PDB/Ahmad_RASA.txt
new file mode 100644
--- /dev/null
+++ b/Tests/PDB/Ahmad_RASA.txt
@@ -0,0 +1,130 @@
+0.7317073170731707
+0.6376057254391673
+0.3188839063278525
+0.5082212257100149
+0.35390199637023595
+0.43503148254149976
+0.18043025676613464
+0.5790500975927131
+0.5717916137229987
+0.3583617747440273
+0.9631147540983607
+0.525036460865338
+0.3811944091486658
+0.5172413793103449
+0.8738394320043692
+0.42599672310213
+0.22871664548919948
+0.4695121951219512
+0.5447276361819091
+0.8262849707221861
+0.34307496823379924
+0.6734434561626429
+0.494469746258946
+0.9108653220559533
+0.584380120152922
+0.9981851179673321
+0.6097560975609756
+0.2927781392322707
+0.044843049327354265
+0.17438963627304435
+0.0544464609800363
+0.2289639381797367
+0.0
+0.3253090435914119
+0.0
+0.2645051194539249
+0.3756830601092896
+0.009722897423432183
+0.012706480304955527
+0.2540834845735027
+0.5079191698525396
+0.0
+0.3176620076238882
+0.042682926829268296
+0.5297351324337831
+0.0520494469746259
+0.241423125794155
+0.06353240152477764
+0.16916070266753416
+0.07807417046193885
+0.3386127799016931
+0.5898366606170599
+0.5487804878048781
+0.28627195836044245
+0.05480817140009966
+0.2590931738913802
+0.045372050816696916
+0.21179164281625645
+0.006939625260235948
+0.22771633051398832
+0.0
+0.4010238907849829
+0.505464480874317
+0.014584346135148274
+0.08894536213468869
+0.27223230490018147
+0.5188421627525942
+0.0
+0.35578144853875476
+0.054878048780487805
+0.46976511744127936
+0.03253090435914119
+0.241423125794155
+0.0
+0.22121014964216007
+0.08458035133376708
+0.3768432550518842
+0.5898366606170599
+0.31097560975609756
+0.3513337670787248
+0.04982561036372696
+0.21425012456402592
+0.045372050816696916
+0.24613623354321695
+0.013879250520471896
+0.25374105400130126
+0.0
+0.3924914675767918
+0.430327868852459
+0.004861448711716091
+0.10165184243964422
+0.24500907441016334
+0.4860731840524304
+0.0
+0.3303684879288437
+0.042682926829268296
+0.42478760619690153
+0.04554326610279766
+0.21601016518424396
+0.0
+0.2797657774886142
+0.14964216005204944
+0.4205352266521027
+0.6442831215970962
+0.9878048780487805
+0.8783344176968121
+0.4633781763826607
+0.57299451918286
+0.27223230490018147
+0.6353749284487693
+0.4371963913948647
+0.8262849707221861
+0.25412960609911056
+0.8447098976109215
+0.8948087431693988
+0.15070491006319883
+0.1397712833545108
+0.5716878402903811
+0.9175314036045877
+0.3331512834516658
+0.6861499364675985
+0.18292682926829268
+0.7596201899050475
+0.09108653220559532
+0.7115628970775095
+0.012706480304955527
+0.5855562784645414
+0.22771633051398832
+0.7536865101037684
+0.8076225045372051
diff --git a/Tests/test_PDB_DSSP.py b/Tests/test_PDB_DSSP.py
--- a/Tests/test_PDB_DSSP.py
+++ b/Tests/test_PDB_DSSP.py
@@ -240,6 +240,20 @@ def test_DSSP_RSA(self):
                     self.assertAlmostEqual(rasa, rasa_ref)
                     i += 1
 
+        # Ahmad (procedure similar as for the Sander values above):
+        s = p.get_structure("example", "PDB/2BEG.pdb")
+        m = s[0]
+        _ = DSSP(m, "PDB/2BEG.dssp", "dssp", "Ahmad", "DSSP")
+        i = 0
+        with open("PDB/Ahmad_RASA.txt") as fh_ref:
+            ref_lines = fh_ref.readlines()
+            for chain in m:
+                for res in chain:
+                    rasa_ref = float(ref_lines[i].rstrip())
+                    rasa = float(res.xtra["EXP_DSSP_RASA"])
+                    self.assertAlmostEqual(rasa, rasa_ref)
+                    i += 1
+
 
 if __name__ == "__main__":
     runner = unittest.TextTestRunner(verbosity=2)