Add missing terminal cappings#

Adding terminal cappings to peptides and proteins.

Capping the termini of peptides and proteins is often required in molecular modeling to ensure charge neutrality, stability, or to match specific biological conditions. The function molsysmt.build.add_missing_terminal_cappings() adds chemical capping groups (such as ACE for N-terminus and NME for C-terminus) or completes uncapped terminal residues.

Added in version 1.0.0.

Basic usage#

Let’s show how this function works using a tripeptide example (AlaValPro):

import molsysmt as msm
molsys = msm.build.build_peptide('AlaValPro', to_form='molsysmt.MolSys')
msm.info(molsys, element='group')
index id name type n atoms component index chain index molecule index molecule type entity index entity name
0 1 ALA amino acid 10 0 0 0 peptide 0 peptide 0
1 2 VAL amino acid 16 0 0 0 peptide 0 peptide 0
2 3 PRO amino acid 14 0 0 0 peptide 0 peptide 0

As shown, the termini of the peptide are currently incomplete. We now add the atoms required to complete the terminal amino acids without capping groups, producing a charged version of the peptide:

molsys_charged = msm.build.add_missing_terminal_cappings(molsys, N_terminal=None, C_terminal=None)
msm.info(molsys_charged, element='group')
index id name type n atoms component index chain index molecule index molecule type entity index entity name
0 1 ALA amino acid 12 0 0 0 peptide 0 peptide 0
1 2 VAL amino acid 16 0 0 0 peptide 0 peptide 0
2 3 PRO amino acid 15 0 0 0 peptide 0 peptide 0

Let’s check the group charges under these conditions using molsysmt.physchem.get_charge():

msm.physchem.get_charge(molsys_charged, element='group')
Magnitude
[0.0 0.0 0.0]
Unitselementary_charge

To neutralize terminal charges, we can cap the N-terminus with an acetyl group (ACE) and the C-terminus with an N-methyl amide group (NME):

molsys_uncharged = msm.build.add_missing_terminal_cappings(molsys, N_terminal='ACE', C_terminal='NME')
msm.info(molsys_uncharged, element='group')
index id name type n atoms component index chain index molecule index molecule type entity index entity name
0 0 ACE terminal capping 6 0 0 0 peptide 0 peptide 0
1 1 ALA amino acid 10 0 0 0 peptide 0 peptide 0
2 2 VAL amino acid 16 0 0 0 peptide 0 peptide 0
3 3 PRO amino acid 14 0 0 0 peptide 0 peptide 0
4 4 NME terminal capping 6 0 0 0 peptide 0 peptide 0

We inspect the group charges again to confirm that the capped peptide is now neutral:

msm.physchem.get_charge(molsys_uncharged, element='group')
Magnitude
[0.0 0.0 0.0 0.0 0.0]
Unitselementary_charge

Native domain preservation#

Native insertion of terminal atoms or ACE/NME requires one chemical state. Existing atom IDs, chemical assignments, state identity/provenance and coordinates survive. Inserted groups can change atom/group indices. New chemical values remain unknown and connectivity is partial: a modeled capping geometry does not declare or validate all terminal chemistry. Assign the intended chemical state separately.

Named interaction analyses retain their definitions and remapped source axes; occurrences and evaluated coverage are cleared for recalculation. Structural attributes or force-field atom parameters without values for new atoms are dropped with a diagnostic. Observe these diagnostics in preparation workflows. The strict attribute-loss option belongs to the separate heavy-atom repair tool; this terminal tool keeps its existing intersection behavior.

Inspecting nonterminal gaps#

The native engine also calls bounded heavy-atom repair. Unsupported side-chain gaps remain missing with a warning even when OXT or ACE/NME insertion succeeds. Inspect both msm.build.get_missing_terminal_cappings(molsys_charged) and msm.build.get_missing_heavy_atoms(molsys_charged). PDBFixer can choose wider heavy-atom reconstruction, so whole-system counts need not match between engines. Matching terminal inventories do not certify all side-chain coordinates.