from io import StringIO
from parmed.charmm import CharmmParameterSet, CharmmPsfFile
import parmed
psf_tmp_file = StringIO()
parmed.load_file('examples/charmm/ala5_autopsf.pdb').write_psf(psf_tmp_file, vmd=True)
psf_tmp_file.seek(0)
psf = CharmmPsfFile(psf_tmp_file)
(I am doing this as I want to use CHARMM force fields, but have no other way to create the required PSF files)
However, when I attempt setting up a system via psf.createSystem(force_field, ...), it fails with:
File "/usr/local/lib/python3.10/dist-packages/parmed/charmm/psf.py", line 650, in load_parameters
raise ParameterError(f"Could not find atom type for {atom.type}")
parmed.exceptions.ParameterError: Could not find atom type for HT1
So it seems that ParmEd writes atom types that it does not know how to interpret. Is there a way to get around it?
I am following ParmEd example with OpenMM and CHARMM, but instead of using the supplied PSF file I am trying to write one using ParmEd:
(I am doing this as I want to use CHARMM force fields, but have no other way to create the required PSF files)
However, when I attempt setting up a system via
psf.createSystem(force_field, ...)
, it fails with:So it seems that ParmEd writes atom types that it does not know how to interpret. Is there a way to get around it?