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

Please improve the mechanism for looking for a templates.mae file #64

Open
yurivict opened this issue May 10, 2020 · 7 comments
Open

Please improve the mechanism for looking for a templates.mae file #64

yurivict opened this issue May 10, 2020 · 7 comments

Comments

@yurivict
Copy link

Here https://github.com/schrodinger/coordgenlibs/blob/master/sketcherMinimizer.cpp#L3520 a non-existent file user_templates.mae is encoded into the library at build time.

Suggested solution:

  • install templates.mae into share/coordgen and default to it, otherwise allow the user to override this setting using some environment variable, ex. COORDGEN_TEMPLATES
@yurivict yurivict changed the title Please improve the mechanism for looking for a .mae file: install a templates.mae file as a default Please improve the mechanism for looking for a templates.mae file May 10, 2020
@d-b-w
Copy link
Collaborator

d-b-w commented May 11, 2020

Hi Yuri -
Thanks for this report/request.

I've been considering removing the user templates altogether, and adding a more robust mechanism for including them in the coordgen build. Most issues reported about coordgen have to do with linking maeparser or with run-time detection of the templates file. Additionally, removing this option would allow us to validate the templates at build time. It's all to easy to add a template that is never used.

Are you guys hoping for specific templates to be included?

@yurivict
Copy link
Author

Are you guys hoping for specific templates to be included?

I encountered this issue while updating the FreeBSD port and just installed the version included in the project.

@d-b-w
Copy link
Collaborator

d-b-w commented May 11, 2020

As far as I know, that should be unnecessary, because the data from that templates file is compiled into the library.

Was there some sort of error that you experienced that led you to want a templates file?

@yurivict
Copy link
Author

Was there some sort of error that you experienced that led you to want a templates file?

Yes, OpenBabel-3.0 depends on coordgenlibs and in its cmake script is looking for templates.mae and failing to install find it because it was missing.

@d-b-w
Copy link
Collaborator

d-b-w commented May 11, 2020

We could absolutely install a dummy/empty templates.mae file for backwards compatibility with existing applications that have been using coordgen.

The templates file is now unnecessary and unused.

@yurivict
Copy link
Author

I'm just saying that the code references the .mae template in https://github.com/schrodinger/coordgenlibs/blob/master/sketcherMinimizer.cpp#L3520 that you compile into the library but don't install. People get confused, think that this file is required, and write cmake scripts to look for the file.

Hence, you should remove dangling file references from the library and document how templates are handled or used.

I am only an OpenBabel (and coordgenlibs) FreeBSD port maintainer and came across this issue when OpenBabel-3.0 failed to find coordgenlibs.

@d-b-w
Copy link
Collaborator

d-b-w commented May 11, 2020

Thanks Yuri, and sorry for the confusion. Let me know if there's a better place to document than here: https://github.com/schrodinger/coordgenlibs#templates

I'll also add comments to the code here, and we'll work towards removing the templates file.

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

2 participants