• 'on_surface' function places molecules onto a surface, defined by the convex hull of its atomic positions. The molecule's orientation is controlled by two indices: adsorbant_idx and tail_idx (n1 and n2 in Figure ). The n1 atom is adsorbed directly onto the substrate, and the molecule is oriented so the vector between n1 and n2 is perpendicular to the convex hull facet at the adsorption site.