Describe the bug
Some graphs have NaN coordinates.
This has been particularly observed for graphs missing aromatic residues WHEN aromatic interactions are listed in the edge_construction_functions, and when "granularity": "centroids"
Different reasons have been identified:
some edges distance and angles are computed on empty dataframes
The centroid is computed as the mean coordinates of atoms.groupby("residue_number"). The chain ID and the residue type should be added to the groupby to avoir considering atoms from different residues.
Describe the bug Some graphs have NaN coordinates. This has been particularly observed for graphs missing aromatic residues WHEN aromatic interactions are listed in the
edge_construction_functions
, and when"granularity": "centroids"
Different reasons have been identified:
atoms.groupby("residue_number")
. The chain ID and the residue type should be added to the groupby to avoir considering atoms from different residues.To Reproduce
Expected behavior Several checks should be added to ensure the correct computation of centroids coordinates when no atoms nor residues are missing.