Interest in chemistry-focused BoF?

Hey Julia fam!

I was thinking that it would be cool to organize a BoF session at JuliaCon focused around folks who use Julia for chemistry- and/or materials-related things. I bounced the idea off of @tim.holy and he was enthusiastic, but before putting together a proposal, I wanted to gauge interest, in particular around what particular topics would be most useful to talk about. At the highest level, I can imagine dividing “chemistry-related Julia usage” into three broad categories:

  1. simulation (e.g DFTK, JuliaChem, Fermi, TightBinding, and a bunch of other cool stuff in the JuliaMolSim org, just to name a few)
  2. ML for chemical systems (this is what I’m personally working on right now; I’m developing ChemistryFeaturization and AtomicGraphNets, and also know about e.g. MolecularGraph)
  3. analyzing chemical data (could be data from simulation or experiments, I’m not as much in this world so I don’t know what packages are out there)

In principle, we could easily split this up into three separate discussions, but I think there are probably things of interest to folks doing all three, so my inclination is to focus this discussion on those and create “breakout” groups to discuss more specific topics later on.

This is where I want your input! What particular areas of discussion are most relevant? The main thing that has come to my mind is some attempt to uniformize representations of chemical structure in Julia, as well as reading/writing these representations to common file types. The long-term dream (in my mind) would be a pure-Julia implementation of something like ASE or pymatgen, or at least the parts that handle reading and writing structure files (.cif, .xyz, .traj, etc. etc. etc.) – in my personal experience, I’ve relied on PyCall to those packages to handle that stuff, but since they’re both pretty heavy packages with lots of dependencies, it can create some headaches (e.g. getting CI to run across platforms).

But I’m sure there are other topics of discussion that would be useful, so please jump in and voice your opinions! Hopefully we can iterate together and come up with a proposal for a session that will be really useful and impactful!

Tagging: @anon92994695 @mfh @davpoolechem @jarvist @Aroeira @mdav2 @jagot @jgreener64 (couldn’t figure out if GitHub’s mojaie (Seiji Matsuoka, developer of MolecularGraph) was on this site or not, if anyone knows, please tag him in, also please tag in any other folks who you think would be interested!)

Related previous discussion I found: Should there be a Chemistry Domain? - #4 by mfh

Finally, if you’re interested in helping to organize/lead this, please let me know that too! I think getting representation from folks who focus on different sorts of things will be really important!

22 Likes

Julia + Chemistry, sounds awesome - I will be attending JuliaCon this year :). What is a BoF? Maybe I will help organize something, but I wanna know what I’m signing up for first :D.

I fall mostly under group #3, but it’s a relatively lonely group. GitHub - caseykneale/ChemometricsTools.jl: A collection of tools for chemometrics and machine learning written in Julia. is one such package :).

4 Likes

Oops, sorry! BoF = birds of [a] feather; see description of proposal types here

ChemometricsTools looks like a cool package! :slight_smile:

5 Likes

Thanks for explaining :). Sure this sounds like fun, let me know how I can help. I was thinking about giving a talk but - I don’t know if I can or not yet (work).

I’m not sure if we’re big enough to split up into different breakout sessions, but I’d love be happily surprised and would enjoy taking part in either format. I don’t mind doing organizing/leading in general.

2 Likes

I would be very interested in such BoF. I think would be a great opportunity to learn what chemists are up to with Julia, and hopefully enhance collaboration!

4 Likes

I’m just a physicist doing ab initio calculations of (closed-shell) atoms in strong laser fields, so I guess that puts me squarely in category 0.5, but I think chemistry is cool, so I’ll happily join in!

4 Likes

Thanks everyone for the interest so far! Let me just add: if you’re interested in helping to put together the proposal (or just giving feedback on it) and/or helping to lead the session, please send me an email at rkurchin at cmu dot edu and/or DM me at rkurchin on the Julia Slack and we can start coordinating that way.

3 Likes

Thanks @rkurchin for getting the ball rolling!

I mostly fall into category (1) and from my end I think a BoF could be a good opportunity to coordinate. I think there is quite some common (and annoying) setup effort in QChem calculations that could be easily factored out of individual packages and dealt once and for all by a community effort.

Especially ASE or pymatgen (what Rachel mentioned) are good examples for how it’s done in the python world. Also the MolSSI has done some nice effort with the QCSchema one could integrate with. I also fully agree that something similar in pure Julia would be great in the long run. But even just using those packages in one common Julia wrapper and thus agreeing on a common interface how to feed codes with the chemical setup would already be an awesome start, I suppose :smile:.

Looking forward to the discussion and to brainstorming ideas.

6 Likes

Sounds like a good idea!

My interest is mainly in category 1, and particularly in getting molecular simulation to work with automatic differentiation tools.

Another interesting topic to discuss would be how best to develop packages for algorithms used in a variety of chemical contexts, such as long-range electrostatics (Electrostatics in Julia).

reading/writing these representations to common file types

There is GitHub - chemfiles/Chemfiles.jl: Julia bindings to chemfiles which goes in this direction.

5 Likes

I think a BoF session would be a good idea, but I’m less sure about

The long-term dream (in my mind) would be a pure-Julia implementation of something like ASE or pymatgen, or at least the parts that handle reading and writing structure files (.cif, .xyz, .traj, etc. etc. etc.)

This is a large amount of boring and thankless work which has already been done before, and julia/python interop is excellent, so unless there’s a specific reason why you’d want that, I would say relying on established tools as much as possible is the best option. I’m very wary of standardization efforts because of xkcd: Standards

2 Likes

I would absolutely be interested in something like this!

As an electronic structure theorist, molecular simulations using ab initio methods is what I do, so I would fall squarely under (1). A big focus of mine in particular is designing and implementing algorithms for these methods that are highly scalable and performant; Julia’s combination of performance equivalent to low-level languages such as C and Fortran, and high-level semantics similar to Python, in my experience, is extremely effective for the design and implementation of such algorithms. So, one topic that could be discussed is the methodology by which one would implement highly parallel and performant algorithms using the Julia programming language, in the context of chemical packages. This could range from algorithmic optimizations to specific quantum chemical methods (falling under (1)), to optimization of ML pipelines (falling under (2)).

I will also echo what @mfh said regarding the QCSchema standard developed by MolSSI.

2 Likes

I think a BoF would be a great idea!

I appreciate @antoine-levitt 's point on not duplicating effort, but a high performance and relatively lightweight pure-Julia file reader for at least a subset of structure files would be useful. Both for lightweight reading of a single structure, and of high performance processing of molecular dynamics trajectories.
I’ve generally bodged together a POSCAR, AXYZ reading/writing as necessary, but a well defined Julia library would be a lot better. We could target a relatively simple file format well supported by OpenBabel.
Generalising can add a lot of complexity - particularly when periodicity & symmetry are supported. :confused:

JuLIP.jl supplies some of the core ASE functionality.

I think it would be very useful to have some Julia bindings for cclib, a python package for passing the output of electronic structure calculations.

2 Likes

These are all very sensible points. Maybe a good general topic for the session would be something like “identifying tasks common across many computational workflows in chemistry and converging on key features that reusable implementations of them would need to have,” followed by a discussion of what packages may already have (some subset of) these features that we could build off of…

3 Likes

I am very interested and enthusiastic about this and in general for all recent developments of chemistry in Julia!

I am a quantum chemist and a fond supporter/user of Julia. Besides using Julia for many years in my daily workflow, I recently published my first official package: Lebedev.jl. It implements numerical integration using the Lebedev grid, which is used essentially everywhere to integrate exchange and correlation functionals in DFT.

Lately I have also been (slowly) working on the implementation of a molecular integral library (over Gaussian basis functions), something I started as an exercise a couple of years ago (see GitHub - stefabat/MolecularIntegrals: A step-by-step tutorial to code the McMurchie-Davidson scheme to compute molecular integrals), but recently decided to do it for real.
Unfortunately, at the moment I can only do this in my spare time, however if there are interested people out there, I would be very happy to join forces.

4 Likes

I took Rick Muller’s minimal Hartree-Fock only Julia rewrite of pyquante2 and refactored a few bits of code to make it more Julian, and put it in a proper package etc. It’s enough to reproduce the reference data in Szabo and Ostlund, but chokes (at molecular integral generation level) on large molecules.

I would love to collaborate on making it more production ready, adding Hybrid DFT etc.! But as it’s so far away from any actual academic research aims, I’ve only done this in (increasingly rare) spare time.

3 Likes

Oh nice, that’ll come in handy, thanks for doing this!

I can only second what @antoine-levitt said. A nice DFT grid library would be super nice to get started on molecular DFT in Julia.

Cool. I got started on a Obara Saika at some point last year, but similarly had to pause that for the lack of time unfortunately.

Sounds like a few of us have actually all been thinking about similar topics to work on … I seems with a bit of coordination and joining forces, there could be quite a number of standard quantum-chemistry issues we could “unlock” in Julia :smile:.

2 Likes

I know very little of DFT. But anyone working with correlated methods please reach out to me. I am currently cleaning up Fermi.jl which I am hoping to publish a paper on soon. I want to point out that there is a highly optimized library for integrals over Gaussian functions written in C++ (libint2) for which @mdav2 has written a Julia wrapper called Lints.jl. I do not think the overhead is bad, but any optimizations are welcome. Moreover, I would like to expose gradients for the Julia interface soon.

I do think would be worth it to discuss how we can avoid doing duplicate work. For example, regardless if you’re using DFT or ab initio methods you likely want geometry optimization algorithms, those are fairly independent of how you get gradients, so I feel like it is something that can be shared across different projects, as an example.

Libint is definitely good to have readily available in the Julia world, even though there are limitations you could overcome with a pure-Julia approach (which was my motivation for looking into an integral code in Julia). Again this indicates to me that a common interface allowing to swap a pure-Julia library and the very well-written and feature-rich libint could be a good way to go forward.

For doing geometry optimisation with DFTK we have so far used Optim or ASE’s optimiser. That served us pretty well I’d say (and it was like no effort). I wonder if there is something specific you have in mind that goes beyond these “off-the-shelf” solutions?

Perhaps that also points to another aspect we could think about in the BoF: It seems we have a lot of knowledge how to combine existing efforts with our Julia building blocks, which could be worth collecting and documenting somewhere just to provide an overview of what is the state-of-the-art how to do quantum chemistry in the Julia stack.

The obvious one for molecular structures is a Berny based optimisation. It can save a factor of 2-3x steps over doing the optimisation directly in Cartesian space.
PyBerny Python implementation

Though it appears that now ASE can wrap PyBerny, as well as providing GPMin and Preconditioned optimisers.