Skip to content

Instantly share code, notes, and snippets.

View cstein's full-sized avatar

Casper Steinmann cstein

View GitHub Profile
""" Builds a string of alpha-1,4-glucose residue names compatible with our
efforts at AAU to build a GLYCAM-like force field
author: Casper Steinmann
email: css@bio.aau.dk
"""
import argparse
import numpy
import numpy.random
@cstein
cstein / analyse.py
Last active March 2, 2021 12:40
Analyse Desmond Trajectory with MDTraj
""" Compute Center of Mass distances between groups of residues """
from typing import List
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
import mdtraj
""" Some notes on MD traj
def twoint_kernel(
RA, RB, RC, RD, lA, lB, lC, lD,
aA, aB, aC, aD, cA, cB, cC, cD
):
""" Two-electron integral kernel
Calculated with primitive gaussian type orbitals.
This function implements equation 13 from:
DOI: 10.1002/ejtc.36
[
{"name": "Imidazoles", "reactant": "[n+;H]", "product": "n"},
{"name": "Amines", "reactant": "[N+;!H0]", "product": "N"},
{"name": "Carboxylic acids and alcohols", "reactant": "[$([O-]);!$([O-][#7])]", "product": "O"},
{"name": "Thiols", "reactant": "[S-;X1]", "product": "S"},
{"name": "Sulfonamides", "reactant": "[$([N-;X2]S(=O)=O)]", "product": "N"},
{"name": "Enamines", "reactant": "[$([N-;X2][C,N]=C)]", "product": "N"},
{"name": "Tetrazoles", "reactant": "[n-]", "product": "[nH]"},
{"name": "Sulfoxides", "reactant": "[$([S-]=O)]", "product": "S"},
{"name": "Amides", "reactant": "[$([N-]C=O)]", "product": "N"}
@cstein
cstein / filter.csv
Created February 3, 2020 19:44
RDKit Plotting Code for two different sets of csv data
title docking score SMILES
S01 -9.61916 CC1=CC=C(C(=O)N2CN(C([NH3+])=O)N(C(=O)[O-])C2=O)C=C1
S02 -9.6052 NC1CN(C([NH3+])=O)C(=O)N1C(=O)[O-]
S03 -8.84833 CNC(=O)C1=CN(C(=O)[O-])CN(C([NH3+])=O)C1
S04 -8.92497 CC1=CC=CC=C1NN1C(=O)N(C(=O)[O-])C2=C1C=CC=C2F
@cstein
cstein / organic_subset.smi
Last active January 31, 2020 17:01
Just an organic subset of molecules
c1ccccc1 benzene
c1ccccc1C methylbenzene
c1ccccc1CC ethylbenzene
c1ccccc1CCC propylbenzene
c1ccccc1CCCC butylbenzene
Cc1ccc(C)cc1 1-methyl-4-methylbenzene
CCc1ccc(C)cc1 1-ethyl-4-methylbenzene
CCCc1ccc(C)cc1 1-propyl-4-methylbenzene
c1cc(C)ccc1CCCC 1-butyl-4-methylbenzene
Cc1cc(C)ccc1 1-methyl-3-methylbenzene
Resp charges for organic molecule
&cntrl
nmol = 7,
ihfree = 0,
iqopt = 2,
qwt = 0.00050,
&end
@cstein
cstein / README.md
Last active May 27, 2020 11:19
cyclodextrin structures. Preprocessed to work with AMBER and GLYCAM

Cyclodextrin Structures

alpha-, beta- and gamma-cyclodextrin structures.

The structures are compatible with AMBER and for use with the GLYCAM force field.

@cstein
cstein / maestro_qmmm.py
Last active December 20, 2018 07:35
simple script for maestro to extract QM and MM regions from a single .pdb
from schrodinger import maestro
from schrodinger import structure
import PyQt5
from PyQt5.QtWidgets import QFileDialog
__doc__ = """
Extracts QM region around molecule.
"""
#Name: QM/MM:Extract
@cstein
cstein / setup.py
Created December 1, 2018 10:22
Creating QM, MM and QM/MM regions from .xyz files.
""" Script to generate appropriate QM, MM and QM/MM files """
from operator import itemgetter
import sys
import numpy
# shamelessly stolen from molecool
aa2au = 1.8897261249935897 # bohr / AA
# converts nuclear charge to atom label