Another molecule-related simulation I had always wanted to do was to simulate the so-called "nanocar" rolling on gold foil, as described in the paper from James M. Tour's research group at Rice University. It took a bit of work to perform the necessary coordinate manipulations.
It was easier to build the nanocar in ChemDraw/Chem3D, so I did the construction there and imported the result into Mathematica as a Molecule:
nanocar=Molecule
Formula:
C
430
H
274
O
12
Atoms: 716 Bonds: 847
;
Let’s take a quick look:
MoleculePlot3D[nanocar,AtomLabels->Placed["AtomIndex",Tooltip]]
To make the animation, I first needed to locate the four single bonds attaching the buckyball “wheels” to the nanocar’s body. A look at the atom indices gives the following:
blist={{61,31},{139,109},{215,185},{293,263}};
Although MoleculeModify does have “SetTorsionAngle”, it was not suitable for the current situation, so I rolled my own bond rotation function:
bondRotate[mol_?MoleculeQ,{b1_Integer,b2_Integer},th_?RealValuedNumericQ]:=Module[{coords,p0,sel},​​sel=First[Select[ConnectedComponents[EdgeDelete[MoleculeGraph[mol,GraphLayout->None],UndirectedEdge[b1,b2]]],MemberQ[b2]]];​​coords=MoleculeValue[mol,"AtomCoordinates",TargetUnits->None];​​p0=coords[[b1]];​​Molecule[mol,AtomCoordinates->ReplacePart[coords,Thread[sel->RotationTransform[th,coords[[b2]]-p0,p0][coords[[sel]]]]]]]
For efficiency, we precompute the frames of the animation, before displaying them. Here, I use a very thin Cuboid with somewhat arbitrarily-adjusted directives* to play the role of the gold foil:
frames=TableShow
gold foil
,MoleculePlot3DMoleculeModifyFold[bondRotate[#1,#2,θ]&,nanocar,blist],"TransformAtomCoordinates",TranslationTransform
0.
Å
,
3.45θ
Å
,
0.
Å
,Background->RGBColor["#002B36"],ImageSize->Large,{θ,0,2π,2π/20};
ListAnimate[frames,AnimationRunning->False]
Et Voilà !
Tour’s research group has also made a "nanodragster" where two of the buckyball wheels were replaced with p-carboranes; simulating that, I’ll leave for someone else to do.
(* - I suppose should note here that I did try to use MaterialShading[“Gold”] to render the gold foil, but that presented a bunch of rendering problems, so I had to reluctantly abandon the approach. You can try making the replacement to see for yourself.)

CITE THIS NOTEBOOK

Go, Nanocar, Go!: rolling simulation of car-shaped molecule on gold foil​
by J. M.​
Wolfram Community, STAFF PICKS, December 27, 2023
​https://community.wolfram.com/groups/-/m/t/3092002