moleculekit.tools.preparation_customres module#

class moleculekit.tools.preparation_customres.CustomNucleicResidue(atoms, ref)#

Bases: Nucleic

Custom nucleic-acid residue class - the na counterpart of CustomResidue. pdb2pqr resolves a residue to amino vs nucleic by looking its name up in pdb2pqr.aa then pdb2pqr.na; registering a modified nucleotide (5MC, …) here routes it through the nucleic path.

letter_code()#

Default letter code for residue.

Returns:

letter code for residue

Return type:

str

set_state()#

Adds the termini for all inherited objects.

class moleculekit.tools.preparation_customres.CustomResidue(atoms, ref)#

Bases: Amino

Custom residue class. Hack for pdb2pqr which requires one class per residue in pdb2pqr.aa module

letter_code()#

Default letter code for residue.

Returns:

letter code for residue

Return type:

str

class moleculekit.tools.preparation_customres.CustomSugarResidue(atoms, ref)#

Bases: Nucleic

Custom monosaccharide residue class, registered under pdb2pqr’s nucleic-acid module rather than its amino-acid one.

This is not about nucleic-acid chemistry: it is the only registration path that avoids two amino-acid-only assumptions pdb2pqr’s Amino machinery hard-codes and no sugar can satisfy. Biomolecule. set_reference_distance (called unconditionally by debumping) requires every aa.Amino residue to have a CA atom and raises otherwise; and the rotamer-debumping pass only ever touches aa.Amino residues in the first place. Registering sugars as na.Nucleic instead gives them the same heavy-atom-repair and hydrogen-addition treatment as a modified nucleotide (both paths are gated on isinstance(residue, (aa.Amino, na.Nucleic))) without tripping the CA requirement, and without pdb2pqr attempting to debump them.

A sugar is also never a real nucleic-acid 5’/3’ terminus: its glycosidic attachment point (to a protein anchor, another sugar, or nothing for a free reducing end) is handled afterwards by moleculekit’s own _apply_glycan_modifications, not by a pdb2pqr terminus patch. n_term_blocked / c_term_blocked are set unconditionally here (the same flags moleculekit.tools.preparation._stamp_non_termini() sets per-residue for protein junctions) so Biomolecule.assign_termini never applies a 5TERM/3TERM patch to a sugar just because it happens to sit first or last in pdb2pqr’s chain grouping.

letter_code()#

Default letter code for residue.

Returns:

letter code for residue

Return type:

str

set_state()#

Adds the termini for all inherited objects.