neurosnap.structure.prepare module#
Structure-preparation helpers.
This module provides small structure-level preparation utilities plus thin wrappers around the existing PDB2PQR and EvoEF2 preparation backends.
The wrappers intentionally do not reimplement those engines. They expose a structure-oriented API while delegating the underlying chemistry logic to the existing algorithm modules.
- neurosnap.structure.prepare.add_hydrogens_with_pdb2pqr(structure, *, forcefield='PARSE', ffout=None, neutraln=False, neutralc=False, debump=True)[source]#
Add hydrogens using the PDB2PQR preparation backend.
This wrapper delegates to
neurosnap.algos.pdb2pqr.assign_pqr()withassign_only=Falseandoptimize=False. PDB2PQR may still perform its internal water-specific hydrogen handling, but it skips the full optimization path used byoptimize_hydrogens_with_pdb2pqr().The returned structure is the PDB2PQR-rebuilt structure, so it also carries any charge/radius annotations and provenance metadata that backend emits.
- Return type:
- neurosnap.structure.prepare.has_hydrogens(structure)[source]#
Return
Trueif the structure currently contains hydrogen atoms.
- neurosnap.structure.prepare.optimize_hydrogens_with_pdb2pqr(structure, *, forcefield='PARSE', ffout=None, neutraln=False, neutralc=False, debump=True)[source]#
Add and optimize hydrogens using the PDB2PQR preparation backend.
This wrapper delegates to
neurosnap.algos.pdb2pqr.assign_pqr()withassign_only=Falseandoptimize=True.The returned structure is the PDB2PQR-rebuilt structure, so it also carries any charge/radius annotations and provenance metadata that backend emits.
- Return type:
- neurosnap.structure.prepare.rebuild_missing_atoms_with_evoef2(structure, *, param_path=None, topo_path=None)[source]#
Rebuild missing heavy atoms and hydrogens using bundled EvoEF2 topology data.
Unlike the scoring implementation in
neurosnap.algos.evoef2, this structure-level wrapper uses a local reconstruction backend and returns a nativeStructuredirectly.- Return type: