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

Creating pnictogen from Avogadro2 #14

Open
ghutchis opened this issue Apr 5, 2021 · 3 comments
Open

Creating pnictogen from Avogadro2 #14

ghutchis opened this issue Apr 5, 2021 · 3 comments

Comments

@ghutchis
Copy link

ghutchis commented Apr 5, 2021

I've been thinking about this for a while. Pnictogen and other template systems are great for batch calculations. Often people want to set up an initial calculation with a GUI.

I'd like to think on a good way to click a button from the Avogadro2 GUI to "Generate Template". I think the main thing would be to insert the tokens for charge, spin, and coordinates, right?

Anything else we'd need?

@schneiderfelipe
Copy link
Member

Hi, @ghutchis, that's indeed very useful. Yes, that would be the minimum amount of information, I think.

I've tried various approaches, and pnictogen was a proof of concept, going a bit beyond the pure "variable template" approach and allowing some basic geometry manipulation from within the input, like the following (it generates one MOPAC input for each molecule/geometry in a file):

{% for molecule in molecule %}
--@{{ loop.index }}
CHARGE={{ molecule.charge }} MS={{ (molecule.mult - 1)/2 }}
{{ molecule.name }}

{{ molecule.to_string("mop") }}

{% endfor %}

As such, pnictogen provides some primitive scripting in a way that's similar to web server programming (like Django’s templates, etc.; in fact, pnictogen uses Jinja2 under the hood). Something like that can greatly increase the usefulness of an input templating system.

Other options could be considered in a GUI. I have another project (orcinus) that's basically a GUI (warning: handy but not pretty - it's Tk) for ORCA inputs (screenshot below).

orcinus screenshot

This is also a proof of concept and is completely independent of pnictogen. The focus of orcinus is on how all options influence each other - being both user-friendly and promoting an environment that helps the user make good decisions. I confess the ADF GUI greatly inspired some choices.

Maybe both ideas could be blended together?

@ghutchis
Copy link
Author

ghutchis commented Apr 5, 2021

I have some goals for the Avo2 input generators (i.e., to allow multiple panes and for choices in one menu to influence the GUI). I'd absolutely take feedback into how the Avo2 input generators work / layout to help promote good decisions.

If you have some suggestions on the input generator GUI, please let me know (e.g., organization, user-friendly, etc.)

In the meantime, I'll see if I can make a mockup. I think it's basically just adding a default button (e.g. this intentionally bad modified screenshot).

Screen Shot 2021-04-05 at 1 46 53 PM

@schneiderfelipe
Copy link
Member

Do you plan on using something like pnictogen as a backend?

I have some goals for the Avo2 input generators (i.e., to allow multiple panes and for choices in one menu to influence the GUI). I'd absolutely take feedback into how the Avo2 input generators work / layout to help promote good decisions.

That's how orcinus is organized (multiple panes with groups of options only showing up if some other option is set).

If you have some suggestions on the input generator GUI, please let me know (e.g., organization, user-friendly, etc.)

Two things I believe help make good decisions:

  1. Show everything that would influence the calculation (this is tricky and package-dependent, as packages often have defaults that influence other options, e.g. Opt in ORCA silently imply TightSCF)
  2. Make all decisions conscious (e.g., a beginner might learn from the GUI that her functional choice is, in fact, a GGA)

Avogadro is already excellent. Adding something like that would greatly increase its potential. Please let me know if/how I can help; I would be happy to take part.

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