Skip to content

Instantly share code, notes, and snippets.

View jonathanking's full-sized avatar

Jonathan King jonathanking

View GitHub Profile
REMARK 7l8n_A
SEQRES 1 A 151 GLN GLN LEU SER ASP ASP GLU LYS LEU VAL ALA ALA PHE
SEQRES 2 A 151 VAL LYS ALA VAL ALA TYR MET SER PRO ARG LYS ILE GLY
SEQRES 3 A 151 ALA LEU VAL SER ILE GLU GLU THR GLN THR LEU ARG GLU
SEQRES 4 A 151 TYR ILE ALA THR GLY ILE PRO LEU ASP ALA ASP ILE SER
SEQRES 5 A 151 GLY GLU LEU LEU ILE ASN ILE PHE ILE PRO ASN THR PRO
SEQRES 6 A 151 LEU HIS ASP GLY ALA VAL ILE VAL GLU GLY ASN LYS ILE
SEQRES 7 A 151 ALA VAL SER CYS ALA TYR LEU PRO LEU SER GLU SER SER
SEQRES 8 A 151 HIS ILE SER LYS GLU PHE GLY THR ARG HIS ARG ALA ALA
SEQRES 9 A 151 ILE GLY LEU SER GLU ALA SER ASP ALA PHE THR PHE VAL
@jonathanking
jonathanking / scn_from_pdb.py
Last active March 8, 2023 20:07
Loads protein from pdb into SCNProtein.
import prody
import sidechainnet as scn
from sidechainnet.utils.download import get_resolution_from_pdbid
def from_pdb(filename, pdbid="", include_resolution=False):
"""Create a SCNProtein from a PDB file. Warning: does not support gapped proteins!!
Args:
filename (str): Path to existing PDB file.
pdbid (str): 4-letter string representing the PDB Identifier.
include_resolution (bool, default=False): If True, query the PDB for the protein
@jonathanking
jonathanking / tqdm_cluster.py
Last active February 15, 2023 21:34
Modifying TQDM to avoid carriage returns in SLURM job output
import os
from tqdm import tqdm
from tqdm.utils import _unicode, disp_len
_TQDM_STATUS_EVERY_N = 2
if "SLURM_JOB_ID" in os.environ:
def status_printer(self, file):
"""
Manage the printing and in-place updating of a line of characters.
@jonathanking
jonathanking / Console Log
Created March 20, 2016 07:27
CalendarAgent Console message
3/20/16 12:20:38.088 AM CalendarAgent[6405]: [com.apple.calendar.store.log.caldav.coredav] [Refusing to parse response to PROPPATCH because of content-type: [text/html; charset=UTF-8].]