Code now available at https://github.com/JoaoRodrigues/hydrophobic_moment with example usage and proper licensing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
(c) 2016 Joao Rodrigues | |
""" | |
from __future__ import print_function | |
from pymol import cmd | |
# Autocomplete | |
def _autocomplete(): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@jit() | |
def pw_dist(xyz_array): | |
"""Iteration-based pairwise distance calculator""" | |
A = xyz_array | |
M, N = A.shape | |
max_d = 0.0 | |
for i in xrange(M): | |
print(i) | |
_t = [] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Cython optimized pairwise distance function on numpy matrix (3xN). | |
""" | |
from __future__ import print_function | |
import numpy as np | |
cimport numpy as np | |
# data type of our arrays | |
DTYPE = np.float |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
Demonstration of calling DSSP and accessing accessibilities using Biopython | |
""" | |
from Bio.PDB import PDBParser, DSSP | |
# Make sure you downloaded 1ctf in PDB format first.. | |
pdb_filepath = '1ctf.pdb' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
Draws a SS plot, representing strands as arrows and helices as waves from | |
a SS-containing file (H/E/etc). Turns are drawn as single arcs. | |
Example Input: | |
1 C | |
2 H | |
3 H |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ATOM 1 CAY MET A 1 -56.399 2.562 22.154 0.00 0.00 | |
ATOM 2 HY1 MET A 1 -56.751 3.253 21.523 0.00 0.00 | |
ATOM 3 HY2 MET A 1 -55.521 2.858 22.528 0.00 0.00 | |
ATOM 4 HY3 MET A 1 -57.053 2.413 22.896 0.00 0.00 | |
ATOM 5 CY MET A 1 -56.269 1.704 21.658 0.00 0.00 | |
ATOM 6 OY MET A 1 -55.917 1.013 22.289 0.00 0.00 | |
ATOM 7 N MET A 1 -56.536 1.836 20.703 1.00 0.00 N | |
ATOM 8 HN MET A 1 -56.888 2.527 20.072 0.00 0.00 | |
ATOM 9 CA MET A 1 -56.346 0.586 19.980 1.00 0.00 C | |
ATOM 10 HA MET A 1 -56.929 -0.175 20.484 0.00 0.00 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PSF CMAP | |
7 !NTITLE | |
REMARKS original generated structure x-plor psf file | |
REMARKS 2 patches were applied to the molecule. | |
REMARKS topology C:/Users/joaor/Downloads/toppar/top_all36_prot.rtf | |
REMARKS topology C:/Users/joaor/Downloads/toppar/top_all22_prot.rtf | |
REMARKS segment A { first ACE; last CT3; auto angles dihedrals } | |
REMARKS patch CT3 A:27 | |
REMARKS patch ACE A:1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
REMARK 200 Generated with PyMOL and psico | |
ATOM 1 CY MET A 1 -57.588 1.993 21.439 1.00 0.00 C | |
ATOM 2 OY MET A 1 -58.412 1.073 21.529 1.00 0.00 O | |
ATOM 3 CAY MET A 1 -57.792 3.297 22.180 1.00 0.00 C | |
ATOM 4 N MET A 1 -56.540 1.838 20.704 1.00 0.00 N | |
ATOM 5 CA MET A 1 -56.332 0.585 19.985 1.00 0.00 C | |
ATOM 6 C MET A 1 -54.885 0.158 20.046 1.00 0.00 C | |
ATOM 7 O MET A 1 -54.053 0.864 20.614 1.00 0.00 O | |
ATOM 8 CB MET A 1 -56.802 0.738 18.512 1.00 0.00 C | |
ATOM 9 CG MET A 1 -58.316 0.961 18.308 1.00 0.00 C |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from Bio import Entrez | |
Entrez.email = None # change this! | |
assert Entrez.email is not None | |
# Read ids from file to a list | |
id_list = [ ... ] | |
results = {} | |
handle = Entrez.efetch(db="protein", id=id_list, retmode="xml") |