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 / NPT.mdp
Last active August 29, 2015 14:23
G_hyd using FEP with Gromacs
; RUN CONTROL PARAMETERS =
integrator = sd
; start time and timestep in ps =
tinit = 0
dt = 0.002
; 6 ns. This turns out to be long enough for systems without slow intramolecular degrees of freedom
nsteps = 1000000
; mode for center of mass motion removal =
@leelasd
leelasd / Prod_MD.mdp
Last active August 29, 2015 14:23
G_hyd using FEP with Gromacs
; RUN CONTROL PARAMETERS =
integrator = sd
; start time and timestep in ps =
tinit = 0
dt = 0.002
; 6 ns. This turns out to be long enough for systems without slow intramolecular degrees of freedom
nsteps = 500000
; mode for center of mass motion removal =
@leelasd
leelasd / Lambda.sh
Created June 28, 2015 04:10
FEP Job file Gromacs
#!/bin/bash
#BSUB -o . ## requests outfile be generated
#BSUB -a openmpi
#BSUB -q shared ## specify queue to run on, shared = default
#BSUB -J ACH ## job-name
#BSUB -W 24:00 ## walltime <HH:MM>= 24 hrs
#BSUB -n 8
#BSUB -R "rusage[mem=50000]" ## memory limit= MB count only (1024MB = 1GB)
module load Apps/Gromacs
@leelasd
leelasd / npl.py
Created July 3, 2015 16:15
Data as a function of time
import numpy as np
from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt
import pandas as pd
dat=pd.read_csv("Gban_data.csv")
def randrange(n, vmin, vmax):
return (vmax-vmin)*np.random.rand(n) + vmin
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
@leelasd
leelasd / RDF_analysis.py
Last active August 29, 2015 14:24
RDF & CN analysis from GMX
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
###############
def get_RDF(filename='1'):
rdf=pd.read_csv(filename+'/rdf.xvg', header=None, delim_whitespace=True,skiprows=14)
cn=pd.read_csv(filename+'/rdf_cn.xvg', header=None, delim_whitespace=True,skiprows=14)
rdf.columns=['R','RDF']
cn.columns=['R','CN']
fig, ax1 = plt.subplots()
import pandas as pd
import numpy as np
import scipy.stats as stats
import matplotlib.pyplot as plt
%matplotlib inline
cm = plt.cm.get_cmap('rainbow')
df1=pd.read_csv('Dat.csv')
df2=pd.read_csv('Dat2.csv')
df=df1.append(df2)
df=df.sort(['RDF','SIG'])
import string
import pandas as pd
df=pd.read_csv('Best_LJS_Zn.csv')
df.SIG=df.SIG*0.1
df.EPS=df.EPS*4.184
with open("top.top", "r") as f:
lines = f.readlines()
for i in range(len(df.SIG)):
SIGMA='%.5e'%df.SIG[i]
EPSILON='%.5e'%df.EPS[i]
4
0.241 0.917073 -0.051843 0.000000
0.241 -0.280127 0.874757 0.000000
-0.241 -0.287527 -0.371443 0.571500
-0.241 -0.287527 -0.371443 -0.571500
#!/usr/bin/env ruby
#
# This script is a wrapper around pandoc that uses pandoc's
# builtin citeproc support to generate a markdown bibliography
# from bibtex.
#
# Inspired by Jacob Barney's [bib2mkd][] script.
#
# [bib2mkd]: http://jmbarney.dyndns.org/?/linux/bib2mkd/
#
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):
old_ene = Goodness_of_Fit(ps)