Skip to content

Instantly share code, notes, and snippets.

@gabrielelanaro
gabrielelanaro / eq.mdp
Last active August 29, 2015 13:56
Urea topology problem
integrator = md
dt = 0.00002
nsteps = 60000
nstxout = 0
nstvout = 0
nstlog = 50
nstenergy = 50
nstxtcout = 50
from chemlab.db import RcsbDB
db = RcsbDB()
mol = db.get("molecule", "4b0n")
@gabrielelanaro
gabrielelanaro / Test.ipynb
Created April 26, 2013 07:06
Chemlab and ipython test
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
from calculator_hf import HartreeFock
import numpy as np
class MP2:
def __init__(self, scf, text, parameters):
""" Takes as input *scf* that is a converged SCF and the usual
output function *text* and the parameter dictionary
*parameters.
"""
@gabrielelanaro
gabrielelanaro / gist:1158774
Created August 20, 2011 06:48
relevant parts huckel
# This is in aiccm/calculator_huckel.py how I form the huckel fock matrix
def calcF(self):
""" Calculate the fock matrix.
"""
# It's not quite necessary but I calculate overlaps at once
S = self.getS()
d = self.dimension
self.F = F = np.zeros((d, d), 'd')
@gabrielelanaro
gabrielelanaro / gist:1158765
Created August 20, 2011 06:36
Water AICCM
___ __ ______ ______ .___ ___.
/ \ | | / | / || \/ |
/ ^ \ | | | ,----'| ,----'| \ / |
/ /_\ \ | | | | | | | |\/| |
/ _____ \ | | | `----.| `----.| | | |
/__/ \__\ |__| \______| \______||__| |__|
ab initio cyclic cluster model
Developed by Michael F. Peintinger
@gabrielelanaro
gabrielelanaro / gist:1158759
Created August 20, 2011 06:31
Orca Output Water
*****************
* O R C A *
*****************
--- An Ab Initio, DFT and Semiempirical electronic structure package ---
########################################################
# -***- #
# Developed by Frank Neese #
@gabrielelanaro
gabrielelanaro / emacs-for-python.el
Created May 9, 2011 17:22
emacs for python recipe
(:name emacs-for-python
:type git
:url "git://github.com/gabrielelanaro/emacs-for-python.git"
:load-path "."
:post-init (lambda ()
(require 'epy-setup)
(require 'epy-python)
(require 'epy-completion))
)
import pyaudio
import wave
import numpy as np
from contextlib import contextmanager
import math
p = pyaudio.PyAudio()
chunk = 1024*4
FORMAT = pyaudio.paInt16
@gabrielelanaro
gabrielelanaro / gist:832379
Created February 17, 2011 19:01
bad file
from attest import Tests
pdbone = def
"""
"""
import pdb; pdb.set_trace()
import pdb; pdb.set_trace()
def (self, ):