Modeller with CHARMM with OpenMM 6.1
Posted: Thu Jun 11, 2015 9:27 am
Hi,
I'm trying to use the Modeller class to add explicit waters to a protein. I have PDB and PSF files for the protein and topology and parameter files for CHARMM. The addSolvent() method seems inconsistent as to what topology and forcefield should be but I could just be confused.
This works:
This does not:
When looking at the source for addSolvent(), I choose params for the topology and psf as the forcefield parameters based on this line in Modeller.addSolvent():
Where am I going wrong? Thanks!
I'm trying to use the Modeller class to add explicit waters to a protein. I have PDB and PSF files for the protein and topology and parameter files for CHARMM. The addSolvent() method seems inconsistent as to what topology and forcefield should be but I could just be confused.
Code: Select all
psf = CharmmPsfFile(...)
pdb = PDBFile(...)
params = CharmmParameterSet(...)
Code: Select all
system = psf.createSystem(params, nonbondedCutoff=CutoffNonPeriodic)
Code: Select all
modeller = Modeller(params, pdb.positions)
modeller.addSolvent(psf, boxSize=[5.0, 5.0, 5.0])
File "prepare-water-box.py", line 31, in create_system
modeller.addSolvent(psf, boxSize=[5.0, 5.0, 5.0])
File "/usr/lib64/python2.7/site-packages/simtk/openmm/app/modeller.py", line 337, in addSolvent
for chain in self.topology.chains():
AttributeError: 'CharmmParameterSet' object has no attribute 'chains'
Code: Select all
system = forcefield.createSystem(self.topology)