"babel ... -o svg -xd -xP300" Bug - Option -d takes a parameter
Why "babel ... -o svg -xd -xP300" command is giving the "Option -d takes a parameter" error in Open Babel 2.4?
It seems to be another code bug in the "babel" command in Open Babel 2.4 release.
"-xd" option for "svg" output format should not require any parameters according the help document: "d - do not display molecule name."
If you use "-xd" option and follow by another option, the "babel -o svg" command will gives you an error.
fyicenter$ obabel -:CCCCCCC -O carbon-chain.sdf --gen2D 1 molecule converted fyicenter$ babel carbon-chain.sdf carbon-chain.svg -xd -xP300 Option -d takes a parameter
The workaround is to put the "-xd" option at the end of the command line as shown below:
fyicenter$ babel carbon-chain.sdf carbon-chain.svg -xP300 -xd 1 molecule converted 20 audit log messages
However, the "obabel -o svg -xd -xP300" works perfectly in Open Babel 2.4 release.
fyicenter$ obabel -:CCCCCC -o svg -O carbon-chain.svg -xd -xP300 1 molecule converted
So we should use "obabel" instead of "babel", since "babel" is deprecated now and will be removed in a future release.
2020-07-15, 531👍, 0💬
Where to find FAQ (Frequently Asked Questions) in understanding what is SDF/Mol V3000 file format? H...
What is SDF generator service provided by cactus.nci.nih.gov? The SDF generator service provided by ...
How to convert Convert SDF to SVG (Scalable Vector Graphics) using Open Babel? I want to see the mol...
How to split a file with a large number of molecules? You can split a file with a large number of mo...
Where to find molecule FAQ (Frequently Asked Questions)? I want to learn more about SDF/Mol file for...