geem-lab / pnictogen

⚛️ A Python library and a command-line tool that creates input files for computational chemistry packages
https://pypi.org/project/pnictogen/
MIT License
18 stars 4 forks source link

DALTON: default boilerplate using Open Babel #2

Closed berquist closed 6 years ago

berquist commented 6 years ago

This adds a DALTON boilerplate to the config, because Open Babel can generate the inputs.

Is it correct that all of the boilerplates in examples/boilerplates technically don't need to be there, and all of the defaults are always generated from config.yml? I ask because

  1. Duplicating all of the templates will make maintaining them harder. I understand that examples/templates are not boilerplates, but are more complex examples of what you can do with templates.

  2. Most of the commands in the boilerplates are specific to pybel. I'm thinking of how to add cclib support (maybe a selectable YAML config?) alongside pybel. There is a cclib-to-pybel bridge that could replace pybel here, but they should probably coexist since the pybel boilerplates are so simple, and I'm not sure that the cclib bridge is feature complete.

schneiderfelipe commented 6 years ago

Hi Eric,

Thanks for the PR.

Files in examples/boilerplates are indeed superfluous and can be removed (#3). The initial design changed, as config.yml didn't existed as I started the project (if I remember correctly).

To be honest, I don't exactly like examples/templates either. My plan was to create some kind of repository (https://github.com/dudektria/pnictogen-templates) of more complex templates and restrict the examples of this repository to simple tests. What do you think about it? I created an issue (#4) so we can discuss it.

The whole set of functions available within templates and the data model for Molecule is not completely set in my mind yet and I believe this has to do with adding support for other parsers such as cclib. Initially, I thought about sub-classing pybel.Molecule but eventually ended up passing the object to the template engine as is. I think that this extra layer of abstraction is unavoidable now (#5), what do you think?

schneiderfelipe commented 5 years ago

I opted to create a folder (/repo) to hold all templates. The duplicated content is now gone (f63009d7e2f29f8965e656c861793cf995f177ee), as well as the config.yml file (b70f1fb42dff784f9fc064683eed511cf093b4cc). cclib support has been added through the new pyrrole interface (e1f1ceff5a9a3891fccf6d9f0da6c7249a43fb38 and 5f7b67d14560df3bdeb4cae3445b700b10e1a730).

Thanks again for your contribution!