Data models and reports for structural interactions and coordination centers.
- class neurosnap.structure.interaction_report.AtomReference(atom_index, chain_id, res_id, ins_code, res_name, atom_name, element)[source]#
Bases:
objectA reference to a specific atom in a Structure with copied metadata.
-
atom_index:
int#
-
atom_name:
str#
-
chain_id:
str#
-
element:
str#
-
ins_code:
str#
-
res_id:
int#
-
res_name:
str#
-
atom_index:
- class neurosnap.structure.interaction_report.CoordinationCenterRecord(center_id, metal_atom_index, entity, chain, res_id, ins_code, res_name, atom_name, element, coordination_number, donor_atom_indices, donor_elements, geometry=None, geometry_deviation_deg=None, evidence='distance_cutoff', rule_set='default', rule_version='1', model_id=1)[source]#
Bases:
objectThe exact fields representing a metal coordination center.
-
atom_name:
str#
-
center_id:
str#
-
chain:
str#
-
coordination_number:
int#
-
donor_atom_indices:
Sequence[int]#
-
donor_elements:
Sequence[str]#
-
element:
str#
-
entity:
str#
-
evidence:
str= 'distance_cutoff'#
-
geometry:
Optional[str] = None#
-
geometry_deviation_deg:
Optional[float] = None#
-
ins_code:
str#
-
metal_atom_index:
int#
-
model_id:
int= 1#
-
res_id:
int#
-
res_name:
str#
-
rule_set:
str= 'default'#
-
rule_version:
str= '1'#
-
atom_name:
- class neurosnap.structure.interaction_report.InteractionEntity(name, atom_indices, rdkit_mol=None)[source]#
Bases:
objectRepresentation of a molecular entity participating in interactions.
- class neurosnap.structure.interaction_report.InteractionRecord(interaction_id, interaction_type, evidence, entity1, atom_index1, chain1, res_id1, ins_code1, res_name1, atom_name1, element1, role1, entity2, atom_index2, chain2, res_id2, ins_code2, res_name2, atom_name2, element2, role2, distance_a=None, angle_deg=None, vdw_gap_a=None, source='geometric_rules', rule_set='default', rule_version='1', model_id=1, details=None)[source]#
Bases:
objectThe exact fields representing a detected structural interaction.
-
angle_deg:
Optional[float] = None#
-
atom_index1:
int#
-
atom_index2:
int#
-
atom_name1:
str#
-
atom_name2:
str#
-
chain1:
str#
-
chain2:
str#
-
details:
Optional[dict] = None#
-
distance_a:
Optional[float] = None#
-
element1:
str#
-
element2:
str#
-
entity1:
str#
-
entity2:
str#
-
evidence:
str#
-
ins_code1:
str#
-
ins_code2:
str#
-
interaction_id:
str#
-
interaction_type:
str#
-
model_id:
int= 1#
-
res_id1:
int#
-
res_id2:
int#
-
res_name1:
str#
-
res_name2:
str#
-
role1:
str#
-
role2:
str#
-
rule_set:
str= 'default'#
-
rule_version:
str= '1'#
-
source:
str= 'geometric_rules'#
-
vdw_gap_a:
Optional[float] = None#
-
angle_deg:
- class neurosnap.structure.interaction_report.InteractionReport(records, coordination_centers, metadata=None)[source]#
Bases:
objectImmutable collection of structural interaction records and coordination centers.
- coordination_centers_dataframe()[source]#
Convert coordination centers to a pandas DataFrame with the expected columns.
- Return type:
DataFrame
- filter(*, interaction_types=None, entities=None, chains=None, record_indices=None, predicate=None)[source]#
Filter interactions and return a new InteractionReport with relevant coordination centers.
- Return type:
- to_csv(**kwargs)[source]#
Export the interaction records DataFrame as a CSV string.
- Return type:
str