neurosnap.structure.interactions module#

Interaction analysis helpers for Neurosnap structures.

neurosnap.structure.interactions.calculate_hydrogen_bonds(structure, chain=None, chain_other=None, *, donor_acceptor_cutoff=3.5, angle_cutoff=120.0)[source]#

Count hydrogen bonds using explicit hydrogens and simple geometric cutoffs.

Parameters:
  • structure (Structure) – Input single-model Structure.

  • chain (Optional[str]) – Optional donor-chain ID. When omitted, all chains are searched.

  • chain_other (Optional[str]) – Optional acceptor-chain ID for inter-chain counting.

  • donor_acceptor_cutoff (float) – Maximum donor-acceptor distance in Å.

  • angle_cutoff (float) – Minimum donor-H-acceptor angle in degrees.

Return type:

int

Returns:

Total number of hydrogen bonds that satisfy the geometric cutoffs.

neurosnap.structure.interactions.calculate_interface_hydrogen_bonding_residues(structure, chain=None, chain_other=None, *, donor_acceptor_cutoff=3.5, angle_cutoff=120.0)[source]#

Count unique residues that participate in inter- or intra-chain hydrogen bonds.

Parameters:
  • structure (Structure) – Input single-model Structure.

  • chain (Optional[str]) – Optional donor-chain ID. When omitted, all chains are searched.

  • chain_other (Optional[str]) – Optional acceptor-chain ID for inter-chain counting.

  • donor_acceptor_cutoff (float) – Maximum donor-acceptor distance in Å.

  • angle_cutoff (float) – Minimum donor-H-acceptor angle in degrees.

Return type:

int

Returns:

Number of unique residues that participate in at least one qualifying hydrogen bond.

neurosnap.structure.interactions.find_disulfide_bonds(structure, chain=None, threshold=2.05)[source]#

Find disulfide bonds between cysteine residues using SG-SG distance.

Parameters:
  • structure (Structure) – Input single-model Structure.

  • chain (Optional[str]) – Optional chain ID to restrict the search to.

  • threshold (float) – Maximum SG-SG distance in Å used to classify a disulfide bond.

Return type:

List[Tuple[Residue, Residue]]

Returns:

List of (residue1, residue2) cysteine pairs that satisfy the distance cutoff.

neurosnap.structure.interactions.find_hydrophobic_residues(structure, chain=None)[source]#

Return hydrophobic residues from a single structure.

Parameters:
  • structure (Structure) – Input single-model Structure.

  • chain (Optional[str]) – Optional chain ID to restrict the search to.

Return type:

List[Tuple[str, Residue]]

Returns:

List of (chain_id, residue) tuples for residues classified as hydrophobic.

neurosnap.structure.interactions.find_salt_bridges(structure, chain=None, cutoff=4.0)[source]#

Identify salt bridges using CA-CA distance as a simple proxy.

Parameters:
  • structure (Structure) – Input single-model Structure.

  • chain (Optional[str]) – Optional chain ID to restrict the search to.

  • cutoff (float) – Maximum CA-CA distance in Å used to classify a salt bridge.

Return type:

List[Tuple[Residue, Residue]]

Returns:

List of (positive_residue, negative_residue) pairs that satisfy the distance cutoff.