6

ProteinData["A2M", "MoleculePlot"] gives you a Graphics3D object below.

I'd like to display multiple of these proteins in a single Graphics3D scene. Is there a way to place the Graphics3D object returned by ProteinData[...] at a specific location and orientation in another 3D scene?

Alternatively, is there a ProteinData API that (I'm somehow missing and) would give me an object that I could place (rotated and translated) in a new Graphics3D scene?

protein display

J. M.'s missing motivation
  • 124,525
  • 11
  • 401
  • 574
rjkaplan
  • 1,083
  • 1
  • 8
  • 15

1 Answers1

5

Take a look to the documentation page of Translate > NeatExamples. This example involves also Rotate.

In order to use it on "MoleculePlot" you have to extract the Graphics' first part (primitives), transform them and wrap with Graphics3D again:

p1 = ProteinData["A2M", "MoleculePlot"];
p2 = ProteinData["SERPINA1", "MoleculePlot"];

Show[
     p1,
     Graphics3D @ Translate[
        Rotate[First[p2], Pi/8, {1, 1, 0}], 
        {5, 5, 5}
     ]
    ]

enter image description here

J. M.'s missing motivation
  • 124,525
  • 11
  • 401
  • 574
Kuba
  • 136,707
  • 13
  • 279
  • 740