# Adding text on an .xyz file of an atom

I know it is possible to view .xyz files of coordinates in Mathematica. I tried to write some text on a specific atom using Text, but I was not successful. How can i do that? Thanks for the help in advance.

## 1 Answer

Text should work. For example

{g, n, p} = Import["ExampleData/caffeine.xyz",
{{"Graphics3D", "VertexTypes", "VertexCoordinates"}}];

Show[g, Graphics3D[MapThread[Text, {n, p}]]]


• OP can also style the text: MapThread[Style[Text[##], 12, Bold, White] &, {n, p}] – Bob Hanlon Dec 19 '15 at 21:31