View make_graphs.py
def make_graphs(atoms, coos, bonds):
G = nx.DiGraph()
# ADD NODES USING ATOM TYPES AND COORDINATES
for i in coos.keys():
G.add_node(i, XYZ=coos[i], elem=atoms[i],
atno=bossElement2Num(atoms[i]))
for (i, j, rij) in zip(bonds['BI'], bonds['BJ'], bonds['RIJ']):
G.add_edge(i, j, distance=rij)
G.add_edge(j, i, distance=rij)
all_paths = []
View BOSS_soscmd_fep.py
## Useful to collect data from SOS simulations
import pandas as pd
import numpy as np
import os
def col_dat():
com1="grep 'DelSOS (' *sum* |sed 's/)//g'|awk '{print $4,$6,$8,$10}'>resDeltaSOS"
com2="grep 'DeltaG (' *sum* |sed 's/)//g'|awk '{print $4,$6,$8,$10}'>resDeltaG"
os.system(com1)
os.system(com2)
View MULTIPLE_JOBS.sh
#!/bin/bash
#SBATCH --job-name=scavenge
#SBATCH --time=00:10:00
#SBATCH --array=0-14
#SBATCH --ntasks=1
# the environment variable SLURM_ARRAY_TASK_ID contains
# the index corresponding to the current job step
echo $SLURM_ARRAY_TASK_ID
View run_md-npt.sh
#PBS -l nodes=2:ppn=12
#PBS -N JobName
cd ${PBS_O_WORKDIR}
NPROCS=`wc -l <$PBS_NODEFILE`
MPIRUN="mpirun -machinefile $PBS_NODEFILE -n $NPROC"
export GMX_MAXBACKUP=1000 # max number of gro backup
GMDIR=/home/kmtu/local/gromacs-4.6.6/bin
View BNZ_in_TIP4P.pdb
REMARK 1 CREATED WITH OPENMM 7.1.1, 2017-10-16
CRYST1 23.993 23.993 23.993 90.00 90.00 90.00 P 1 1
HETATM 1 C00 BNZ A 1 -33.719 6.803 5.110 1.00 0.00 C
HETATM 2 C01 BNZ A 1 -32.949 7.049 3.983 1.00 0.00 C
HETATM 3 C02 BNZ A 1 -32.971 6.191 2.877 1.00 0.00 C
HETATM 4 C03 BNZ A 1 -33.784 5.067 2.912 1.00 0.00 C
HETATM 5 C04 BNZ A 1 -34.551 4.833 4.050 1.00 0.00 C
HETATM 6 C05 BNZ A 1 -34.532 5.672 5.136 1.00 0.00 C
HETATM 7 H06 BNZ A 1 -33.689 7.478 5.953 1.00 0.00 H
HETATM 8 H07 BNZ A 1 -32.317 7.924 3.960 1.00 0.00 H
View tip4pew.xml
<ForceField>
<AtomTypes>
<Type name="tip4pew-O" class="OW" element="O" mass="15.99943"/>
<Type name="tip4pew-H" class="HW" element="H" mass="1.007947"/>
<Type name="tip4pew-M" class="MW" mass="0"/>
</AtomTypes>
<Residues>
<Residue name="HOH">
<Atom name="O" type="tip4pew-O"/>
<Atom name="H1" type="tip4pew-H"/>
View BNZ_in_TIP4P.py
from __future__ import print_function
from simtk.openmm import app
import simtk.openmm as mm
from simtk import unit
from sys import stdout
# load in input PDB file and force field XML files
pdb = app.PDBFile('BNZ_7D0AA7.pdb')
forcefield = app.ForceField('BNZ_7D0AA7.xml', 'tip4pew.xml')
View serial_parmed.py
structure = parmed.openmm.topsystem.load_topology( pdbfile.topology, system, pdbfile.positions)
structure.save('system.prmtop', overwrite=True)
structure.save('system.crd', format='rst7', overwrite=True)
parm = parmed.load_file('system.prmtop', 'system.crd')
ambersys = parm.createSystem(nonbondedMethod= app.NoCutoff, constraints = None, implicitSolvent = None)
from simtk.openmm import XmlSerializer
serialized_system_amber = XmlSerializer.serialize(ambersys)
outfile = open('amber_system.xml','w')
outfile.write(serialized_system_amber)
outfile.close()
View tip4p.xml
<ForceField>
<Info>
<Reference>Lee-Ping Wang, Todd J. Martinez and Vijay S. Pande. Building force fields - an automatic, systematic and reproducible approach. Journal of Physical Chemistry Letters, ASAP, 2014. DOI: 10.1021/jz500737m.</Reference>
</Info>
<AtomTypes>
<Type name="tip4p-fb-O" class="OW" element="O" mass="15.99943"/>
<Type name="tip4p-fb-H" class="HW" element="H" mass="1.007947"/>
<Type name="tip4p-fb-M" class="MW" mass="0"/>
</AtomTypes>
<Residues>
View NO_INTER_SS.py
from simtk.openmm import app,KcalPerKJ,Vec3
import simtk.openmm as mm
from simtk import unit as u
from sys import stdout,exit
#from simtk.openmm.app import *
#from simtk.openmm import *
#from simtk.unit import *
#from sys import stdout,exit
#from mdtraj.reporters import NetCDFReporter # <-- new import from mdtraj