Commit d825e6ab authored by Jason Swails's avatar Jason Swails
Browse files

Modify simulateCharmm.py to require a top and par file. Delete charmm22 files

to prevent users from actually using them.
parent 6dc080e9
This diff is collapsed.
This diff is collapsed.
from simtk.openmm.app import * from simtk.openmm.app import *
from simtk.openmm import * from simtk.openmm import *
from simtk.unit import * from simtk.unit import *
from sys import stdout from sys import stdout, exit, stderr
# Define a user-interface
from optparse import OptionParser
parser = OptionParser()
parser.add_option('-t', '--top', dest='top', default=None,
help='CHARMM RTF file to use in the simulation.')
parser.add_option('-p', '--param', dest='par', default=None,
help='CHARMM parameter file to use in the simulation.')
opt, arg = parser.parse_args()
if arg:
stderr.write('Unexpected arguments: %s' % ', '.join(arg) + '\n')
exit(parser.print_help() or 1)
if opt.top is None or opt.par is None:
stderr.write('You must provide a top AND parameter file\n')
exit(parser.print_help() or 1)
# Read the PSF # Read the PSF
psf = CharmmPsfFile('ala_ala_ala.psf') psf = CharmmPsfFile('ala_ala_ala.psf')
...@@ -10,7 +27,7 @@ psf = CharmmPsfFile('ala_ala_ala.psf') ...@@ -10,7 +27,7 @@ psf = CharmmPsfFile('ala_ala_ala.psf')
pdb = PDBFile('ala_ala_ala.pdb') pdb = PDBFile('ala_ala_ala.pdb')
# Read and condense the parameter set # Read and condense the parameter set
params = CharmmParameterSet('charmm22.rtf', 'charmm22.par') params = CharmmParameterSet(opt.top, opt.par)
# Instantiate the system # Instantiate the system
system = psf.createSystem(params, nonbondedMethod=NoCutoff, system = psf.createSystem(params, nonbondedMethod=NoCutoff,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment