a-r-j / graphein

Protein Graph Library
https://graphein.ai/
MIT License
1.02k stars 129 forks source link

Check atoms are in the same chain always False #199

Closed EyalRozenberg1 closed 2 years ago

EyalRozenberg1 commented 2 years ago

Describe the bug While you calculate covalent edges based on atomic distances, you check whether two atoms are in the same chain or not. The condition you use there is wrong, and will always return False.

To Reproduce Steps to reproduce the behavior:

  1. Go to :

    https://github.com/a-r-j/graphein/blob/553fd2615e69fcad74c6c2659b795faf6d1c798b/graphein/protein/edges/atomic.py#L137

  2. The not (chain_1 and chain_2) condition is always False.

To Fix Replace to not (chain_1 == chain_2) for the expected behavior.

best, Eyal

a-r-j commented 2 years ago

Thanks for the report, Eyal! Should be fixed in 1.5.1 :)