Subject: ChemShell Solvation Error: unknown residue type TER from psfgen (NAMD 3.0)

Dear Py-ChemShell developers,
I am a user of ChemShell (version 23.0.3) and I am currently working on setting up a molecular dynamics simulation for a protein system containing a haem group and a bound O2 molecule, using the Solvation workflow with the NAMD driver.

My script is based on the solvation example, loading an initial PDB (p450_a.pdb) and attempting to solvate it using the Solvation workflow:

Generated python

# ... (script setup) ...
my_namd = NAMD(par=['camphor.prm'], top=['camphor.rtf']) # Note: Initial par/top list is minimal in script snippet
solv = Solvation(solute=p450, padding=10.0, driver=my_namd, ...)
solv.run(dryrun=True)

content_copydownload

The script fails during the psfgen execution called internally by the Solvation workflow. The traceback indicates a non-zero exit status from the psfgen command:

Generated code

subprocess.CalledProcessError: Command '['/home/zhong12058/packages/NAMD_3.0_Source/Linux-x86_64-g++/psfgen', '_psfgen.inp']' returned non-zero exit status 1.

content_copydownload

Upon examining the output from the psfgen run (likely in the .err file), I found the following specific errors:

Generated code

ERROR!  FAILED TO RECOGNIZE SET.  Line 35: set nat ?NATC
... (many similar FAILED TO RECOGNIZE SET/IF errors when reading toppar_water_ions.str) ...
psfgen) unknown residue type TER
...
psfgen) failed!

content_copydownload

Based on the ChemShell output log, I can see that ChemShell successfully loads my initial PDB (p450_a.pdb), runs PDB2PQR, identifies segments (PROT, HEM, LIG, CAM, CW, SOL*), and then saves these segments into separate intermediate PDB files (e.g., _segment_PROT_A.pdb) before calling psfgen with an input file (_psfgen.inp) that references these segment PDBs.

My initial p450_a.pdb file does not contain TER records within the protein chain. However, it appears that ChemShell is adding a TER record to the end of the _segment_PROT_A.pdb file it generates for psfgen. The NAMD 3.0 psfgen then seems to interpret this TER record as an unknown residue type when processing the segment’s PDB file, causing the build process to fail.

Additionally, the FAILED TO RECOGNIZE SET/IF errors suggest that the toppar_water_ions.str file, which ChemShell automatically assigns for water/ions, contains CHARMM script commands that my version of psfgen (NAMD 3.0’s built-in psfgen) cannot process.

Could you please provide guidance on the following points?

  1. Is there a known compatibility issue between ChemShell 23.0.3’s generation of intermediate segment PDB files (specifically the inclusion of TER records) and the psfgen executable distributed with NAMD 3.0?

  2. Is there a recommended way or an option within the ChemShell Solvation workflow, NAMD driver configuration, or Fragment object handling to prevent ChemShell from including TER records when it saves segment PDB files for psfgen?

  3. Regarding the toppar_water_ions.str issue, is it advisable to manually provide the separate top_water_ions.rtf and par_water_ions.prm files from the CHARMM force field distribution to the NAMD driver object’s top and par lists instead of relying on ChemShell’s automatic assignment of the .str file? Should I also ensure all other necessary parameter files (protein, haem, ligand, etc.) are explicitly listed in my_namd.par?

Any help or suggestions you can offer would be greatly appreciated.

Thank you for your time and support.