Biostar Beta. Not for public use.
Convert multiple .mol files from the KEGG database to pdb.
0
Entering edit mode
2.4 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 • 428 views
ADD COMMENTlink
0
Entering edit mode
9 months ago
Joe 12k
United Kingdom

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 COMMENTlink
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 REPLYlink

Login before adding your answer.

Similar Posts
Loading Similar Posts
Powered by the version 2.3.1