forlilab / Meeko

Interfacing RDKit and AutoDock
GNU Lesser General Public License v2.1
169 stars 41 forks source link

incorrect flexibility model for macrocycle with both breakable and unbreakable rings #129

Closed diogomart closed 1 month ago

diogomart commented 1 month ago

For a molecule with multiple rings, and only one bond that is breakable per CG/G typing restrictions (between aliphatic carbons), some rotatable bonds that are part of rigid rings are incorrectly set as rotatable. This is an extreme case, most macrocycles are simpler than this, but a bug nonetheless. Molecule: non_sequential_atom_ordering_05.mol.txt. Verified on v0.4.0 through v0.6.0-alpha.3 (didn't test on versions older than v0.4.0).

input Input is above, after docking is below. Note the amide at the center. docked

diogomart commented 1 month ago

Fixed in the flexibility refactor 32f24695526d3bdc0fc213c5170bdcbd51691992 (and a tiny fix to it b6c9edadeb213250d16b9c7f0d07c23f48fb2ba6) by preventing bonds in rigid rings from opening a branch in the torsion tree https://github.com/forlilab/Meeko/blob/b6c9edadeb213250d16b9c7f0d07c23f48fb2ba6/meeko/flexibility.py#L253