Chain-interface analysis helpers for Neurosnap structures.
- neurosnap.structure.interface.calculate_bsa(structure, chain_group_1, chain_group_2, *, level='R')[source]#
Calculate buried surface area between two chain groups.
- The buried surface area (BSA) is computed as:
(SASA(group 1) + SASA(group 2)) - SASA(complex)
- Parameters:
structure (
Structure) – Input complex as a single-modelStructure.chain_group_1 (
List[str]) – Chain IDs for the first group.chain_group_2 (
List[str]) – Chain IDs for the second group.level (
str) – Surface-area aggregation level forwarded tocalculate_surface_area().
- Return type:
float- Returns:
Buried surface area in Ų.
- neurosnap.structure.interface.find_contacts(atoms1, atoms2, cutoff=4.5)[source]#
Identify atom-atom contacts between two atom sets using a distance cutoff.
- neurosnap.structure.interface.find_interface_contacts(structure, chain1, chain2, *, cutoff=4.5, hydrogens=True)[source]#
Identify atom-atom contacts between two chains using a distance cutoff.
- Parameters:
structure (
Structure) – Input single-modelStructure.chain1 (
str) – First chain ID.chain2 (
str) – Second chain ID.cutoff (
float) – Contact cutoff distance in Å.hydrogens (
bool) – Whether hydrogen atoms should be included.
- Return type:
- Returns:
List of contacting
(atom1, atom2)pairs.
- neurosnap.structure.interface.find_interface_residues(structure, chain1, chain2, *, cutoff=4.5, hydrogens=True)[source]#
Identify unique residue-residue contacts between two chains.
Multiple atom-atom contacts between the same residue pair are collapsed into one output pair.
- Parameters:
structure (
Structure) – Input single-modelStructure.chain1 (
str) – First chain ID.chain2 (
str) – Second chain ID.cutoff (
float) – Contact cutoff distance in Å.hydrogens (
bool) – Whether hydrogen atoms should be included in the contact search.
- Return type:
- Returns:
List of unique contacting
(residue1, residue2)pairs.
- neurosnap.structure.interface.find_non_interface_hydrophobic_patches(structure, chain_pairs, target_chains=None, *, cutoff_interface=4.5, hydrogens=True, patch_cutoff=6.0, min_patch_area=40.0)[source]#
Identify solvent-exposed hydrophobic patches outside specified interfaces.
Hydrophobic residues are first filtered to remove interface residues and buried residues, then clustered by CA-CA proximity into connected components.
- Parameters:
structure (
Structure) – Input single-modelStructure.chain_pairs (
Iterable[Tuple[str,str]]) – Iterable of chain-ID pairs whose interfaces should be excluded from patch detection.target_chains (
Optional[Iterable[str]]) – Optional chain IDs to search for patches. IfNone, all chains are considered.cutoff_interface (
float) – Distance cutoff in Å used to classify interface contacts.hydrogens (
bool) – Whether hydrogen atoms should be included in the interface contact search.patch_cutoff (
float) – CA-CA distance cutoff in Å used to connect hydrophobic residues into the same patch.min_patch_area (
float) – Minimum summed SASA in Ų required for a connected component to be returned.
- Return type:
List[List[Residue]]- Returns:
List of residue lists, where each list represents one hydrophobic patch.