pestifer.charmmff.ligand_paramgen.protonation module¶
Protonate a ligand residue at a target pH while preserving its PDB heavy-atom order, names, and coordinates.
Used as the first stage of the on-the-fly CGenFF parameterization
pipeline: the protonated 3D Mol returned here feeds the mol2 writer
that drives the cgenff binary.
- exception pestifer.charmmff.ligand_paramgen.protonation.LigandProtonationError[source]¶
Bases:
RuntimeErrorRaised when a ligand cannot be protonated for CGenFF parameterization.
- pestifer.charmmff.ligand_paramgen.protonation.protonate_ligand(residue: Residue, smiles: str, ph: float = 7.4) Chem.Mol[source]¶
Protonate a ligand residue at the given pH using Dimorphite-DL.
The input
residuesupplies heavy-atom coordinates and PDB atom names; thesmilessupplies bond orders and formal charges. Heavy-atom order in the returned Mol matches the input residue’s heavy-atom order, and each heavy atom carries its PDB name as the RDKit property_pdb_name. Hydrogens are placed in 3D at the protonation state appropriate forph.- Parameters:
residue – A pestifer
Residuefor the ligand. Hydrogens inresidue.atomsare ignored; only heavy atoms are used.smiles – SMILES describing the ligand’s heavy-atom skeleton and bond orders. Heavy-atom count must match the number of heavy atoms in
residue.ph – pH at which to protonate (default 7.4).
ph_minandph_maxpassed to Dimorphite-DL are both set to this value.