QtWebKit

Hi everyone,

I just finished a new revision of the polymer builder, which embeds previews of the monomers using SVG and QtWebKit (see attached).

Now, this does add a small dependency, since we did not previously require QtWebKit, but I think the benefit is high, and we’ll probably start to use embedded web views more. (For example, perhaps the input generators could be done with HTML + JavaScript?)

Thoughts? Concerns?

-Geoff


Prof. Geoffrey Hutchison
Department of Chemistry
University of Pittsburgh
tel: (412) 648-0492
email: geoff.hutchison@gmail.com
web: http://hutchison.chem.pitt.edu/

On Tue, Jun 5, 2012 at 5:40 PM, Geoffrey Hutchison geoff.hutchison@gmail.com wrote:

I just finished a new revision of the polymer builder, which embeds
previews of the monomers using SVG and QtWebKit (see attached).

Now, this does add a small dependency, since we did not previously require
QtWebKit, but I think the benefit is high, and we’ll probably start to use
embedded web views more. (For example, perhaps the input generators could
be done with HTML + JavaScript?)

Very cool! I don’t think it will be a problem, I’d imagine that most
packagers build Qt with webkit anyway, but Marcus would know more for sure.
Was there no other way to display an SVG?

Now the important question: Can it use this openbabel painter?

:slight_smile:

Dave

Hi,

On Tue, Jun 05, 2012 at 05:40:27PM -0400, Geoffrey Hutchison wrote:

I just finished a new revision of the polymer builder, which embeds
previews of the monomers using SVG and QtWebKit (see attached).

Now, this does add a small dependency, since we did not previously
require QtWebKit, but I think the benefit is high, and we’ll probably
start to use embedded web views more. (For example, perhaps the input
generators could be done with HTML + JavaScript?)

As long as it does not bump the minimum required version of Qt, I would
say it is a no-brainer - most people who have Qt should have QtWebKit as
well I guess.

Michael

On Tue, Jun 5, 2012 at 5:49 PM, David Lonie david.lonie@kitware.com wrote:

On Tue, Jun 5, 2012 at 5:40 PM, Geoffrey Hutchison geoff.hutchison@gmail.com wrote:

I just finished a new revision of the polymer builder, which embeds
previews of the monomers using SVG and QtWebKit (see attached).

Now, this does add a small dependency, since we did not previously require
QtWebKit, but I think the benefit is high, and we’ll probably start to use
embedded web views more. (For example, perhaps the input generators could be
done with HTML + JavaScript?)

Very cool! I don’t think it will be a problem, I’d imagine that most
packagers build Qt with webkit anyway, but Marcus would know more for sure.
Was there no other way to display an SVG?

Now the important question: Can it use this openbabel
painter? Noel O'Blog: Painting molecules your way - Introducing the paint format

It is a fairly large dependency (I think QtWebKit is a similar size to
the rest of Qt), but most people who have Qt have it installed. There
are some SVG rendering classes in Qt, but I think they were deprecated
in Qt5 and don’t handle all of SVG very well.

I don’t see the value in using webkit for the input generators, but
don’t object to using webkit for these in a plugin. It looks great,
and I think for interactive web pages with teaching material etc this
could be interesting.

I would like to focus on fixing some of the crashes reported by
Michael before adding new features for 1.1.0, but remain flexible.

Once we have this release out it would be good to discuss some of the
new work we have been doing for Avogadro 2.0. I have been seeing some
great rendering performance increases using GLSL/impostor spheres, it
leads to a simpler but quite different API for engines too.

Marcus

As long as it does not bump the minimum required version of Qt,

Nope. It existed as far back as Qt 4.4.

It is a fairly large dependency (I think QtWebKit is a similar size to
the rest of Qt), but most people who have Qt have it installed. There
are some SVG rendering classes in Qt, but I think they were deprecated
in Qt5 and don’t handle all of SVG very well.

Right. I think they intended to improve the SVG code and then after adopting WebKit, it made zero sense. Why offer two SVG implementations?

I don’t see the value in using webkit for the input generators, but
don’t object to using webkit for these in a plugin.

The value of HTML+JavaScript for input generators is three-fold IMHO:

  1. Each input generator would really just be an HTML file, so it’s easy to distribute or download new ones.
  2. The barrier to entry is lower – external projects can clearly find someone willing to adapt HTML and JavaScript even if not C++/Qt.
  3. It’s easier to customize – we don’t need to ship all input generators. In Avogadro 1.1, the menu is getting quite long! Imagine if we also supported VASP, Erekale, GROMACS, etc.

I would like to focus on fixing some of the crashes reported by
Michael before adding new features for 1.1.0, but remain flexible.

As some of you know, I am currently finishing a contract/grant through the US DoD (or more correctly, their computational chemistry researchers) for a set of features. The project must complete by June 22nd, when we have to deliver source + binaries. While I’d also like to fix a pile of bugs, I’m in bigger trouble if I don’t complete the set of requested features. They obviously would like to see Avogadro in general improve, but the polymer builder was a key feature request. The mountain of other (non-coding) work is also large, but I have one remaining key feature to write – a distance geometry implementation to create amorphous, random polymer unit cells.

Whether these features “ship” in 1.1.0 or 1.1.1 or whatever is less important at the moment. (Although if someone can help me create a Windows binary, that would be wonderful.) There is a method to the patches which hit Gerrit right now.

Once we have this release out it would be good to discuss some of the
new work we have been doing for Avogadro 2.0. I have been seeing some
great rendering performance increases using GLSL/impostor spheres

Yes, I think we’d all be interested to hear about some of the Avogadro 2.0 projects… but aren’t you also able to work on 1.1.0 bug fixes? :wink: Should we pick a day or week for bug-squashing?

-Geoff

On Tue, Jun 05, 2012 at 10:04:40PM -0400, Geoffrey Hutchison wrote:

I don’t see the value in using webkit for the input generators, but
don’t object to using webkit for these in a plugin.

The value of HTML+JavaScript for input generators is three-fold IMHO:

  1. Each input generator would really just be an HTML file, so it’s
    easy to distribute or download new ones.
  2. The barrier to entry is lower – external projects can clearly find
    someone willing to adapt HTML and JavaScript even if not C++/Qt.
  3. It’s easier to customize – we don’t need to ship all input
    generators. In Avogadro 1.1, the menu is getting quite long! Imagine
    if we also supported VASP, Erekale, GROMACS, etc.

I think the way forward would be to group input generators by field,
e.g. molecular semi-empirical/ab-initio, periodical and molecular
dynamics and then figure out a set of common base features (like, HF,
MP2, CCSD) every input generator would provide, plus an input element to
switch between Codes (GAMESS, NWChem and so on).

Michael

On Tue, Jun 5, 2012 at 10:04 PM, Geoffrey Hutchison geoff.hutchison@gmail.com wrote:

I don’t see the value in using webkit for the input generators, but
don’t object to using webkit for these in a plugin.

The value of HTML+JavaScript for input generators is three-fold IMHO:

  1. Each input generator would really just be an HTML file, so it’s easy to distribute or download new ones.
  2. The barrier to entry is lower – external projects can clearly find someone willing to adapt HTML and JavaScript even if not C++/Qt.
  3. It’s easier to customize – we don’t need to ship all input generators. In Avogadro 1.1, the menu is getting quite long! Imagine if we also supported VASP, Erekale, GROMACS, etc.

I think there are other solutions to this, but would be interested
what you come up with. I was hoping to prototype something more
dynamic than requiring C++, but simpler than HTML + JavaScript. It
would certainly be good to come up with something easier for people to
edit, but Python or simple template approaches could also be viable.

I would like to focus on fixing some of the crashes reported by
Michael before adding new features for 1.1.0, but remain flexible.

As some of you know, I am currently finishing a contract/grant through the US DoD (or more correctly, their computational chemistry researchers) for a set of features. The project must complete by June 22nd, when we have to deliver source + binaries. While I’d also like to fix a pile of bugs, I’m in bigger trouble if I don’t complete the set of requested features. They obviously would like to see Avogadro in general improve, but the polymer builder was a key feature request. The mountain of other (non-coding) work is also large, but I have one remaining key feature to write – a distance geometry implementation to create amorphous, random polymer unit cells.

Whether these features “ship” in 1.1.0 or 1.1.1 or whatever is less important at the moment. (Although if someone can help me create a Windows binary, that would be wonderful.) There is a method to the patches which hit Gerrit right now.

I think 1.1.0 would be good to release with minimal extra features at
this point, but I was hoping to have it tagged already. It is nice to
have some background on the timing of what you are pushing. I also
have deliverables to work towards, and a mountain of other work…

Once we have this release out it would be good to discuss some of the
new work we have been doing for Avogadro 2.0. I have been seeing some
great rendering performance increases using GLSL/impostor spheres

Yes, I think we’d all be interested to hear about some of the Avogadro 2.0 projects… but aren’t you also able to work on 1.1.0 bug fixes? :wink: Should we pick a day or week for bug-squashing?

I will get some done over the next day or two, and we could make
another feature release in the next month or two.

Marcus

Hi,

On Wed, Jun 06, 2012 at 10:59:11AM -0400, Marcus D. Hanwell wrote:

On Tue, Jun 5, 2012 at 10:04 PM, Geoffrey Hutchison geoff.hutchison@gmail.com wrote:

Whether these features “ship” in 1.1.0 or 1.1.1 or whatever is less
important at the moment. (Although if someone can help me create a
Windows binary, that would be wonderful.) There is a method to the
patches which hit Gerrit right now.

I think 1.1.0 would be good to release with minimal extra features at
this point, but I was hoping to have it tagged already.

The Debian freeze is approaching (said to happen in June), but not
making it will not be the end of the world, we can still ship it as a
backport I guess.

Michael