Convert multiple .mol files from the KEGG database to pdb.
1
0
Entering edit mode
5.8 years ago

I have a folder full of 1000s of mol files which I would like to be converted to pdb files. I have tried using open babel, but that is throwing me errors. Here is the command I tried:

babel *.mol -opdb -m --gen3d

It manages to convert a few files, but eventually fails after 10 odd files. Here are the warnings and errors it threw me.

WARNING: too small "scale" at Newton2NumLineSearch
WARNING: damped steplength inf to 5e+70
WARNING: damped steplength inf to 5e+70
WARNING: damped steplength inf to 5e+70
WARNING: damped steplength inf to 5e+70 
WARNING: too small "scale" at Newton2NumLineSearch
WARNING: damped steplength inf to 5e+70
WARNING: damped steplength inf to 5e+70
WARNING: damped steplength inf to 5e+70
WARNING: damped steplength inf to 5e+70
WARNING: too small "scale" at Newton2NumLineSearch
WARNING: damped steplength inf to 5e+70
WARNING: damped steplength inf to 5e+70
WARNING: damped steplength inf to 5e+70
WARNING: damped steplength inf to 5e+70
WARNING: damped steplength 0.00606406 to 0.00502046
==============================
*** Open Babel Warning  in Expand
Alias R was not chemically interpreted

Segmentation fault (core dumped)

Is there any way to fix this error? If not, what are the other methods that I can use?

pdb mol • 1.7k views
ADD COMMENT
0
Entering edit mode
5.8 years ago
Joe 21k

You might be able to script something with UCSF Chimera. It can read and write MOL2 and PDB formats.

I really like PyChimera for doing this sort of thing on the commandline.

Some pseudocode/process would look something like:

for file in *.mol ; do 
    pychimera mol2pdb.py "${file}" "${file%.*}".pdb

done

where mol2pdb.py looks something a little like (this is non-functional code):

import sys
if not sys.argv[0].endswith("pychimera"):
    import pychimera
    pychimera.patch_environ()
    pychimera.enable_chimera()

import chimera
from chimera import openModels, Molecule
from chimera import runCommand as rc

chimera.openModels.open(sys.argv[1],type="MOL") # not sure if this needs to be MOL or MOL2 etc...

from WriteMol2 import writeMol2
writeMol2(chimera.openModels.list(modelTypes=[chimera.Molecule]), "models.mol2") # or rc(write format mol2 0 filename.mol2)

That might give you some clues at least. You can always ask on the chimera users forum, they're really good.

ADD COMMENT
0
Entering edit mode

mol2 files are not mol files. The reported messages look like the inputs are 2D mol files, and there are failures to generate 3D coordinates. Converted 3D mol2 to and from 3D pdb is a trivial exercise in comparison.

If the compounds are reasonably well known (i.e. they are in PubChem), I would suggest to download 3D coordinate files from PubChem, or, even better because these are reasonably high-level QM results, from PubChemQC.

ADD REPLY

Login before adding your answer.

Traffic: 2108 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6