Skip to content

Instantly share code, notes, and snippets.

@lennax
lennax / get_torsion.py
Last active June 29, 2023 18:17
Script to calculate side-chain torsion angles from PDB files
#!/usr/bin/env python
# Copyright (c) 2014 Lenna X. Peterson, all rights reserved
# lenna@purdue.edu
import argparse
import csv
import glob
import logging
import math
import os
@lennax
lennax / mailstatus.py
Created July 29, 2015 19:43
call process and send unicode mail with status
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright 2015 Lenna X. Peterson
# All rights reserved
import os
import socket
import subprocess
import sys
@lennax
lennax / describe_align.py
Created November 4, 2015 20:37
Describe alignment
sbjct_aln = "C-GGLK-GAPFLAC"
query_aln = "CHG--KTGASFLQC"
gap = "-"
sbjct_idx = -1
query_idx = -1
for sbjct_resn, query_resn in zip(sbjct_aln, query_aln):
# Check for gaps