This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## mpirun -np 2 python helloworld.py | |
""" | |
Parallel Hello World | |
""" | |
from mpi4py import MPI | |
import sys | |
size = MPI.COMM_WORLD.Get_size() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# for chimera 1.4 | |
from chimera import runCommand | |
import sys | |
rec_file = sys.argv[1] | |
basename = rec_file.split('/')[-1].split('.')[0] | |
#runCommand("open 0 receptor.pdb") | |
runCommand("open 0 %s"%rec_file) | |
runCommand("hbonds intramodel true distSlop 0.65 angleSlop 80 saveFile output/%s_hbonds.txt namingStyle serial"%basename) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Experimental wrapper to use Chimera's Python directly from console. | |
You can `import chimera` with no errors! | |
Usage | |
===== | |
1. Alias your /path/to/chimera/bin/python binary to something more user-friendly, like `chimerapy`. | |
2. Download these two files and put them together | |
3. Run `chimerapy -i chimera_cli.py`. (Tip: Realias `chimerapy` to this command). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
open prometryn.pdb | |
preset apply pub 3 | |
aromatic disk; | |
focus | |
center | |
color byatom | |
repr bs | |
copy file prometryn.png dpi 300 | |
stop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## installing dependencies | |
## conda install boost | |
## conda install rdkit | |
## Download SAMPL1 database file from leelasd/SAMPL1 github repo | |
from __future__ import print_function | |
from rdkit import Chem | |
from rdkit.Chem import AllChem,Draw | |
import pandas as pd | |
df=pd.read_csv('SAMPL1_Dataset.csv') | |
mols = [Chem.MolFromSmiles(smi) for smi in df.SMILES] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
REMARK Aniline | |
REMARK Created by BOSS 4.9 Feb 12 Linux | |
ATOM 1 C00 UNK 1 0.000 1.400 0.000 | |
ATOM 2 C01 UNK 1 0.000 0.695 -1.220 | |
ATOM 3 C02 UNK 1 -0.000 0.694 1.219 | |
ATOM 4 C03 UNK 1 0.006 -0.713 -1.220 | |
ATOM 5 C04 UNK 1 0.006 -0.715 1.218 | |
ATOM 6 C05 UNK 1 0.010 -1.420 -0.002 | |
ATOM 7 N06 UNK 1 -0.001 2.739 0.001 | |
ATOM 8 H07 UNK 1 -0.008 1.225 -2.162 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ForceField> | |
<AtomTypes> | |
<Type name="opls_145" class="CA" element="C" mass="12.011000" /> | |
<Type name="opls_146" class="HA" element="H" mass="1.008000" /> | |
<Type name="opls_900" class="NT" element="N" mass="14.007000" /> | |
<Type name="opls_916" class="CA" element="C" mass="12.011000" /> | |
<Type name="opls_909" class="H" element="H" mass="1.008000" /> | |
</AtomTypes> | |
<HarmonicBondForce> | |
<Bond class1="CA" class2="CA" length="0.140" k="392459.20"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ForceField> | |
<AtomTypes> | |
<Type name="tip3p-O" class="OW" element="O" mass="15.99943"/> | |
<Type name="tip3p-H" class="HW" element="H" mass="1.007947"/> | |
</AtomTypes> | |
<Residues> | |
<Residue name="HOH"> | |
<Atom name="O" type="tip3p-O"/> | |
<Atom name="H1" type="tip3p-H"/> | |
<Atom name="H2" type="tip3p-H"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
dcdreporter.py: Outputs simulation trajectories in DCD format | |
This is part of the OpenMM molecular simulation toolkit originating from | |
Simbios, the NIH National Center for Physics-Based Simulation of | |
Biological Structures at Stanford, funded under the NIH Roadmap for | |
Medical Research, grant U54 GM072970. See https://simtk.org. | |
Portions copyright (c) 2012 Stanford University and the Authors. | |
Authors: Peter Eastman |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
from simtk.openmm.app import * | |
from simtk.openmm import * | |
from simtk.unit import * | |
from sys import stdout | |
def getForceByClass(system, klass): | |
for i in range(system.getNumForces()): | |
f = system.getForce(i) | |
if isinstance(f, klass): |