HNHacker News
TopNewBestAskShowJobs

lowdanie

178 karma · joined December 1, 2019

Blog: https://www.daniellowengrub.com/
submissionscomments
lowdanie··on Show HN: Differentiable Quantum Chemistry
From my understanding, accurate simulations at the electron level (post Hartree Fock / DFT) are currently limited to 100 atoms (on a gpu cluster this can take hours or days). Maybe this can be pushed to 1000 atoms with aggressive optimization techniques like FMM.

So at this level of simulation it is currently only possible to simulate one medium size molecule or the interaction of a few small ones.

To simulate larger systems, it is necessary to work at a (semi-)classical level of abstraction that approximates quantum mechanics. For example using molecular dynamics to essentially simulate a fluid with a ball and springs model. In this case, electron level simulation can still be useful for deriving heuristics (conceptually, the spring tension).

I completely agree that it’s interesting to investigate how far the electron level simulation can be pushed.

lowdanie··on Show HN: Differentiable Quantum Chemistry
Theoretically yes, but the method that is currently implemented (Hartree Fock) is notoriously inaccurate for molecular interactions. For example it does not predict the Van Der Waals force between water molecules.

I’m planning to add support for an alternative method called density functional theory which gives better results for molecular interaction.

lowdanie··on Show HN: Differentiable Quantum Chemistry
Thanks!
lowdanie··on Show HN: Differentiable Quantum Chemistry
Thanks!
lowdanie··on Show HN: Differentiable Quantum Chemistry
The short answer is yes, but either memory (if the electron integrals are cached) or runtime (if they are not cached) currently scales like O(n^4) where n is the number of atoms.

In cached mode, it can currently jit compile the graph for molecules of around 10 atoms in ~5 minutes on one T4 gpu. Once the graph is compiled, the actual geometry optimization only takes a few seconds.

I’m working on optimizations that improve the scaling behavior (such as density fitting) with the goal of achieving similar or even better performance for molecules with ~50 atoms.

lowdanie··on Show HN: Differentiable Quantum Chemistry
In a nutshell, the only approximation in Hartree Fock is the assumption that the electronic wave function has a very specific form. Namely, that it is a Slater determinant of orbitals, and that each orbital is a linear combination of atomic orbitals from a fixed basis set. The linear coefficients of the orbitals are then solved for via the (exact) variational method.

Of course, the true wave function is generally not a Slater determinant. In particular, electrons in a Slater determinant with different spins are uncorrelated.

The standard approach to resolving this is density functional theory. In that model, the main approximation is the choice of an “exchange correlation functional” which approximates the electron exchange and correlation energy. The choice of a functional is unfortunately a dark art in the sense that they can only be evaluated empirically rather than from first principles.

The classic reference for Hartree Fock is Modern Quantum Chemistry by Szabo and Ostland: https://books.google.com/books/about/Modern_Quantum_Chemistr...

It is very well written and I highly recommend it.

I also wrote up some notes here: https://www.daniellowengrub.com/blog/2025/07/26/scf

lowdanie··on Show HN: Differentiable Quantum Chemistry
Since the gradients are computed with jax, the library can be used to differentiate with respect to all inputs including nuclear charge and basis set parameters (exponents and contraction coefficients). I agree that computing gradients for the nuclear charges could be interesting in the context of molecular design.

But for the colab demo I thought that sticking to nuclear positions (i.e atomic forces) would be easier to visualize.

lowdanie··on Ask HN: Share your personal website
https://www.daniellowengrub.com/
lowdanie··on Quantum Computing and the Hidden Subgroup Problem
Thanks!
lowdanie··on A High-Level Technical Overview of Homomorphic Encryption
One related concept is “partially homomorphic encryption” (https://en.wikipedia.org/wiki/Homomorphic_encryption#Partial...). These are encryption schemes that are homomorphic under one operation such as addition or multiplication.

For example, you could use an additively homomorphic scheme to compute a sum of encrypted values. This could then be converted into an average assuming you knew the number of values.

lowdanie··on Show HN: Fully Homomorphic Encryption from Scratch
Thanks!

I completely agree that it is possible to homomorphically evaluate b - <a,s> much more easily using homomorphic addition and multiplication. However, wouldn't we still need some sort of blind rotate magic to bound the output error?

lowdanie··on Be in a field where tech is the limit
As other commenters have mentioned, it is common practice to use such an approach to find genes that are associated with a disease (GWAS).

But finding a correlated gene is only the first step. One issue is that a single protein can participate in hundreds of seemingly unrelated chemical reactions throughout the body depending on the cell type and environment. So simply tweaking the genes expression will have many unintended consequences.

For instance, each cell is constantly maintaining a baffling complex balance between growing and dying. Any external perturbation has a good chance of either killing the cell or causing cancer.

lowdanie··on Moderna mRNA sequence released to GitHub [pdf]
Yes, the even healthy cells are constantly transporting protein fragments to the cell surface but the immune system learns to ignore these as it is developing.

In addition, B and T cells only detect fragments on the surface of active Dendric cells. Dendric cells become active in response to alternate and less specific indications of infection such as an unusually high amount of mRNA translation or families of protein that occur only in bacteria and viruses.

lowdanie··on Moderna mRNA sequence released to GitHub [pdf]
There is a system that transports protein fragments to the cell surface and “presents” them to the immune cells: https://en.m.wikipedia.org/wiki/Antigen_presentation
lowdanie··on L.A. startup is building tiny injectable robots to attack tumors
In some sense you have described our microbiome :)
lowdanie··on It took two days to develop Moderna’s vaccine
1. One advantage of the mRNA vaccine is that each strand of mRNA is translated to protein many times before it is degraded. So less vaccine has to be manufactured and the dosage can be smaller. Another advantage is that since it lacks proteins you do not develop immunity to the vaccine itself, meaning that you can receive multiple booster doses.

2. Yes, the mRNA is ultimately degraded. But part of the process of developing the vaccine is fine tuning the precise rna sequence in order to achieve the desired half life.

lowdanie··on Show HN: Instantly search 2M recipes
Very nice.

One issue I noticed: I looked up Chana Masala and the first recipe (Vegan Chana Masala) calls for “12 tsp salt” but the source calls for “1/2 tsp salt” :)

lowdanie··on Moderna Covid vaccine candidate almost 95% effective, trials show
Thanks for the link!
lowdanie··on The Complete Idiot’s Guide to the Independence of the Continuum Hypothesis
Indeed, the statement is that for any list of axioms there exists a countable set of objects satisfying them.

For example, you could write down axioms for the real numbers by specifying that there should be relations called + and x with the standard properties such as commutativity, as well as an ordering relation < such that for all elements x and y there is an element z for which: x < z < y.

Clearly the real numbers are a model for these axioms. But as it turns out the countable set of rational numbers is a model as well.

lowdanie··on Launch HN: Deepnote (YC S19) – A better data science notebook
Looks very useful!
lowdanie··on Applying Textbook Data Structures for Real Life Wins
Your method is similar to a popular probabilistic technique called simulated annealing [1].

The general setting for this type of algorithm is that you have a large number of states and you want to find the state that maximizes a particular score. In the TSP, the states are paths and the score is the (negative of the) path length. The idea is to define a Markov Chain whose stationary distribution is proportional to the score. This means that if you jump from state to state according to the probabilities defined by the MC, eventually the probability of ending up at a given state is proportional to that states score.

In the case of TSP the states can be represented as permutations of the cities and the neighbors of a state are given by swapping the positions of two cities. The probability of moving to a neighbor is high if the length of the neighbor is shorter than the current path.

[1] https://en.wikipedia.org/wiki/Simulated_annealing

lowdanie··on Covid vaccine makers commit to not seek approval until complete Phase III trials
Phase III tests for both safety and efficacy. The efficacy portion is the bottleneck because the experimenters do not a priori know the rate of infection. So rather than waiting for a fixed amount of time, we must wait for a target number of infections.

In contrast, since we know when each person in the treatment group got the vaccine, safety can be measured after a predetermined amount of time.

lowdanie··on Ask HN: Mind bending books to read and never be the same as before?
My favorite aspect of the book is the way in which it depicts “addiction” in its many forms such as being addicted to drugs, playing sports, consumer products or work. It makes you think hard about the elusive nature of happiness and fulfillment.
lowdanie··on Ask HN: What is your blog and why should I read it?
https://www.daniellowengrub.com/

I mostly discuss interesting mathematics that has applications to engineering.

lowdanie··on How Radar Works
You are right that the graphic is a highly simplified cartoon of what the actual received wave looks like - I should have stated that in the post.

Regarding the question, it is true that the received pulse will be shorter or longer than the transmitted one (depending on whether the object is moving towards or away from the sensor) but since we are assuming that the speed of the object is significantly less than the speed of light, we're making the simplifying assumption that this difference is negligible. People sometimes refer to this as the "stop and hop" assumption since in practice we are assuming that the object "stops" at point x when the radio wave is emitted and then "hops" to x + dt*v once the wave has been received dt seconds later.

Regarding the number of cycles, you are again correct that the image represents a gross oversimplification. One reason for this is that since the carrier frequency is so much higher than the doppler frequency, the true graph of the received wave would not be noticeably different than the transmitted one. It is easier to plot a realistic graph of the demodulated wave which you can see in the plot titles "samples of the demodulated pulse".

lowdanie··on How Radar Works
Thanks a lot for the comment - you are absolutely right.