Skip to content

Instantly share code, notes, and snippets.

View leelasd's full-sized avatar
🏠
Working from home

Leela S. Dodda leelasd

🏠
Working from home
View GitHub Profile
@leelasd
leelasd / github-pages.md
Last active August 29, 2015 14:26 — forked from mattnorris/github-pages.md
How to create a GitHub page using Jekyll and Bootstrap

Creating Whispernote's GitHub Project Page

Jekyll, GitHub's static site generator, and Bootstrap were used to create Whispernote's GitHub Project Page. This document shows how.

Project Goals

I wanted a stylish "brand" page for my project, and I wanted to reuse the README file I had created without a lot of copy/pasting. GitHub's Jekyll allowed me to essentially embed the file as a partial. What I got was really an enhanced README file (thanks to some jQuery and Bootstrap), which is exactly what I wanted.

gh-pages

def OPLS_pot(R,SIG=10,EPS=0.05):
sij=np.sqrt(SIG*3.15061)
eij=np.sqrt(EPS*0.1521)
return 4*eij*((sij/R)**12-(sij/R)**6)
xdata = Ri
ydata = pot(Ri)
popt, pcov = curve_fit(OPLS_pot, xdata, ydata)
print popt
############################################
def Sim_Anneal(ps,const):
T=8.00
delta = 0.05
nmoves=10
while (T > 5e-2):
accept=0
reject=0
Beta=(1.0/T)
for i in range(0,nmoves):
def get_atom_mass_martini(atomname):
database={
'NC3': 72.0
'PO4': 72.0
'GL1': 72.0
'C1A': 72.0
'C2A': 72.0
'C3A': 72.0
'C4A': 72.0
'C1B': 72.0
*>>>> CHARMM Parameter file generated by ParmEd <<<<
*
ATOMS
MASS 1 C135 12.01100
MASS 2 C136 12.01100
MASS 3 C137 12.01100
MASS 4 C145 12.01100
MASS 5 C149 12.01100
MASS 6 C157 12.01100
from simtk.openmm.app import *
from simtk.openmm import *
from simtk.unit import *
pdb = PDBFile('waterSphere.pdb')
#forcefield = ForceField('amber99sb.xml', 'tip3p.xml')
forcefield = ForceField('tip3p.xml')
system = forcefield.createSystem(pdb.topology, nonbondedMethod=NoCutoff)
forces = { system.getForce(index).__class__.__name__ : system.getForce(index) for index in range(system.getNumForces()) }
@leelasd
leelasd / Qfepzmat_bcc.py
Last active November 12, 2015 20:09
Creates Charge Annihilation files for BOSS from BOSS Zmatrix
#!/net/nas01/leela/anaconda/bin/python
#################################################
# USAGE: python Qfepzmat_bcc.py molname.z
#################################################
import sys
import numpy as np
def new_func(linex, match):
out = 0
@leelasd
leelasd / new_groups.py
Created December 10, 2015 16:39
RDKit sample program
import sys
import re
import numpy as np
import csv
from rdkit import Chem
names = open('fns')
def raa(fname):
m=Chem.MolFromMolFile('../'+fname)
natoms=len(m.GetAtoms())
var=[]
@leelasd
leelasd / name2pdb.py
Created December 22, 2015 15:42
Python Programme to get PDB file from Chemical name of Molecule
import cirpy
import sys
molecule = sys.argv[1]
smiles_code = cirpy.resolve(molecule, 'smiles')
print smiles_code
pdbfile = cirpy.resolve(smiles_code, 'pdb')
oname = ''.join(molecule.split())
file_output = open(oname + '.pdb', "w+")
file_output.write(pdbfile)
file_output.close()
@leelasd
leelasd / mpi4py.sh
Created December 23, 2015 06:33
Running MPI4PY programme in GRACE
## mpirun -np 2 python helloworld.py
"""
Parallel Hello World
"""
from mpi4py import MPI
import sys
size = MPI.COMM_WORLD.Get_size()