Commit 17b7569a authored by Jason Swails's avatar Jason Swails
Browse files

Update the CHARMM example.

parent 895f9a6f
...@@ -4,20 +4,17 @@ from simtk.unit import * ...@@ -4,20 +4,17 @@ from simtk.unit import *
from sys import stdout from sys import stdout
# Read the PSF # Read the PSF
psf = CharmmPSF.load_from_psf('ala_ala_ala.psf') psf = CharmmPsfFile('ala_ala_ala.psf')
# Get the coordinates from the PDB # Get the coordinates from the PDB
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.load_set(tfile='charmm22.rtf', params = CharmmParameterSet('charmm22.rtf', 'charmm22.par')
pfile='charmm22.par').condense()
# Load the parameter set !! do not forget this !!
psf.load_parameters(params)
# Instantiate the system # Instantiate the system
system = psf.createSystem(nonbondedMethod=NoCutoff, nonbondedCutoff=None) system = psf.createSystem(params, nonbondedMethod=NoCutoff,
nonbondedCutoff=None)
integrator = LangevinIntegrator(300*kelvin, 1/picosecond, 0.002*picoseconds) integrator = LangevinIntegrator(300*kelvin, 1/picosecond, 0.002*picoseconds)
simulation = Simulation(psf.topology, system, integrator) simulation = Simulation(psf.topology, system, integrator)
simulation.context.setPositions(pdb.getPositions()) simulation.context.setPositions(pdb.getPositions())
......
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