qp.manager.charge_embedding.rename_and_clean_resnames¶
- qp.manager.charge_embedding.rename_and_clean_resnames(input_pdb, output_pdb)[source]¶
Rename histidine residues for ff14SB compatibility and convert HETATM to ATOM.
Protoss outputs all histidines as HIS, but ff14SB requires specific protonation states: HIP (doubly protonated), HID (delta-protonated), or HIE (epsilon-protonated). This function determines the correct name based on hydrogen atoms present.
Also handles N-terminal (NXXX) and C-terminal (CXXX) residue naming, and converts all HETATM records to ATOM for force field assignment.
- Parameters:
input_pdb (str) – Path to the input PDB file (typically Protoss output).
output_pdb (str) – Path to write the renamed PDB file.
Notes
The four-letter residue names (NALA, CALA, etc.) may cause column alignment issues in strict PDB format parsers.