1

I am using obabel tool to batch convert a set of SDF files to PDB file.

 obabel *.sdf -opdb --gen3d -m

I have ~50000 files and i am getting totally of 12 warnings in total (warning mentioned below).

==============================
*** Open Babel Warning  in CorrectStereoAtoms
  Could not correct 2 stereocenter(s) in this molecule ()
  with Atom Ids as follows: 1 5
Warning: Stereochemistry is wrong, using the distance geometry method instead
==============================
*** Open Babel Warning  in CorrectStereoAtoms
  Could not correct 2 stereocenter(s) in this molecule ()
  with Atom Ids as follows: 2 4
Warning: Stereochemistry is wrong, using the distance geometry method instead
==============================
*** Open Babel Warning  in CorrectStereoAtoms
  Could not correct 3 stereocenter(s) in this molecule ()
  with Atom Ids as follows: 1 3 4
Warning: Stereochemistry is wrong, using the distance geometry method instead
==============================
*** Open Babel Warning  in CorrectStereoAtoms
  Could not correct 4 stereocenter(s) in this molecule ()
  with Atom Ids as follows: 0 2 3 4
Warning: Stereochemistry is wrong, using the distance geometry method instead
==============================
*** Open Babel Warning  in CorrectStereoAtoms
  Could not correct 2 stereocenter(s) in this molecule ()
  with Atom Ids as follows: 1 12
Warning: Stereochemistry is wrong, using the distance geometry method instead
==============================
*** Open Babel Warning  in CorrectStereoAtoms
  Could not correct 1 stereocenter(s) in this molecule ()
  with Atom Ids as follows: 0
Warning: Stereochemistry is wrong, using the distance geometry method instead
==============================
*** Open Babel Warning  in CorrectStereoAtoms
  Could not correct 1 stereocenter(s) in this molecule ()
  with Atom Ids as follows: 1
Warning: Stereochemistry is wrong, using the distance geometry method instead
==============================
*** Open Babel Warning  in CorrectStereoAtoms
  Could not correct 2 stereocenter(s) in this molecule ()
  with Atom Ids as follows: 0 2
Warning: Stereochemistry is wrong, using the distance geometry method instead
==============================
*** Open Babel Warning  in CorrectStereoAtoms
  Could not correct 2 stereocenter(s) in this molecule ()
  with Atom Ids as follows: 0 11
Warning: Stereochemistry is wrong, using the distance geometry method instead
==============================
*** Open Babel Warning  in CorrectStereoAtoms
  Could not correct 3 stereocenter(s) in this molecule ()
  with Atom Ids as follows: 0 2 13
Warning: Stereochemistry is wrong, using the distance geometry method instead
==============================
*** Open Babel Warning  in CorrectStereoAtoms
  Could not correct 1 stereocenter(s) in this molecule ()
  with Atom Ids as follows: 0
Warning: Stereochemistry is wrong, using the distance geometry method instead
==============================
*** Open Babel Warning  in CorrectStereoAtoms
  Could not correct 1 stereocenter(s) in this molecule ()
  with Atom Ids as follows: 0
Warning: Stereochemistry is wrong, using the distance geometry method instead
==============================
*** Open Babel Warning  in CorrectStereoAtoms
  Could not correct 1 stereocenter(s) in this molecule ()
  with Atom Ids as follows: 0
Warning: Stereochemistry is wrong, using the distance geometry method instead
==============================
*** Open Babel Warning  in CorrectStereoAtoms
  Could not correct 1 stereocenter(s) in this molecule ()
  with Atom Ids as follows: 0
Warning: Stereochemistry is wrong, using the distance geometry method instead
==============================
*** Open Babel Warning  in CorrectStereoAtoms
  Could not correct 5 stereocenter(s) in this molecule ()
  with Atom Ids as follows: 8 9 30 31 52
Warning: Stereochemistry is wrong, using the distance geometry method instead

How do I identify the exact 12 files which have created this warning?

Edit:

As suggested, I tried to use --errorlevel 3. But sadly, that also did not help to identify the exact ligand throwing out the error. I am pasting the output got with the code. It is similar to the earlier one.

obabel *.sdf -opdb --gen3d --errorlevel 3 -m
obabel *.sdf -opdb --gen3d --errorlevel 3 -m
==============================
*** Open Babel Warning  in CorrectStereoAtoms
  Could not correct 2 stereocenter(s) in this molecule ()
  with Atom Ids as follows: 1 5
Warning: Stereochemistry is wrong, using the distance geometry method instead
==============================
*** Open Babel Warning  in CorrectStereoAtoms
  Could not correct 2 stereocenter(s) in this molecule ()
  with Atom Ids as follows: 2 4
Warning: Stereochemistry is wrong, using the distance geometry method instead
==============================
*** Open Babel Warning  in CorrectStereoAtoms
  Could not correct 3 stereocenter(s) in this molecule ()
  with Atom Ids as follows: 1 3 4
Warning: Stereochemistry is wrong, using the distance geometry method instead
==============================
*** Open Babel Warning  in CorrectStereoAtoms
  Could not correct 4 stereocenter(s) in this molecule ()
  with Atom Ids as follows: 0 2 3 4
Warning: Stereochemistry is wrong, using the distance geometry method instead
==============================
*** Open Babel Warning  in CorrectStereoAtoms
  Could not correct 2 stereocenter(s) in this molecule ()
  with Atom Ids as follows: 1 12
Warning: Stereochemistry is wrong, using the distance geometry method instead
5
  • You could run for i in *.sdf; do echo "$i"; obabel "$i" -opdb --gen3d -m; done instead
    – nohillside
    Commented May 17, 2020 at 8:41
  • @nohillside OK Sure. Will try and let you know Commented May 17, 2020 at 8:44
  • 1
    Maybe try ---errorlevel 3 or similar (the online manual says "---errorlevel <N> Filter the level of errors and warnings displayed: 1 = critical errors only 2 = include warnings too (default) 3 = include informational messages too"
    – muru
    Commented May 17, 2020 at 8:46
  • @muru I have started a process with error level 3 with the following code obabel *.sdf -opdb --gen3d --errorlevel 3 -m . Going on. I think it is going to be bit slow. Will update on completion Commented May 17, 2020 at 11:20
  • @muru updated the post based on result Commented May 17, 2020 at 17:03

1 Answer 1

1

I don‘t know the software but if there are no interdependencies between the files you can run

for i in *.sdf; do
    echo "$i"
    obabel "$i" -opdb --gen3d
done
3
  • I tried these lines of code. The process is going on. On preliminary experience what I am finding was the process is bit slow and secondly as it is giving lines for all files, it is better to capture it in a txt file using >> and then grep the output and see to identify the exact file. The current code is chucking out the STDOUT in terminal which becomes difficult to evaluate. Commented May 17, 2020 at 11:17
  • You will have to remove -m from the code. -m stands for batch conversion (that is taking individual files). Since we are using a for loop that is not required @nohillside Commented May 17, 2020 at 18:14
  • for i in *.sdf; do echo "$i" obabel "$i" -opdb --gen3d done Commented May 17, 2020 at 18:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .