mirror of
https://github.com/rdkit/rdkit.git
synced 2026-06-03 21:44:30 +08:00
Fix typo in _calculateBeta: check nb1 instead of nb2 twice (#9202)
The non-terminal bond filter checked len(nb2) > 1 for both atoms, ignoring nb1 entirely. This could include bonds with a terminal begin-atom when computing dmax for torsion weights.
This commit is contained in:
@@ -392,7 +392,7 @@ def _calculateBeta(mol, distmat, aid1):
|
||||
for b in mol.GetBonds():
|
||||
nb1 = _getHeavyAtomNeighbors(b.GetBeginAtom())
|
||||
nb2 = _getHeavyAtomNeighbors(b.GetEndAtom())
|
||||
if len(nb2) > 1 and len(nb2) > 1:
|
||||
if len(nb1) > 1 and len(nb2) > 1:
|
||||
bonds.append(b)
|
||||
# get shortest distance
|
||||
dmax = 0
|
||||
|
||||
Reference in New Issue
Block a user