This file contains 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 rdkit.Chem | |
def reorder_atoms(mol_pdb_fname, template_pdb_fname, output_pdb_fname): | |
from rdkit.Chem import rdmolfiles | |
mol_to_transform = rdkit.Chem.rdmolfiles.MolFromPDBFile(mol_pdb_fname, removeHs=False) | |
transform_order = list(rdmolfiles.CanonicalRankAtoms(mol_to_transform)) | |
mol_template = rdkit.Chem.rdmolfiles.MolFromPDBFile(template_pdb_fname, removeHs=False) |
This file contains 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
class Renderer: | |
def __init__(self, root): | |
self.root = root | |
def svg(self): | |
leftmost = self.root.leftmost(0) | |
s = min(300 / self.root.w, 300 / self.root.h) | |
svg = f""" | |
<!DOCTYPE html> | |
<html> |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
#include <math.h> | |
#include <stddef.h> | |
#include <signal.h> | |
#include <assert.h> | |
static volatile sig_atomic_t interrupted; | |
static void (*old_handler)(int); | |
static void signal_handler(int signo) { | |
interrupted = 1; |
This file contains 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
# Python version of the following original work: | |
# Title: Sorting Real Schur Forms | |
# Author: Jan Brandts | |
# E-Mail: brandts-AT-science.uva.nl | |
# http://m2matlabdb.ma.tum.de/download.jsp?MC_ID=3&MP_ID=119 | |
# http://dx.doi.org/10.1002/nla.274 | |
# Institution: University of Amsterdam | |
# Description: In Matlab 6, there exists a command to generate a real Schur form, wheras another transforms a real | |
# Schur form into a complex one. There do not exist commands to prescribe the order in which the eigenvalues appear on | |
# the diagonal of the upper (quasi-) triangular factor T. |
This file contains 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 mdtraj | |
import os | |
import os.path | |
import argparse | |
def prepare_maps(mut_pdb='mutant.pdb', wt_pdb=None): | |
if wt_pdb is None: | |
wt_pdb = os.path.expanduser('~/system/crystal.pdb') |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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 | |
import numpy as np | |
import mdtraj | |
def tl(filename, chunk=100): | |
with mdtraj.open(filename, mode='r') as fh: | |
try: | |
return (len(fh) - 1) // chunk + 1 | |
except: |
This file contains 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 pyparsing as pp | |
from pyparsing import pyparsing_common as ppc | |
__all__ = ['load_colvars', 'handle_colvars'] | |
pp.ParserElement.setDefaultWhitespaceChars(' \t') | |
vector = pp.Group(pp.Literal('(').suppress() + | |
pp.delimitedList(ppc.number, delim=',') + | |
pp.Literal(')').suppress()) |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder