Although more researches are required for details, chemical reaction plays an important role in evolutions of Earth's environment and even in the origin of life. For example, in 20th century, Oparin and Haldane suggested that life was evolved from simple molecules. In laboratory experiment, Miller synthesized amino acids from methane, hydrogen, ammonia and water, which is known as Miller-Urey experiment. Even now, the relationship between chemical evolution and life is the hot topic (e.g., the state of primordial Earth's atmosphere and the place where amino acids were synthesized).
As the simulation of chemical evolutions and the application to ELSI's ongoing art project (Creators Meet Scientists project), magnetic balls (sold as toy) covered with thermoplastic (Oyumaru), which was used to weaken the magnetic force between the balls, were put in water flow. Because the pump was set at the left side of the tank, connections of the magnetic balls are broken at the left side by getting energy of water flow. On the other hand, flow is relatively weak at the right side, and thus the balls aggregate by magnetic force.
Of course, there are many differences between molecules and the magnetic balls, and this simulation is oversimplified. However, chemical evolution also proceeds by segregation due to getting large energy such as high temperature and by aggregation into stable state due to chemical force.