Skip to content

Instantly share code, notes, and snippets.

View puckvg's full-sized avatar

Puck van Gerwen puckvg

  • EPFL
  • Lausanne, Switzerland
View GitHub Profile
@andersx
andersx / qorca.sh
Created July 24, 2020 09:10
ORCA alchemy script
#!/bin/bash
# get the filename without the extension
JOB=$1
SUBMIT=qsub.tmp
PWD=`pwd`
cat > $SUBMIT <<!EOF
#!/bin/bash
@charnley
charnley / Makefile
Created September 4, 2019 18:36
Cute multiprocessing of task coming from stdin pipe
PY=python3
all:
find data -name "*.txt" | ${PY} test.py
data:
mkdir -p data
for x in `seq 1 150`; do echo $$x; ./generate_password.sh > data/$$x.txt; done
@fnky
fnky / ANSI.md
Last active July 22, 2024 12:03
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@charnley
charnley / fix_hydrogens.py
Last active August 31, 2020 14:26
Hacking SMILES to get correct Hydrogens on molecule fragments with RDkit
import numpy as np
from rdkit import Chem
# examples
# C=[NH+]C
component = "C=[NH+]"
component = "[NH+]C"
# C[S+](C)C
component = "C[S+]"
@bxshi
bxshi / tmux_local_install.sh
Last active December 3, 2021 15:17 — forked from smsharma/ tmux_local_install.sh
Install tmux locally without root access
#!/bin/bash
# Script for installing tmux on systems where you don't have root access.
# tmux will be installed in $INSTALL_DIR/local/bin.
# It's assumed that wget and a C/C++ compiler are installed.
# exit on error
set -e
TMUX_VERSION=2.3
anonymous
anonymous / recap.py
Created April 14, 2009 19:48
import openbabel
# Copyright 2009 TJ O'Donnell
class recap:
# RECAP-Retrosynthetic Combinatorial Analysis Procedure
# J. Chem. Inf. Comput. Sci. 1998, 38, 511-522
def __init__(self, mol, minsize=5):
self.mol = mol;
# minimum allowed size (atom count) of fragment
self.minsize = minsize;
# bonded atom pairs populated by the apply method,