Simulation
Running simple simulations using Molecular Nodes
Inside of Geometry Nodes, we can run simulations using the Simulation Zone. In the most simple form, a simulation is just doing something with data from a previous iteration of the data. The easiest example of this is moving the positions of some points, building on top of the previous positions of the point from earlier time points.
What is a simulation?
The approach taken in Molecular Nodes is to include several “lower-level” nodes that can run simulations in a more generic way. Simulations are still to be considered experimental, and the nodes will likely change in the future.
As simulations are improved more generally inside of Geometry Nodes, these nodes will also be updated and improved.
Because the nodes are likely to change in the future the documenation is not exhaustive, but these examples should be enough to get you started and explain some of how the system works.
Simulate Elastic Network
This node simulates the edges of a mesh. It’s intended for simulating an elastic network, but any mesh that is passed in will be simulated. By default the starting length of the edges be used as the rest length and the simulation will attempt to keep the edges at that length.
In the below examble, we create an elastic network between the alpha carbons of a protein structure, then use the node to simulate the network. This can then be styled using the Style Ribbon node, which only requires the alpha carbons of a structure to work.
Changing the Alpha Carbon
value for the Build Elastic Network node increases the search distance. More edges are created leading to more structural stability, but also more computational cost.
All-atom Simulation
We can create an elastic network that includes all atoms by selecting the All Atom
enum for the Build Elastic Network node. The Alpha Carbon
input will still be used for building a network between the alpha carbons for overall structure stability, but the All Atom
input will be used for building a shorter-range network between all atoms.
We can’t just use the Style Ball and Stick node because the edges are now between all of the atoms. Instead, we can sample the positions from the resulting simulation using the Sample Position node update the positions of our starting atoms using the Set Position node. Then we can style accordingly.
Simulate Curve
This is the simplest simulation nodes, which simulates any Curve geometry that it is given, attempting to maintain the length between points of the curve and also handling point collisions.
The simplest inputs for this simulation are Points
which indicate how many points on the curve before and after this current point to check when trying to maintain length, and also the Straightness
which is a value between 0 and 1 that determines how straight the curve should be.
Simulate on Faces
This node simulates points with collisions, while also ensuring they remain attached to the faces of a mesh. It’s intended for simulating membranes or something similar, where points need to collide side to side, but you can input and shape mesh and it will ensure the points stay attached to it.
Node Inputs
Substeps
The number of substeps that are simulated for each frame that Blender advances. Usually the higher this number the more accurate the simulation is, but this currently isn’t always the case.
Forces
Forces inside of the simulation are a Vector
field that is evaluated on the Point
domain. You can chain multiple forces together by using a Vector Math node to just add the outputs, or by puting the Force
output of one node into the Add
input of the next node in the chain.

Hook & Pin
Sometimes we don’t want points to be simulated, and instead we want to manually specify their positions. This is done via the Hook
and Pin
inputs. Pin
will stop the point from simulating at all and ensure that the points is always exactly at the Target
input. This will default to whatever the current position of the point is inside of the simulation when Selection
is set to true. To get an updating position, you can use the Sample Position node to sample the position of a point in the simulation and then use that as the Target
input.
For the Hook
inputs, it will move the point to the Target
over a certain amount of time, essentially exerting a force but one that is more stable. The higher the Decay
value the quicker the rate of movement.
