neurosnap.structure.filters module#
Convenience structure-filtering functions.
- neurosnap.structure.filters.fix_nucleic_termini(structure, *, strip_3prime=False, chain=None)[source]#
Normalize nucleotide phosphate names and strip terminal phosphate atoms.
- neurosnap.structure.filters.remove_atoms(structure, predicate, *, chain=None)[source]#
Remove atoms from a structure in-place when they match a predicate.
- neurosnap.structure.filters.remove_chains(structure, predicate)[source]#
Remove chains from a structure in-place when they match a predicate.
- neurosnap.structure.filters.remove_non_biopolymers(structure, *, chain=None)[source]#
Remove non-biopolymer residues from a structure in-place.
- Parameters:
- Returns:
None. The input structure is modified in-place.
Notes
Residues are preserved when they classify as valid protein or nucleotide polymer components, even if they were parsed as hetero atoms. Ambiguous placeholders such as
ASX,GLX,XLE, andUNKare removed. Common protonation or tautomer states such asHIDandHIEare preserved.
- neurosnap.structure.filters.remove_nucleotides(structure, *, chain=None)[source]#
Remove DNA and RNA residues from a structure in-place.
- neurosnap.structure.filters.remove_residues(structure, predicate, *, chain)[source]#
Remove residues from a structure in-place when they match a predicate.