Skip to content

ValueError: No template found for N-terminal residue in large multi-chain system (150 chains) #345

@Parwez4436

Description

@Parwez4436

I am attempting to set up a large-scale Coarse-Grained simulation using the Open-AWSEM forcefield in OpenMM. The system consists of 150 copies of the Mouse Prion Protein (residues 23-225, ~203 residues per chain) arranged in a slab geometry (25×25×150 nm).

I am encountering two primary bottlenecks when using PDBFixer and OpenMM's ForceField.createSystem():

  1. ValueError: No template found for residue 1 (LYS).
    Even after using PDBFixer to standardize the topology, OpenMM fails to match the N-terminal Lysine. The error persists even if Hydrogens are removed. It seems the internal _matchAllResiduesToTemplates logic is struggling with the terminal connectivity in this multi-chain setup.

  2. OOM / Process Killed during addMissingAtoms()
    When running fixer.addMissingAtoms() on the full 150-chain system (~170,000 atoms/beads), the process is killed by the OS (Out of Memory). It appears the LocalEnergyMinimizer or the internal system creation within PDBFixer does not scale linearly with the number of chains/residues in terms of RAM usage.

System Details:

  • OpenMM Version: 8.x (via Miniconda)
  • PDBFixer Version: 1.9
  • System Size: 150 chains, ~203 residues/chain.
  • Input: Custom PDB generated by replicating a single-chain template.

Error Traceback:

ValueError: No template found for residue 1 (LYS). This might mean your input topology is missing some atoms or bonds, or possibly that you are using the wrong force field. 
For more information, see https://github.com/openmm/openmm/wiki/Frequently-Asked-Questions#template

What I have tried:

  • Standardizing a single chain with PDBFixer first, then replicating.
  • Ensuring TER records are present after every chain.
  • Using chains=None in OpenMMAWSEMSystem (Open-AWSEM wrapper for app.PDBFile).
  • Strict column alignment in the PDB file.

Questions for the Developers:

  1. Is there a way to force PDBFixer to skip the expensive minimization step during addMissingAtoms() to prevent OOM for large systems?
  2. In multi-chain systems where Chain IDs must repeat (exceeding the 62-character A-Z, a-z, 0-9 limit), does the template matcher lose track of terminal residues (N-TER/C-TER)?
  3. Are there specific atom-naming requirements for the AWSEM 6-bead model (N, H, CA, C, O, CB) to be recognized as a valid N-terminal template without causing a mismatch?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions