Created
October 16, 2017 16:07
-
-
Save leelasd/185f9bc3ea80e062ca4aa3dcc7468310 to your computer and use it in GitHub Desktop.
Simulation of Benzene in TIP4P waterbox with OpenMM
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
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') | |
# use app.Modeller to add hydrogens, extra particles, and solvent | |
modeller = app.Modeller(pdb.topology, pdb.positions) | |
modeller.addSolvent(forcefield, model='tip4pew', padding=1.0*unit.nanometers) | |
app.PDBFile.writeFile(modeller.topology, modeller.positions, open('1o9s_modeller_tip4pew.pdb', 'w')) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment