Skip to content

Commit 62bd7eb

Browse files
authored
Merge pull request #186 from StollLab/issue89
Issue89
2 parents aa249da + c5d22c7 commit 62bd7eb

29 files changed

Lines changed: 295 additions & 10 deletions

src/chilife/RotamerEnsemble.py

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
import chilife.io as io
1818
import chilife.scoring as scoring
1919

20-
from .globals import SUPPORTED_RESIDUES, nataa_codes, dihedral_defs
20+
from .globals import SUPPORTED_RESIDUES, nataa_codes, dihedral_defs, ralt_prot_states
2121
from .scoring import get_lj_rep, GAS_CONST
2222
from .numba_utils import get_sasa as nu_getsasa
2323
from .alignment_methods import alignment_methods, parse_backbone, local_mx, global_mx
@@ -263,6 +263,21 @@ def from_mda(cls, residue, **kwargs):
263263
"""
264264

265265
res = residue.resname
266+
267+
268+
if kwargs.get('use_H', False) and res in ralt_prot_states:
269+
if res != 'HIS':
270+
res = ralt_prot_states[res].get(len(residue.atoms), res)
271+
elif len(residue.atoms) == 18:
272+
res = 'HIP'
273+
elif len([x for x in residue.atoms.names if 'HE' in x]) == 2:
274+
res = 'HIE'
275+
elif len([x for x in residue.atoms.names if 'HD' in x]) == 2:
276+
res = 'HID'
277+
else:
278+
res = 'HIS'
279+
280+
266281
site = residue.resid
267282
chain = residue.segid
268283
protein = residue.universe

src/chilife/data/dihedral_defs.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,20 @@
11
ARG = [["N", "CA", "CB", "CG"], ["CA", "CB", "CG", "CD"], ["CB", "CG", "CD", "NE"], ["CG", "CD", "NE", "CZ"], ["CD", "NE", "CZ", "NH1"]]
22
ASN = [["N", "CA", "CB", "CG"], ["CA", "CB", "CG", "OD1"]]
33
ASP = [["N", "CA", "CB", "CG"], ["CA", "CB", "CG", "OD1"]]
4+
ASH = [["N", "CA", "CB", "CG"], ["CA", "CB", "CG", "OD1"]]
45
CYS = [["N", "CA", "CB", "SG"]]
6+
CYM = [["N", "CA", "CB", "SG"]]
57
GLN = [["N", "CA", "CB", "CG"], ["CA", "CB", "CG", "CD"], ["CB", "CG", "CD", "OE1"]]
68
GLU = [["N", "CA", "CB", "CG"], ["CA", "CB", "CG", "CD"], ["CB", "CG", "CD", "OE1"]]
9+
GLH = [["N", "CA", "CB", "CG"], ["CA", "CB", "CG", "CD"], ["CB", "CG", "CD", "OE1"]]
710
HIS = [["N", "CA", "CB", "CG"], ["CA", "CB", "CG", "ND1"]]
11+
HID = [["N", "CA", "CB", "CG"], ["CA", "CB", "CG", "ND1"]]
12+
HIE = [["N", "CA", "CB", "CG"], ["CA", "CB", "CG", "ND1"]]
13+
HIP = [["N", "CA", "CB", "CG"], ["CA", "CB", "CG", "ND1"]]
814
ILE = [["N", "CA", "CB", "CG1"], ["CA", "CB", "CG1", "CD1"]]
915
LEU = [["N", "CA", "CB", "CG"], ["CA", "CB", "CG", "CD1"]]
1016
LYS = [["N", "CA", "CB", "CG"], ["CA", "CB", "CG", "CD"], ["CB", "CG", "CD", "CE"], ["CG", "CD", "CE", "NZ"]]
17+
LYN = [["N", "CA", "CB", "CG"], ["CA", "CB", "CG", "CD"], ["CB", "CG", "CD", "CE"], ["CG", "CD", "CE", "NZ"]]
1118
MET = [["N", "CA", "CB", "CG"], ["CA", "CB", "CG", "SD"], ["CB", "CG", "SD", "CE"]]
1219
PHE = [["N", "CA", "CB", "CG"], ["CA", "CB", "CG", "CD1"]]
1320
PRO = [["N", "CA", "CB", "CG"], ["CA", "CB", "CG", "CD"]]
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

src/chilife/data/rotamer_libraries/residue_internal_coords/remake_ics.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77
residue_pdbs = pdb_directory.glob('*.pdb')
88

99
for pdb in residue_pdbs:
10+
11+
new_path = Path(pdb.stem + '_ic.pkl')
12+
if new_path.exists():
13+
continue
14+
1015
print(pdb.stem)
1116

1217
srtd = chilife.sort_pdb(pdb)

0 commit comments

Comments
 (0)