martimunicoy / peleffy

The peleffy (PELE Force Field Yielder) is a Python package that builds PELE-compatible force field templates.

Home Page:https://martimunicoy.github.io/peleffy

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Assign Molecule's connectivity with an RDKit template

martimunicoy opened this issue · comments

Description

If we want to load PDB files with no connectivity data (such as those coming from PELE simulations) we need a method to assign the missing connectivity.

Solution

We can use an RDKit molecule representation with the correct connectivity assigned as the connectivity template. Then, the RDKit's method AllChem.AssignBondOrdersFromTemplate can be employed to assign the connectivity to a third molecular representation using the previous connectivity template.

I just recently saw that MDAnalysis has added a to_rdkit method, and that they put some solid work into guessing valid connectivities + bond orders. It may be worth checking this out:

MDAnalysis PR: MDAnalysis/mdanalysis#2916
Blog post from author about guessing connectivity: https://cedric.bouysset.net/blog/2020/07/22/rdkit-converter-part2