如何在 bash 中使用 obabel 批量转换文件时识别发出警告的确切文件?

如何在 bash 中使用 obabel 批量转换文件时识别发出警告的确切文件?

我正在使用 obabel 工具将一组SDF文件批量转换为PDB文件。

 obabel *.sdf -opdb --gen3d -m

我有大约 50000 个文件,总共收到 12 个警告(下面​​提到的警告)。

==============================
*** 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

如何确定创建此警告的确切 12 个文件?

编辑:

按照建议,我尝试使用 --errorlevel 3。但遗憾的是,这也无助于识别抛出错误的确切配体。我粘贴了代码的输出。它与之前的类似。

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

答案1

我不知道该软件,但如果文件之间没有相互依赖性,您可以运行

for i in *.sdf; do
    echo "$i"
    obabel "$i" -opdb --gen3d
done

相关内容