Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

errors in --gen3d #2676

Open
cassguff opened this issue Feb 28, 2024 · 8 comments
Open

errors in --gen3d #2676

cassguff opened this issue Feb 28, 2024 · 8 comments

Comments

@cassguff
Copy link

Environment Information

Open Babel version: Open Babel 3.1.1
Operating system and version: Windows 11

Expected Behavior

I'm just trying to convert a SMILES string to an .xyz file using the --gen3d to get an approximate low energy conformation. I expect to get an xyz file with 3d coordinates.

Actual Behavior

It generates the xyz file, but I do not get 3D coordinates ( in that the z column is all 0s) showing that no optimization is happening. I get the following output:

==============================
*** Open Babel Error in OpenBabel::OBBuilder::LoadFragments
Cannot open ring-fragments-index.txt

*** Open Babel Error in OpenBabel::OBForceFieldMMFF94::ParseParamFile
Cannot open parameter file

*** Open Babel Error in OpenBabel::OBForceFieldUFF::ParseParamFile
Cannot open UFF.prm

*** Open Babel Error in OpenBabel::OBForceFieldUFF::SetTypes
Cannot open UFF.prm
1 molecule converted

Steps to Reproduce

I am using the command 'obabel -:"CCCC" -O 1.xyz --gen3D -xb -h' in the command line.

I saw a different thread about someone who added BABEL_DATADIR as an environment variable and fixing a similar problem, but that didn't work for me.

Copy link

welcome bot commented Feb 28, 2024

Thanks for opening your first issue here! Be sure to follow the issue template!

@nbehrnd
Copy link
Contributor

nbehrnd commented Feb 28, 2024

@cassguff Based on the documentation flag -b is an option (-xb) of reading. Your input is a SMILES string and eventually you want to write .xyz coordinates only (i.e., the file has no information about bonds). An command like

obabel -:"c1ccncc1" -h --gen3d -O test.xyz

is sufficient for (this example) to generate a conformer of pyridine (including protons for pH 7.4) written into file test.xyz.

@ghutchis
Copy link
Member

The bigger problem is that it's reporting it cannot find any of the force field data files.

You didn't mention how you installed it, but that's the key problem. The install can't find any files needed for coordinate generation.

@nbehrnd
Copy link
Contributor

nbehrnd commented Feb 28, 2024

@cassguff
Copy link
Author

cassguff commented Feb 28, 2024 via email

@cassguff
Copy link
Author

cassguff commented Feb 29, 2024 via email

@nbehrnd
Copy link
Contributor

nbehrnd commented Mar 1, 2024

Re executables: with Windows 64bit in hand, you might i) deinstall the current installation of openbabel (for 64bit) to ii) then try the installer for 32bit. No guarantee this then works better.

Else, openbabel is packaged for a couple of Linuxes. At least Debian, Ubuntu, and Fedora offer live images, i.e. the OS works from the RAM/without permanent installation on the hard disk, while accessing their openbabel package from the corresponding repositories -- just in case you don't want/are not permitted to modify the computer you use.

Packaging status

If the structure isn't IP, you may consider cheminfo.org with its online instance of openbabel. It equally allows the conversion of e.g., a SMILES string into a 3D .sdf.

@cassguff
Copy link
Author

cassguff commented Mar 2, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants