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
| import numpy as np | |
| import prody as pr | |
| from geometricus import MomentInvariants, SplitType | |
| import plotly as py | |
| import plotly.graph_objs as go | |
| def make_atom_group(atom_list): | |
| out_group = pr.atomgroup.AtomGroup('Protein') | |
| out_group.addCoordset(atom_list) |
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.PDB import PDBParser, PDBList | |
| from Bio.PDB.DSSP import DSSP | |
| # !! set path to mkdssp binary !! Install: https://github.com/cmbi/xssp (use docker or check dockerfile for install tips) | |
| mkdssp_path = '/home/carlos/Downloads/xssp-3.0.8/mkdssp' | |
| pdb_downloader = PDBList() | |
| # Retrieve an example pdb file (for alpha-synuclein here) and load | |
| pdb_fn = PDBList().retrieve_pdb_file('1xq8', file_format='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
| import multiprocessing as mp | |
| def square(x, out_queue): | |
| out_queue.put(x ** 2) | |
| out_list = [] | |
| out_queue = mp.Queue() | |
| processes = [mp.Process(target=square, args=(x, out_queue)) for x in range(8)] | |
| for p in processes: p.start() |