6
$\begingroup$

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

$\endgroup$
5
$\begingroup$

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

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.