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?
Answer
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}
]
]
Comments
Post a Comment