Hi Noel,
Thanks for a prompt reply. The structures I use are actually protonated using ChimeraX so all the hydrogens are explicit. If I understand you correctly the 3.0 version should work better in my case, however I’m getting this warning and quite possibly because of that there is a data discrepancy downstream, so I wonder what can I do to find out what is wrong in my case. Best, Lukas From: Noel O'Boyle <baoille...@gmail.com> Date: Tuesday, 14 July 2020 at 15:13 To: Lukas Pravda <lpra...@ebi.ac.uk> Cc: "openbabel-discuss@lists.sourceforge.net" <openbabel-discuss@lists.sourceforge.net> Subject: Re: [Open Babel] Failed to kekulize aromatic bonds | structure building Before 3.0, aromaticity perception was performed as if the position of the hydrogens were unknown, and the hydrogens were inferred afterwards. This makes sense for structures from the PDB, but not for anything else (e.g. SMILES) where there were occasional errors and it was much slower than necessary. Now, the perception is the other way around; it makes sense for everything except for structures where the bond order is unknown, like for PDB structures. It would be nice to return the PDB structure perception to the same level as before - I 'just' need to adapt the old procedure to the job. But in the short term, for this particular problem, you may find it best to use OB 2.4.1. Regards, - Noel On Tue, 14 Jul 2020 at 13:49, Lukas Pravda <lpra...@ebi.ac.uk> wrote: Dear all, I’m maintaining a package to perceive molecular interactions that depends on openbabel functionality using python. Historically it used openbabel 2.4.1, but recently I’ve learned that there is a version 3.x so I wanted to give it a go (newer should be better right? 😊). I made few changes according to the document here: https://open-babel.readthedocs.io/en/latest/UseTheLibrary/migration.html to comply with the breaking changes…. Long story short, in certain cases the interactions perceived by the software are not the same as with underlying openbabel 2.4.1. Namely there are missing plane-plane interactions. I can see the following message in the log that was not there with the previous version: *** Open Babel Warning in PerceiveBondOrders Failed to kekulize aromatic bonds in OBMol::PerceiveBondOrders So I suspect this may be root of the problem So my question is twofold: Is there a way how can I find out what is possibly wrong with the structure so that I can fix it? Is there any change in the way protein structure is being constructured If I do it myself? This is essentially what I do: import openbabel.openbabel as ob mol = ob.OBMol() mol.BeginModify() # residue is created like this res = mol.NewResidue() res.SetChainNum(chain_num) res.SetNum(res_id) res.SetName(res_name) res.SetInsertionCode(ins_code) # atom is created in a residue like this: atom = mol.NewAtom(atom_id) atom.SetVector(x,y,z) atomic_num = ob.GetAtomicNum(element) atom.SetAtomicNum(atomic_num) atom.SetFormalCharge(_format_formal_charge(atom_sites, i)) res.AddAtom(atom) res.SetHetAtom(atom, atom_sites["group_PDB"][i] == "HETATM") res.SetSerialNum(atom, int(atom_sites["id"][i])) # after atom reading is done this is the post-processing mol.EndModify() mol.ConnectTheDots() ob.OBAromaticTyper().AssignAromaticFlags(mol) mol.PerceiveBondOrders() My setup: Mac os: 10.15.5 Python: 3.7 Best, Lukas _______________________________________________ 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