Skip to content

Commit

Permalink
Store solvent parameters in floats not strings
Browse files Browse the repository at this point in the history
  • Loading branch information
martimunicoy committed Nov 17, 2020
1 parent 3a11d1f commit fc968e7
Show file tree
Hide file tree
Showing 3 changed files with 142 additions and 142 deletions.
216 changes: 108 additions & 108 deletions peleffy/data/parameters/OBCparam.json
Original file line number Diff line number Diff line change
@@ -1,190 +1,190 @@
[
{
"CW": [
"1.875",
"0.72"
1.875,
0.72
],
"NC": [
"1.7063",
"0.79"
1.7063,
0.79
],
"CM": [
"1.875",
"0.72"
1.875,
0.72
],
"C*": [
"1.875",
"0.72"
1.875,
0.72
],
"H1": [
"1.25",
"0.85"
1.25,
0.85
],
"CT": [
"1.9",
"0.72"
1.9,
0.72
],
"N2": [
"1.7063",
"0.79"
1.7063,
0.79
],
"N*": [
"1.7063",
"0.79"
1.7063,
0.79
],
"CR": [
"1.875",
"0.72"
1.875,
0.72
],
"HO": [
"1.05",
"0.85"
1.05,
0.85
],
"NB": [
"1.7063",
"0.79"
1.7063,
0.79
],
"H2": [
"1.25",
"0.85"
1.25,
0.85
],
"S": [
"1.775",
"0.96"
1.775,
0.96
],
"NA": [
"1.7063",
"0.79"
1.7063,
0.79
],
"H4": [
"1.25",
"0.85"
1.25,
0.85
],
"HC": [
"1.25",
"0.85"
1.25,
0.85
],
"C": [
"1.875",
"0.72"
1.875,
0.72
],
"OH": [
"1.535",
"0.85"
1.535,
0.85
],
"CQ": [
"1.875",
"0.72"
1.875,
0.72
],
"CK": [
"1.875",
"0.72"
1.875,
0.72
],
"O2": [
"1.48",
"0.85"
1.48,
0.85
],
"OS": [
"1.535",
"0.85"
1.535,
0.85
],
"SH": [
"1.775",
"0.96"
1.775,
0.96
],
"HA": [
"1.25",
"0.85"
1.25,
0.85
],
"CB": [
"1.875",
"0.72"
1.875,
0.72
],
"H5": [
"1.25",
"0.85"
1.25,
0.85
],
"CN": [
"1.875",
"0.72"
1.875,
0.72
],
"P": [
"1.87",
"0.86"
1.87,
0.86
],
"N3": [
"1.625",
"0.79"
1.625,
0.79
],
"HP": [
"1.25",
"0.85"
1.25,
0.85
],
"N": [
"1.7063",
"0.79"
1.7063,
0.79
],
"H": [
"1.15",
"0.85"
1.15,
0.85
],
"HS": [
"1.25",
"0.85"
1.25,
0.85
],
"CV": [
"1.875",
"0.72"
1.875,
0.72
],
"CA": [
"1.875",
"0.72"
1.875,
0.72
],
"O": [
"1.48",
"0.85"
1.48,
0.85
],
"CC": [
"1.875",
"0.72"
1.875,
0.72
]
},
{
"H": "1.25",
"LI": "1.432",
"C": "1.90",
"N": "1.7063",
"O": "1.535",
"F": "1.47",
"FE": "2.00",
"NE": "1.39",
"NA": "1.992",
"MG": "1.70",
"SI": "1.80",
"P": "1.87",
"S": "1.775",
"CL": "1.735",
"AR": "1.70",
"K": "2.123",
"CA": "1.817",
"BR": "1.90",
"KR": "1.812",
"RB": "2.26",
"I": "2.10",
"XE": "1.967",
"CS": "2.507",
"BA": "2.188",
"PT": "2.0"
"H": 1.25,
"LI": 1.432,
"C": 1.90,
"N": 1.7063,
"O": 1.535,
"F": 1.47,
"FE": 2.00,
"NE": 1.39,
"NA": 1.992,
"MG": 1.70,
"SI": 1.80,
"P": 1.87,
"S": 1.775,
"CL": 1.735,
"AR": 1.70,
"K": 2.123,
"CA": 1.817,
"BR": 1.90,
"KR": 1.812,
"RB": 2.26,
"I": 2.10,
"XE": 1.967,
"CS": 2.507,
"BA": 2.188,
"PT": 2.0
},
{
"H": "0.85",
"C": "0.72",
"N": "0.79",
"O": "0.85",
"F": "0.88",
"P": "0.86",
"S": "0.96",
"PT": "0.80",
"FE": "0.88"
"H": 0.85,
"C": 0.72,
"N": 0.79,
"O": 0.85,
"F": 0.88,
"P": 0.86,
"S": 0.96,
"PT": 0.80,
"FE": 0.88
}
]
16 changes: 8 additions & 8 deletions peleffy/forcefield/parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -852,19 +852,19 @@ def _check_bonds(scale, atom_type, degree, parent):
"""

if atom_type == 'H' and parent == 'O':
scale = '1.05'
scale = float(1.05)
if atom_type == 'H' and parent == 'N':
scale = '1.15'
scale = float(1.15)
if atom_type == 'C' and degree == 3:
scale = '1.875'
scale = float(1.875)
if atom_type == 'C' and degree == 2:
scale = '1.825'
scale = float(1.825)
if atom_type == 'N' and degree == 4:
scale = '1.625'
scale = float(1.625)
if atom_type == 'N' and degree == 1:
scale = '1.60'
scale = float(1.60)
if atom_type == 'O' and degree == 1:
scale = '1.48'
scale = float(1.48)

return scale

Expand Down Expand Up @@ -938,7 +938,7 @@ def _find_GBSA_parameters_according_to(atom_name, atom_type,
+ '{} {} '.format(atom_name, atom_type)
+ 'NOT found in the template '
+ 'database. Using default parameters')
radius, scale = '0.80', '2.0'
radius, scale = float(0.80), float(2.0)

return radius, scale

Expand Down
Loading

0 comments on commit fc968e7

Please sign in to comment.