Hi Eduardo, As I understand - you are trying to read back Vina docked conformers of your small molecules. Maybe I can suggest a different approach, which I implemented in ODDT. Instead of reading back the molecules and recreating bonds, you could read back just the 3D conformer onto an original molecule (without touching the bond orders at all). See https://github.com/oddt/oddt/blob/master/oddt/docking/AutodockVina.py#L285
Additionally, you could use either OB and RDKit, the latter has some more boilerplate in ODDT, where you can write the RDKit molecules straight to PDBQT for Vina. https://github.com/oddt/oddt/blob/a3ff8b84b3abf986ad5bdbfebc9ef96cb8a84d8c/oddt/toolkits/extras/rdkit/__init__.py#L353 The bottom line is the same for both toolkits - you do not care what the BO are after docking as long as you have the original molecule in place. Best, Maciek ---- Pozdrawiam, | Best regards, Maciek Wójcikowski mac...@wojcikowski.pl czw., 11 mar 2021 o 09:46 Eduardo Mayo <eduardomayoya...@gmail.com> napisał(a): > Hi OpenBabels users, > Nice to join the community. > I would like to convert pdbqt file to sdf file without using openbabel > itself. I mean why should my project has another dependency just to do a > single task. So I look into OpenBabel code and I finally found this ( > https://github.com/openbabel/openbabel/blob/4709b0752109db593f1bee6298ef3bfa718d260d/src/formats/pdbqtformat.cpp > ) > > I have some questions: > Where are defined these functions? > line:219 parseAtomRecord > line:295 resdat.AssignBonds(mol) > > > Bests, > Eduardo > _______________________________________________ > OpenBabel-discuss mailing list > OpenBabel-discuss@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/openbabel-discuss >
_______________________________________________ OpenBabel-discuss mailing list OpenBabel-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbabel-discuss