schrodinger / coordgenlibs

Schrodinger-developed 2D Coordinate Generation
BSD 3-Clause "New" or "Revised" License
42 stars 28 forks source link

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

Open yurivict opened 4 years ago

yurivict commented 4 years ago

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:

d-b-w commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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.